lib/fmap: Cache FMAP in cbmem
For platform independend exposure of FMAP through a kernel module cache the FMAP in CBMEM. In addition add a pointer in coreboot tables pointing to the introduced CBMEM area. To not waste the allocated DRAM, use the cached CBMEM in RAM enabled stages if possible. Tested on qemu using https://github.com/9elements/linux/commits/google_firmware_fmap2 Tested on QEMU and Supermicro X11SSH-TF. Change-Id: I4e01c573c3edfa34dbba5fe7604d4f6e18b584d5 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35377 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
committed by
Philipp Deppenwiese
parent
afa6a2de48
commit
6d787c2590
@@ -76,6 +76,7 @@
|
||||
#define CBMEM_ID_ROM1 0x524f4d31
|
||||
#define CBMEM_ID_ROM2 0x524f4d32
|
||||
#define CBMEM_ID_ROM3 0x524f4d33
|
||||
#define CBMEM_ID_FMAP 0x464d4150
|
||||
|
||||
#define CBMEM_ID_TO_NAME_TABLE \
|
||||
{ CBMEM_ID_ACPI, "ACPI " }, \
|
||||
@@ -134,5 +135,6 @@
|
||||
{ CBMEM_ID_ROM0, "VGA ROM #0 "}, \
|
||||
{ CBMEM_ID_ROM1, "VGA ROM #1 "}, \
|
||||
{ CBMEM_ID_ROM2, "VGA ROM #2 "}, \
|
||||
{ CBMEM_ID_ROM3, "VGA ROM #3 "},
|
||||
{ CBMEM_ID_ROM3, "VGA ROM #3 "}, \
|
||||
{ CBMEM_ID_FMAP, "FMAP "},
|
||||
#endif /* _CBMEM_ID_H_ */
|
||||
|
@@ -89,6 +89,7 @@ enum {
|
||||
LB_TAG_VBOOT_WORKBUF = 0x0034,
|
||||
LB_TAG_MMC_INFO = 0x0035,
|
||||
LB_TAG_TCPA_LOG = 0x0036,
|
||||
LB_TAG_FMAP = 0x0037,
|
||||
LB_TAG_CMOS_OPTION_TABLE = 0x00c8,
|
||||
LB_TAG_OPTION = 0x00c9,
|
||||
LB_TAG_OPTION_ENUM = 0x00ca,
|
||||
|
Reference in New Issue
Block a user