From 6d787c2590920fc5ea222d692004818bbed6b3e5 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 12 Sep 2019 13:21:37 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/35377 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Arthur Heymans Reviewed-by: Julius Werner --- src/lib/coreboot_table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/coreboot_table.c') diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 66afcf353b..9c5942fa9d 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -345,7 +345,8 @@ static void add_cbmem_pointers(struct lb_header *header) {CBMEM_ID_ACPI_GNVS, LB_TAG_ACPI_GNVS}, {CBMEM_ID_VPD, LB_TAG_VPD}, {CBMEM_ID_WIFI_CALIBRATION, LB_TAG_WIFI_CALIBRATION}, - {CBMEM_ID_TCPA_LOG, LB_TAG_TCPA_LOG} + {CBMEM_ID_TCPA_LOG, LB_TAG_TCPA_LOG}, + {CBMEM_ID_FMAP, LB_TAG_FMAP}, }; int i; -- cgit v1.2.3