On Fri, 25 Oct 2024 11:17:33 +0100, Eric Auger <eric.au...@redhat.com> wrote: > > 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 > > cpu-sysregs.h creates defined 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.
You really want to be careful with this. Both the script and the source file describing the registers are submitted to regular outburst of churn (I'm currently sitting on such a series). You really have to be prepared to see things breaking on each import. That file has also been known to contain annoying mistakes, as it is all written by hand. Ideally, this would be directly generated from the ARM XML, which is a public set of files. However, the license attached to this package strictly prohibits its use in QEMU (or anywhere else). One day... Thanks, M. -- Without deviation from the norm, progress is not possible.