John Looney has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32082
Change subject: Patch SSDTs into qemu, and add VPD area to the fmap for q35 as a proof of concept ......................................................................
Patch SSDTs into qemu, and add VPD area to the fmap for q35 as a proof of concept
Change-Id: I8c31fa79e13be237a752f47e72a6a7025fe9dffd
reformatting
Change-Id: I4e1b161a89d860c350d4735f843f6bee42313378 --- M src/arch/x86/acpi.c M src/mainboard/emulation/qemu-i440fx/fw_cfg.c M src/mainboard/emulation/qemu-q35/Kconfig 3 files changed, 20 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/32082/1
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index f08a401..7bbbd2f 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -38,7 +38,6 @@ */
#include <console/console.h> -#include <string.h> #include <arch/acpi.h> #include <arch/acpi_ivrs.h> #include <arch/acpigen.h> diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 3acb11e..af5dddd 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -225,6 +225,8 @@ BiosLinkerLoaderEntry *s; unsigned long *addrs, current; uint8_t *ptr; + acpi_rsdp_t *rsdp = NULL; + acpi_header_t *ssdt; int i, j, src, dst, max;
if (fw_cfg_check_file(&f, "etc/table-loader")) @@ -251,6 +253,10 @@
printk(BIOS_DEBUG, "QEMU: loading "%s" to 0x%lx (len %d)\n", s[i].alloc.file, current, f.size); + if (!strncmp(s[i].alloc.file, "etc/acpi/rsdp", 13)) { + printk(BIOS_DEBUG, "Found RSDP at 0x%lx\n", current); + rsdp = (acpi_rsdp_t *) current; + } fw_cfg_get(f.select, (void *)current, f.size); addrs[i] = current; current += f.size; @@ -322,6 +328,16 @@ }; }
+ if (rsdp) { + ssdt = (acpi_header_t *)current; + acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR); + if (ssdt->length > sizeof(acpi_header_t)) { + current += ssdt->length; + acpi_add_table(rsdp, ssdt); + current = acpi_align_current(current); + } + } + printk(BIOS_DEBUG, "QEMU: loaded ACPI tables from fw_cfg.\n"); free(s); free(addrs); diff --git a/src/mainboard/emulation/qemu-q35/Kconfig b/src/mainboard/emulation/qemu-q35/Kconfig index 815b93b..0672092 100644 --- a/src/mainboard/emulation/qemu-q35/Kconfig +++ b/src/mainboard/emulation/qemu-q35/Kconfig @@ -54,4 +54,8 @@ hex default 0x4000
+config FMDFILE + string + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/board.fmd" + endif # BOARD_EMULATION_QEMU_X86_Q35
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32082 )
Change subject: Patch SSDTs into qemu, and add VPD area to the fmap for q35 as a proof of concept ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32082/1/src/mainboard/emulation/qemu-i440fx/... File src/mainboard/emulation/qemu-i440fx/fw_cfg.c:
https://review.coreboot.org/#/c/32082/1/src/mainboard/emulation/qemu-i440fx/... PS1, Line 257: printk(BIOS_DEBUG, "Found RSDP at 0x%lx\n", current); line over 80 characters
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/32082?usp=email )
Change subject: Patch SSDTs into qemu, and add VPD area to the fmap for q35 as a proof of concept ......................................................................
Abandoned