summaryrefslogtreecommitdiffstats
path: root/source/components/tables/tbxfroot.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-09-29 19:53:38 +0000
committerjkim <jkim@FreeBSD.org>2014-09-29 19:53:38 +0000
commit4a5720e5f30ea6a8d31e75f94046c76ace845126 (patch)
treec09826b28ca0b50455664fa1d18a4efff33181e4 /source/components/tables/tbxfroot.c
parent9f91b0b83a53651519b3bbe3b8c1f2a324da984e (diff)
downloadFreeBSD-src-4a5720e5f30ea6a8d31e75f94046c76ace845126.zip
FreeBSD-src-4a5720e5f30ea6a8d31e75f94046c76ace845126.tar.gz
Import ACPICA 20140926.
Diffstat (limited to 'source/components/tables/tbxfroot.c')
-rw-r--r--source/components/tables/tbxfroot.c37
1 files changed, 37 insertions, 0 deletions
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
OpenPOWER on IntegriCloud