qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/2] smc37c669: Fix parallel overlapping VGA ioport
@ 2018-06-14 18:01 Philippe Mathieu-Daudé
  2018-06-14 18:01 ` [Qemu-devel] [RFC PATCH 1/2] hw/isa/smc37c669-superio: Basic 'Config Registers' implementation Philippe Mathieu-Daudé
  2018-06-14 18:01 ` [Qemu-devel] [RFC PATCH 2/2] hw/alpha/dp264: Disable the Super I/O parallel port Philippe Mathieu-Daudé
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-06-14 18:01 UTC (permalink / raw)
  To: Emilio G . Cota, Richard Henderson, Paolo Bonzini,
	Mark Cave-Ayland, Hervé Poussineau
  Cc: Philippe Mathieu-Daudé, qemu-devel

Hi,

This RFC series attempt to fix a regression introduced in a4cb773928e,
and reported by Emilio:
http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00317.html

Mark noticed the VGA and parallel I/O were overlapping:

(qemu) info mtree
address-space: memory
  0000000000000000-ffffffffffffffff (prio 0, i/o): system
    00000801fc000000-00000801fdffffff (prio 0, i/o): pci0-io
      ...
      00000801fc0003b4-00000801fc0003b5 (prio 0, i/o): vga
      00000801fc0003ba-00000801fc0003ba (prio 0, i/o): vga
      00000801fc0003bc-00000801fc0003c3 (prio 0, i/o): parallel
                                    ^^^                ^^^^^^^^
      00000801fc0003c0-00000801fc0003cf (prio 0, i/o): vga
                   ^^^
      00000801fc0003d4-00000801fc0003d5 (prio 0, i/o): vga
      00000801fc0003da-00000801fc0003da (prio 0, i/o): vga
      ...

In reset the parallel port is enabled. Since the emulated PALcode
directly accesses the VGA port without checking if the SIO parallel
port is enabled, I suppose the real PALcode does this check.

To avoid changing the emulated PALcode, a "parallel" property is used
to reset the SIO with the parallel device disabled.

I tried to implement the quickest simpler fix...

references used:
- http://www.osdever.net/FreeVGA/vga/portidx.htm
- https://retired.beyondlogic.org/spp/parallel.htm
- http://ww1.microchip.com/downloads/en/DeviceDoc/37c669.pdf
- linux/arch/alpha/kernel/smc37c669.c
- https://github.com/rth7680/qemu-palcode/blob/master/init.c#L290
- https://github.com/rth7680/qemu-palcode/blob/master/ioport.h#L48

Regards,

Phil.

Philippe Mathieu-Daudé (2):
  hw/isa/smc37c669-superio: Basic 'Config Registers' implementation
  hw/alpha/dp264: Disable the Super I/O parallel port

 hw/alpha/dp264.c           |  6 +++-
 hw/isa/smc37c669-superio.c | 73 +++++++++++++++++++++++++++++++++-----
 2 files changed, 70 insertions(+), 9 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-06-14 21:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-14 18:01 [Qemu-devel] [RFC PATCH 0/2] smc37c669: Fix parallel overlapping VGA ioport Philippe Mathieu-Daudé
2018-06-14 18:01 ` [Qemu-devel] [RFC PATCH 1/2] hw/isa/smc37c669-superio: Basic 'Config Registers' implementation Philippe Mathieu-Daudé
2018-06-14 18:19   ` Paolo Bonzini
2018-06-14 21:14     ` Richard Henderson
2018-06-14 21:24       ` Paolo Bonzini
2018-06-14 18:01 ` [Qemu-devel] [RFC PATCH 2/2] hw/alpha/dp264: Disable the Super I/O parallel port Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).