Kernel: Add CPUID check for 1 GiB page support

This commit is contained in:
2024-10-14 11:38:03 +03:00
parent 2b43569927
commit 5f63ea8f8a
2 changed files with 11 additions and 0 deletions

View File

@@ -64,6 +64,16 @@ namespace CPUID
return edx & CPUID::EDX_PAT;
}
bool has_1gib_pages()
{
uint32_t buffer[4] {};
get_cpuid(0x80000000, buffer);
if (buffer[0] < 0x80000001)
return false;
get_cpuid(0x80000001, buffer);
return buffer[3] & (1 << 26);
}
const char* feature_string_ecx(uint32_t feat)
{
switch (feat)