diff options
author | Aaron Durbin <adurbin@chromium.org> | 2018-04-18 23:07:44 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2018-04-25 19:56:22 +0000 |
commit | a695a736b4b8a9549e3384b4ec66b148f547d16c (patch) | |
tree | 91e0b87b11f981bdbf3191b32e30708a919cf165 /src/soc/intel/apollolake/include | |
parent | f8744425537f09738a153c8368364070be559f20 (diff) |
soc/intel/apollake: add support for tracking memory details
It's going to be necessary to know the i/o hole size as well
the amount of memory configured in the sytsem. Therefore, add
two helper functions:
memory_in_system_in_mib()
iohole_in_mib()
Both return values in units of MiB.
BUG=b:72728953
Change-Id: I481ba517c37f769e76d9e12b3631f5f99b5427a9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25738
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/apollolake/include')
-rw-r--r-- | src/soc/intel/apollolake/include/soc/meminit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/include/soc/meminit.h b/src/soc/intel/apollolake/include/soc/meminit.h index 6b892fcdff..3b0b507ddd 100644 --- a/src/soc/intel/apollolake/include/soc/meminit.h +++ b/src/soc/intel/apollolake/include/soc/meminit.h @@ -132,4 +132,10 @@ void meminit_lpddr4_by_sku(FSP_M_CONFIG *cfg, const struct lpddr4_cfg *lpcfg, size_t sku_id); void save_lpddr4_dimm_info(const struct lpddr4_cfg *lpcfg, size_t mem_sku); +/* Retrieve the amount of memory configured in the system in MiB. It's only + * valid during romstage. */ +size_t memory_in_system_in_mib(void); +/* Retrieve the requested i/o hole in MiB. Only valid in romstage. */ +size_t iohole_in_mib(void); + #endif /* _SOC_APOLLOLAKE_MEMINIT_H_ */ |