[PATCH v2 2/2] cmd: acpi: fix acpi list command
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sat Nov 18 20:02:26 CET 2023
On 11/12/23 21:01, Simon Glass wrote:
> On Sun, 12 Nov 2023 at 00:03, Heinrich Schuchardt
> <heinrich.schuchardt at canonical.com> wrote:
>>
>> ACPI tables may comprise either RSDT, XSDT, or both. The current code fails
>> to check the presence of the RSDT table before accessing it. This leads to
>> an exception if the RSDT table is not provided.
>>
>> The XSDT table takes precedence over the RSDT table.
>>
>> Addresses in the XSDT table are 64-bit. Adjust the output accordingly.
>>
>> As the RSDT table has to be ignored if the XSDT command is present there is
>> no need to compare the tables in a display command. Anyway the
>> specification does not require that the sequence of addresses in the RSDT
>> and XSDT table are the same.
>>
>> The FACS table header does not provide revision information. Correct the
>> description of dump_hdr().
>>
>> Adjust the ACPI test to match the changed output format of the 'acpi list'
>> command.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> ---
>> v2:
>> add unit test for offset of field Entry in RSDT, XSDT
>> merge patch 2 and 3
>> remove leading zeros from address output
>> ---
>> cmd/acpi.c | 48 +++++++++++++++++++++++++++++-------------------
>> test/dm/acpi.c | 18 +++++++++---------
>> 2 files changed, 38 insertions(+), 28 deletions(-)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
The patch does not consider that
map_sysmem(0, 0) != NULL
on the sandbox.
list_rsdp() needs to be changed to pass rsdt or xsdt as NULL if
rsdt_address or xsdt_address is zero when invoking list_rsdt().
So this needs a respin.
Best regards
Heinrich
More information about the U-Boot
mailing list