qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/acpi: Set memory regions to native endian as a work aroun


From: BALATON Zoltan
Subject: Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around
Date: Tue, 7 Mar 2023 01:06:31 +0100 (CET)

On Tue, 7 Mar 2023, Paolo Bonzini wrote:
On 3/6/23 23:56, Paolo Bonzini wrote:
On 2/21/23 13:55, BALATON Zoltan wrote:

To get that menu with Shut Down, first Quit the installer then again right click or click on background first to get the menu of the Ambient desktop. I also see an error from the firmware at the beginning:
Initializing KBD...00000012    FAILED.
when it's broken and it says Done without the hex number when it works. (Two other FAILED messages about clock chip is normal as we don't emulate that but all others should be green.)

Ok, I've reproduced it.  The mouse is a bit flaky but using the keyboard for everything except right clicking works better.

Now the OS doesn't boot anymore, it doesn't get to the point where it initializes the VGA.

Sorry, that is a known breakage from a recent series that's not yet fixed. This patch should fix it:

http://patchew.org/QEMU/cover.1677628524.git.balaton@eik.bme.hu/cdfb3c5a42e505450f6803124f27856434c5b298.1677628524.git.balaton@eik.bme.hu/

or another proposed altenative is here:

20230304114043.121024-1-shentey@gmail.com/20230304114043.121024-2-shentey@gmail.com/">http://patchew.org/QEMU/20230304114043.121024-1-shentey@gmail.com/20230304114043.121024-2-shentey@gmail.com/

Either of the above should work.

I got some quick logs with .impl.min_access_size to 1, to understand what the firmware (but not the OS) does. With this at least I could confirm that your patch is wrong:

cnt 1 1 write 80
evt 3 1 write 1         // enable timer
evt 0 2 read
evt 0 2 write 1         // just writes again the same value
evt 1 1 write
evt 1 1 write 0

Since you have both 1-size and 2-size writes, and the 2-byte reads/writes are done with byte swapping instructions lhbrx and sthbrx, your patch would cause 0x100 to be read and written on the third and fourth lines.

Likewise, any 4-byte read of the timer port would be byte swapped.

The solution is a patch similar to mine, applied to both evt and cnt; while perhaps tmr can be left as is and only accept 4-byte reads, I don't know. I'll try to come up with something that can be tested at least with the firmware.

I'm not sure I follow what you mean so I'd need a patch to see then I can test it with the clients I run on pegasos2.

Regards,
BALATON Zoltan

reply via email to

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