qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 0/8] Pegasos2 emulation


From: Mark Cave-Ayland
Subject: Re: [PATCH v7 0/8] Pegasos2 emulation
Date: Tue, 16 Mar 2021 20:00:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

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).

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.

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);


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]