diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
commit | dbded195f9840f9044a6828c8877c6bf0a956482 (patch) | |
tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/os_specific | |
parent | 94c37fb2483cc09856a30e74879a69f2ccfe22f0 (diff) | |
download | src-test2-dbded195f9840f9044a6828c8877c6bf0a956482.tar.gz src-test2-dbded195f9840f9044a6828c8877c6bf0a956482.zip |
Notes
Diffstat (limited to 'source/os_specific')
-rw-r--r-- | source/os_specific/service_layers/osfreebsdtbl.c | 27 | ||||
-rw-r--r-- | source/os_specific/service_layers/oslinuxtbl.c | 23 |
2 files changed, 11 insertions, 39 deletions
diff --git a/source/os_specific/service_layers/osfreebsdtbl.c b/source/os_specific/service_layers/osfreebsdtbl.c index 3df48456d2ba..9d39bc3ca8f1 100644 --- a/source/os_specific/service_layers/osfreebsdtbl.c +++ b/source/os_specific/service_layers/osfreebsdtbl.c @@ -964,28 +964,15 @@ OslMapTable ( *Table = MappedTable; - /* Checksum for RSDP */ + /* + * Checksum for RSDP. + * Note: Other checksums are computed during the table dump. + */ - if (!ACPI_STRNCMP (MappedTable->Signature, ACPI_SIG_RSDP, - sizeof (ACPI_SIG_RSDP) - 1)) + if (AcpiTbValidateRsdp (ACPI_CAST_PTR (ACPI_TABLE_RSDP, MappedTable)) == + AE_BAD_CHECKSUM) { - /* Check the standard checksum */ - - if (AcpiTbChecksum ((UINT8 *) MappedTable, ACPI_RSDP_CHECKSUM_LENGTH)) - { - fprintf (stderr, "Warning: wrong checksum for RSDP\n"); - } - - /* Check extended checksum if table version >= 2 */ - - if (MappedTable->Revision) - { - if (AcpiTbChecksum ((UINT8 *) MappedTable, - ACPI_RSDP_XCHECKSUM_LENGTH)) - { - fprintf (stderr, "Warning: wrong checksum for RSDP\n"); - } - } + fprintf (stderr, "Warning: wrong checksum for RSDP\n"); } return (AE_OK); diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c index 67a5e0246db3..fd593a12263e 100644 --- a/source/os_specific/service_layers/oslinuxtbl.c +++ b/source/os_specific/service_layers/oslinuxtbl.c @@ -960,26 +960,11 @@ OslMapTable ( * Checksum for RSDP. * Note: Other checksums are computed during the table dump. */ - if (!ACPI_STRNCMP (MappedTable->Signature, ACPI_SIG_RSDP, - sizeof (ACPI_SIG_RSDP) - 1)) - { - /* Check the standard checksum */ - - if (AcpiTbChecksum ((UINT8 *) MappedTable, ACPI_RSDP_CHECKSUM_LENGTH)) - { - fprintf (stderr, "Warning: wrong checksum for RSDP\n"); - } - - /* Check extended checksum if table version >= 2 */ - if (MappedTable->Revision) - { - if (AcpiTbChecksum ((UINT8 *) MappedTable, - ACPI_RSDP_XCHECKSUM_LENGTH)) - { - fprintf (stderr, "Warning: wrong checksum for RSDP\n"); - } - } + if (AcpiTbValidateRsdp (ACPI_CAST_PTR (ACPI_TABLE_RSDP, MappedTable)) == + AE_BAD_CHECKSUM) + { + fprintf (stderr, "Warning: wrong checksum for RSDP\n"); } return (AE_OK); |