Fix cpuid 0x7 for AMD

This commit is contained in:
EnderIce2 2024-02-28 05:07:22 +02:00
parent f34f6f94c6
commit a49d4936e3
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
3 changed files with 4 additions and 4 deletions

View File

@ -251,7 +251,7 @@ namespace CPU
if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0) if (strcmp(CPU::Vendor(), x86_CPUID_VENDOR_AMD) == 0)
{ {
CPU::x86::AMD::CPUID0x00000001 cpuid1; CPU::x86::AMD::CPUID0x00000001 cpuid1;
CPU::x86::AMD::CPUID0x00000007 cpuid7; CPU::x86::AMD::CPUID0x00000007_ECX_0 cpuid7;
feat.PGE = cpuid1.EDX.PGE; feat.PGE = cpuid1.EDX.PGE;
feat.SSE = cpuid1.EDX.SSE; feat.SSE = cpuid1.EDX.SSE;

View File

@ -327,9 +327,9 @@ namespace CPU
}; };
/** @brief Structured Extended Feature Identifiers */ /** @brief Structured Extended Feature Identifiers */
struct CPUID0x00000007 struct CPUID0x00000007_ECX_0
{ {
__amd_cpuid_init(0x00000007); __amd_cpuid_init2(0x00000007, 0x0, _ECX_0);
/** @brief Structured Extended Feature Identifiers */ /** @brief Structured Extended Feature Identifiers */
union union

View File

@ -34,7 +34,7 @@ __constructor void TestCPUIDStructs()
CPU::x86::AMD::CPUID0x00000001 cpuid1; CPU::x86::AMD::CPUID0x00000001 cpuid1;
CPU::x86::AMD::CPUID0x00000005 cpuid5; CPU::x86::AMD::CPUID0x00000005 cpuid5;
CPU::x86::AMD::CPUID0x00000006 cpuid6; CPU::x86::AMD::CPUID0x00000006 cpuid6;
CPU::x86::AMD::CPUID0x00000007 cpuid7; CPU::x86::AMD::CPUID0x00000007_ECX_0 cpuid7_C_0;
CPU::x86::AMD::CPUID0x0000000B_ECX_0 cpuidB_C_0; CPU::x86::AMD::CPUID0x0000000B_ECX_0 cpuidB_C_0;
CPU::x86::AMD::CPUID0x0000000B_ECX_1 cpuidB_C_1; CPU::x86::AMD::CPUID0x0000000B_ECX_1 cpuidB_C_1;
CPU::x86::AMD::CPUID0x0000000D_ECX_0 cpuidD_C_0; CPU::x86::AMD::CPUID0x0000000D_ECX_0 cpuidD_C_0;