diff options
Diffstat (limited to 'drivers/acpi/tables/tbrsdt.c')
-rw-r--r-- | drivers/acpi/tables/tbrsdt.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 13c6ddb2f546..069d498465d0 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c | |||
@@ -96,32 +96,13 @@ acpi_tb_verify_rsdp ( | |||
96 | return_ACPI_STATUS (AE_BAD_PARAMETER); | 96 | return_ACPI_STATUS (AE_BAD_PARAMETER); |
97 | } | 97 | } |
98 | 98 | ||
99 | /* | 99 | /* Verify RSDP signature and checksum */ |
100 | * The signature and checksum must both be correct | ||
101 | */ | ||
102 | if (ACPI_STRNCMP ((char *) rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) { | ||
103 | /* Nope, BAD Signature */ | ||
104 | |||
105 | status = AE_BAD_SIGNATURE; | ||
106 | goto cleanup; | ||
107 | } | ||
108 | |||
109 | /* Check the standard checksum */ | ||
110 | 100 | ||
111 | if (acpi_tb_checksum (rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { | 101 | status = acpi_tb_validate_rsdp (rsdp); |
112 | status = AE_BAD_CHECKSUM; | 102 | if (ACPI_FAILURE (status)) { |
113 | goto cleanup; | 103 | goto cleanup; |
114 | } | 104 | } |
115 | 105 | ||
116 | /* Check extended checksum if table version >= 2 */ | ||
117 | |||
118 | if (rsdp->revision >= 2) { | ||
119 | if (acpi_tb_checksum (rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0) { | ||
120 | status = AE_BAD_CHECKSUM; | ||
121 | goto cleanup; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /* The RSDP supplied is OK */ | 106 | /* The RSDP supplied is OK */ |
126 | 107 | ||
127 | table_info.pointer = ACPI_CAST_PTR (struct acpi_table_header, rsdp); | 108 | table_info.pointer = ACPI_CAST_PTR (struct acpi_table_header, rsdp); |