Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TargetList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ POWER7
POWER8
POWER9
POWER10
POWER11
PPCG4
PPC970
PPC970MP
Expand Down
4 changes: 4 additions & 0 deletions cpuid_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions driver/others/dynamic_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ static int cpuid(void)
#endif
#ifdef POWER_10
else if (arch >= POWER_10) return CPU_POWER10;
Copy link
Copy Markdown
Contributor

@ChipKerchner ChipKerchner Aug 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pratiklp00 Shouldn't this be

else if arch == POWER_10 return CPU_POWER10;

I only made it >= as a temp change till POWER11 came out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChipKerchner Yes Chip.

#endif
#ifdef POWER_11
else if (arch >= POWER_11) return CPU_POWER10;
#endif
return CPU_UNKNOWN;
}
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion getarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading