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>
This commit is contained in:
Arthur Heymans 2018-06-06 10:35:45 +02:00 committed by Patrick Georgi
parent afa5ec8d5f
commit 8da2fa06f8
1 changed files with 11 additions and 3 deletions

View File

@ -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 (