diff --git a/headers/private/kernel/arch/m68k/arch_vm.h b/headers/private/kernel/arch/m68k/arch_vm.h index ed129b90b3..8e064e0228 100644 --- a/headers/private/kernel/arch/m68k/arch_vm.h +++ b/headers/private/kernel/arch/m68k/arch_vm.h @@ -32,6 +32,8 @@ struct m68k_vm_ops { void (*m68k_unmap_address_range)(addr_t virtualAddress, size_t size); status_t (*m68k_remap_address_range)(addr_t *_virtualAddress, size_t size, bool unmap); #endif + bool (*arch_vm_translation_map_is_kernel_page_accessible)(addr_t virtualAddress, uint32 protection); + }; #ifdef __cplusplus diff --git a/src/system/kernel/arch/m68k/arch_030_mmu.cpp b/src/system/kernel/arch/m68k/arch_030_mmu.cpp index 9754212753..98472bb133 100644 --- a/src/system/kernel/arch/m68k/arch_030_mmu.cpp +++ b/src/system/kernel/arch/m68k/arch_030_mmu.cpp @@ -45,4 +45,5 @@ struct m68k_vm_ops m68030_vm_ops = { m68k_unmap_address_range, m68k_remap_address_range #endif + m68k_vm_translation_map_is_kernel_page_accessible }; diff --git a/src/system/kernel/arch/m68k/arch_040_mmu.cpp b/src/system/kernel/arch/m68k/arch_040_mmu.cpp index 4cc4691f6b..5988660d05 100644 --- a/src/system/kernel/arch/m68k/arch_040_mmu.cpp +++ b/src/system/kernel/arch/m68k/arch_040_mmu.cpp @@ -43,4 +43,5 @@ struct m68k_vm_ops m68040_vm_ops = { m68k_unmap_address_range, m68k_remap_address_range #endif + m68k_vm_translation_map_is_kernel_page_accessible }; diff --git a/src/system/kernel/arch/m68k/arch_vm_translation_map.cpp b/src/system/kernel/arch/m68k/arch_vm_translation_map.cpp index f70753b22d..963f5cf90f 100644 --- a/src/system/kernel/arch/m68k/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/m68k/arch_vm_translation_map.cpp @@ -159,3 +159,13 @@ m68k_remap_address_range(addr_t *_virtualAddress, size_t size, bool unmap) } #endif + +bool +arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, + uint32 protection) +{ + return get_vm_ops()-arch_vm_translation_map_is_kernel_page_accessible(virtualAddress, + protection); +} + + diff --git a/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp b/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp index 1d1a16e4eb..51237c87d1 100644 --- a/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp +++ b/src/system/kernel/arch/m68k/arch_vm_translation_map_impl.cpp @@ -1512,8 +1512,8 @@ m68k_vm_translation_map_early_map(kernel_args *args, addr_t va, addr_t pa, } -bool -arch_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, +static bool +m68k_vm_translation_map_is_kernel_page_accessible(addr_t virtualAddress, uint32 protection) { // TODO: Implement!