ARM64: Add ThunderX2 CPU revision macro. Add ThunderX2 name in identcpu.c

Submitted by:          Patryk Duda <pdk@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
This commit is contained in:
Wojciech Macek 2018-07-09 08:41:54 +00:00
parent e76247cd60
commit 45e8acf71c
2 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,7 @@ static const struct cpu_parts cpu_parts_arm[] = {
/* Cavium */
static const struct cpu_parts cpu_parts_cavium[] = {
{ CPU_PART_THUNDERX, "ThunderX" },
{ CPU_PART_THUNDERX2, "ThunderX2" },
CPU_PART_NONE,
};

View File

@ -97,6 +97,8 @@
#define CPU_REV_THUNDERX_1_0 0x00
#define CPU_REV_THUNDERX_1_1 0x01
#define CPU_REV_THUNDERX2_0 0x00
#define CPU_IMPL(midr) (((midr) >> 24) & 0xff)
#define CPU_PART(midr) (((midr) >> 4) & 0xfff)
#define CPU_VAR(midr) (((midr) >> 20) & 0xf)