qemu-arm
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]