aboutsummaryrefslogtreecommitdiff
path: root/source/components/tables/tbxfroot.c
diff options
context:
space:
mode:
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 b3b3ed632cbd..04500aae02fa 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