summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorAlexandru Gagniuc <alexandrux.gagniuc@intel.com>2016-03-03 13:16:36 -0800
committerAaron Durbin <adurbin@chromium.org>2016-04-08 18:11:07 +0200
commit0a4b47ee2d5fabec468aebbfbd0f27dc50ebf231 (patch)
tree5f4476ba93c2019ac88f26f19c387c907fe2bc6d /src/soc
parent922064162bb4695a276bd46ba0a928e94825ac8b (diff)
downloadcoreboot-0a4b47ee2d5fabec468aebbfbd0f27dc50ebf231.tar.xz
soc/intel/apollolake: Override default to_flash_offset implementation
The default nvm_mmio_to_flash_offset() implementation used by NVM code in intel/common does not work on apollolake. As a result, provide the correct override. Change-Id: I01a94f90dfdd33586a4aac5c05dd8c73e8804437 Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com> Signed-off-by: Andrey Petrov <andrey.petrov@intel.com> Reviewed-on: https://review.coreboot.org/14248 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/apollolake/mmap_boot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/mmap_boot.c b/src/soc/intel/apollolake/mmap_boot.c
index 36259243f4..a618d4a1d9 100644
--- a/src/soc/intel/apollolake/mmap_boot.c
+++ b/src/soc/intel/apollolake/mmap_boot.c
@@ -16,6 +16,7 @@
#include <commonlib/region.h>
#include <console/console.h>
#include <fmap.h>
+#include <soc/intel/common/nvm.h>
/* The 128 KiB right below 4G are decoded by readonly SRAM, not boot media */
#define IFD_BIOS_MAX_MAPPED (CONFIG_IFD_BIOS_END - 128 * KiB)
@@ -72,3 +73,10 @@ const struct cbfs_locator cbfs_master_header_locator = {
.name = "IAFW Locator",
.locate = iafw_boot_region_properties,
};
+
+uint32_t nvm_mmio_to_flash_offset(void *p)
+{
+ uintptr_t xlate_base;
+ xlate_base = VIRTUAL_ROM_BASE;
+ return (uintptr_t)p - xlate_base + CONFIG_IFD_BIOS_START;
+}