summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohnny Lin <johnny_lin@wiwynn.com>2022-11-02 16:10:46 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-11-04 13:21:43 +0000
commit3bc9fbb496c7e1ae346c8d7e98d2bcabbbbe8673 (patch)
tree94b41ff46e41dca0f64ccc1b71cd566428406be6 /src
parent491f66ee5984201a2b0face10ce2373f2c7f8ace (diff)
soc/intel/xeon_sp/cpx: Add get_ewl_hob() utility function
Change-Id: I8f949e9c881099c3723fca056e2c4732ca8b64cf Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69144 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/xeon_sp/cpx/Makefile.inc2
-rw-r--r--src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h2
-rw-r--r--src/soc/intel/xeon_sp/cpx/soc_util.c14
3 files changed, 17 insertions, 1 deletions
diff --git a/src/soc/intel/xeon_sp/cpx/Makefile.inc b/src/soc/intel/xeon_sp/cpx/Makefile.inc
index 0cd267b712..7e18b923c0 100644
--- a/src/soc/intel/xeon_sp/cpx/Makefile.inc
+++ b/src/soc/intel/xeon_sp/cpx/Makefile.inc
@@ -5,7 +5,7 @@ ifeq ($(CONFIG_SOC_INTEL_COOPERLAKE_SP),y)
subdirs-y += ../../../../cpu/intel/turbo
subdirs-y += ../../../../cpu/intel/microcode
-romstage-y += romstage.c ddr.c
+romstage-y += romstage.c ddr.c soc_util.c
romstage-$(CONFIG_DISPLAY_UPD_DATA) += upd_display.c
romstage-$(CONFIG_DISPLAY_HOBS) += hob_display.c
diff --git a/src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h b/src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h
index 5ce392863c..c4e2a7d49e 100644
--- a/src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h
+++ b/src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h
@@ -5,11 +5,13 @@
#include <hob_iiouds.h>
#include <hob_memmap.h>
+#include <hob_enhancedwarningloglib.h>
const struct SystemMemoryMapHob *get_system_memory_map(void);
uint32_t get_socket_stack_busno(uint32_t socket, uint32_t stack);
int soc_get_stack_for_port(int port);
+const EWL_PRIVATE_DATA *get_ewl_hob(void);
#endif /* _SOC_UTIL_H_ */
diff --git a/src/soc/intel/xeon_sp/cpx/soc_util.c b/src/soc/intel/xeon_sp/cpx/soc_util.c
index cd1e06d290..2a8b6c94ec 100644
--- a/src/soc/intel/xeon_sp/cpx/soc_util.c
+++ b/src/soc/intel/xeon_sp/cpx/soc_util.c
@@ -9,6 +9,20 @@
#include <soc/soc_util.h>
#include <soc/util.h>
+const EWL_PRIVATE_DATA *get_ewl_hob(void)
+{
+ size_t hob_size;
+ static const EWL_PRIVATE_DATA *hob;
+ const uint8_t ewl_id_hob_guid[16] = FSP_HOB_EWLID_GUID;
+
+ if (hob != NULL)
+ return hob;
+
+ hob = fsp_find_extension_hob_by_guid(ewl_id_hob_guid, &hob_size);
+ assert(hob != NULL && hob_size != 0);
+ return hob;
+}
+
const struct SystemMemoryMapHob *get_system_memory_map(void)
{
size_t hob_size;