From: Marcel Apfelbaum <marcel@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/4] i386/acpi-build: more traditional _UID and _HID for PXB root buses
Date: Wed, 10 Jun 2015 12:16:42 +0300 [thread overview]
Message-ID: <5578007A.8010401@redhat.com> (raw)
In-Reply-To: <1433547989-7238-2-git-send-email-lersek@redhat.com>
On 06/06/2015 02:46 AM, Laszlo Ersek wrote:
> 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 <marcel@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 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 5593e41..52c2591 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -945,9 +945,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) {
>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Thanks,
Marcel
next prev parent reply other threads:[~2015-06-10 9:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 23:45 [Qemu-devel] PXB fixes for QEMU, and extra root buses for OVMF Laszlo Ersek
2015-06-05 23:46 ` [Qemu-devel] [PATCH 0/4] PXB tweaks and fixes Laszlo Ersek
2015-06-05 23:46 ` [Qemu-devel] [PATCH 1/4] i386/acpi-build: more traditional _UID and _HID for PXB root buses Laszlo Ersek
2015-06-10 9:16 ` Marcel Apfelbaum [this message]
2015-06-05 23:46 ` [Qemu-devel] [PATCH 2/4] i386/acpi-build: fix PXB workarounds for unsupported BIOSes Laszlo Ersek
2015-06-10 9:17 ` Marcel Apfelbaum
2015-06-05 23:46 ` [Qemu-devel] [PATCH 3/4] hw/pci: allow the caller of pci_bar_address() to ignore command register Laszlo Ersek
2015-06-05 23:46 ` [Qemu-devel] [PATCH 4/4] i386/acpi-build: build_crs(): fetch BAR from PCI config space directly Laszlo Ersek
2015-06-07 9:23 ` Michael S. Tsirkin
2015-06-08 7:56 ` Laszlo Ersek
2015-06-08 9:40 ` Michael S. Tsirkin
2015-06-09 20:34 ` Laszlo Ersek
2015-06-10 10:06 ` Marcel Apfelbaum
2015-06-10 11:07 ` Laszlo Ersek
2015-06-10 16:21 ` Michael S. Tsirkin
2015-06-10 16:19 ` Michael S. Tsirkin
2015-06-10 9:09 ` [Qemu-devel] PXB fixes for QEMU, and extra root buses for OVMF Marcel Apfelbaum
2015-06-10 11:04 ` Laszlo Ersek
2015-06-10 11:55 ` Marcel Apfelbaum
2015-06-10 12:05 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5578007A.8010401@redhat.com \
--to=marcel@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).