Kernel: Remove obsole CPUID::IsAvailable
This is now a harware requirement that is verified already in boot.S
This commit is contained in:
@@ -341,12 +341,6 @@ namespace APIC
|
||||
|
||||
static bool InitializeAPIC()
|
||||
{
|
||||
if (!CPUID::IsAvailable())
|
||||
{
|
||||
kprintln("CPUID not available");
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t ecx, edx;
|
||||
CPUID::GetFeatures(ecx, edx);
|
||||
if (!(edx & CPUID::Features::EDX_APIC))
|
||||
|
||||
@@ -12,24 +12,6 @@ namespace CPUID
|
||||
asm volatile ("cpuid": "=a"(out[0]), "=b"(out[0]), "=d"(out[1]), "=c"(out[2]) : "a"(code));
|
||||
}
|
||||
|
||||
bool IsAvailable()
|
||||
{
|
||||
uint32_t res;
|
||||
asm volatile(
|
||||
"pushfl;"
|
||||
"pushfl;"
|
||||
"popl %0;"
|
||||
"xorl %1, %0;"
|
||||
"pushl %0;"
|
||||
"popfl;"
|
||||
"pushfl;"
|
||||
"popl %0;"
|
||||
"popfl;"
|
||||
: "=r"(res)
|
||||
: "i" (0x00200000));
|
||||
return res != 0;
|
||||
}
|
||||
|
||||
const char* GetVendor()
|
||||
{
|
||||
static char vendor[13] {};
|
||||
@@ -48,9 +30,6 @@ namespace CPUID
|
||||
|
||||
bool Is64Bit()
|
||||
{
|
||||
if (!IsAvailable())
|
||||
return false;
|
||||
|
||||
uint32_t buffer[4] {};
|
||||
get_cpuid(0x80000000, buffer);
|
||||
if (buffer[0] < 0x80000001)
|
||||
|
||||
Reference in New Issue
Block a user