mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 12:12:16 +00:00
board_inspector: add _CID to vACPI device objects
ACPI device drivers use both _HID and _CID to identify devices they match. This patch copies _CID objects to vACPI devices so that guest drivers can recognize the passthrough devices properly. Tracked-On: #6288 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
a0c03030f6
commit
855b0ed774
@ -439,6 +439,12 @@ def fetch_device_info(devices_node, interpreter, namepath, args):
|
|||||||
hid = "<unknown>"
|
hid = "<unknown>"
|
||||||
add_object_to_device(interpreter, namepath, "_HID", result)
|
add_object_to_device(interpreter, namepath, "_HID", result)
|
||||||
|
|
||||||
|
# Create the XML element for the device and create its ancestors if necessary
|
||||||
|
element = get_device_element(devices_node, namepath, hid)
|
||||||
|
if hid in buses.keys():
|
||||||
|
element.tag = "bus"
|
||||||
|
element.set("type", buses[hid])
|
||||||
|
|
||||||
# Compatible ID
|
# Compatible ID
|
||||||
cids = []
|
cids = []
|
||||||
if interpreter.context.has_symbol(f"{namepath}._CID"):
|
if interpreter.context.has_symbol(f"{namepath}._CID"):
|
||||||
@ -458,13 +464,9 @@ def fetch_device_info(devices_node, interpreter, namepath, args):
|
|||||||
elif isinstance(cid_datum, datatypes.String):
|
elif isinstance(cid_datum, datatypes.String):
|
||||||
cids.append(cid_datum.get())
|
cids.append(cid_datum.get())
|
||||||
|
|
||||||
# Create the XML element for the device and create its ancestors if necessary
|
|
||||||
element = get_device_element(devices_node, namepath, hid)
|
|
||||||
if hid in buses.keys():
|
|
||||||
element.tag = "bus"
|
|
||||||
element.set("type", buses[hid])
|
|
||||||
for cid in cids:
|
for cid in cids:
|
||||||
add_child(element, "compatible_id", cid)
|
add_child(element, "compatible_id", cid)
|
||||||
|
add_object_to_device(interpreter, namepath, "_CID", cid_object)
|
||||||
|
|
||||||
# Unique ID
|
# Unique ID
|
||||||
uid = ""
|
uid = ""
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user