[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 41/42] i386/acpi-build: more traditional _UID and _HI
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 41/42] i386/acpi-build: more traditional _UID and _HID for PXB root buses |
Date: |
Thu, 11 Jun 2015 14:01:36 +0200 |
From: Laszlo Ersek <address@hidden>
The ACPI specification permits the _HID and _UID objects to evaluate to
strings. (See "6.1.5 _HID (Hardware ID)" and "6.1.12 _UID (Unique ID)" in
the ACPI v6.0 spec.)
With regard to related standards, the UEFI specification can also express
a device address composed from string _HID and _UID identifiers, inside
the Expanded ACPI Device Path Node. (See "9.3.3 ACPI Device Path", Table
49, in the UEFI v2.5 spec.)
However, numeric (integer) contents for both _HID and _UID are more
traditional. They are recommended by the UEFI spec for size reasons:
[...] the ACPI Device Path node is smaller and should be used if
possible to reduce the size of device paths that may potentially be
stored in nonvolatile storage [...]
External tools support them better (for example the --acpi_hid and
--acpi_uid options of "efibootmgr" only take numeric identifiers).
Finally, numeric _HID and _UID contents are existing practice in the QEMU
source.
This patch was tested with a Fedora 20 LiveCD and a preexistent Windows
Server 2012 R2 guest. Using "acpidump" and "iasl" in the Fedora guest, we
get, in the SSDT:
> Scope (\_SB)
> {
> Device (PC04)
> {
> Name (_UID, 0x04) // _UID: Unique ID
> Name (_HID, EisaId ("PNP0A03") /* PCI Bus */) // _HID: Hardware ID
Cc: Marcel Apfelbaum <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/acpi-build.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index db32fd1..8fae3b9 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -944,9 +944,8 @@ build_ssdt(GArray *table_data, GArray *linker,
scope = aml_scope("\\_SB");
dev = aml_device("PC%.02X", bus_num);
- aml_append(dev,
- aml_name_decl("_UID", aml_string("PC%.02X", bus_num)));
- aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A03")));
+ aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
+ aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
if (numa_node != NUMA_NODE_UNASSIGNED) {
--
MST
- [Qemu-devel] [PULL 30/42] virtio-pci: fill VirtIOPCIRegions early., (continued)
- [Qemu-devel] [PULL 30/42] virtio-pci: fill VirtIOPCIRegions early., Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 32/42] virtio-input: core code & base class [pci], Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 34/42] virtio-net: move qdev properties into virtio-net.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 33/42] virtio-input: emulated devices [pci], Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 35/42] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 36/42] virtio-scsi: move qdev properties into virtio-scsi.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 37/42] virtio-rng: move qdev properties into virtio-rng.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 39/42] virtio-9p-device: move qdev properties into virtio-9p-device.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 38/42] virtio-serial-bus: move qdev properties into virtio-serial-bus.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 40/42] vhost-scsi: move qdev properties into vhost-scsi.c, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 41/42] i386/acpi-build: more traditional _UID and _HID for PXB root buses,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 42/42] i386/acpi-build: fix PXB workarounds for unsupported BIOSes, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 21/42] virtio-pci: correctly set host notifiers for modern bar, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 20/42] virtio-pci: make modern bar 64bit + prefetchable, Michael S. Tsirkin, 2015/06/11
- [Qemu-devel] [PULL 19/42] virtio-pci: change & document virtio pci bar layout., Michael S. Tsirkin, 2015/06/11
- Re: [Qemu-devel] [PULL 00/42] pc, acpi, virtio, Peter Maydell, 2015/06/11