From 1ca2d864dd09788ab69f461074889bab57a92ae8 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 30 Sep 2015 12:26:54 -0500 Subject: 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 Reviewed-on: http://review.coreboot.org/11757 Reviewed-by: Alexandru Gagniuc Tested-by: build bot (Jenkins) --- src/commonlib/include/commonlib/coreboot_tables.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/commonlib/include') diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index 2ed4d7f277..5e0c87c99d 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -308,6 +308,19 @@ struct lb_boot_media_params { uint64_t boot_media_size; }; +/* + * There can be more than one of these records as there is one per cbmem entry. + */ +#define LB_TAG_CBMEM_ENTRY 0x0031 +struct lb_cbmem_entry { + uint32_t tag; + uint32_t size; + + uint64_t address; + uint32_t entry_size; + uint32_t id; +}; + #define LB_TAG_SERIALNO 0x002a #define MAX_SERIALNO_LENGTH 32 -- cgit v1.2.3