Skip to content

RFC target/arm: move common aarch64 init to helpers and make cpu max standalone

Leif Lindholm qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/arm: commonalize aarch64 cpu inittarget/arm/cpu-qom.h target/arm/cpu64.c+28 -211 reply
2/3target/arm: move cpu64 cortex processor common init settings to functiontarget/arm/cpu64.c+34 -731 reply
3/3target/arm: use cortex...common_init for cpu64 maxtarget/arm/cpu64.c+15 -90 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/3] target/arm: move common aarch64 init to helpers and make cpu max standalone

As a follow-up to the thread that started with
https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg01018.html

Most of the a57/a53/a72 init functions is currently identical lines, with some individual options set up differently.

Some of that duplication can be considered to be likely to apply to any (or at least the majoroty of) aarch64 processors to be added in the future.

And finally, the "max" cpu init function currently calls the a57 one, with some non-obvious side effects including:
- cpu dtb_compatible string set to "arm,cortex-a57"
- kvm_target set (to A57 value) in tcg mode
- id_mmfr0 containing a value present in real A57 cpus of the revision qemu emulates, but banned by the architecture specification
- emulating implementation-defined cortex cp registers

This series:
- Creates a common initialization function for all aarch64 cpus, which also sets up the MIDR.
- Creates a common initialization function for the cortex cpus defined in cpu64.h.
- Detaches the "max" cpu from the A57 init, making use of both of the above helper functions.
- Can definitely be split up into additional patches (especially 3/3).

Leif Lindholm (3):
target/arm: commonalize aarch64 cpu init
target/arm: move cpu64 cortex processor common init settings to
function
target/arm: use cortex...common_init for cpu64 max

 target/arm/cpu-qom.h |   3 +
 target/arm/cpu64.c   | 155 ++++++++++++++++++-------------------------
 2 files changed, 66 insertions(+), 92 deletions(-)
Signature · 1 line
2.20.1