Kernel: Add CPUID check for 1 GiB page support
This commit is contained in:
parent
2b43569927
commit
5f63ea8f8a
|
@ -80,5 +80,6 @@ namespace CPUID
|
|||
bool has_nxe();
|
||||
bool has_pge();
|
||||
bool has_pat();
|
||||
bool has_1gib_pages();
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue