diff options
| author | Lv Zheng <lv.zheng@intel.com> | 2016-12-14 02:04:33 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-20 20:36:38 -0500 |
| commit | 66360faa4333babc53836c7b59a0cff68cb0a9c6 (patch) | |
| tree | b7c895a9a106ce6457b1a23697e2b47e6e5d5e1d | |
| parent | 174cc7187e6f088942c8e74daa7baff7b44b33c9 (diff) | |
ACPICA: Tables: Allow FADT to be customized with virtual address
ACPICA commit d98de9ca14891130efc5dcdc871b97eb27b4b0f5
FADT parsing code requires FADT to be installed as
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, using new
acpi_tb_get_table()/acpi_tb_put_table(), other address types can also be allowed,
thus facilitates FADT customization with virtual address. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/d98de9ca
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>
| -rw-r--r-- | drivers/acpi/acpica/tbfadt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index 5fb838e592dc..81473a4880ce 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c | |||
| @@ -311,6 +311,8 @@ void acpi_tb_parse_fadt(void) | |||
| 311 | { | 311 | { |
| 312 | u32 length; | 312 | u32 length; |
| 313 | struct acpi_table_header *table; | 313 | struct acpi_table_header *table; |
| 314 | struct acpi_table_desc *fadt_desc; | ||
| 315 | acpi_status status; | ||
| 314 | 316 | ||
| 315 | /* | 317 | /* |
| 316 | * The FADT has multiple versions with different lengths, | 318 | * The FADT has multiple versions with different lengths, |
| @@ -319,14 +321,12 @@ void acpi_tb_parse_fadt(void) | |||
| 319 | * Get a local copy of the FADT and convert it to a common format | 321 | * Get a local copy of the FADT and convert it to a common format |
| 320 | * Map entire FADT, assumed to be smaller than one page. | 322 | * Map entire FADT, assumed to be smaller than one page. |
| 321 | */ | 323 | */ |
| 322 | length = acpi_gbl_root_table_list.tables[acpi_gbl_fadt_index].length; | 324 | fadt_desc = &acpi_gbl_root_table_list.tables[acpi_gbl_fadt_index]; |
| 323 | 325 | status = acpi_tb_get_table(fadt_desc, &table); | |
| 324 | table = | 326 | if (ACPI_FAILURE(status)) { |
| 325 | acpi_os_map_memory(acpi_gbl_root_table_list. | ||
| 326 | tables[acpi_gbl_fadt_index].address, length); | ||
| 327 | if (!table) { | ||
| 328 | return; | 327 | return; |
| 329 | } | 328 | } |
| 329 | length = fadt_desc->length; | ||
| 330 | 330 | ||
| 331 | /* | 331 | /* |
| 332 | * Validate the FADT checksum before we copy the table. Ignore | 332 | * Validate the FADT checksum before we copy the table. Ignore |
| @@ -340,7 +340,7 @@ void acpi_tb_parse_fadt(void) | |||
| 340 | 340 | ||
| 341 | /* All done with the real FADT, unmap it */ | 341 | /* All done with the real FADT, unmap it */ |
| 342 | 342 | ||
| 343 | acpi_os_unmap_memory(table, length); | 343 | acpi_tb_put_table(fadt_desc); |
| 344 | 344 | ||
| 345 | /* Obtain the DSDT and FACS tables via their addresses within the FADT */ | 345 | /* Obtain the DSDT and FACS tables via their addresses within the FADT */ |
| 346 | 346 | ||
