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: Paolo Bonzini
Subject: Re: [PATCH] hw/acpi: Set memory regions to native endian as a work around
Date: Tue, 7 Mar 2023 00:36:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

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

Paolo




reply via email to

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