Skip to content

Add Sony PlayStation 5 (Oberon) uarch detection - #441

Open
fbarchard wants to merge 1 commit into
pytorch:mainfrom
fbarchard:oberon-arden-uarch
Open

fbarchard wants to merge 1 commit into
pytorch:mainfrom
fbarchard:oberon-arden-uarch

Conversation

@fbarchard

@fbarchard fbarchard commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #440

Summary

Identify the Sony PlayStation 5 (Oberon) CPU as its own microarchitecture instead of generic Zen 2.

Before this change, AMD family 17h, extended model 0x4 fell through the same case as Rome (extended model 0x3) and returned cpuinfo_uarch_zen2. A comment also mislabeled it as "Xbox Series X". The PS5 core is a custom Zen 2 with a cut-down 128-bit FPU, so it performs differently from standard Zen 2 (Rome, Matisse, Renoir, ...).

This PR adds cpuinfo_uarch_oberon (0x0020010F) and returns it for family 17h, extended model 0x4. That covers both known parts with this extended model:

Part Family Ext. Model Base Model Model CPUID.1 EAX
Sony PlayStation 5 (Oberon), retail 17h 0x4 0x6 46h 0x00840F6x (stepping not published)
AMD 4700S Desktop Kit (Cardinal) 17h 0x4 0x7 47h 0x00840F70

Sources:

Standard Zen 2 parts keep returning cpuinfo_uarch_zen2: Rome 31h, Renoir 60h / Lucienne 68h, Matisse 71h, Van Gogh 90h / Mero 98h, and Mendocino A0h.

Also included

  • Add cpuinfo_uarch_arden (0x00200110) for Microsoft Xbox Series X/S (Arden) / AMD 4800S: family 17h, extended model 0x8, model 84h, CPUID 0x00880F40. It was previously unhandled (cpuinfo_uarch_unknown). Unlike the PS5, it keeps standard Zen 2's full 256-bit FPU.
    Source: http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0880F40_K17_CPUID.txt
  • Add "Oberon" and "Arden" string mappings in tools/cpu-info.c.

@meta-cla meta-cla Bot added the cla signed label Oct 6, 2026
Comment thread src/x86/uarch.c
return cpuinfo_uarch_zen;
case 0x3: // model 31h ->
// Rome/Castle Peak
case 0x4: // model 47h -> Xbox

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this deleted?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nevermind. i see it is moved

@kimishpatel kimishpatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you add in summary how the cpu info (hex id) was derived

@fbarchard fbarchard changed the title Add Sony PlayStation 5 (Oberon) and Xbox Series X/S (Arden) uarch detection Add Sony PlayStation 5 (Oberon) uarch detection Oct 8, 2026
…ection

AMD family 17h extended model 0x4 now returns cpuinfo_uarch_oberon
(previously zen2, mislabeled as Xbox Series X):
- model 46h: Sony PlayStation 5 (Oberon), retail
  ps5-linux/ps5-linux-patches#29
- model 47h: AMD 4700S Desktop Kit (Cardinal), CPUID 0x00840F70
  http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0840F70_K17_CPUID.txt

AMD family 17h extended model 0x8 now returns cpuinfo_uarch_arden:
- model 84h: Microsoft Xbox Series X/S (Arden) / AMD 4800S, CPUID 0x00880F40
  http://users.atw.hu/instlatx64/AuthenticAMD/AuthenticAMD0880F40_K17_CPUID.txt
@fbarchard fbarchard changed the title Add Sony PlayStation 5 (Oberon) uarch detection Add Sony PlayStation 5 (Oberon) and Xbox Series X/S (Arden) uarch detection Oct 8, 2026
@fbarchard fbarchard changed the title Add Sony PlayStation 5 (Oberon) and Xbox Series X/S (Arden) uarch detection Add Sony PlayStation 5 (Oberon) uarch detection Oct 8, 2026
@fbarchard

Copy link
Copy Markdown
Contributor Author

For testing I wrote a little cpuid app and ran it but I dug up developer community references which are in the description.

The source is

#include <stdio.h>
static void CpuId(int eax, int info[4]) {
  __asm__ volatile("cpuid" : "=a"(info[0]), "=b"(info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(eax), "c"(0));
}
int main(void) {
  int info[13] = {0};
  CpuId(1, info);
  printf("Family: 0x%x, Extended Model: 0x%x\n", ((info[0] >> 8) & 0xf) + ((info[0] >> 20) & 0xff), ((info[0] >> 12) & 0xf0) + ((info[0] >> 4) & 0xf));
  CpuId(0, info);
  info[4] = info[1]; info[5] = info[3]; info[6] = info[2];
  printf("Vendor: %s\n", (char*)(info + 4));
  CpuId(0x80000002, info); CpuId(0x80000003, info + 4); CpuId(0x80000004, info + 8);
  printf("Brand: %s\n", (char*)info);
  return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect uarch detection for Sony PlayStation 5 (Oberon) and missing Xbox Series X/S (Arden)

2 participants