From 02b43aa2e01772556a6b18a40677bb2438ba8327 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 12 Dec 2017 14:56:41 -0700 Subject: vc/amd/pi/0067F00: add option to add AGESA binary PI as stage Stage addition to CBFS allows relocation to happen on the fly. Take advantage of that by adding AGESA binary PI as a stage file so that each instance will be relocated properly within CBFS. Without this patch Chrome OS having multiple CBFS instances just redirects the AGESA calls back into RO which is inappropriate. BUG=b:65442265,b:68141063 TEST=Enabled AGESA_BINARY_PI_AS_STAGE and used ELF file. Booted and noted each instance in Chrome OS build was relocated. Change-Id: Ic0141bc6436a30f855148ff205f28ac9bce30043 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/22833 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Paul Menzel Reviewed-by: Marshall Dawson --- src/vendorcode/amd/pi/00670F00/Makefile.inc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/vendorcode/amd/pi/00670F00') diff --git a/src/vendorcode/amd/pi/00670F00/Makefile.inc b/src/vendorcode/amd/pi/00670F00/Makefile.inc index a5e644e78c..f1e340e751 100644 --- a/src/vendorcode/amd/pi/00670F00/Makefile.inc +++ b/src/vendorcode/amd/pi/00670F00/Makefile.inc @@ -125,7 +125,15 @@ ramstage-libs += $(agesa_output_path)/libagesa.a cbfs-files-$(CONFIG_CPU_AMD_AGESA_BINARY_PI) += $(CONFIG_AGESA_CBFS_NAME) $(CONFIG_AGESA_CBFS_NAME)-file := $(CONFIG_AGESA_BINARY_PI_FILE) +ifeq ($(CONFIG_AGESA_BINARY_PI_AS_STAGE),y) +$(CONFIG_AGESA_CBFS_NAME)-type := stage +$(CONFIG_AGESA_CBFS_NAME)-options := --xip +# 4KiB alignment to handle any interior alignment. Current AGESA only has +# 64 byte alignment. +$(CONFIG_AGESA_CBFS_NAME)-align := 4096 +else $(CONFIG_AGESA_CBFS_NAME)-type := raw $(CONFIG_AGESA_CBFS_NAME)-position := $(CONFIG_AGESA_BINARY_PI_LOCATION) +endif endif -- cgit v1.2.3