[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp
|
From: |
Laszlo Ersek |
|
Subject: |
Re: [PATCH 3/3] tests/acpi: Update virt/SSDT.memhp |
|
Date: |
Mon, 15 Jan 2024 20:07:41 +0100 |
On 1/15/24 15:46, Bin Meng wrote:
> On Mon, Jan 15, 2024 at 7:40 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Bin Meng <bin.meng@windriver.com> writes:
>>
>>> The Arm dtb changes caused an address change:
>>>
>>> DefinitionBlock ("", "SSDT", 1, "BOCHS ", "NVDIMM", 0x00000001)
>>> {
>>> [ ... ]
>>> - Name (MEMA, 0x43C80000)
>>> + Name (MEMA, 0x43D80000)
>>> }
>>
>> I'm confused by why this changes. Isn't this declaring the size of a
>> NVDIMM region of the memory map? Why does a DTB change affect an ACPI
>> based boot?
>>
>
> I have no idea too. I suspect that's because the AllocateAlignedPages
> call to allocate a 1 MiB aligned address in the BiosTableTest.c is
> affected by the shrinked DTB now.
>
> + Laszlo who might know the root cause.
Just speculating:
from "docs/specs/acpi_nvdimm.rst":
Memory:
QEMU uses BIOS Linker/loader feature to ask BIOS to allocate a memory
page and dynamically patch its address into an int32 object named "MEMA"
in ACPI.
Therefore any QEMU-side change that affects memory allocations in the guest may
affect the ACPI contents (captured later).
I don't know what the DTB change at hand was, but if (for example) the DTB has
grown significantly, that could lead to this. The guest firmware stashes a
dynamically allocated copy of the DTB, early on in the PEI phase. Some growth
there may change the initial memory map of the DXE phase, which could affect
the ACPI linker/loader's allocation operations.
If you can attach the DTB before-after, and the *verbose* firmware log
before-after, we might find out finer details.
Laszlo