[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: |
Mon, 1 May 2023 01:26:16 +0200 (CEST) |
On Mon, 1 May 2023, BALATON Zoltan wrote:
- unaligned access is not handled correctly in acpi_pm_cnt_write() which now
I think is the place where this should be fixed
And also when running the test script on QEMU:
acpi_pm_cnt_read: 0 2 -> 0x80
acpi_pm_cnt_read: 1 2 -> 0x80
where the second should return 0 so these ops are either wrong or the
memory layer does not do what's intended for:
static const MemoryRegionOps acpi_pm_cnt_ops = {
.read = acpi_pm_cnt_read,
.write = acpi_pm_cnt_write,
.impl.min_access_size = 2,
.valid.min_access_size = 1,
.valid.max_access_size = 2,
.endianness = DEVICE_LITTLE_ENDIAN,
};
I could patch this up in acpi_pm_cnt_read() abd acpi_pm_cnt_write() but
how this is supposed to work? Do these functions have to handle unaligned
access or the impl/valid settings should take care of that?
Regards,
BALATON Zoltan