aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/romstage.c
diff options
context:
space:
mode:
authorHannah Williams <hannah.williams@intel.com>2018-05-31 19:16:09 -0700
committerMartin Roth <martinroth@google.com>2018-06-03 16:06:46 +0000
commit067d38a7af16bd6ca3add8d806874571fa1151c1 (patch)
tree671a5625a9c8cab8600ea72407e493cc067528d7 /src/soc/intel/apollolake/romstage.c
parent22e6018b282c9422c9517632045301ce5fa652ec (diff)
soc/intel/apollolake: Add Page table mapping for System Memory
Since we do not know before hand the memory range initialized by FSP memory init until it completes and as memory gets accessed from within FSP memory init to migrate FSP from CAR to memory, we need to add this mapping in coreboot. Change-Id: I1ce2d489240e6e3686ceb7f6e824e5a94398d47e Signed-off-by: Hannah Williams <hannah.williams@intel.com> Reviewed-on: https://review.coreboot.org/26745 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/romstage.c')
-rw-r--r--src/soc/intel/apollolake/romstage.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c
index 4d6cb27420..5996124207 100644
--- a/src/soc/intel/apollolake/romstage.c
+++ b/src/soc/intel/apollolake/romstage.c
@@ -248,13 +248,6 @@ asmlinkage void car_stage_entry(void)
tseg_base = (uintptr_t)smm_base;
postcar_frame_add_mtrr(&pcf, tseg_base, smm_size, MTRR_TYPE_WRBACK);
- /* Ensure TSEG has mappings. */
- if (IS_ENABLED(CONFIG_PAGING_IN_CACHE_AS_RAM)) {
- if (paging_identity_map_addr(tseg_base, smm_size, PAT_WB))
- printk(BIOS_ERR, "Unable to map TSEG: %lx--%lx\n",
- tseg_base, tseg_base + smm_size);
- }
-
run_postcar_phase(&pcf);
}
@@ -343,40 +336,6 @@ static void parse_devicetree_setting(FSPM_UPD *m_upd)
#endif
}
-static void prepare_fspm_pages(void)
-{
- const size_t mib128 = 128 * MiB;
- uintptr_t base;
- /* All in units of MiB */
- size_t mem_sz;
- size_t iohole_sz;
- size_t low_mem_sz;
-
- mem_sz = memory_in_system_in_mib();
-
- if (!mem_sz) {
- printk(BIOS_ERR, "No memory in system! FSP will hang...\n");
- return;
- }
-
- iohole_sz = iohole_in_mib();
-
- /* Mark pages as WB where FSP will write. One region will be in cbmem,
- but it's not clear what else FSP is writing to. Try to make the best
- calculation. */
- low_mem_sz = 4 * (GiB / MiB) - iohole_sz;
-
- if (low_mem_sz > mem_sz)
- low_mem_sz = mem_sz;
-
- /* Assume all accesses are within 128MiB of the crude low memory
- calculation above. */
- base = low_mem_sz * MiB - mib128;
- if (paging_identity_map_addr(base, mib128, PAT_WB))
- printk(BIOS_ERR, "Unable to map %lx--%lx\n", base,
- base + mib128);
-}
-
void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
{
struct region_device rdev;
@@ -430,8 +389,6 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
car_set_var(fsp_version, version);
- if (IS_ENABLED(CONFIG_PAGING_IN_CACHE_AS_RAM))
- prepare_fspm_pages();
}
__weak