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 17:48:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 3/7/23 16:21, BALATON Zoltan wrote:
I didn't even have an idea that Forth was involved, honestly, or how to write Forth code for this machine that I barely know exists. 😄

It's supposed to be CHRP compatible which mandates OpenFirmware so it should work about the same as similar IBM and Apple machines but those are also kind of obscure. If you can describe what you want tested I can try to make that a script and ask somebody to run it on real machine but I'm not sure what to test.

For example:

- read the PMTIMER, check that it increases when read as little endian

- read individual bytes of the PMTIMER and check which increase faster


Also, since we've probably identified the EN and STS registers:

- write 0 to the supposed 16-bit EN register

- write 1 to the supposed 16-bit EN register

- check that it reads back as 1 (the STS register would not)

- read individual bytes of the 16-bit EN register and check which is the low and which is the high one

- write 0x100 to the supposed 16-bit EN register

- check that it reads back as 0x100

- read individual bytes of the 16-bit EN register and confirm that the one you identified as "low" now reads 0 and the one you identified as "high" now reads 1


Or:

- read the (supposed) 16-bit STS register

- wait for the STS register to be non-zero

- write the read value to the STS register

- read again and check that it's zero

- wait for the STS register to be non-zero

- read the individual bytes of the 16-bit STS register and check which is the low and which is the high one

- wait for the STS register to be non-zero

- for each individual byte of the STS register, write it back, and check that it now reads to zero

Part of this should already work in QEMU.

Paolo




reply via email to

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