1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

trampoline code doesn't longer enable SMEP

because old CPUs don't support this feature
This commit is contained in:
Stefan Lankes 2016-06-28 20:52:36 +02:00
parent 7d471b4691
commit a3ed137f07

View file

@ -384,6 +384,8 @@ int cpu_detection(void) {
kprintf("Syscall instruction: %s\n", (cpu_info.feature3 & CPU_FEATURE_SYSCALL) ? "available" : "unavailable");
}
//TODO: add check for SMEP and SMAP
// be sure that AM, NE and MP is enabled
cr0 = read_cr0();
cr0 |= CR0_AM;