Features/QOM/CPU: Difference between revisions
(Update status with new qom-cpu-ppc branch) |
(Update status with new qom-cpu-alpha branch and obsolete the qom-cpu dependency) |
||
Line 78: | Line 78: | ||
|- | |- | ||
|<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-arm qom-cpu-arm]</del> | |<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-arm qom-cpu-arm]</del> | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |- | ||
|<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-unicore32 qom-cpu-unicore32]</del> | |<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-unicore32 qom-cpu-unicore32]</del> | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |- | ||
|<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-s390 qom-cpu-s390]</del> | |<del>[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-s390 qom-cpu-s390]</del> | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 1 | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86 qom-cpu-x86], part 1 | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-sparc qom-cpu-sparc] | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-sparc qom-cpu-sparc] | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-ppc qom-cpu-ppc] | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-ppc qom-cpu-ppc] | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|- | |||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-alpha qom-cpu-alpha] | |||
|<del>qom-cpu</del> | |||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-sh4 qom-cpu-sh4] (to be updated) | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-sh4 qom-cpu-sh4] (to be updated) | ||
|qom-cpu, object_realize() | |<del>qom-cpu</del>, object_realize() | ||
|- | |- | ||
|[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-others qom-cpu-others] (to be split up) | |[https://github.com/afaerber/qemu-cpu/commits/qom-cpu-others qom-cpu-others] (to be split up) | ||
|qom-cpu | |<del>qom-cpu</del> | ||
|} | |} |
Revision as of 11:06, 7 April 2012
QOM CPU
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/VFP7xx: 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.
Status
NB: Due to hosting issues, branches have moved to GitHub.
name | depends on |
---|---|
type_init() | |
qom-user | |
qom-cpu-x86, part 1 | |
qom-cpu-sparc | |
qom-cpu-ppc | |
qom-cpu-alpha | |
qom-cpu-sh4 (to be updated) | |
qom-cpu-others (to be split up) |