Skip to content

Commit

Permalink
DB: add AMD Ryzen Z1
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Sep 24, 2023
1 parent 764607f commit ede3b8c
Show file tree
Hide file tree
Showing 3 changed files with 1,009 additions and 1 deletion.
1 change: 1 addition & 0 deletions libcpuid/libcpuid_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ enum _amd_bits_t {
_FX = LBIT( 25 ),
_APU_ = LBIT( 26 ),
C86_ = LBIT( 27 ),
_Z = LBIT( 28 ),
};
typedef enum _amd_bits_t amd_bits_t;

Expand Down
4 changes: 3 additions & 1 deletion libcpuid/recog_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ const struct match_entry_t cpudb_amd[] = {
{ 15, -1, -1, 25, 116, -1, -1, -1, NC, RYZEN_|_5|_H , 0, "Ryzen 5 (Phoenix)" },
{ 15, -1, -1, 25, 116, -1, -1, -1, NC, RYZEN_|_5|_U , 0, "Ryzen 5 (Phoenix)" },
{ 15, -1, -1, 25, 116, -1, -1, -1, NC, RYZEN_|_3|_U , 0, "Ryzen 3 (Phoenix)" },
{ 15, -1, -1, 25, 116, -1, -1, -1, NC, RYZEN_|_Z , 0, "Ryzen Z1 (Phoenix)" },
/* F M S EF EM #cores L2$ L3$ BC ModelBits ModelCode Name */
};

Expand Down Expand Up @@ -567,14 +568,15 @@ static struct amd_code_and_bits_t decode_amd_codename_part1(const char *bs)
if (amd_has_turion_modelname(bs)) {
bits |= TURION_;
}
if ((i = match_pattern(bs, "Ryzen [3579]")) != 0) {
if ((i = match_pattern(bs, "Ryzen [3579Z]")) != 0) {
bits |= RYZEN_;
i--;
switch (bs[i + 6]) {
case '3': bits |= _3; break;
case '5': bits |= _5; break;
case '7': bits |= _7; break;
case '9': bits |= _9; break;
case 'Z': bits |= _Z; break;
}
for(i = i + 7; i < n; i++) {
switch (bs[i]) {
Expand Down
Loading

0 comments on commit ede3b8c

Please sign in to comment.