[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v4 61/83] hw/i386/acpi-build: Resolve north rather than south brid
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v4 61/83] hw/i386/acpi-build: Resolve north rather than south bridges |
|
Date: |
Mon, 7 Nov 2022 17:52:33 -0500 |
From: Bernhard Beschow <shentey@gmail.com>
The code currently assumes Q35 iff ICH9 and i440fx iff PIIX. Now that more
AML generation has been moved into the south bridges and since the
machines define themselves primarily through their north bridges, let's
switch to resolving the north bridges for AML generation instead. This
also allows for easier experimentation with different south bridges in
the "pc" machine, e.g. with PIIX4 and VT82xx.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20221028103419.93398-4-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 73d8a59737..d9eaa5fc4d 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -60,6 +60,7 @@
#include "hw/i386/fw_cfg.h"
#include "hw/i386/ich9.h"
#include "hw/pci/pci_bus.h"
+#include "hw/pci-host/i440fx.h"
#include "hw/pci-host/q35.h"
#include "hw/i386/x86-iommu.h"
@@ -1322,8 +1323,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
AcpiPmInfo *pm, AcpiMiscInfo *misc,
Range *pci_hole, Range *pci_hole64, MachineState *machine)
{
- Object *piix = object_resolve_type_unambiguous(TYPE_PIIX4_PM);
- Object *lpc = object_resolve_type_unambiguous(TYPE_ICH9_LPC_DEVICE);
+ Object *i440fx =
object_resolve_type_unambiguous(TYPE_I440FX_PCI_HOST_BRIDGE);
+ Object *q35 = object_resolve_type_unambiguous(TYPE_Q35_HOST_DEVICE);
CrsRangeEntry *entry;
Aml *dsdt, *sb_scope, *scope, *dev, *method, *field, *pkg, *crs;
CrsRangeSet crs_range_set;
@@ -1344,13 +1345,13 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
AcpiTable table = { .sig = "DSDT", .rev = 1, .oem_id = x86ms->oem_id,
.oem_table_id = x86ms->oem_table_id };
- assert(!!piix != !!lpc);
+ assert(!!i440fx != !!q35);
acpi_table_begin(&table, table_data);
dsdt = init_aml_allocator();
build_dbg_aml(dsdt);
- if (piix) {
+ if (i440fx) {
sb_scope = aml_scope("_SB");
dev = aml_device("PCI0");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
@@ -1363,7 +1364,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
build_x86_acpi_pci_hotplug(dsdt, pm->pcihp_io_base);
}
build_piix4_pci0_int(dsdt);
- } else if (lpc) {
+ } else if (q35) {
sb_scope = aml_scope("_SB");
dev = aml_device("PCI0");
aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08")));
--
MST
- [PULL v4 51/83] tests: acpi: update expected blobs, (continued)
- [PULL v4 51/83] tests: acpi: update expected blobs, Michael S. Tsirkin, 2022/11/07
- [PULL v4 52/83] tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup, Michael S. Tsirkin, 2022/11/07
- [PULL v4 53/83] acpi: pc/35: sanitize _GPE declaration order, Michael S. Tsirkin, 2022/11/07
- [PULL v4 54/83] tests: acpi: update expected blobs, Michael S. Tsirkin, 2022/11/07
- [PULL v4 55/83] hw/acpi/erst.c: Fix memory handling issues, Michael S. Tsirkin, 2022/11/07
- [PULL v4 56/83] MAINTAINERS: Add qapi/virtio.json to section "virtio", Michael S. Tsirkin, 2022/11/07
- [PULL v4 57/83] msix: Assert that specified vector is in range, Michael S. Tsirkin, 2022/11/07
- [PULL v4 58/83] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios, Michael S. Tsirkin, 2022/11/07
- [PULL v4 59/83] hw/i386/acpi-build: Remove unused struct, Michael S. Tsirkin, 2022/11/07
- [PULL v4 60/83] hw/i386/acpi-build: Resolve redundant attribute, Michael S. Tsirkin, 2022/11/07
- [PULL v4 61/83] hw/i386/acpi-build: Resolve north rather than south bridges,
Michael S. Tsirkin <=
- [PULL v4 63/83] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs, Michael S. Tsirkin, 2022/11/07
- [PULL v4 64/83] tests: acpi: q35: add test for hmat nodes without initiators, Michael S. Tsirkin, 2022/11/07
- [PULL v4 62/83] hmat acpi: Don't require initiator value in -numa, Michael S. Tsirkin, 2022/11/07
- [PULL v4 65/83] tests: acpi: q35: update expected blobs *.hmat-noinitiators expected HMAT:, Michael S. Tsirkin, 2022/11/07
- [PULL v4 66/83] tests: Add HMAT AArch64/virt empty table files, Michael S. Tsirkin, 2022/11/07
- [PULL v4 67/83] hw/arm/virt: Enable HMAT on arm virt machine, Michael S. Tsirkin, 2022/11/07
- [PULL v4 68/83] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators, Michael S. Tsirkin, 2022/11/07
- [PULL v4 69/83] tests: virt: Update expected *.acpihmatvirt tables, Michael S. Tsirkin, 2022/11/07
- [PULL v4 70/83] vfio: move implement of vfio_get_xlat_addr() to memory.c, Michael S. Tsirkin, 2022/11/07
- [PULL v4 71/83] intel-iommu: don't warn guest errors when getting rid2pasid entry, Michael S. Tsirkin, 2022/11/07