Attention is currently required from: Chen, Gang C.
Hello Chen, Gang C,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/80684?usp=email
to review the following change.
Change subject: soc/intel/xeon_sp: Add fsp_headers.h ......................................................................
soc/intel/xeon_sp: Add fsp_headers.h
FSP headers change across SoC generations. Add fsp_headers.h as the centralized placeholder to include these headers and related definitions for Xeon-SP common codes, thus to reduce this dependency.
TEST=intel/archercity CRB
Change-Id: I89a87ec72933484326cb594b83bb3ed39d06b85c Signed-off-by: Shuo Liu shuo.liu@intel.com Signed-off-by: Gang Chen gang.c.chen@intel.com --- M src/drivers/intel/fsp2_0/include/fsp/soc_binding.h M src/soc/intel/xeon_sp/Makefile.mk A src/soc/intel/xeon_sp/include/soc/fsp_headers.h A src/soc/intel/xeon_sp/include/soc/fsp_hob.h D src/soc/intel/xeon_sp/include/soc/fsp_upd.h M src/soc/intel/xeon_sp/include/soc/util.h M src/soc/intel/xeon_sp/spr/ioat.c M src/vendorcode/intel/fsp/fsp2_0/cooperlake_sp/hob_iiouds.h M src/vendorcode/intel/fsp/fsp2_0/sapphirerapids_sp/hob_iiouds.h 9 files changed, 66 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/80684/1
diff --git a/src/drivers/intel/fsp2_0/include/fsp/soc_binding.h b/src/drivers/intel/fsp2_0/include/fsp/soc_binding.h index ba3e289..5598c33 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/soc_binding.h +++ b/src/drivers/intel/fsp2_0/include/fsp/soc_binding.h @@ -40,6 +40,10 @@ #include <FspErrorInfoHob.h> #endif
+#if CONFIG(XEON_SP_COMMON_BASE) +#include <soc/fsp_headers.h> +#endif + #pragma pack(pop)
#endif diff --git a/src/soc/intel/xeon_sp/Makefile.mk b/src/soc/intel/xeon_sp/Makefile.mk index a732c78..db8ab5a 100644 --- a/src/soc/intel/xeon_sp/Makefile.mk +++ b/src/soc/intel/xeon_sp/Makefile.mk @@ -21,6 +21,5 @@ subdirs-$(CONFIG_SOC_INTEL_XEON_RAS) += ras
CPPFLAGS_common += -I$(src)/soc/intel/xeon_sp/include -CPPFLAGS_common += -include $(src)/soc/intel/xeon_sp/include/soc/fsp_upd.h
endif ## XEON_SP_COMMON_BASE diff --git a/src/soc/intel/xeon_sp/include/soc/fsp_headers.h b/src/soc/intel/xeon_sp/include/soc/fsp_headers.h new file mode 100644 index 0000000..20d80e4 --- /dev/null +++ b/src/soc/intel/xeon_sp/include/soc/fsp_headers.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _FSP_HEADERS_H_ +#define _FSP_HEADERS_H_ + +/* + * Intel FSPs of XEON server platforms define FSPX_CONFIG + * instead of FSP_X_CONFIG, which is expected by coreboot. + */ +#define FSP_T_CONFIG FSPT_CONFIG +#define FSP_M_CONFIG FSPM_CONFIG +#define FSP_S_CONFIG FSPS_CONFIG + + +#if CONFIG(PLATFORM_USES_FSP2_3) +#include <MemoryMapDataHob.h> +#include <IioUniversalDataHob.h> +#include <IioPcieConfigUpd.h> +#endif + +#if CONFIG(SOC_INTEL_COOPERLAKE_SP) +#include <hob_iiouds.h> +#endif + +#if CONFIG(SOC_INTEL_SAPPHIRERAPIDS_SP) +#include <CxlNodeHob.h> +#include <hob_iiouds.h> +#endif + +#endif diff --git a/src/soc/intel/xeon_sp/include/soc/fsp_hob.h b/src/soc/intel/xeon_sp/include/soc/fsp_hob.h new file mode 100644 index 0000000..20d80e4 --- /dev/null +++ b/src/soc/intel/xeon_sp/include/soc/fsp_hob.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _FSP_HEADERS_H_ +#define _FSP_HEADERS_H_ + +/* + * Intel FSPs of XEON server platforms define FSPX_CONFIG + * instead of FSP_X_CONFIG, which is expected by coreboot. + */ +#define FSP_T_CONFIG FSPT_CONFIG +#define FSP_M_CONFIG FSPM_CONFIG +#define FSP_S_CONFIG FSPS_CONFIG + + +#if CONFIG(PLATFORM_USES_FSP2_3) +#include <MemoryMapDataHob.h> +#include <IioUniversalDataHob.h> +#include <IioPcieConfigUpd.h> +#endif + +#if CONFIG(SOC_INTEL_COOPERLAKE_SP) +#include <hob_iiouds.h> +#endif + +#if CONFIG(SOC_INTEL_SAPPHIRERAPIDS_SP) +#include <CxlNodeHob.h> +#include <hob_iiouds.h> +#endif + +#endif diff --git a/src/soc/intel/xeon_sp/include/soc/fsp_upd.h b/src/soc/intel/xeon_sp/include/soc/fsp_upd.h deleted file mode 100644 index 15ce96f..0000000 --- a/src/soc/intel/xeon_sp/include/soc/fsp_upd.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#ifndef _FSP_UPD_H_ -#define _FSP_UPD_H_ - -/* - * Intel FSPs of XEON server platforms define FSPX_CONFIG - * instead of FSP_X_CONFIG, which is expected by coreboot. - */ -#define FSP_T_CONFIG FSPT_CONFIG -#define FSP_M_CONFIG FSPM_CONFIG -#define FSP_S_CONFIG FSPS_CONFIG - -#endif diff --git a/src/soc/intel/xeon_sp/include/soc/util.h b/src/soc/intel/xeon_sp/include/soc/util.h index 43bf9d6..10fb301 100644 --- a/src/soc/intel/xeon_sp/include/soc/util.h +++ b/src/soc/intel/xeon_sp/include/soc/util.h @@ -4,7 +4,7 @@ #define _XEON_SP_SOC_UTIL_H_
#include <cpu/x86/msr.h> -#include <hob_iiouds.h> +#include <fsp/util.h>
void lock_pam0123(void); void unlock_pam_regions(void); diff --git a/src/soc/intel/xeon_sp/spr/ioat.c b/src/soc/intel/xeon_sp/spr/ioat.c index 0d81d0d..e70666d 100644 --- a/src/soc/intel/xeon_sp/spr/ioat.c +++ b/src/soc/intel/xeon_sp/spr/ioat.c @@ -5,11 +5,7 @@ #include <console/console.h> #include <device/device.h> #include <device/resource.h> - -#include <defs_iio.h> -#include <hob_iiouds.h> -#include <IioPcieConfigUpd.h> - +#include <fsp/util.h> #include <soc/chip_common.h>
/* diff --git a/src/vendorcode/intel/fsp/fsp2_0/cooperlake_sp/hob_iiouds.h b/src/vendorcode/intel/fsp/fsp2_0/cooperlake_sp/hob_iiouds.h index c95a255..90abf7f 100644 --- a/src/vendorcode/intel/fsp/fsp2_0/cooperlake_sp/hob_iiouds.h +++ b/src/vendorcode/intel/fsp/fsp2_0/cooperlake_sp/hob_iiouds.h @@ -31,8 +31,6 @@ #ifndef _HOB_IIOUDS_H_ #define _HOB_IIOUDS_H_
-#include <fsp/util.h> - #define FSP_HOB_IIO_UNIVERSAL_DATA_GUID { \ 0xa1, 0x96, 0xf3, 0x7f, 0x7d, 0xee, 0x1e, 0x43, \ 0xba, 0x53, 0x8f, 0xCa, 0x12, 0x7c, 0x44, 0xc0 \ diff --git a/src/vendorcode/intel/fsp/fsp2_0/sapphirerapids_sp/hob_iiouds.h b/src/vendorcode/intel/fsp/fsp2_0/sapphirerapids_sp/hob_iiouds.h index 1a61c1d..1466353 100644 --- a/src/vendorcode/intel/fsp/fsp2_0/sapphirerapids_sp/hob_iiouds.h +++ b/src/vendorcode/intel/fsp/fsp2_0/sapphirerapids_sp/hob_iiouds.h @@ -31,8 +31,6 @@ #ifndef _HOB_IIOUDS_H_ #define _HOB_IIOUDS_H_
-#include <fsp/util.h> - #include "defs_iio.h" #include "IioUniversalDataHob.h"