On Sun, 28 Jul 2024, BALATON Zoltan wrote:
On Sun, 28 Jul 2024, quan wrote:
I am playing around with the parallel port on the pegasos 2 and I noticed
the following issue:
The parallel port on startup is set to iobase 0x378, then later it gets
remapped to iobase 0x3bc.
When I tried writing to the 0x3bc location with
trace:memory_region_ops_write on, I get logs about writing to the location
'parallel', so far so good, but the writes don't make it through (it never
calls parallel_ioport_write* functions)

I traced it through where it calls portio_write, and inside the
portio_write code:
This line always fails for me:
const MemoryRegionPortio *mrp = find_portio(mrpio, addr, size, true);
This is due to the mrpio has the offset of 0x44 (0x3bc-0x378) in the list,
and the 'addr' in the code ranges from (0-15) (address relative to 0x3bc),
so it can never match the parallel io function to execute.

This seems like a bug to me. I think there is some issue where the
portio_list is not getting updated properly after the remapping to 0x3bc.

The other devices (Serial, RTC, PM, VGA) responds properly for me, so it is
only the parallel port that has this issue.

Is this something that broke recently or can the same be reproduced with QEMU v8.2.0. The relocation of these devices was implemented around commit 35a6380b4ed27f (and the ones before that). Adding Bernhard to cc as well.

This commit also seems to break display with some VGA ROMs as can be reproduced with:

qemu-system-ppc -machine pegasos2 -bios pegasos2.rom -serial stdio -vga none 
-device ati-vga,romfile=ati-rage128progl16mb.VBI

where the romfile is something from http://vgamuseum.info/index.php/companies/item/111-ati-rage-128-pro for example). Until commit 35a6380b4ed27f^ you get picture on emulated VGA but not after (although I have no idea what a VGA BIOS has to do with the parallel port). Any idea how to fix this?

Regards,
BALATON Zoltan

Reply via email to