Commit 428394df authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem

ACPICA commit ab29013cfa2424140446aff196a70b211ab343a9

The /dev/mem can be configured out, in which case, acpidump should still
work with "-c" option as tables can be found in /sys/firmware/acpi/tables.
This patch allows acpidump to work without /dev/mem.
This patch has been tested with "acpidump -c" and "acpidump -c -n FADT".
And it worked as expected. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/ab29013cReported-by: default avatarAl Stone <ahs3@redhat.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent fde175e3
...@@ -582,6 +582,8 @@ static acpi_status osl_table_initialize(void) ...@@ -582,6 +582,8 @@ static acpi_status osl_table_initialize(void)
return (AE_OK); return (AE_OK);
} }
if (!gbl_dump_customized_tables) {
/* Get RSDP from memory */ /* Get RSDP from memory */
status = osl_load_rsdp(); status = osl_load_rsdp();
...@@ -600,8 +602,9 @@ static acpi_status osl_table_initialize(void) ...@@ -600,8 +602,9 @@ static acpi_status osl_table_initialize(void)
gbl_revision = 2; gbl_revision = 2;
status = osl_get_bios_table(ACPI_SIG_XSDT, 0, status = osl_get_bios_table(ACPI_SIG_XSDT, 0,
ACPI_CAST_PTR(struct ACPI_CAST_PTR(struct
acpi_table_header *, acpi_table_header
&gbl_xsdt), &address); *, &gbl_xsdt),
&address);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return (status); return (status);
} }
...@@ -617,8 +620,9 @@ static acpi_status osl_table_initialize(void) ...@@ -617,8 +620,9 @@ static acpi_status osl_table_initialize(void)
status = osl_get_bios_table(ACPI_SIG_RSDT, 0, status = osl_get_bios_table(ACPI_SIG_RSDT, 0,
ACPI_CAST_PTR(struct ACPI_CAST_PTR(struct
acpi_table_header *, acpi_table_header
&gbl_rsdt), &address); *, &gbl_rsdt),
&address);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return (status); return (status);
} }
...@@ -632,15 +636,14 @@ static acpi_status osl_table_initialize(void) ...@@ -632,15 +636,14 @@ static acpi_status osl_table_initialize(void)
} }
status = osl_get_bios_table(ACPI_SIG_FADT, 0, status = osl_get_bios_table(ACPI_SIG_FADT, 0,
ACPI_CAST_PTR(struct acpi_table_header *, ACPI_CAST_PTR(struct
acpi_table_header *,
&gbl_fadt), &gbl_fadt),
&gbl_fadt_address); &gbl_fadt_address);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return (status); return (status);
} }
if (!gbl_dump_customized_tables) {
/* Add mandatory tables to global table list first */ /* Add mandatory tables to global table list first */
status = osl_add_table_to_list(ACPI_RSDP_NAME, 0); status = osl_add_table_to_list(ACPI_RSDP_NAME, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment