haiku/headers/private/kernel/arch
David Karoly 745a40d78a kernel/arm: implement memory attributes
Set AP[2:0] and XN flags based on page attributes.
PXN is not implemented as it seems to be available only
in L1 descriptors on ARMv7.

Set TEX, B, C flags based on memoryType:
* B_MTR_UC is mapped to Strongly Ordered (TEX=0, B=0, C=0)
* B_MTR_WC is mapped to Shareable Device Memory (TEX=0, B=1, C=0)
* B_MTR_WT is mapped to Outer and Inner Write-Through, no Write-Allocate (TEX=0, B=0, C=1)
* B_MTR_WB is mapped to Outer and Inner Write-Back, no Write-Allocate (TEx=0, B=1, C=1)
* B_MTR_WP has no direct equivalent on the ARM so it's mapped as B_MTR_WB
* default is Write-Back

Implement ARMPagingMethod32Bit::AttributesToPageTableEntryFlags()
for mapping from page attributes to AP[2:0] and XN flags.

Implement ARMPagingMethod32Bit::PageTableEntryFlagsToAttributes()
for the reverse mapping used in Query() and QueryInterrupt()
i.e. recover page attributes from AP[2:0] and XN flags.

Implement ARMPagingMethod32Bit::MemoryTypeToPageTableEntryFlags()
fr mapping from memoryType to TEX, B, C flags.

Implement ARMVMTranslationMap32Bit::Protect() which used to be commented out.

Accessed and modified flags are not implemented yet, so no such
flags are returned from Query() and QueryInterrupt().

Also because of this, we just invalidate TLB on any call to Protect()
without checking whether the page has been accessed.

Change-Id: I027af5c02bd6218d9f92a58044aeb26373e1956b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5236
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-04-23 12:52:59 +00:00
..
alpha Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
arm kernel/arm: implement memory attributes 2022-04-23 12:52:59 +00:00
arm64 arm64: Enable DTB handling, Introduce LINFlex UART driver 2022-04-04 19:57:10 +00:00
generic system/uart: refactor debug_uart, fix arm uart 2021-09-06 20:37:14 +00:00
m68k Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
mipsel Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
ppc Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
riscv64 boot: rework 32-bit/64-bit kernel load base selection 2021-12-27 15:44:56 +00:00
sh4 Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
sparc Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
x86 kernel/x86: add ability to set GS segment base from userland 2022-03-09 18:28:00 +00:00
atomic.h kernel: No need for arch specific ifdefs in arch/atomic.h 2014-01-20 04:09:17 +01:00
cpu.h kernel: add generic wrapper for accessing user memory 2014-09-14 22:39:07 +02:00
debug_console.h
debug.h
elf.h system: Build using public elf.h header 2015-11-07 11:49:56 +13:00
int.h kernel/int: Allow arch_int_assign_to_cpu to make its own decisions. 2021-12-03 22:36:47 +00:00
platform.h
real_time_clock.h
smp.h x86: Make arch/smp.h a C++ only header 2013-12-20 22:05:26 +01:00
system_info.h kernel/cpu: add cpu_frequency() 2020-09-15 20:42:14 +00:00
thread_types.h
thread.h Revert the rest of the COMPAT_MODE changes (back to hrev52003.) 2018-06-15 00:20:56 -04:00
timer.h Mass updating of OpenBeOS text to Haiku 2021-11-07 10:00:35 +00:00
user_debugger.h kernel: +arch_get_thread_debug_cpu_state() 2016-04-24 17:29:28 +02:00
user_memory.h kernel: riscv64 patches 2021-06-07 07:14:23 +00:00
vm_translation_map.h s/Haiku License/MIT License/g. 2019-08-30 18:16:02 -04:00
vm_types.h
vm.h