745a40d78a
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> |
||
---|---|---|
.. | ||
arch | ||
boot | ||
disk_device_manager | ||
fs | ||
platform | ||
posix | ||
slab | ||
util | ||
vm | ||
AllocationTracking.h | ||
AreaKeeper.h | ||
block_cache.h | ||
boot_device.h | ||
boot_item.h | ||
boot_splash.h | ||
commpage_compat.h | ||
commpage.h | ||
condition_variable.h | ||
console.h | ||
core_dump.h | ||
cpu.h | ||
debug_heap.h | ||
debug_hex_dump.h | ||
debug_paranoia.h | ||
debug.h | ||
debugger_keymaps.h | ||
DPC.h | ||
elf_priv.h | ||
elf.h | ||
file_cache.h | ||
frame_buffer_console.h | ||
generic_syscall.h | ||
heap.h | ||
int.h | ||
kdevice_manager.h | ||
kdriver_settings.h | ||
kernel_c++_structs.h | ||
kernel_daemon.h | ||
kernel.h | ||
kimage.h | ||
kmodule.h | ||
kscheduler.h | ||
ksignal.h | ||
ksyscalls.h | ||
ksystem_info.h | ||
listeners.h | ||
load_tracking.h | ||
lock.h | ||
low_resource_manager.h | ||
messaging.h | ||
MessagingServiceDefs.h | ||
Notifications.h | ||
port.h | ||
real_time_clock.h | ||
safemode.h | ||
scheduling_analysis.h | ||
sem.h | ||
smp.h | ||
stack_protector.h | ||
syscall_restart.h | ||
system_profiler.h | ||
team.h | ||
thread_types.h | ||
thread.h | ||
timer.h | ||
tracing.h | ||
user_atomic.h | ||
user_debugger.h | ||
user_mutex.h | ||
UserEvent.h | ||
usergroup.h | ||
UserTimer.h | ||
vfs.h | ||
wait_for_objects.h |