summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2018-06-06 10:35:45 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-08-13 12:29:23 +0000
commit8da2fa06f87484ac1861d8f7985621287f4a38b2 (patch)
tree6d6f855ab6303518de13b7ac95729cfa79e5428c
parentafa5ec8d5fb7f26bdc27d52d696c0f912caa7acf (diff)
downloadcoreboot-8da2fa06f87484ac1861d8f7985621287f4a38b2.tar.xz
nb/intel/haswell: Always locate mrc.bin in the COREBOOT fmap region
This binary needs to be at a specific offset and will therefore always be located in the COREBOOT fmap region. This is needed when VBOOT_SEPARATE_VERSTAGE is selected. Change-Id: Ia73d468ab23932f92331ef40b8e8066cef55af2c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/26883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/northbridge/intel/haswell/raminit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/northbridge/intel/haswell/raminit.c b/src/northbridge/intel/haswell/raminit.c
index 55a7339d4e..21767b9416 100644
--- a/src/northbridge/intel/haswell/raminit.c
+++ b/src/northbridge/intel/haswell/raminit.c
@@ -120,6 +120,8 @@ static void report_memory_config(void)
void sdram_initialize(struct pei_data *pei_data)
{
unsigned long entry;
+ uint32_t type = CBFS_TYPE_MRC;
+ struct cbfsf f;
printk(BIOS_DEBUG, "Starting UEFI PEI System Agent\n");
@@ -142,9 +144,15 @@ void sdram_initialize(struct pei_data *pei_data)
/* Pass console handler in pei_data */
pei_data->tx_byte = do_putchar;
- /* Locate and call UEFI System Agent binary. */
- entry = (unsigned long)cbfs_boot_map_with_leak("mrc.bin",
- CBFS_TYPE_MRC, NULL);
+ /*
+ * Locate and call UEFI System Agent binary. The binary needs to be at
+ * a fixed offset in the flash and can therefore only reside in the
+ * COREBOOT fmap region
+ */
+ if (cbfs_locate_file_in_region(&f, "COREBOOT", "mrc.bin", &type) < 0)
+ die("mrc.bin not found!");
+ /* We don't care about leaking the mapping */
+ entry = (unsigned long)rdev_mmap_full(&f.data);
if (entry) {
int rv;
asm volatile (