Skip to content

Commit

Permalink
DB: add Intel Bay Trail-D
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Oct 29, 2023
1 parent bd22219 commit f483697
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 2 deletions.
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
15 changes: 13 additions & 2 deletions libcpuid/recog_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,10 @@ const struct match_entry_t cpudb_intel[] = {
{ 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_ , 0, "Bay Trail-M (Pentium)" },
{ 6, 7, -1, -1, 55, -1, -1, -1, NC, CELERON_ , 0, "Bay Trail-M (Celeron)" },
{ 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): */
Expand Down Expand Up @@ -805,6 +807,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
133 changes: 133 additions & 0 deletions tests/intel/x86-atom/silvermont/bay-trail-d-celeron.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
------[ Logical CPU #0 ]------
CPUID 00000000: 0000000B-756E6547-6C65746E-49656E69 [GenuineIntel]
CPUID 00000001: 00030673-00100800-41D8E3BF-BFEBFBFF
CPUID 00000002: 61B3A001-0000FFC2-00000000-00000000
CPUID 00000003: 00000000-00000000-00000000-00000000
CPUID 00000004: 1C000121-0140003F-0000003F-00000001
CPUID 00000004: 1C000122-01C0003F-0000003F-00000001
CPUID 00000004: 1C00C143-03C0003F-000003FF-00000001
CPUID 00000005: 00000040-00000040-00000003-33000020
CPUID 00000006: 00000005-00000002-00000009-00000000
CPUID 00000007: 00000000-00002282-00000000-00000000
CPUID 00000008: 00000000-00000000-00000000-00000000
CPUID 00000009: 00000000-00000000-00000000-00000000
CPUID 0000000A: 07280203-00000000-00000000-00004503
CPUID 0000000B: 00000001-00000001-00000100-00000000
CPUID 0000000B: 00000004-00000004-00000201-00000000
CPUID 80000000: 80000008-00000000-00000000-00000000
CPUID 80000001: 00000000-00000000-00000101-28100000
CPUID 80000002: 20202020-6E492020-286C6574-43202952 [ Intel(R) C]
CPUID 80000003: 72656C65-52286E6F-50432029-4A202055 [eleron(R) CPU J]
CPUID 80000004: 30303931-20402020-39392E31-007A4847 [1900 @ 1.99GHz]
CPUID 80000005: 00000000-00000000-00000000-00000000
CPUID 80000006: 00000000-00000000-04008040-00000000
CPUID 80000007: 00000000-00000000-00000000-00000100
CPUID 80000008: 00003024-00000000-00000000-00000000
------[ Logical CPU #1 ]------
CPUID 00000000: 0000000B-756E6547-6C65746E-49656E69 [GenuineIntel]
CPUID 00000001: 00030673-02100800-41D8E3BF-BFEBFBFF
CPUID 00000002: 61B3A001-0000FFC2-00000000-00000000
CPUID 00000003: 00000000-00000000-00000000-00000000
CPUID 00000004: 1C000121-0140003F-0000003F-00000001
CPUID 00000004: 1C000122-01C0003F-0000003F-00000001
CPUID 00000004: 1C00C143-03C0003F-000003FF-00000001
CPUID 00000005: 00000040-00000040-00000003-33000020
CPUID 00000006: 00000005-00000002-00000009-00000000
CPUID 00000007: 00000000-00002282-00000000-00000000
CPUID 00000008: 00000000-00000000-00000000-00000000
CPUID 00000009: 00000000-00000000-00000000-00000000
CPUID 0000000A: 07280203-00000000-00000000-00004503
CPUID 0000000B: 00000001-00000001-00000100-00000002
CPUID 0000000B: 00000004-00000004-00000201-00000002
CPUID 80000000: 80000008-00000000-00000000-00000000
CPUID 80000001: 00000000-00000000-00000101-28100000
CPUID 80000002: 20202020-6E492020-286C6574-43202952 [ Intel(R) C]
CPUID 80000003: 72656C65-52286E6F-50432029-4A202055 [eleron(R) CPU J]
CPUID 80000004: 30303931-20402020-39392E31-007A4847 [1900 @ 1.99GHz]
CPUID 80000005: 00000000-00000000-00000000-00000000
CPUID 80000006: 00000000-00000000-04008040-00000000
CPUID 80000007: 00000000-00000000-00000000-00000100
CPUID 80000008: 00003024-00000000-00000000-00000000
------[ Logical CPU #2 ]------
CPUID 00000000: 0000000B-756E6547-6C65746E-49656E69 [GenuineIntel]
CPUID 00000001: 00030673-04100800-41D8E3BF-BFEBFBFF
CPUID 00000002: 61B3A001-0000FFC2-00000000-00000000
CPUID 00000003: 00000000-00000000-00000000-00000000
CPUID 00000004: 1C000121-0140003F-0000003F-00000001
CPUID 00000004: 1C000122-01C0003F-0000003F-00000001
CPUID 00000004: 1C00C143-03C0003F-000003FF-00000001
CPUID 00000005: 00000040-00000040-00000003-33000020
CPUID 00000006: 00000005-00000002-00000009-00000000
CPUID 00000007: 00000000-00002282-00000000-00000000
CPUID 00000008: 00000000-00000000-00000000-00000000
CPUID 00000009: 00000000-00000000-00000000-00000000
CPUID 0000000A: 07280203-00000000-00000000-00004503
CPUID 0000000B: 00000001-00000001-00000100-00000004
CPUID 0000000B: 00000004-00000004-00000201-00000004
CPUID 80000000: 80000008-00000000-00000000-00000000
CPUID 80000001: 00000000-00000000-00000101-28100000
CPUID 80000002: 20202020-6E492020-286C6574-43202952 [ Intel(R) C]
CPUID 80000003: 72656C65-52286E6F-50432029-4A202055 [eleron(R) CPU J]
CPUID 80000004: 30303931-20402020-39392E31-007A4847 [1900 @ 1.99GHz]
CPUID 80000005: 00000000-00000000-00000000-00000000
CPUID 80000006: 00000000-00000000-04008040-00000000
CPUID 80000007: 00000000-00000000-00000000-00000100
CPUID 80000008: 00003024-00000000-00000000-00000000
------[ Logical CPU #3 ]------
CPUID 00000000: 0000000B-756E6547-6C65746E-49656E69 [GenuineIntel]
CPUID 00000001: 00030673-06100800-41D8E3BF-BFEBFBFF
CPUID 00000002: 61B3A001-0000FFC2-00000000-00000000
CPUID 00000003: 00000000-00000000-00000000-00000000
CPUID 00000004: 1C000121-0140003F-0000003F-00000001
CPUID 00000004: 1C000122-01C0003F-0000003F-00000001
CPUID 00000004: 1C00C143-03C0003F-000003FF-00000001
CPUID 00000005: 00000040-00000040-00000003-33000020
CPUID 00000006: 00000005-00000002-00000009-00000000
CPUID 00000007: 00000000-00002282-00000000-00000000
CPUID 00000008: 00000000-00000000-00000000-00000000
CPUID 00000009: 00000000-00000000-00000000-00000000
CPUID 0000000A: 07280203-00000000-00000000-00004503
CPUID 0000000B: 00000001-00000001-00000100-00000006
CPUID 0000000B: 00000004-00000004-00000201-00000006
CPUID 80000000: 80000008-00000000-00000000-00000000
CPUID 80000001: 00000000-00000000-00000101-28100000
CPUID 80000002: 20202020-6E492020-286C6574-43202952 [ Intel(R) C]
CPUID 80000003: 72656C65-52286E6F-50432029-4A202055 [eleron(R) CPU J]
CPUID 80000004: 30303931-20402020-39392E31-007A4847 [1900 @ 1.99GHz]
CPUID 80000005: 00000000-00000000-00000000-00000000
CPUID 80000006: 00000000-00000000-04008040-00000000
CPUID 80000007: 00000000-00000000-00000000-00000100
CPUID 80000008: 00003024-00000000-00000000-00000000
--------------------------------------------------------------------------------
x86
general
6
7
3
6
55
2
4
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
128 (non-authoritative)
Bay Trail-D (Celeron)
fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt rdtscp lm lahf_lm constant_tsc rdrand

0 comments on commit f483697

Please sign in to comment.