Attention is currently required from: Arthur Heymans, Christian Walter, Jincheng Li, Johnny Lin, Lean Sheng Tan, Patrick Rudolph, Tim Chu.
Hello Johnny Lin, Jincheng Li,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/81317?usp=email
to review the following change.
Change subject: soc/intel/xeon_sp/gnr: Use OCP_VPD drivers ......................................................................
soc/intel/xeon_sp/gnr: Use OCP_VPD drivers
Use OCP_VPD driver provided functions to get VPD value.
Change-Id: Ifeca8cf4312ab66ca03188fe25af88a952073130 Signed-off-by: Johnny Lin johnny_lin@wiwynn.com Signed-off-by: Jincheng Li jincheng.li@intel.com --- M src/soc/intel/xeon_sp/gnr/Kconfig M src/soc/intel/xeon_sp/gnr/chip.h M src/soc/intel/xeon_sp/gnr/romstage.c 3 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/81317/1
diff --git a/src/soc/intel/xeon_sp/gnr/Kconfig b/src/soc/intel/xeon_sp/gnr/Kconfig index a709fcc..1945be7 100644 --- a/src/soc/intel/xeon_sp/gnr/Kconfig +++ b/src/soc/intel/xeon_sp/gnr/Kconfig @@ -16,6 +16,7 @@ select HAVE_IOAT_DOMAINS select FSP_SPEC_VIOLATION_XEON_SP_HEAP_WORKAROUND select VPD + select OCP_VPD help Intel GraniteRapids support
diff --git a/src/soc/intel/xeon_sp/gnr/chip.h b/src/soc/intel/xeon_sp/gnr/chip.h index b3cfeb5..52c01bf 100644 --- a/src/soc/intel/xeon_sp/gnr/chip.h +++ b/src/soc/intel/xeon_sp/gnr/chip.h @@ -16,7 +16,6 @@ uint8_t vtd_support; uint8_t x2apic; uint8_t debug_print_level; - uint8_t serial_debug_msg_lvl; uint16_t serial_io_uart_debug_io_base;
/* Generic IO decode ranges */ diff --git a/src/soc/intel/xeon_sp/gnr/romstage.c b/src/soc/intel/xeon_sp/gnr/romstage.c index 759c38d..bd3289a 100644 --- a/src/soc/intel/xeon_sp/gnr/romstage.c +++ b/src/soc/intel/xeon_sp/gnr/romstage.c @@ -4,6 +4,7 @@ #include <arch/romstage.h> #include <console/console.h> #include <cbmem.h> +#include <drivers/ocp/include/vpd.h> #include <fsp/api.h> #include <fsp/util.h> #include <MemoryMapDataHob.h> @@ -71,12 +72,13 @@ /* FSP_LOG */ const config_t *config = config_of_soc(); m_cfg->DebugPrintLevel = config->debug_print_level; - m_cfg->serialDebugMsgLvl = config->serial_debug_msg_lvl; + m_cfg->serialDebugMsgLvl = get_int_from_vpd_range(FSP_MEM_LOG_LEVEL, + FSP_MEM_LOG_LEVEL_DEFAULT, 0, 4); + m_cfg->SerialIoUartDebugEnable = get_bool_from_vpd(FSP_LOG, FSP_LOG_DEFAULT); m_cfg->SerialIoUartDebugIoBase = config->serial_io_uart_debug_io_base;
/* FAST_BOOT_EN */ - uint8_t val = FAST_BOOT_EN_DEFAULT; - vpd_get_bool(FAST_BOOT_EN, VPD_RW_THEN_RO, &val); + bool val = get_bool_from_vpd(FAST_BOOT_EN, FAST_BOOT_EN_DEFAULT); m_cfg->AttemptFastBoot = val; m_cfg->AttemptFastBootCold = val;