summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-06-30 06:29:52 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-07-02 09:10:03 +0000
commitfb49379ed22341d5e5e859af6823e9361db021f6 (patch)
tree2aef1c47d99cdde3bb8036b615e09acad6668cd4 /src/arch
parent8c9be4327154ef46ffc96da13f816ffddb77253d (diff)
downloadcoreboot-fb49379ed22341d5e5e859af6823e9361db021f6.tar.xz
device/pci_rom: Fix redundant pci_rom_probe() calls
For the PCI_VENDOR_ID_ATI case, we can rely on pci_rom_acpi_fill_vfct() to make the call if necessary. For hardware other than ATI, pci_rom_probe() was already called from pci_rom_ssdt() and pci_dev_init(), so PCI_ROM_ADDRESS BAR is already enabled, if requested so. Change-Id: I0ea893a9ac7ba480840ebf5570d8fe0d9e20938f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33909 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Mike Banon <mikebdp2@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/acpi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index 80923e3edd..8ab993ec48 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -763,11 +763,14 @@ void acpi_create_vfct(struct device *device,
memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = asl_revision;
- header->length = sizeof(struct acpi_vfct);
header->revision = get_acpi_table_revision(VFCT);
current = acpi_fill_vfct(device, vfct, current);
+ /* If no BIOS image, return with header->length == 0. */
+ if (!vfct->VBIOSImageOffset)
+ return;
+
/* (Re)calculate length and checksum. */
header->length = current - (unsigned long)vfct;
header->checksum = acpi_checksum((void *)vfct, header->length);