Skip to content

Commit

Permalink
Add ZEN2 4800S 0880F40 (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
toor1245 authored Sep 5, 2023
1 parent aeaa84e commit b960bcf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/impl_x86__base_implementation.inl
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info) {
case CPUID(0x17, 0x60):
case CPUID(0x17, 0x68):
case CPUID(0x17, 0x71):
case CPUID(0x17, 0x84):
case CPUID(0x17, 0x90):
case CPUID(0x17, 0x98):
case CPUID(0x17, 0xA0):
Expand Down
14 changes: 14 additions & 0 deletions test/cpuinfo_x86_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,20 @@ TEST_F(CpuidX86Test, AMD_K17_ZEN2_XBOX_SERIES_X) {
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN2);
}

// http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0880F40_K17_CPUID.txt
TEST_F(CpuidX86Test, AMD_K17_ZEN2_4800S) {
cpu().SetLeaves({
{{0x00000000, 0}, Leaf{0x00000010, 0x68747541, 0x444D4163, 0x69746E65}},
{{0x00000001, 0}, Leaf{0x00880F40, 0x00100800, 0x7ED8320B, 0x178BFBFF}},
});
const auto info = GetX86Info();

EXPECT_STREQ(info.vendor, CPU_FEATURES_VENDOR_AUTHENTIC_AMD);
EXPECT_EQ(info.family, 0x17);
EXPECT_EQ(info.model, 0x84);
EXPECT_EQ(GetX86Microarchitecture(&info), X86Microarchitecture::AMD_ZEN2);
}

// http://users.atw.hu/instlatx64/HygonGenuine/HygonGenuine0900F02_Hygon_CPUID3.txt
TEST_F(CpuidX86Test, AMD_K18_ZEN_DHYANA) {
cpu().SetLeaves({
Expand Down

0 comments on commit b960bcf

Please sign in to comment.