armv7: Add fine-grained page table support
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: Iedf7ca435ae337ead85115200d6987fb0d4828d7 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223781
This commit is contained in:
parent
92469e04c1
commit
2f13e60cf5
5 changed files with 140 additions and 87 deletions
|
|
@ -69,6 +69,10 @@ extern u8 _ttb[];
|
|||
extern u8 _ettb[];
|
||||
#define _ttb_size (_ettb - _ttb)
|
||||
|
||||
extern u8 _ttb_subtables[];
|
||||
extern u8 _ettb_subtables[];
|
||||
#define _ttb_subtables_size (_ettb_subtables - _ttb_subtables)
|
||||
|
||||
extern u8 _dma_coherent[];
|
||||
extern u8 _edma_coherent[];
|
||||
#define _dma_coherent_size (_edma_coherent - _dma_coherent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue