All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging
@ 2022-02-24 11:59 Mark Cave-Ayland
  2022-02-24 11:59 ` [PATCH v2 01/12] mos6522: add defines for IFR bit flags Mark Cave-Ayland
                   ` (11 more replies)
  0 siblings, 12 replies; 31+ messages in thread
From: Mark Cave-Ayland @ 2022-02-24 11:59 UTC (permalink / raw)
  To: laurent, qemu-devel

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



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2022-03-05 14:33 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 11:59 [PATCH v2 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging Mark Cave-Ayland
2022-02-24 11:59 ` [PATCH v2 01/12] mos6522: add defines for IFR bit flags Mark Cave-Ayland
2022-02-24 13:57   ` Philippe Mathieu-Daudé
2022-03-03 17:38   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 02/12] mac_via: use IFR bit flag constants for VIA1 IRQs Mark Cave-Ayland
2022-03-03 17:39   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 03/12] mac_via: use IFR bit flag constants for VIA2 IRQs Mark Cave-Ayland
2022-02-24 13:57   ` Philippe Mathieu-Daudé
2022-03-03 17:40   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 04/12] mos6522: switch over to use qdev gpios for IRQs Mark Cave-Ayland
2022-03-03 17:47   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 05/12] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass Mark Cave-Ayland
2022-03-03 17:47   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 06/12] mos6522: use device_class_set_parent_reset() to propagate reset to parent Mark Cave-Ayland
2022-03-03 19:52   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 07/12] mos6522: add register names to register read/write trace events Mark Cave-Ayland
2022-02-24 14:04   ` Philippe Mathieu-Daudé
2022-03-05 14:17     ` Mark Cave-Ayland
2022-03-05 14:32       ` Philippe Mathieu-Daudé
2022-03-03 19:54   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 08/12] mos6522: add "info via" HMP command for debugging Mark Cave-Ayland
2022-03-03 19:55   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 09/12] mos6522: record last_irq_levels in mos6522_set_irq() Mark Cave-Ayland
2022-03-03 19:56   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 10/12] mac_via: make SCSI_DATA (DRQ) bit live rather than latched Mark Cave-Ayland
2022-02-24 14:00   ` Philippe Mathieu-Daudé
2022-03-03 19:57   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 11/12] mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs Mark Cave-Ayland
2022-03-03 20:01   ` Laurent Vivier
2022-02-24 11:59 ` [PATCH v2 12/12] macio/pmu.c: remove redundant code Mark Cave-Ayland
2022-03-03 20:02   ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.