mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-06 10:04:42 -07:00
Add ACPI hot-plug registers to DSDT Q35 tables.
Changes in the tables:
+ Scope (_SB.PCI0)
+ {
+ OperationRegion (PCST, SystemIO, 0x0CC4, 0x08)
+ Field (PCST, DWordAcc, NoLock, WriteAsZeros)
+ {
+ PCIU, 32,
+ PCID, 32
+ }
+
+ OperationRegion (SEJ, SystemIO, 0x0CCC, 0x04)
+ Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
+ {
+ B0EJ, 32
+ }
+
+ OperationRegion (BNMR, SystemIO, 0x0CD4, 0x08)
+ Field (BNMR, DWordAcc, NoLock, WriteAsZeros)
+ {
+ BNUM, 32,
+ PIDX, 32
+ }
+
+ Mutex (BLCK, 0x00)
+ Method (PCEJ, 2, NotSerialized)
+ {
+ Acquire (BLCK, 0xFFFF)
+ BNUM = Arg0
+ B0EJ = (One << Arg1)
+ Release (BLCK)
+ Return (Zero)
+ }
+
+ Method (AIDX, 2, NotSerialized)
+ {
+ Acquire (BLCK, 0xFFFF)
+ BNUM = Arg0
+ PIDX = (One << Arg1)
+ Local0 = PIDX /* \_SB_.PCI0.PIDX */
+ Release (BLCK)
+ Return (Local0)
+ }
+
+ Method (PDSM, 6, Serialized)
+ {
+ If ((Arg0 == ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* Device Labeling Interface */))
+ {
+ Local0 = AIDX (Arg4, Arg5)
+ If ((Arg2 == Zero))
+ {
+ If ((Arg1 == 0x02))
+ {
+ If (!((Local0 == Zero) | (Local0 == 0xFFFFFFFF)))
+ {
+ Return (Buffer (One)
+ {
+ 0x81 // .
+ })
+ }
+ }
+
+ Return (Buffer (One)
+ {
+ 0x00 // .
+ })
+ }
+ ElseIf ((Arg2 == 0x07))
+ {
+ Local1 = Package (0x02)
+ {
+ Zero,
+ ""
+ }
+ Local1 [Zero] = Local0
+ Return (Local1)
+ }
+ }
+ }
+ }
+
...
Scope (_GPE)
{
Name (_HID, "ACPI0006" /* GPE Block Device */) // _HID: Hardware ID
+ Method (_E01, 0, NotSerialized) // _Exx: Edge-Triggered GPE, xx=0x00-0xFF
+ {
+ Acquire (\_SB.PCI0.BLCK, 0xFFFF)
+ \_SB.PCI0.PCNT ()
+ Release (\_SB.PCI0.BLCK)
+ }
...
+
+ Device (PHPR)
+ {
+ Name (_HID, "PNP0A06" /* Generic Container Device */) // _HID: Hardware ID
+ Name (_UID, "PCI Hotplug resources") // _UID: Unique ID
+ Name (_STA, 0x0B) // _STA: Status
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ IO (Decode16,
+ 0x0CC4, // Range Minimum
+ 0x0CC4, // Range Maximum
+ 0x01, // Alignment
+ 0x18, // Length
+ )
+ })
+ }
}
...
And if there is a port in configuration:
Device (S10)
{
Name (_ADR, 0x00020000) // _ADR: Address
+ Name (BSEL, Zero)
+ Device (S00)
+ {
+ Name (_SUN, Zero) // _SUN: Slot User Number
+ Name (_ADR, Zero) // _ADR: Address
+ Method (_EJ0, 1, NotSerialized) // _EJx: Eject Device, x=0-9
+ {
+ PCEJ (BSEL, _SUN)
+ }
+
+ Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
+ {
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+ }
+ }
+
...
+ Method (DVNT, 2, NotSerialized)
+ {
+ If ((Arg0 & One))
+ {
+ Notify (S00, Arg1)
+ }
...
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20210713004205.775386-7-jusual@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||
|---|---|---|
| .. | ||
| fuzz | ||
| libqos | ||
| ac97-test.c | ||
| acpi-utils.c | ||
| acpi-utils.h | ||
| adm1272-test.c | ||
| ahci-test.c | ||
| am53c974-test.c | ||
| arm-cpu-features.c | ||
| aspeed_hace-test.c | ||
| aspeed_smc-test.c | ||
| bios-tables-test-allowed-diff.h | ||
| bios-tables-test.c | ||
| boot-order-test.c | ||
| boot-sector.c | ||
| boot-sector.h | ||
| boot-serial-test.c | ||
| cdrom-test.c | ||
| cmsdk-apb-dualtimer-test.c | ||
| cmsdk-apb-timer-test.c | ||
| cmsdk-apb-watchdog-test.c | ||
| cpu-plug-test.c | ||
| dbus-vmstate-test.c | ||
| dbus-vmstate1.xml | ||
| device-introspect-test.c | ||
| device-plug-test.c | ||
| display-vga-test.c | ||
| drive_del-test.c | ||
| ds1338-test.c | ||
| e1000-test.c | ||
| e1000e-test.c | ||
| eepro100-test.c | ||
| emc141x-test.c | ||
| endianness-test.c | ||
| es1370-test.c | ||
| fdc-test.c | ||
| fuzz-e1000e-test.c | ||
| fuzz-megasas-test.c | ||
| fuzz-sb16-test.c | ||
| fuzz-sdcard-test.c | ||
| fuzz-virtio-scsi-test.c | ||
| fw_cfg-test.c | ||
| hd-geo-test.c | ||
| hexloader-test.c | ||
| i440fx-test.c | ||
| i82801b11-test.c | ||
| ide-test.c | ||
| intel-hda-test.c | ||
| ioh3420-test.c | ||
| ipmi-bt-test.c | ||
| ipmi-kcs-test.c | ||
| ipoctal232-test.c | ||
| ivshmem-test.c | ||
| libqtest-single.h | ||
| libqtest.c | ||
| lpc-ich9-test.c | ||
| m48t59-test.c | ||
| machine-none-test.c | ||
| max34451-test.c | ||
| megasas-test.c | ||
| meson.build | ||
| microbit-test.c | ||
| migration-helpers.c | ||
| migration-helpers.h | ||
| migration-test.c | ||
| modules-test.c | ||
| ne2000-test.c | ||
| npcm7xx_adc-test.c | ||
| npcm7xx_emc-test.c | ||
| npcm7xx_gpio-test.c | ||
| npcm7xx_pwm-test.c | ||
| npcm7xx_rng-test.c | ||
| npcm7xx_smbus-test.c | ||
| npcm7xx_timer-test.c | ||
| npcm7xx_watchdog_timer-test.c | ||
| numa-test.c | ||
| nvme-test.c | ||
| pca9552-test.c | ||
| pci-test.c | ||
| pcnet-test.c | ||
| pflash-cfi02-test.c | ||
| pnv-xscom-test.c | ||
| prom-env-test.c | ||
| pvpanic-pci-test.c | ||
| pvpanic-test.c | ||
| pxe-test.c | ||
| q35-test.c | ||
| qmp-cmd-test.c | ||
| qmp-test.c | ||
| qom-test.c | ||
| qos-test.c | ||
| rtas-test.c | ||
| rtc-test.c | ||
| rtl8139-test.c | ||
| sdhci-test.c | ||
| spapr-phb-test.c | ||
| sse-timer-test.c | ||
| tco-test.c | ||
| test-arm-mptimer.c | ||
| test-filter-mirror.c | ||
| test-filter-redirector.c | ||
| test-hmp.c | ||
| test-netfilter.c | ||
| test-x86-cpuid-compat.c | ||
| tmp105-test.c | ||
| tpm-crb-swtpm-test.c | ||
| tpm-crb-test.c | ||
| tpm-emu.c | ||
| tpm-emu.h | ||
| tpm-tests.c | ||
| tpm-tests.h | ||
| tpm-tis-device-swtpm-test.c | ||
| tpm-tis-device-test.c | ||
| tpm-tis-swtpm-test.c | ||
| tpm-tis-test.c | ||
| tpm-tis-util.c | ||
| tpm-tis-util.h | ||
| tpm-util.c | ||
| tpm-util.h | ||
| tulip-test.c | ||
| usb-hcd-ehci-test.c | ||
| usb-hcd-ohci-test.c | ||
| usb-hcd-uhci-test.c | ||
| usb-hcd-xhci-test.c | ||
| vhost-user-blk-test.c | ||
| vhost-user-test.c | ||
| virtio-9p-test.c | ||
| virtio-blk-test.c | ||
| virtio-ccw-test.c | ||
| virtio-net-test.c | ||
| virtio-rng-test.c | ||
| virtio-scsi-test.c | ||
| virtio-serial-test.c | ||
| virtio-test.c | ||
| vmgenid-test.c | ||
| vmxnet3-test.c | ||
| wdt_ib700-test.c | ||
| xlnx-can-test.c | ||