From c714137d9519c12d2b951abf3c335fb1d6912029 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 12 Oct 2017 11:23:58 -0600 Subject: soc/intel/common: sanity check ebda signature It's possible for chipsets utilizing ebda to cache the cbmem_top() value to be called prior to the object being entirely setup. As such it's important to check the signature to ensure the object has been initialized. Do that in a newly introduced function, retrieve_ebda_object(), which will zero out the object if the signature doesn't match. Change-Id: I66b07c36f46ed9112bc39b44914c860ba68677ae Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/21995 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Matt DeVillier --- src/soc/intel/skylake/memmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/skylake') diff --git a/src/soc/intel/skylake/memmap.c b/src/soc/intel/skylake/memmap.c index 485b8c4cbb..eaf7d073ae 100644 --- a/src/soc/intel/skylake/memmap.c +++ b/src/soc/intel/skylake/memmap.c @@ -348,7 +348,7 @@ void *cbmem_top(void) if (sa_get_tseg_base() == 0) return NULL; - read_ebda_data(cfg, sizeof(*cfg)); + retrieve_ebda_object(cfg); return (void *)(uintptr_t)cfg->tolum_base; } -- cgit v1.2.3