Commit f1b697525d5428856eaba2be2ee6dc1cf3efbbbe
Committed by
Rafael J. Wysocki
1 parent
5f8b35b633
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 3 changed files with 35 additions and 2 deletions Side-by-side Diff
drivers/acpi/acpica/actables.h
... | ... | @@ -49,6 +49,8 @@ |
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); |
drivers/acpi/acpica/tbxfroot.c
... | ... | @@ -50,6 +50,36 @@ |
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 |
... | ... | @@ -59,7 +89,8 @@ |
59 | 89 | * DESCRIPTION: Validate the RSDP (ptr) |
60 | 90 | * |
61 | 91 | ******************************************************************************/ |
62 | -acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) | |
92 | + | |
93 | +acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp) | |
63 | 94 | { |
64 | 95 | |
65 | 96 | /* |
tools/power/acpi/tools/acpidump/apdump.c