Features/QOM/CPU: Difference between revisions
(Status update: The basic conversion of the remaining targets has been applied) |
(Update status with qom-cpu-1.1, qom-cpu-reset, qom-cpu-alpha branches) |
||
Line 130: | Line 130: | ||
|<del>qom-cpu, qom-cpu-s390, qom-cpu-lm32, qom-cpu-microblaze, qom-cpu-sh4, qom-cpu-m68k</del> | |<del>qom-cpu, qom-cpu-s390, qom-cpu-lm32, qom-cpu-microblaze, qom-cpu-sh4, qom-cpu-m68k</del> | ||
|- | |- | ||
|<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu qom-cpu], part 2</del> | |<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu qom-cpu], part 2 (cleanup)</del> | ||
|<del>qom-cpu-arm, qom-cpu-unicore32, qom-cpu-s390, qom-cpu-x86, qom-cpu-sparc, qom-cpu-ppc, qom-cpu-alpha, qom-cpu-lm32, qom-cpu-xtensa, qom-cpu-cris, qom-cpu-microblaze, qom-cpu-sh4, qom-cpu-m68k, qom-cpu-mips</del> | |<del>qom-cpu-arm, qom-cpu-unicore32, qom-cpu-s390, qom-cpu-x86, qom-cpu-sparc, qom-cpu-ppc, qom-cpu-alpha, qom-cpu-lm32, qom-cpu-xtensa, qom-cpu-cris, qom-cpu-microblaze, qom-cpu-sh4, qom-cpu-m68k, qom-cpu-mips</del> | ||
|- | |- | ||
|<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 2</del> | |<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 2 (props)</del> | ||
| | | | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu qom-cpu] | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-1.1 qom-cpu-1.1] (cleanups) | ||
| | | | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 3 | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-reset qom-cpu], part 3 (reset) | ||
|qom-cpu-1.1 | |||
|- | |||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 3 (classes) | |||
| | | | ||
|- | |- | ||
Line 146: | Line 149: | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-unicore32 qom-cpu-unicore32], part 2 | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-unicore32 qom-cpu-unicore32], part 2 | ||
| | |||
|- | |||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-alpha qom-cpu-alpha], part 2 | |||
| | | | ||
|} | |} |
Revision as of 15:55, 6 May 2012
Summary
Convert CPUState to QOM.
Motivation
- Short-term: Allow inspecting and modifying CPU properties via QOM.
- Short-term: Avoid common target code doing ifs or switches on CPU identifiers.
- target-arm/helper.c: cpu_reset_model_id()
- Short-term: Replace CPU_COMMON macro and duplicated reset code by inheritance.
- Mid-term: Avoid dependency of common code on #defines from cpu.h.
- Mid-term: Ease instantiation of mixed software-visible cores within one target, e.g.
- NXP LPC43xx: Cortex-M4 + Cortex-M0
- ARM big.LITTLE: Cortex-A15 + Cortex-A7
- Freescale Vybrid VF6xx/VF7xx: Cortex-A5 + Cortex-M4
- Long-term: Work towards allowing to compile multiple targets into one executable.
- Renesas R-Car H1, M1A: ARM Cortex-A9 + SH-4A
- Renesas R-Home S1: ARM Cortex-A9 + SH-4A + ARM7TDMI-S
"CPU" name conflict
Identifier | current | interim | final |
---|---|---|---|
struct CPU$archState or struct CPUState_$arch |
defined in target-*/cpu.h | ??? | |
#define CPUState | alias to CPU$archState / CPUState_$arch | dropped in favor of CPU | |
struct CPUClass | class | ||
#define CPU_CLASS(class) | cast macro for class | ||
struct CPU | object | ||
#define CPU(obj) | cast macro for object | ||
#define CPU_GET_CLASS(obj) | macro to obtain class pointer |
Resolved by renaming existing CPUState to CPUArchState and by using struct CPUState for the object state, while using CPU(obj) as macro for casting.
Owner
- Name: Andreas Färber
- Email: afaerber@suse.de
Status
QOM CPUState exists, former CPUState is renamed to CPUArchState. All targets have been converted.
Field movements from CPUArchState to CPUState (and subsequent removal of CPUArchState and CPU_COMMON) are being worked on.
Patch series and branches
NB: Due to hosting issues, branches have moved to GitHub.
name | depends on |
---|---|
qom-cpu-1.1 (cleanups) | |
qom-cpu, part 3 (reset) | qom-cpu-1.1 |
qom-cpu-x86, part 3 (classes) | |
qom-cpu-sh4, part 2 | |
qom-cpu-unicore32, part 2 | |
qom-cpu-alpha, part 2 |