[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 00/12] mos6522: switch to gpios, add control line edge-trigger
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging |
Date: |
Thu, 24 Feb 2022 11:59:44 +0000 |
Here is another patchset taken from my series to enable MacOS to boot on the
q800
machine.
Patches 1-3 define the IFR bit flags in terms of the physical control lines and
update mac_via to use them.
Patch 4 does the main switch from custom methods in MOS6522DeviceClass to using
standard gpios whilst patch 5 removes these now-obsolete methods.
Patch 6 updates mos6522 instances to use the recommended method of calling
device_class_set_parent_reset() to propagate the device reset to the parent.
Patches 7 and 8 add more support for debugging guests using the mos6522 devices
by adding register names into the trace-event output and implementing a new
"info via" HMP command to give detailed information about the registers and
timer
states.
Patch 9 introduces a new last_irq_levels field within MOS6522State to enable
detection
of edge transitions, which is also a migration break for the q800 and
g3beige/mac99
machines.
Patch 10 ensures that the SCSI_DATA (DRQ) bit in VIA2 is unlatched since in the
q800
machine VIA2 is integrated within the on-board logic, and analysis of the MacOS
toolbox ROM suggests that the DRQ bit is expected to be live compared with older
Macs which use a real (latched) VIA.
Patches 11 implement edge-triggering for the CA1/2 and CB1/2 control lines as
documented in the datasheet, including updating the relevant inputs for negative
edge-triggering if required.
Finally patch 12 removes some old code in the PMU mos6522 instance which is now
no
longer required with these latest changes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
v2:
- Update patches 1-3 to use the BIT() macro
- Add R-B tags from Peter
- Update "info via" patch to use a target-specific HMP command as discussed
on-list
- Add patch 10 "mac_via: make SCSI_DATA (DRQ) bit live rather than latched"
Mark Cave-Ayland (12):
mos6522: add defines for IFR bit flags
mac_via: use IFR bit flag constants for VIA1 IRQs
mac_via: use IFR bit flag constants for VIA2 IRQs
mos6522: switch over to use qdev gpios for IRQs
mos6522: remove update_irq() and set_sr_int() methods from
MOS6522DeviceClass
mos6522: use device_class_set_parent_reset() to propagate reset to
parent
mos6522: add register names to register read/write trace events
mos6522: add "info via" HMP command for debugging
mos6522: record last_irq_levels in mos6522_set_irq()
mac_via: make SCSI_DATA (DRQ) bit live rather than latched
mos6522: implement edge-triggering for CA1/2 and CB1/2 control line
IRQs
macio/pmu.c: remove redundant code
hmp-commands-info.hx | 15 +++
hw/m68k/q800.c | 9 +-
hw/misc/mac_via.c | 87 ++++++--------
hw/misc/macio/cuda.c | 8 +-
hw/misc/macio/pmu.c | 40 +------
hw/misc/mos6522.c | 223 ++++++++++++++++++++++++++++++++---
hw/misc/trace-events | 4 +-
include/hw/misc/mac_via.h | 46 ++++----
include/hw/misc/macio/pmu.h | 2 -
include/hw/misc/mos6522.h | 44 +++++--
include/monitor/hmp-target.h | 1 +
11 files changed, 333 insertions(+), 146 deletions(-)
--
2.20.1
- [PATCH v2 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging,
Mark Cave-Ayland <=
- [PATCH v2 01/12] mos6522: add defines for IFR bit flags, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 02/12] mac_via: use IFR bit flag constants for VIA1 IRQs, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 06/12] mos6522: use device_class_set_parent_reset() to propagate reset to parent, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 05/12] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 04/12] mos6522: switch over to use qdev gpios for IRQs, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 08/12] mos6522: add "info via" HMP command for debugging, Mark Cave-Ayland, 2022/02/24
- [PATCH v2 09/12] mos6522: record last_irq_levels in mos6522_set_irq(), Mark Cave-Ayland, 2022/02/24
- [PATCH v2 03/12] mac_via: use IFR bit flag constants for VIA2 IRQs, Mark Cave-Ayland, 2022/02/24