提交 d0e184ab 编写于 作者: B Bob Moore 提交者: Andi Kleen

ACPICA: Workaround for reversed _PRT entries from BIOS

Some BIOSs erroneously reverse the _PRT SourceName and the
SourceIndex.  Detect and repair this problem. MS ACPI also allows
and repairs this problem, thus ACPICA must also.
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLin Ming <ming.m.lin@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
上级 b25d2a47
...@@ -284,6 +284,23 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, ...@@ -284,6 +284,23 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
} }
} }
/*
* If the BIOS has erroneously reversed the _PRT source_name (index 2)
* and the source_index (index 3), fix it. _PRT is important enough to
* workaround this BIOS error. This also provides compatibility with
* other ACPI implementations.
*/
obj_desc = sub_object_list[3];
if (!obj_desc
|| (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER)) {
sub_object_list[3] = sub_object_list[2];
sub_object_list[2] = obj_desc;
ACPI_WARNING((AE_INFO,
"(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed",
index));
}
/* /*
* 3) Third subobject: Dereference the PRT.source_name * 3) Third subobject: Dereference the PRT.source_name
* The name may be unresolved (slack mode), so allow a null object * The name may be unresolved (slack mode), so allow a null object
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册