[arch][mmu] add another routine to query if the arch supports user aspaces
Trim the arch mmu unit tests accordingly. Should probably switch this to a #define, but it's possible some of these queries could be dynamically detected (XN for example). May revisit at some point.
This commit is contained in:
@@ -405,6 +405,7 @@ int arch_mmu_map(arch_aspace_t * const aspace, const vaddr_t vaddr, const paddr_
|
||||
|
||||
bool arch_mmu_supports_nx_mappings(void) { return false; }
|
||||
bool arch_mmu_supports_ns_mappings(void) { return false; }
|
||||
bool arch_mmu_supports_user_aspaces(void) { return false; }
|
||||
|
||||
void x86_mmu_early_init(void) {
|
||||
/* Set WP bit in CR0*/
|
||||
|
||||
@@ -604,6 +604,7 @@ int arch_mmu_map(arch_aspace_t *const aspace, const vaddr_t vaddr, const paddr_t
|
||||
|
||||
bool arch_mmu_supports_nx_mappings(void) { return true; }
|
||||
bool arch_mmu_supports_ns_mappings(void) { return false; }
|
||||
bool arch_mmu_supports_user_aspaces(void) { return false; }
|
||||
|
||||
void x86_mmu_early_init(void) {
|
||||
volatile uint64_t efer_msr, cr0, cr4;
|
||||
|
||||
Reference in New Issue
Block a user