ACPICA: Tables: Fix the issues in handling virtual addressed tables.
When table is overridden or reloaded, acpi_tb_delete_table() is called where struct acpi_table_desc.Pointer will be NULL. It thus is impossible for virtual addressed tables to obtain the .Pointer again in acpi_tb_verify_table(). This patch stores virtual table addresses (ACPI_TABLE_ORIGIN_ALLOCATED, ACPI_TABLE_ORIGIN_UNKNOWN, ACPI_TABLE_ORIGIN_OVERRIDE) in the struct acpi_table_desc.Address field and refills the struct acpi_table_desc.Pointer using these addresses in acpi_tb_verify_table(). Note that if a table with ACPI_TABLE_ORIGIN_ALLOCATED set is actually freed, the .Address field should be invalidated and thus must be replaced with NULL to avoid wrong future validations occuring in acpi_tb_verify_table(). Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Esse commit está contido em:
@@ -435,7 +435,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
table_desc.address = obj_desc->region.address;
|
||||
table_desc.address = ACPI_PTR_TO_PHYSADDR(table_desc.pointer);
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */
|
||||
@@ -476,7 +476,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
|
||||
}
|
||||
|
||||
ACPI_MEMCPY(table_desc.pointer, table, length);
|
||||
table_desc.address = ACPI_TO_INTEGER(table_desc.pointer);
|
||||
table_desc.address = ACPI_PTR_TO_PHYSADDR(table_desc.pointer);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Referência em uma nova issue
Block a user