summaryrefslogtreecommitdiffstats
path: root/include/zero_page.h
Commit message (Collapse)AuthorAgeFilesLines
* ARM: mmu64: fix build for non-MMU configurationsAhmad Fatoum2021-03-151-1/+1
| | | | | | | | | | barebox only catches null pointer dereferences when MMU support is enabled. Thus the empty stubs should always be used on !CONFIG_MMU systems, disregarding whether CONFIG_ARCH_HAS_ZERO_PAGE is selected or not. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu64: allow to disable null pointer trap on zero pageMichael Tretter2020-10-221-0/+54
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>