diff options
author | Simon Glass <sjg@chromium.org> | 2019-09-25 08:11:41 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-10-08 13:57:36 +0800 |
commit | c3863eadbc60d21b234ac5fb15c525b3cbc4f637 (patch) | |
tree | 0df7f52a65fb77d8515981bb83b0ae282e2fe1e8 /arch/x86/lib | |
parent | 12c81b2f4196ed7eb9f2d7d377b34280b1ca26c1 (diff) | |
download | u-boot-c3863eadbc60d21b234ac5fb15c525b3cbc4f637.tar.gz |
x86: fsp: Save usable RAM and hob_list in the handoff area
The useable RAM is calculated when the RAM is inited. Save this value so
that it can be easily used in U-Boot proper.
Also save a pointer to the hob list so that it is accessible (before
relocation only) in U-Boot proper. This avoids having to scan it in SPL,
for everything U-Boot proper might need later.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: guard handoff_arch_save() with IS_ENABLED(CONFIG_USE_HOB)]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/fsp/fsp_dram.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/lib/fsp/fsp_dram.c b/arch/x86/lib/fsp/fsp_dram.c index 8fe1e0bf73..2d1023068f 100644 --- a/arch/x86/lib/fsp/fsp_dram.c +++ b/arch/x86/lib/fsp/fsp_dram.c @@ -88,3 +88,13 @@ unsigned int install_e820_map(unsigned int max_entries, return num_entries; } + +#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB) +int handoff_arch_save(struct spl_handoff *ho) +{ + ho->arch.usable_ram_top = fsp_get_usable_lowmem_top(gd->arch.hob_list); + ho->arch.hob_list = gd->arch.hob_list; + + return 0; +} +#endif |