在 2020/1/16 21:25, Igor Mammedov 写道:
On Thu, 16 Jan 2020 19:56:19 +0800
Guoheyi <guoh...@huawei.com> wrote:
在 2020/1/5 20:53, Michael S. Tsirkin 写道:
On Sun, Jan 05, 2020 at 07:34:01AM -0500, Michael S. Tsirkin wrote:
On Thu, Dec 19, 2019 at 02:47:59PM +0800, Heyi Guo wrote:
According to ACPI spec, _ADR should be used for device which is on a
bus that has a standard enumeration algorithm. It does not make sense
to have a _ADR object for devices which already have _HID and will be
enumerated by OSPM.
Signed-off-by: Heyi Guo <guoh...@huawei.com>
Are you sure? I would think this depends on the ID and the device
really. E.g. PCI devices all are expected to have _ADR and some of them
have a _HID.
To clarify I am not commenting on patches.
The spec says this:
6.1.5 _HID (Hardware ID)
This object is used to supply OSPM with the device’s PNP ID or ACPI ID.
1
When describing a platform, use of any _HID objects is optional.
However, a _HID object must be
used to describe any device that will be enumerated by OSPM. OSPM only
enumerates a device
when no bus enumerator can detect the device ID. For example, devices
on an ISA bus are
enumerated by OSPM. Use the _ADR object to describe devices enumerated
by bus enumerators
other than OSPM.
Note: "detect the device ID" not "enumerate the device" which I think
means there's a driver matching this vendor/device ID.
So it seems fine to have _ADR so device is enumerated, and still have
_HID e.g. so ACPI driver can be loaded as fallback if there's
no bus driver.
Note I am not saying the patch itself is not correct.
Maybe these devices are not on any standard bus and that
is why they should not have _ADR? I have not looked.
I am just saying that spec does not seem to imply _HID and _ADR
can't coexist.
More reading on the spec, I found a statement as below
(https://uefi.org/sites/default/files/resources/ACPI_6_3_May16.pdf,
section 6.1, on top of page 343):
I'd replace 'It does not make sense ...' sentence with pointer to spec
and quote below in commit message.
Sure; actually I hadn't found this statement in the spec when making the
patch :)
Thanks,
Heyi
A device object must contain either an _HID object or an _ADR object,
but should not contain both
[...]
.