mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-06 12:59:18 +00:00
Add Get() function for every cpuid struct
This commit is contained in:
@ -803,31 +803,15 @@ namespace Tasking
|
||||
bool MONITORSupported = false;
|
||||
if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0)
|
||||
{
|
||||
#if defined(a64)
|
||||
CPU::x64::AMD::CPUID0x00000001 cpuid1amd;
|
||||
#elif defined(a32)
|
||||
CPU::x32::AMD::CPUID0x00000001 cpuid1amd;
|
||||
#endif
|
||||
#if defined(a64) || defined(a32)
|
||||
asmv("cpuid"
|
||||
: "=a"(cpuid1amd.EAX.raw), "=b"(cpuid1amd.EBX.raw), "=c"(cpuid1amd.ECX.raw), "=d"(cpuid1amd.EDX.raw)
|
||||
: "a"(0x1));
|
||||
MONITORSupported = cpuid1amd.ECX.MONITOR;
|
||||
#endif
|
||||
CPU::x86::AMD::CPUID0x00000001 cpuid;
|
||||
cpuid.Get();
|
||||
MONITORSupported = cpuid.ECX.MONITOR;
|
||||
}
|
||||
else if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_INTEL) == 0)
|
||||
{
|
||||
#if defined(a64)
|
||||
CPU::x64::Intel::CPUID0x00000001 cpuid1intel;
|
||||
#elif defined(a32)
|
||||
CPU::x32::Intel::CPUID0x00000001 cpuid1intel;
|
||||
#endif
|
||||
#if defined(a64) || defined(a32)
|
||||
asmv("cpuid"
|
||||
: "=a"(cpuid1intel.EAX.raw), "=b"(cpuid1intel.EBX.raw), "=c"(cpuid1intel.ECX.raw), "=d"(cpuid1intel.EDX.raw)
|
||||
: "a"(0x1));
|
||||
MONITORSupported = cpuid1intel.ECX.MONITOR;
|
||||
#endif
|
||||
CPU::x86::Intel::CPUID0x00000001 cpuid;
|
||||
cpuid.Get();
|
||||
MONITORSupported = cpuid.ECX.MONITOR;
|
||||
}
|
||||
|
||||
if (MONITORSupported)
|
||||
|
Reference in New Issue
Block a user