On Thu, Jun 08, 2023 at 07:09:36PM +0800, Qiumiao Zhang via Grub-devel wrote: > According to the UEFI specification, in ACPI 2.0 or later, an ACPI-compatible > OS must use the XSDT if present.
Sorry, I cannot find this in the UEFI spec. Though something more generic is in the ACPI spec. Could you update the commit message accordingly? > So, we should use xsdt_addr instead of rsdt_addr if xsdt_addr is valid. Ha! We have the same problem in the grub-core/kern/acpi.c:grub_acpi_find_table(). May I ask you to fix this function too? Of course in separate patch. > Signed-off-by: Qiumiao Zhang <zhangqiumi...@huawei.com> > --- > grub-core/commands/acpi.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/grub-core/commands/acpi.c b/grub-core/commands/acpi.c > index deec4bb43..6a7c9ad87 100644 > --- a/grub-core/commands/acpi.c > +++ b/grub-core/commands/acpi.c > @@ -514,7 +514,11 @@ grub_cmd_acpi (struct grub_extcmd_context *ctxt, int > argc, char **args) > /* Set revision variables to replicate the same version as host. */ > rev1 = ! rsdp->revision; > rev2 = rsdp->revision; > - rsdt = (struct grub_acpi_table_header *) (grub_addr_t) rsdp->rsdt_addr; > + if (rev2 && ((struct grub_acpi_rsdp_v20 *) rsdp)->xsdt_addr != NULL) > + rsdt = (struct grub_acpi_table_header *) (grub_addr_t) ((struct > grub_acpi_rsdp_v20 *) rsdp)->xsdt_addr; > + else > + rsdt = (struct grub_acpi_table_header *) (grub_addr_t) rsdp->rsdt_addr; This LGTM... Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel