Skip to content

Commit

Permalink
update libcpuid
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed Oct 29, 2023
1 parent 560356c commit 319d47c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libcpuid/libcpuid_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ enum _intel_bits_t {
_GOLD_ = LBIT( 23 ),
_PLATINIUM_ = LBIT( 24 ),
_MAX_ = LBIT( 25 ),
_J_ = LBIT( 26 ),
_N_ = LBIT( 27 ),
};
typedef enum _intel_bits_t intel_bits_t;

Expand Down
16 changes: 16 additions & 0 deletions libcpuid/recog_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ const struct match_entry_t cpudb_intel[] = {
{ 6, 12, -1, -1, 60, 1, -1, -1, NC, CELERON_ , 0, "Haswell (Celeron)" },
{ 6, 15, -1, -1, 63, -1, -1, -1, NC, 0 , 0, "Haswell-E" },

/* Silvermont CPUs (2013, 22nm, low-power) */
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, PENTIUM_|_J_ , 0, "Bay Trail-D (Pentium)" },
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, CELERON_|_J_ , 0, "Bay Trail-D (Celeron)" },
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, PENTIUM_|_N_ , 0, "Bay Trail-M (Pentium)" },
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, CELERON_|_N_ , 0, "Bay Trail-M (Celeron)" },
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, ATOM_ , 0, "Bay Trail-T (Atom)" },

/* Broadwell CPUs (5th gen, 14nm): */
{ 6, 7, -1, -1, 71, 4, -1, -1, NC, CORE_|_I_|_7 , 0, "Broadwell (Core i7)" },
{ 6, 7, -1, -1, 71, 4, -1, -1, NC, CORE_|_I_|_5 , 0, "Broadwell (Core i5)" },
Expand Down Expand Up @@ -808,6 +815,15 @@ static intel_code_and_bits_t get_brand_code_and_bits(struct cpu_id_t* data)
case 'W': bits |= _W_; break;
}
}

if (((bits & PENTIUM_) || (bits & CELERON_)) && ((i = match_pattern(bs, "[JN]")) != 0)) {
i--;
switch (bs[i]) {
case 'J': bits |= _J_; break;
case 'N': bits |= _N_; break;
}
}

for (i = 0; i < COUNT_OF(matchtable); i++)
if (match_pattern(bs, matchtable[i].search)) {
code = matchtable[i].c;
Expand Down
2 changes: 1 addition & 1 deletion libnw/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define NWINFO_MAJOR_VERSION 0
#define NWINFO_MINOR_VERSION 8
#define NWINFO_MICRO_VERSION 11
#define NWINFO_BUILD_VERSION 1
#define NWINFO_BUILD_VERSION 2

#define NWINFO_VERSION NWINFO_MAJOR_VERSION,NWINFO_MINOR_VERSION,NWINFO_MICRO_VERSION,NWINFO_BUILD_VERSION
#define NWINFO_VERSION_STR QUOTE(NWINFO_MAJOR_VERSION.NWINFO_MINOR_VERSION.NWINFO_MICRO_VERSION.NWINFO_BUILD_VERSION)
Expand Down

0 comments on commit 319d47c

Please sign in to comment.