Skip to content

Generate target/arm/cpu-sysregs.h.inc from AARCHMRS Registers.json

Eric Auger qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scripts: introduce scripts/update-aarch64-sysreg-code.pyscripts/update-aarch64-sysreg-code.py+133 -05 replies
2/3target/arm/cpu-sysregs.h.inc: Sort by name alphabetical ordertarget/arm/cpu-sysregs.h.inc+20 -200 replies
3/3target/arm/cpu-sysregs.h.inc: Update with automatic generationtarget/arm/cpu-sysregs.h.inc+15 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Generate target/arm/cpu-sysregs.h.inc from AARCHMRS Registers.json

Introduce a python script that generates ID register definitions from the Registers.json file included in "AARCHMRS containing the JSON files for Arm A-profile (2025-09)". It generates the content of target/arm/cpu-sysregs.h.inc.

Since [PATCH v8 00/14] arm: rework id register storage
(https://lore.kernel.org/all/[email protected]/)
ID regs are generically stored in an array. Auto generation brings the capability to enhance the list of IDregs stored in that array.

Registers.json can be downloaded at:
Arm Developer A-Profile Architecture Exploration Tools page:
https://developer.arm.com/Architectures/A-Profile%20Architecture#Downloads
Open Source 2025-09 item.

This patch is a rework of:
[PATCH v8 12/14] arm/cpu: Add sysreg generation scripts using a python script instead of bash/awk and using a different
entry: Registers.json instead of linux sysreg file.

Soon we will offer the end-user the capability to overwrite some of them through the KVM API.

Eric Auger (3):
scripts: introduce scripts/update-aarch64-sysreg-code.py target/arm/cpu-sysregs.h.inc: Sort by name alphabetical order target/arm/cpu-sysregs.h.inc: Update with automatic generation

 scripts/update-aarch64-sysreg-code.py | 133 ++++++++++++++++++++++++++
 target/arm/cpu-sysregs.h.inc          |  56 +++++++----
 2 files changed, 168 insertions(+), 21 deletions(-)
 create mode 100755 scripts/update-aarch64-sysreg-code.py
Signature · 1 line
2.52.0