Andreas Färber a écrit :
Am 02.05.2013 22:09, schrieb Hervé Poussineau:
Most of the functionality is extracted from hw/ppc/prep.c.
Also add support for board identification/equipment registers.
Document it for the IBM 43p emulation.
Cc: Julio Guerra <gu...@julio.in>
Signed-off-by: Hervé Poussineau <hpous...@reactos.org>
---
docs/ibm_43p.cfg | 5 +
hw/ppc/Makefile.objs | 1 +
hw/ppc/prep_systemio.c | 298 ++++++++++++++++++++++++++++++++++++++++++++++++
trace-events | 4 +
4 files changed, 308 insertions(+)
create mode 100644 hw/ppc/prep_systemio.c
Haven't reviewed the full patch yet, but since this is not modifying
hw/ppc/prep.c, it is duplicating code rather than QOM'ifying the
existing code.
Have you looked into Julio's patch whom you CC? I'm still not sure how
to solve things for 1.5 (and this series a consider -next).
Yes, I've partly taken Julio's patch into account, ie port 0x92 is now
read/write. However, I didn't change the way the reset is done due to
missing agrement of how it should be done: "this is touching on the same
soft reset topic that I am awaiting the outcome for x86". [1]
Moreover, registers emulated are not exactly the same as in hw/ppc/prep.c:
Registers not present in hw/ppc/prep_systemio.c:
0x800: Motorola CPU configuration register
0x802: Motorola base module feature register
0x803: Motorola base module status register
0x823: Something related to no L2 cache?
Those seem specific to Motorola, so they probably belong to another device.
New registers added to hw/ppc/prep_systemio.c:
0x818: Key lock (Read Only)
0x852: System Board Identification (Read Only)
I'm not really sure of impacts of changing 'prep' machine to remove some
registers and adding new ones, so I prefered to keep it as is. However,
if you think that I should use the QOM'ified System I/O device in 'prep'
machine (and this will change emulated machine), I'll do it.
Hervé
[1] https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03359.html