diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-15 18:00:23 +1300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-27 15:04:29 +1300 |
commit | e7bae8283fea94cf470542916a063182c9e5771a (patch) | |
tree | f6b0fe28d2ff03e1ec7472f23482dbb4ed320478 /arch/x86/include | |
parent | 1058ab37f7176370e835d53299c2ae44437925e3 (diff) | |
download | u-boot-e7bae8283fea94cf470542916a063182c9e5771a.zip u-boot-e7bae8283fea94cf470542916a063182c9e5771a.tar.gz u-boot-e7bae8283fea94cf470542916a063182c9e5771a.tar.bz2 |
x86: Allow installing an e820 when booting from coreboot
Move this code into a generic location so that it can be used by other x86
boards which want to boot from coreboot. Also ensure that this is called
if booting from coreboot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/e820.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index a66c0d2..850a0a7 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h @@ -22,9 +22,23 @@ struct e820_entry { #define ISA_START_ADDRESS 0xa0000 #define ISA_END_ADDRESS 0x100000 -/* Implementation defined function to install an e820 map */ +/* Implementation-defined function to install an e820 map */ unsigned int install_e820_map(unsigned int max_entries, struct e820_entry *); + +/** + * cb_install_e820_map() - Install e820 map provided by coreboot sysinfo + * + * This should be used when booting from coreboot, since in that case the + * memory areas are provided by coreboot in its sysinfo. + * + * @max_entries: Maximum number of entries to write + * @entries: Place to put entires + * @return number of entries written + */ +unsigned int cb_install_e820_map(unsigned int max_entries, + struct e820_entry *entries); + #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_E820_H */ |