armv7: Add fine-grained page table support

Hardware / Coreboot - Julius Werner [chromium.org] - 8 April 2015 01:48 UTC

This patch adds an mmu_config_range_kb() function, which can set memory types at the 4KB level by chaining a fine-grained page table to an existing superpage entry. It is only intended for special cases where this level of precision is really necessary and therefore comes with a few practical limitations (the area for each invocation must be confined within a single superpage, and you are not allowed to remap the same region with mmu_config_range() again later). Since the fine-grained page tables need some space, boards intending to use this feature must define a TTB_SUBTABLES() region in their memlayout.ld.

BUG=chrome-os-partner:32848 TEST=Booted both Veyron_Pinky (normal) and Nyan_Blaze (LPAE), ensured that they still work. Checksummed the page tables with and without this patch, confirmed that they end up equal. Hacked in some subtable test entries, hexdumped all tables and manually confirmed that they look as expected.

Change-Id: I8c3eb7c2eb9c82e2abc5f2c0dda91f5b2eee7023

108548a armv7: Add fine-grained page table support
src/arch/arm/armv7/mmu.c | 188 ++++++++++++++++++++-----------
src/arch/arm/include/arch/memlayout.h | 5 +
src/arch/arm/include/armv4/arch/cache.h | 19 ----
src/arch/arm/include/armv7/arch/cache.h | 11 +-
src/include/symbols.h | 4 +
5 files changed, 140 insertions(+), 87 deletions(-)

Upstream: review.coreboot.org


  • Share