From 70bb05715ad0fa8edecb2185e1c1373c76ee2128 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Mon, 13 Mar 2017 16:37:20 -0700 Subject: soc/intel/quark: Read the rmu.bin file from read-only region Always read the rmu.bin file from the read-only section of the SPI flash. Without this change vboot attempts to read this file from the A or B section of the flash. TEST=Build and run on Galileo Gen2 Change-Id: Ied8eaa2cd37645bf401aa957936943946bfd6182 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/18803 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/quark/romstage/fsp2_0.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/soc/intel/quark/romstage/fsp2_0.c') diff --git a/src/soc/intel/quark/romstage/fsp2_0.c b/src/soc/intel/quark/romstage/fsp2_0.c index 4d7f7c9479..d03545d759 100644 --- a/src/soc/intel/quark/romstage/fsp2_0.c +++ b/src/soc/intel/quark/romstage/fsp2_0.c @@ -15,7 +15,6 @@ #include #include -#include #include #include "../chip.h" #include @@ -92,17 +91,16 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *fspm_upd, uint32_t version) FSPM_ARCH_UPD *aupd; const struct device *dev; const struct soc_intel_quark_config *config; - char *rmu_file; - size_t rmu_file_len; + void *rmu_data; + size_t rmu_data_len; FSP_M_CONFIG *upd; /* Clear SMI and wake events */ clear_smi_and_wake_events(); /* Locate the RMU data file in flash */ - rmu_file = cbfs_boot_map_with_leak("rmu.bin", CBFS_TYPE_RAW, - &rmu_file_len); - if (!rmu_file) + rmu_data = locate_rmu_file(&rmu_data_len); + if (!rmu_data) die("Microcode file (rmu.bin) not found."); /* Locate the configuration data from devicetree.cb */ @@ -157,8 +155,8 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *fspm_upd, uint32_t version) upd->Flags = config->Flags; upd->FspReservedMemoryLength = config->FspReservedMemoryLength; upd->RankMask = config->RankMask; - upd->RmuBaseAddress = (uintptr_t)rmu_file; - upd->RmuLength = rmu_file_len; + upd->RmuBaseAddress = (uintptr_t)rmu_data; + upd->RmuLength = rmu_data_len; upd->SerialPortWriteChar = console_log_level(BIOS_SPEW) ? (uintptr_t)fsp_write_line : 0; upd->SmmTsegSize = IS_ENABLED(CONFIG_HAVE_SMI_HANDLER) ? -- cgit v1.2.3