From 92e123a3d66bff3f773f0c2b5eec4463aca34052 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Wed, 21 Oct 2020 16:51:39 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- lib/Kconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3