From a386bf790ed393dadc449910bbc21b03010cf49c Mon Sep 17 00:00:00 2001 From: Deepa Dinamani Date: Wed, 18 Feb 2015 15:48:44 -0800 Subject: google/storm: enable zero page access protection. BRANCH=storm BUG=chrome-os-partner:24786 TEST=verified mmu.pagetable.list output for Storm: _______address___________|_physical________________|sec|_d_|_size____|_permissions____________________|_glb|_shr|_pageflags______________________| C:00000000--00000FFF| | | | | | | | | C:00001000--000FFFFF| A:00:00001000--000FFFFF| ns| 00| 00001000| P:readwrite U:readwrite notexec| yes| no | strongly ordered | C:00100000--29FFFFFF| A:00:00100000--29FFFFFF| ns| 00| 00100000| P:readwrite U:readwrite notexec| yes| no | strongly ordered | C:2A000000--2A05FFFF| A:00:2A000000--2A05FFFF| ns| 00| 00001000| P:readwrite U:readwrite exec | yes| no | write-back/no write alloc | C:2A060000--2A0FFFFF| A:00:2A060000--2A0FFFFF| ns| 00| 00001000| P:readwrite U:readwrite notexec| yes| no | strongly ordered | C:2A100000--3FFFFFFF| A:00:2A100000--3FFFFFFF| ns| 00| 00100000| P:readwrite U:readwrite notexec| yes| no | strongly ordered | C:40000000--59FFFFFF| A:00:40000000--59FFFFFF| ns| 00| 00100000| P:readwrite U:readwrite exec | yes| no | write-back/no write alloc | C:5A000000--5A1FFFFF| A:00:5A000000--5A1FFFFF| ns| 00| 00100000| P:readwrite U:readwrite notexec| yes| no | strongly ordered | C:5A200000--7FFFFFFF| A:00:5A200000--7FFFFFFF| ns| 00| 00100000| P:readwrite U:readwrite exec | yes| no | write-back/no write alloc | C:80000000--FFFFFFFF| | | | | | | | | Change-Id: I08a5094b2da9d67244c94984e2da14399e477b01 Signed-off-by: Patrick Georgi Original-Commit-Id: f137a589434b09055e6b9d32907e662e6c296502 Original-Change-Id: Ia2deab1cf8f08c4ba5a5b6dbe4c4ebf29c9df480 Original-Signed-off-by: Vikas Das Original-Reviewed-on: https://chromium-review.googlesource.com/253801 Original-Tested-by: Deepa Dinamani Original-Reviewed-by: Vadim Bendebury Original-Reviewed-by: Julius Werner Original-Commit-Queue: Deepa Dinamani Reviewed-on: http://review.coreboot.org/9920 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/storm/mmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mainboard/google/storm/mmu.c') diff --git a/src/mainboard/google/storm/mmu.c b/src/mainboard/google/storm/mmu.c index 47e3b09789..4d2e9a0123 100644 --- a/src/mainboard/google/storm/mmu.c +++ b/src/mainboard/google/storm/mmu.c @@ -51,8 +51,6 @@ void setup_mmu(enum dram_state dram) /* Map Device memory. */ mmu_config_range_kb(RPM_START, RPM_SIZE, DCACHE_OFF); - /* TODO: disable Page 0 for trapping NULL pointer references. */ - mmu_config_range_kb(SRAM_START, SRAM_END - SRAM_START, DCACHE_WRITEBACK); @@ -61,6 +59,9 @@ void setup_mmu(enum dram_state dram) mmu_disable_range(DRAM_END, 4096 - DRAM_END); + /* disable Page 0 for trapping NULL pointer references. */ + mmu_disable_range_kb(0, 1); + mmu_init(); dcache_mmu_enable(); -- cgit v1.2.3