Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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=1103
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reported-and-tested-by: Rudolf Marek <r.marek@assembler.cz>
Reported-and-tested-by: Rafal <fatwildcat@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Lv Zheng and committed by
Rafael J. Wysocki
f1b69752 5f8b35b6

+35 -2
+2
drivers/acpi/acpica/actables.h
··· 49 49 /* 50 50 * tbxfroot - Root pointer utilities 51 51 */ 52 + u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp); 53 + 52 54 acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp); 53 55 54 56 u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length);
+32 -1
drivers/acpi/acpica/tbxfroot.c
··· 50 50 51 51 /******************************************************************************* 52 52 * 53 + * FUNCTION: acpi_tb_get_rsdp_length 54 + * 55 + * PARAMETERS: rsdp - Pointer to RSDP 56 + * 57 + * RETURN: Table length 58 + * 59 + * DESCRIPTION: Get the length of the RSDP 60 + * 61 + ******************************************************************************/ 62 + u32 acpi_tb_get_rsdp_length(struct acpi_table_rsdp *rsdp) 63 + { 64 + 65 + if (!ACPI_VALIDATE_RSDP_SIG(rsdp->signature)) { 66 + 67 + /* BAD Signature */ 68 + 69 + return (0); 70 + } 71 + 72 + /* "Length" field is available if table version >= 2 */ 73 + 74 + if (rsdp->revision >= 2) { 75 + return (rsdp->length); 76 + } else { 77 + return (ACPI_RSDP_CHECKSUM_LENGTH); 78 + } 79 + } 80 + 81 + /******************************************************************************* 82 + * 53 83 * FUNCTION: acpi_tb_validate_rsdp 54 84 * 55 85 * PARAMETERS: rsdp - Pointer to unvalidated RSDP ··· 89 59 * DESCRIPTION: Validate the RSDP (ptr) 90 60 * 91 61 ******************************************************************************/ 92 - acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) 62 + 63 + acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp) 93 64 { 94 65 95 66 /*
+1 -1
tools/power/acpi/tools/acpidump/apdump.c
··· 146 146 147 147 if (ACPI_VALIDATE_RSDP_SIG(table->signature)) { 148 148 rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table); 149 - return (rsdp->length); 149 + return (acpi_tb_get_rsdp_length(rsdp)); 150 150 } 151 151 152 152 /* Normal ACPI table */