kernel/arm: clean up x86 PAE related code
Change-Id: I2bd1f1dc699396fee1ec03b5895e995c3aca5fef Reviewed-on: https://review.haiku-os.org/c/haiku/+/6193 Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com> Tested-by: Automation <automation@haiku-os.org>
This commit is contained in:
parent
f964790bcc
commit
9a9c5e9fee
@ -75,29 +75,9 @@ arch_vm_translation_map_init(kernel_args *args,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if B_HAIKU_PHYSICAL_BITS == 64 //IRA: Check 64 bit code and adjust for ARM
|
//TODO: check for LPAE / long-descriptor format
|
||||||
bool paeAvailable = x86_check_feature(IA32_FEATURE_PAE, FEATURE_COMMON);
|
//for now only short-descriptor format is implemented
|
||||||
bool paeNeeded = false;
|
|
||||||
for (uint32 i = 0; i < args->num_physical_memory_ranges; i++) {
|
|
||||||
phys_addr_t end = args->physical_memory_range[i].start
|
|
||||||
+ args->physical_memory_range[i].size;
|
|
||||||
if (end > 0x100000000LL) {
|
|
||||||
paeNeeded = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paeAvailable && paeNeeded) {
|
|
||||||
dprintf("using PAE paging\n");
|
|
||||||
gARMPagingMethod = new(&sPagingMethodBuffer) ARMPagingMethodPAE;
|
|
||||||
} else {
|
|
||||||
dprintf("using 32 bit paging (PAE not %s)\n",
|
|
||||||
paeNeeded ? "available" : "needed");
|
|
||||||
gARMPagingMethod = new(&sPagingMethodBuffer) ARMPagingMethod32Bit;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
gARMPagingMethod = new(&sPagingMethodBuffer) ARMPagingMethod32Bit;
|
gARMPagingMethod = new(&sPagingMethodBuffer) ARMPagingMethod32Bit;
|
||||||
#endif
|
|
||||||
|
|
||||||
return gARMPagingMethod->Init(args, _physicalPageMapper);
|
return gARMPagingMethod->Init(args, _physicalPageMapper);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user