From: BALATON Zoltan <balaton@eik.bme.hu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v7 0/8] Pegasos2 emulation
Date: Tue, 16 Mar 2021 23:12:47 +0100 (CET) [thread overview]
Message-ID: <5d4749ed-8ba8-f976-d111-6f796b425e12@eik.bme.hu> (raw)
In-Reply-To: <64c77f89-a890-2513-a8db-ebdc153f3dd7@eik.bme.hu>
On Tue, 16 Mar 2021, BALATON Zoltan wrote:
> On Tue, 16 Mar 2021, Mark Cave-Ayland wrote:
>> On 16/03/2021 17:25, BALATON Zoltan wrote:
>>> On Tue, 16 Mar 2021, Mark Cave-Ayland wrote:
>>>> On 16/03/2021 13:06, BALATON Zoltan wrote:
>>>>>> The PATCH 1 doesn't seem to be needed to have a working Pegasos 2
>>>>>> machine, does it?
>>>>>
>>>>> It is needed (as well as all other patches in the series). Patch 1 is
>>>>> needed for getting serial output which is the only way to communicate
>>>>> with the Pegasos2 firmware so it's really hard to boot anything without
>>>>> it.
>>>>
>>>> Just having a quick look at patch 1: presumably the issue here is that
>>>> the Pegasos 2 firmware moves the serial ports to a different address on
>>>> startup. If you know what that address is, then why not simply change the
>>>> serial port base address(es) on the SuperIO device from the default?
>>>
>>> I had that as first version but other guests may expect the serial at the
>>> default address or set it up differently and we can emulate the device
>>> more fully this way that works with all guests which is also more like the
>>> device works. So putting it at a default address would be a step back. I
>>> can attempt that if this approach cannot be used but so far nobody said
>>> so.
>>
>> That would certainly be my first choice, as swapping out the memory regions
>> within the ISA bus without its knowledge is likely to cause problems (I can
>> see ioport_id being incorrect for one).
>
> Did you check what's that used for? Unlikely to cause any problems other than
> displaying initial value of port address instead of current address in device
> ID but that could be argued about if an ID should change or stay the same as
> initially. Easily fixable either way.
>
>> Do the guest OSs actually use this feature at all? I don't think I've ever
>> seen such registers being used within QEMU, OSs tend to simply relocate the
>> IO space base address using the BAR if required.
>
> The ISA devices don't have io BAR, they are relocatable _within_ ISA IO space
> by the config registers of the VIA superio chip. But the two guests that
> currently boot (MorphOS and Linux) don't seems to change default set by the
> firmware so we can go with the firmware defaults which is less correct than
> actually emulating what the chip does but whatever. (AmigaOS may also boot
> but has no gfx driver so can't really check at the moment.)
>
>> If Linux/MorphOS work with a fixed address then that's good enough for now:
>> the code should look something like this:
>>
>> dev = qdev_new(TYPE_SUPER_IO);
>> serial_dev = object_resolve_path_component(OBJECT(dev), "serial0"));
>> qdev_prop_set_uint32(dev, "iobase", 0x1234);
>> qdev_realise_and_unref(dev, &error_fatal);
>
> I've sent a v8 dropping patch 1 and setting a default but using the callback
And v9 replacing patch 5 with latest that applies on master that has
changed while I was sending the previous version...
> ISA superio has for this for that which is a bit cleaner IMO.
>
> Could this turned into a pull request by somebody now?
>
> Regards,
> BALATON Zoltan
>
>
next prev parent reply other threads:[~2021-03-16 22:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 2:58 [PATCH v7 0/8] Pegasos2 emulation BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 2/8] vt82c686: QOM-ify superio related functionality BALATON Zoltan
2021-03-11 23:50 ` Philippe Mathieu-Daudé
2021-03-12 0:32 ` BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs BALATON Zoltan
2021-03-11 23:47 ` Philippe Mathieu-Daudé
2021-03-12 1:20 ` David Gibson
2021-03-23 12:54 ` BALATON Zoltan
2021-03-23 21:58 ` Mark Cave-Ayland
2021-03-23 23:13 ` BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 5/8] vt82c686: Add emulation of VT8231 south bridge BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it BALATON Zoltan
2021-03-10 2:58 ` [PATCH v7 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM BALATON Zoltan
2021-03-13 13:27 ` [PATCH v7 0/8] Pegasos2 emulation BALATON Zoltan
2021-03-15 12:33 ` BALATON Zoltan
2021-03-16 9:01 ` Laurent Vivier
2021-03-16 11:49 ` Philippe Mathieu-Daudé
2021-03-16 12:11 ` Laurent Vivier
2021-03-16 12:24 ` BALATON Zoltan
2021-03-16 12:55 ` Laurent Vivier
2021-03-16 13:06 ` BALATON Zoltan
2021-03-16 16:21 ` Mark Cave-Ayland
2021-03-16 17:25 ` BALATON Zoltan
2021-03-16 20:00 ` Mark Cave-Ayland
2021-03-16 21:49 ` BALATON Zoltan
2021-03-16 22:12 ` BALATON Zoltan [this message]
2021-03-16 14:17 ` BALATON Zoltan
2021-03-16 14:48 ` BALATON Zoltan
2021-03-16 12:21 ` BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d4749ed-8ba8-f976-d111-6f796b425e12@eik.bme.hu \
--to=balaton@eik.bme.hu \
--cc=david@gibson.dropbear.id.au \
--cc=f4bug@amsat.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).