emulation: Add the BGRT on the end of the QEMU tables
It is useful to show a boot logo when starting up. Add the BGRT table after the QEMU-provided tables. Signed-off-by: Simon Glass <sjg@chromium.org> Cover-letter: emulation: Improve ACPI support for qemu-x86_64 When running under QEMU U-Boot obtains its ACPI tables from QEMU, since it has the require information. This works well in most cases. QEMU also provides SMBIOS tables, but U-Boot doesn't currently use those on x86. This creates problems if a VM environment is expecting to see particular values (e.g. those which it passed to QEMU!) when booting. So this series switches QEMU on x86 to use those SMBIOS tables. Finally, there is a facility in EFI for showing a boot logo, via a BGRT table. QEMU does not provide this itself, so this series augments the ACPI tables with a new BGRT table containing a suitable logo. END
This commit is contained in:
@@ -242,6 +242,20 @@ out:
|
||||
|
||||
gd_set_acpi_start(acpi_get_rsdp_addr());
|
||||
|
||||
ctx->rsdt = (struct acpi_rsdt *)acpi_find_table("RSDT");
|
||||
ctx->xsdt = (struct acpi_xsdt *)acpi_find_table("XSDT");
|
||||
|
||||
/*
|
||||
* leave space for four 64-bit pointers so we can add up to four more
|
||||
* tables
|
||||
*/
|
||||
ctx->current = acpi_get_end() + 0x20;
|
||||
ret = acpi_write_bgrt(ctx);
|
||||
if (ret) {
|
||||
printf("error: failed to write BGRT (err=%dE)\n", ret);
|
||||
return addr;
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user