diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-09-30 12:26:54 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-11-03 00:19:46 +0100 |
commit | 1ca2d864dd09788ab69f461074889bab57a92ae8 (patch) | |
tree | 2322173b00869e63e7d07a56b10064abd72d88d2 /src/include/cbmem.h | |
parent | 730a043fb6cb4dd3cb5af8f8640365727b598648 (diff) |
cbmem: add coreboot table records for each cbmem entry
In order to not expose the cbmem data structures to userland
that are used by coreboot internally add each of the cbmem
entries to a coreboot table record. The payload ABI uses
coreboot tables so this just provides a shortcut for cbmem
entries which were manually added previously by doing the
work on behalf of all entries.
A cursor structure and associated functions are added to
the imd code for walking the entries in order to be placed
in the coreboot tables. Additionally a struct lb_cbmem_entry
is added that lists the base address, size, and id of the
cbmem entry.
BUG=chrome-os-partner:43731
BRANCH=None
TEST=Booted glados. View coreboot table entries with cbmem.
Change-Id: I125940aa1898c3e99077ead0660eff8aa905b13b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11757
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/include/cbmem.h')
-rw-r--r-- | src/include/cbmem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 0825f2936f..efaa44f9c9 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -37,6 +37,7 @@ #ifndef __ASSEMBLER__ #include <stddef.h> #include <stdint.h> +#include <boot/coreboot_tables.h> struct cbmem_entry; @@ -114,12 +115,11 @@ typedef void (* const cbmem_init_hook_t)(int is_recovery); void cbmem_run_init_hooks(int is_recovery); void cbmem_fail_resume(void); -#ifndef __PRE_RAM__ /* Ramstage only functions. */ /* Add the cbmem memory used to the memory map at boot. */ void cbmem_add_bootmem(void); void cbmem_list(void); -#endif /* __PRE_RAM__ */ +void cbmem_add_records_to_cbtable(struct lb_header *header); #if ENV_RAMSTAGE #define ROMSTAGE_CBMEM_INIT_HOOK(init_fn_) static cbmem_init_hook_t \ |