haiku/headers/private/kernel/arch/arm
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
..
arch_atomic.h arm/atomics: Move cpu-specific memory barriers to arch_cpu 2019-06-20 20:20:03 +00:00
arch_cpu.h s/Haiku License/MIT License/g. 2019-08-30 18:16:02 -04:00
arch_debug.h * Changed arch_debug_save_registers() to take an arch-specific structure 2010-03-18 17:20:06 +00:00
arch_int.h ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
arch_kernel_args.h kernel/arm: add range checking for early page tables 2022-01-27 16:29:48 +00:00
arch_kernel.h system/boot: More cleanup and shuffling 2020-02-22 14:37:45 +00:00
arch_system_info.h ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
arch_thread_types.h kernel/arm: implement entering userspace 2022-03-02 22:38:25 +00:00
arch_thread.h ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
arch_uart_8250_omap.h kernel/arch/arm: enable 8250 generic and OMAP UART drivers 2021-12-02 08:16:31 +00:00
arch_uart_pl011.h system/kernel: Rework uart management 2021-08-20 03:03:25 +00:00
arch_user_debugger.h ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
arch_vm_translation_map.h s/OpenBeOS License/MIT License/ universally, as they're the same thing. 2017-02-09 22:09:56 -05:00
arch_vm_types.h [GSoC] [ARM] Patch by Johannes Wischert. 2009-07-27 16:23:08 +00:00
arch_vm.h ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
arm920t.h * Remove PXA270 code from Freerunner header file 2010-10-22 17:31:04 +00:00
arm_mmu.h kernel/arm: implement memory attributes 2022-04-23 12:52:59 +00:00
bcm283X.h arm: Prevent bcm283X inclusion from breaking other boards 2015-04-04 17:44:32 -05:00
omap3.h Fix stack alignment for bootloader. 2014-09-02 17:01:27 +02:00
pxa270.h Guard header for use by assembler code 2014-07-23 13:27:23 +02:00
reg.h [GSoC] [ARM] Patch by Johannes Wischert. 2009-07-27 16:23:08 +00:00