From 4a5720e5f30ea6a8d31e75f94046c76ace845126 Mon Sep 17 00:00:00 2001 From: jkim Date: Mon, 29 Sep 2014 19:53:38 +0000 Subject: Import ACPICA 20140926. --- source/components/tables/tbxfroot.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'source/components/tables/tbxfroot.c') diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index b3b3ed6..04500aa 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -54,6 +54,43 @@ /******************************************************************************* * + * FUNCTION: AcpiTbGetRsdpLength + * + * PARAMETERS: Rsdp - Pointer to RSDP + * + * RETURN: Table length + * + * DESCRIPTION: Get the length of the RSDP + * + ******************************************************************************/ + +UINT32 +AcpiTbGetRsdpLength ( + 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: AcpiTbValidateRsdp * * PARAMETERS: Rsdp - Pointer to unvalidated RSDP -- cgit v1.1