switch-coreboot/src
Julius Werner ba11d6fec1 armv7: Change all memory domains to Client so XN bits work
Remember the XN bit? The one we had so much fun with on Nyan (LPAE)
because not setting it allows random instruction prefetches to device
memory that hang the system every few thousand boots? Thankfully, we had
always been setting it in the non-LPAE MMU code already...

"When the XN bit is 1, a Permission fault is generated if the processor
attempts to execute an instruction fetched from the corresponding memory
region. However, when using the Short-descriptor translation table
format, the fault is generated only if the access is to memory in the
Client domain, see Domains[...]" - ARM A.R.M. section B3.7.2

Oops. This patch changes our Domain Access Control Register (DACR) to
set domain 0 (the only one we are using) to Client. This means that
access permissions (AP[2:0] bits) become enforced, but they are already
set to full access (0b011). It also means that non-LPAE systems will not
be allowed to execute from DCACHE_OFF memory with enabled MMU anymore.
As far as I can see, Veyron_Pinky has been the only board that does
that.

BUG=chrome-os-partner:32118
TEST=Booted Veyron_Pinky with MMU in the bootblock, saw hangs that look
like spurious prefetches and confirmed that this patch fixes them.

Change-Id: I81c00743f938924a5dc8825389fe512a069b77db
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: cbc96db296a41ae700371a8515a1179c142f58e7
Original-Change-Id: I30676a5bfe12d516e5f910f51ee6854f6e5be557
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/223783
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9343
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-08 09:27:36 +02:00
..
arch armv7: Change all memory domains to Client so XN bits work 2015-04-08 09:27:36 +02:00
console New mechanism to define SRAM/memory map with automatic bounds checking 2015-04-06 22:05:01 +02:00
cpu kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
device cbfs: correct types used for accessing files 2015-04-01 22:51:10 +02:00
drivers kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
ec kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
include armv7: Add fine-grained page table support 2015-04-08 08:48:06 +02:00
lib rmodule: remove cbmem_entry usage 2015-04-07 23:03:45 +02:00
mainboard tegra132: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:26:14 +02:00
northbridge kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
soc tegra132: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:26:14 +02:00
southbridge kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
superio kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
vendorcode cbfs: Enforce media->map() result checking, improve error messages 2015-04-07 23:02:18 +02:00
Kconfig kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00