[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/15] arm/cpu: Add sysreg generation scripts
From: |
Marc Zyngier |
Subject: |
Re: [PATCH 14/15] arm/cpu: Add sysreg generation scripts |
Date: |
Fri, 07 Feb 2025 14:14:12 +0000 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
On Fri, 07 Feb 2025 11:02:47 +0000,
Cornelia Huck <cohuck@redhat.com> wrote:
>
> From: Eric Auger <eric.auger@redhat.com>
>
> Introduce scripts that automate the generation of system register
> definitions from a given linux source tree arch/arm64/tools/sysreg.
>
> Invocation of
> ./update-aarch64-sysreg-code.sh $PATH_TO_LINUX_SOURCE_TREE
> in scripts directory do generate 2 qemu files:
> - target/arm/cpu-sysreg-properties.c
> - target/arm/cpu-sysregs.h.inc
>
> cpu-sysregs.h.inc creates defines for all system registers.
> However cpu-sysreg-properties.c only cares about feature ID registers.
>
> update-aarch64-sysreg-code.sh calls two awk scripts.
> gen-cpu-sysreg-properties.awk is inherited from kernel
> arch/arm64/tools/gen-sysreg.awk. All credits to Mark Rutland
> the original author of this script.
>
> [CH: update to handle current kernel sysregs structure, and to emit
> the re-worked register structures]
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> scripts/gen-cpu-sysreg-properties.awk | 325 ++++++++++++++++++++++++++
> scripts/gen-cpu-sysregs-header.awk | 70 ++++++
> scripts/update-aarch64-sysreg-code.sh | 30 +++
> 3 files changed, 425 insertions(+)
> create mode 100755 scripts/gen-cpu-sysreg-properties.awk
> create mode 100755 scripts/gen-cpu-sysregs-header.awk
> create mode 100755 scripts/update-aarch64-sysreg-code.sh
Shameless plug:
https://lore.kernel.org/r/20250102144339.1564778-1-maz@kernel.org
You could use (something like) this to generate the sysreg file itself
from the architecture data, or another representation as required.
M.
--
Without deviation from the norm, progress is not possible.
- [PATCH 04/15] arm/cpu: Store aa64isar1/2 into the idregs array, (continued)
- [PATCH 04/15] arm/cpu: Store aa64isar1/2 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 05/15] arm/cpu: Store aa64pfr0/1 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 06/15] arm/cpu: Store aa64mmfr0-3 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 07/15] arm/cpu: Store aa64dfr0/1 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 08/15] arm/cpu: Store aa64smfr0 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 10/15] arm/cpu: Store id_mfr0/1 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 09/15] arm/cpu: Store id_isar0-7 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 11/15] arm/cpu: Store id_dfr0/1 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 12/15] arm/cpu: Store id_mmfr0-5 into the idregs array, Cornelia Huck, 2025/02/07
- [PATCH 14/15] arm/cpu: Add sysreg generation scripts, Cornelia Huck, 2025/02/07
- Re: [PATCH 14/15] arm/cpu: Add sysreg generation scripts,
Marc Zyngier <=
- [PATCH 13/15] arm/cpu: Add infra to handle generated ID register definitions, Cornelia Huck, 2025/02/07
- [PATCH 15/15] arm/cpu: Add generated files, Cornelia Huck, 2025/02/07