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 #include #include +#include /* 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; +}