From 535846763825f9bc4531b9322b1b61f3973cd6f8 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Mon, 11 Jan 2021 16:44:06 -0800 Subject: prog_loaders: Remove prog_locate() This patch rewrites the last few users of prog_locate() to access CBFS APIs directly and removes the call. This eliminates the double-meaning of prog_rdev() (referring to both the boot medium where the program is stored before loading, and the memory area where it is loaded after) and makes sure that programs are always located and loaded in a single operation. This makes CBFS verification easier to implement and secure because it avoids leaking a raw rdev of unverified data outside the CBFS core code. Signed-off-by: Julius Werner Change-Id: I7a5525f66e1d5f3a632e8f6f0ed9e116e3cebfcf Reviewed-on: https://review.coreboot.org/c/coreboot/+/49337 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/drivers/intel/fsp1_1/include/fsp/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/drivers/intel/fsp1_1/include') diff --git a/src/drivers/intel/fsp1_1/include/fsp/util.h b/src/drivers/intel/fsp1_1/include/fsp/util.h index e67ecd16d0..e1fb59605a 100644 --- a/src/drivers/intel/fsp1_1/include/fsp/util.h +++ b/src/drivers/intel/fsp1_1/include/fsp/util.h @@ -40,10 +40,10 @@ static inline uint32_t fsp_version(FSP_INFO_HEADER *fih) /* * Relocate FSP entire binary into ram. Returns < 0 on error, 0 on success. - * The FSP source is pointed to by region_device and the relocation information + * The CBFS file name of the FSP source and the relocation information * is encoded in a struct prog with its entry point set to the FSP info header. */ -int fsp_relocate(struct prog *fsp_relocd, const struct region_device *fsp_src); +int fsp_relocate(struct prog *fsp_relocd); /* Additional HOB types not included in the FSP: * #define EFI_HOB_TYPE_HANDOFF 0x0001 -- cgit v1.2.3