[arch][tests] add a way to query some arch mmu features

Allow asking the arch layer if it supports NX pages or NS pages.
Have the arch mmu test code test accordingly.
Also tweak the tests to pass on arm32 mmu, which does not precisely
match the return semantics of the rest of the mmu routines on map/unmap.
This commit is contained in:
Travis Geiselbrecht
2022-10-21 00:00:49 -07:00
parent f1dad5f4c8
commit d5451cc8e6
7 changed files with 53 additions and 14 deletions

View File

@@ -655,3 +655,5 @@ void arch_mmu_context_switch(arch_aspace_t *aspace) {
ARM64_WRITE_SYSREG(tcr_el1, tcr);
}
bool arch_mmu_supports_nx_mappings(void) { return true; }
bool arch_mmu_supports_ns_mappings(void) { return true; }