1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

Kernel: Move CPU feature detection to Arch/x86/CPU.{cpp.h}

We now refuse to boot on machines that don't support PAE since all
of our paging code depends on it.

Also let's only enable SSE and PGE support if the CPU advertises it.
This commit is contained in:
Andreas Kling 2020-01-01 12:56:21 +01:00
parent 3d59db4be4
commit 5aeaab601e
6 changed files with 70 additions and 44 deletions

View file

@ -506,3 +506,10 @@ public:
asm volatile("wrmsr" ::"a"(low), "d"(high), "c"(m_msr));
}
};
void detect_cpu_features();
extern bool g_cpu_supports_nx;
extern bool g_cpu_supports_pae;
extern bool g_cpu_supports_pge;
extern bool g_cpu_supports_smep;
extern bool g_cpu_supports_sse;