soc/intel/common: remove mrc cache assumptions
Update the mrc cache implementation to use region_file. Instead of relying on memory-mapped access and pointer arithmetic use the region_devices and region_file to obtain the latest data associated with the region. This removes the need for the nvm wrapper as the region_devices can be used directly. Thus, the library is more generic and can be extended to work on different boot mediums. BUG=chrome-os-partner:56151 Change-Id: Ic14e2d2f7339e50256b4a3a297fc33991861ca44 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/17717 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
@ -23,7 +23,6 @@
|
||||
#include <console/console.h>
|
||||
#include <fmap.h>
|
||||
#include <soc/flash_ctrlr.h>
|
||||
#include <soc/intel/common/nvm.h>
|
||||
#include <soc/mmap_boot.h>
|
||||
|
||||
/*
|
||||
@ -148,22 +147,6 @@ const struct cbfs_locator cbfs_master_header_locator = {
|
||||
.locate = iafw_boot_region_properties,
|
||||
};
|
||||
|
||||
uint32_t nvm_mmio_to_flash_offset(void *p)
|
||||
{
|
||||
bios_mmap_init();
|
||||
|
||||
size_t start, size;
|
||||
start = car_get_var(bios_start);
|
||||
size = car_get_var(bios_size);
|
||||
|
||||
/*
|
||||
* Returns :
|
||||
* addr - base of mmaped region in addr space + offset of mmaped region
|
||||
* start on flash
|
||||
*/
|
||||
return (uintptr_t)p - (4ULL * GiB - size) + start;
|
||||
}
|
||||
|
||||
size_t get_bios_size(void)
|
||||
{
|
||||
bios_mmap_init();
|
||||
|
Reference in New Issue
Block a user