summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Tretter <m.tretter@pengutronix.de>2020-10-21 16:51:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-10-22 09:30:49 +0200
commit92e123a3d66bff3f773f0c2b5eec4463aca34052 (patch)
tree19e612e83fe9162a91b89914d236514276488677 /lib
parent7ef4cf1a432257f99bee06232929e76292de47ae (diff)
downloadbarebox-92e123a3d66bff3f773f0c2b5eec4463aca34052.tar.gz
barebox-92e123a3d66bff3f773f0c2b5eec4463aca34052.tar.xz
ARM: mmu64: allow to disable null pointer trap on zero page
Barebox uses the zero page to trap NULL pointer dereferences. However, if the SDRAM starts at address 0x0, this makes the first page of the SDRAM inaccessible and makes it impossible to load images to offset 0x0 in the SDRAM. Trapping NULL pointer dereferences on such systems is still desirable. Therefore, add a function to disable the traps if accessing the zero page is necessary and to re-enable the traps after the access is done. The zero_page_memcpy function simplifies copying to the SDRAM, because this is the most common required functionality, but memtest also accesses the zero page and does not use memcpy. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 887f50ff00..e5831ecdb9 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -182,6 +182,9 @@ config ARCH_HAS_STACK_DUMP
config ARCH_HAS_DATA_ABORT_MASK
bool
+config ARCH_HAS_ZERO_PAGE
+ bool
+
config HAVE_EFFICIENT_UNALIGNED_ACCESS
bool