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

ACPICA: acpidump: Add ACPI 1.0 RSDP support.

The acpidump currently always uses ACPI 2.0 format to dump RSDP, this patch
adds ACPI 1.0 RSDP support.

Link: https://bugs.acpica.org/show_bug.cgi?id=1097
Link: https://bugs.acpica.org/show_bug.cgi?id=1103Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Reported-and-tested-by: default avatarRudolf Marek <r.marek@assembler.cz>
Reported-and-tested-by: default avatarRafal <fatwildcat@gmail.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 5f8b35b6
...@@ -49,6 +49,8 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count); ...@@ -49,6 +49,8 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count);
/* /*
* tbxfroot - Root pointer utilities * tbxfroot - Root pointer utilities
*/ */
u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp);
acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp); acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp);
u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length); u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length);
......
...@@ -48,6 +48,36 @@ ...@@ -48,6 +48,36 @@
#define _COMPONENT ACPI_TABLES #define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME("tbxfroot") ACPI_MODULE_NAME("tbxfroot")
/*******************************************************************************
*
* FUNCTION: acpi_tb_get_rsdp_length
*
* PARAMETERS: rsdp - Pointer to RSDP
*
* RETURN: Table length
*
* DESCRIPTION: Get the length of the RSDP
*
******************************************************************************/
u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp)
{
if (!ACPI_VALIDATE_RSDP_SIG(rsdp->signature)) {
/* BAD Signature */
return (0);
}
/* "Length" field is available if table version >= 2 */
if (rsdp->revision >= 2) {
return (rsdp->length);
} else {
return (ACPI_RSDP_CHECKSUM_LENGTH);
}
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_tb_validate_rsdp * FUNCTION: acpi_tb_validate_rsdp
...@@ -59,7 +89,8 @@ ACPI_MODULE_NAME("tbxfroot") ...@@ -59,7 +89,8 @@ ACPI_MODULE_NAME("tbxfroot")
* DESCRIPTION: Validate the RSDP (ptr) * DESCRIPTION: Validate the RSDP (ptr)
* *
******************************************************************************/ ******************************************************************************/
acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
{ {
/* /*
......
...@@ -146,7 +146,7 @@ u32 ap_get_table_length(struct acpi_table_header *table) ...@@ -146,7 +146,7 @@ u32 ap_get_table_length(struct acpi_table_header *table)
if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { if (ACPI_VALIDATE_RSDP_SIG(table->signature)) {
rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table); rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table);
return (rsdp->length); return (acpi_tb_get_rsdp_length(rsdp));
} }
/* Normal ACPI table */ /* Normal ACPI table */
......
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