diff --git a/TargetList.txt b/TargetList.txt index 232e12ffa6..0c94869e7a 100644 --- a/TargetList.txt +++ b/TargetList.txt @@ -52,6 +52,7 @@ POWER7 POWER8 POWER9 POWER10 +POWER11 PPCG4 PPC970 PPC970MP diff --git a/cpuid_power.c b/cpuid_power.c index 1ced8930a5..2b2c32eeab 100644 --- a/cpuid_power.c +++ b/cpuid_power.c @@ -131,6 +131,7 @@ int detect(void){ if (!strncasecmp(p, "POWER8", 6)) return CPUTYPE_POWER8; if (!strncasecmp(p, "POWER9", 6)) return CPUTYPE_POWER9; if (!strncasecmp(p, "POWER10", 7)) return CPUTYPE_POWER10; + if (!strncasecmp(p, "POWER11", 7)) return CPUTYPE_POWER10; if (!strncasecmp(p, "Cell", 4)) return CPUTYPE_CELL; if (!strncasecmp(p, "7447", 4)) return CPUTYPE_PPCG4; @@ -171,6 +172,9 @@ int detect(void){ int id; __asm __volatile("mfpvr %0" : "=r"(id)); switch ( id >> 16 ) { + case 0x82: // POWER11 + return CPUTYPE_POWER10; + break; case 0x80: // POWER10 return CPUTYPE_POWER10; break; diff --git a/driver/others/dynamic_power.c b/driver/others/dynamic_power.c index 4c1f4a26e0..f0afe3eb6c 100644 --- a/driver/others/dynamic_power.c +++ b/driver/others/dynamic_power.c @@ -70,6 +70,9 @@ static int cpuid(void) #endif #ifdef POWER_10 else if (arch >= POWER_10) return CPU_POWER10; +#endif +#ifdef POWER_11 + else if (arch >= POWER_11) return CPU_POWER10; #endif return CPU_UNKNOWN; } @@ -173,6 +176,13 @@ static struct { .cpu_type = CPU_POWER10, }, + { /* Power11 */ + .pvr_mask = 0xffff0000, + .pvr_value = 0x00820000, + .cpu_name = "POWER11 (raw)", + .cpu_type = CPU_POWER10, + }, + { /* End of table, pvr_mask and pvr_value must be zero */ .pvr_mask = 0x0, .pvr_value = 0x0, diff --git a/getarch.c b/getarch.c index cb0b3cd7ca..76c1aaff8d 100644 --- a/getarch.c +++ b/getarch.c @@ -836,7 +836,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CORENAME "POWER9" #endif -#if defined(FORCE_POWER10) +#if defined(FORCE_POWER10) || (FORCE_POWER11) #define FORCE #define ARCHITECTURE "POWER" #define SUBARCHITECTURE "POWER10"