Partially revert ca4f3acc0e
All checks were successful
All checks were successful
This commit is contained in:
@@ -77,29 +77,13 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
|||||||
CpuRegisters.Leaf = CPUID_GET_VENDOR_STRING;
|
CpuRegisters.Leaf = CPUID_GET_VENDOR_STRING;
|
||||||
AR::CpuFunc::CpuId(&CpuRegisters);
|
AR::CpuFunc::CpuId(&CpuRegisters);
|
||||||
|
|
||||||
/* Store CPU vendor name in processor control block */
|
/* Store CPU vendor in processor control block */
|
||||||
|
Prcb->CpuId.Vendor = (CPU_VENDOR)CpuRegisters.Ebx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[0] = CpuRegisters.Ebx;
|
*(PULONG)&Prcb->CpuId.VendorName[0] = CpuRegisters.Ebx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[4] = CpuRegisters.Edx;
|
*(PULONG)&Prcb->CpuId.VendorName[4] = CpuRegisters.Edx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[8] = CpuRegisters.Ecx;
|
*(PULONG)&Prcb->CpuId.VendorName[8] = CpuRegisters.Ecx;
|
||||||
Prcb->CpuId.VendorName[12] = '\0';
|
Prcb->CpuId.VendorName[12] = '\0';
|
||||||
|
|
||||||
/* Resolve CPU vendor */
|
|
||||||
if(RTL::Memory::CompareMemory(Prcb->CpuId.VendorName, "AuthenticAMD", 12) == 12)
|
|
||||||
{
|
|
||||||
/* AMD CPU */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_AMD;
|
|
||||||
}
|
|
||||||
else if(RTL::Memory::CompareMemory(Prcb->CpuId.VendorName, "GenuineIntel", 12) == 12)
|
|
||||||
{
|
|
||||||
/* Intel CPU */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_INTEL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Unknown CPU vendor */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get CPU standard features */
|
/* Get CPU standard features */
|
||||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||||
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
||||||
@@ -134,6 +118,11 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
|||||||
Prcb->CpuId.Model += (CpuSignature.ExtendedModel << 4);
|
Prcb->CpuId.Model += (CpuSignature.ExtendedModel << 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Unknown CPU vendor */
|
||||||
|
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
/* Identify processor features */
|
/* Identify processor features */
|
||||||
IdentifyProcessorFeatures();
|
IdentifyProcessorFeatures();
|
||||||
|
|||||||
@@ -70,29 +70,13 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
|||||||
CpuRegisters.Leaf = CPUID_GET_VENDOR_STRING;
|
CpuRegisters.Leaf = CPUID_GET_VENDOR_STRING;
|
||||||
AR::CpuFunc::CpuId(&CpuRegisters);
|
AR::CpuFunc::CpuId(&CpuRegisters);
|
||||||
|
|
||||||
/* Store CPU vendor name in processor control block */
|
/* Store CPU vendor in processor control block */
|
||||||
|
Prcb->CpuId.Vendor = (CPU_VENDOR)CpuRegisters.Ebx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[0] = CpuRegisters.Ebx;
|
*(PULONG)&Prcb->CpuId.VendorName[0] = CpuRegisters.Ebx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[4] = CpuRegisters.Edx;
|
*(PULONG)&Prcb->CpuId.VendorName[4] = CpuRegisters.Edx;
|
||||||
*(PULONG)&Prcb->CpuId.VendorName[8] = CpuRegisters.Ecx;
|
*(PULONG)&Prcb->CpuId.VendorName[8] = CpuRegisters.Ecx;
|
||||||
Prcb->CpuId.VendorName[12] = '\0';
|
Prcb->CpuId.VendorName[12] = '\0';
|
||||||
|
|
||||||
/* Resolve CPU vendor */
|
|
||||||
if(RTL::Memory::CompareMemory(Prcb->CpuId.VendorName, "AuthenticAMD", 12) == 12)
|
|
||||||
{
|
|
||||||
/* AMD CPU */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_AMD;
|
|
||||||
}
|
|
||||||
else if(RTL::Memory::CompareMemory(Prcb->CpuId.VendorName, "GenuineIntel", 12) == 12)
|
|
||||||
{
|
|
||||||
/* Intel CPU */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_INTEL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Unknown CPU vendor */
|
|
||||||
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get CPU standard features */
|
/* Get CPU standard features */
|
||||||
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
RtlZeroMemory(&CpuRegisters, sizeof(CPUID_REGISTERS));
|
||||||
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
CpuRegisters.Leaf = CPUID_GET_STANDARD1_FEATURES;
|
||||||
@@ -127,6 +111,11 @@ AR::ProcSup::IdentifyProcessor(VOID)
|
|||||||
Prcb->CpuId.Model += (CpuSignature.ExtendedModel << 4);
|
Prcb->CpuId.Model += (CpuSignature.ExtendedModel << 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Unknown CPU vendor */
|
||||||
|
Prcb->CpuId.Vendor = CPU_VENDOR_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
/* Identify processor features */
|
/* Identify processor features */
|
||||||
IdentifyProcessorFeatures();
|
IdentifyProcessorFeatures();
|
||||||
|
|||||||
Reference in New Issue
Block a user