summaryrefslogtreecommitdiffstats
path: root/source/compiler/dttable.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2014-04-25 16:53:42 +0000
committerjkim <jkim@FreeBSD.org>2014-04-25 16:53:42 +0000
commit34dc9d28dcb64ffb397ae86712fcea0cce546203 (patch)
tree643f58d38011b3076bfc6a234d83f22c69487b8c /source/compiler/dttable.c
parent36570d433866fe6dd6cfd1efeaa154ed7ade2121 (diff)
downloadFreeBSD-src-34dc9d28dcb64ffb397ae86712fcea0cce546203.zip
FreeBSD-src-34dc9d28dcb64ffb397ae86712fcea0cce546203.tar.gz
Import ACPICA 20140424.
Diffstat (limited to 'source/compiler/dttable.c')
-rw-r--r--source/compiler/dttable.c83
1 files changed, 82 insertions, 1 deletions
diff --git a/source/compiler/dttable.c b/source/compiler/dttable.c
index 4fa1588..c341bf2 100644
--- a/source/compiler/dttable.c
+++ b/source/compiler/dttable.c
@@ -454,7 +454,7 @@ DtCompileCsrt (
UINT32 GroupLength;
- /* Sub-tables (Resource Groups) */
+ /* Subtables (Resource Groups) */
while (*PFieldList)
{
@@ -1304,6 +1304,87 @@ DtCompileIvrs (
/******************************************************************************
*
+ * FUNCTION: DtCompileLpit
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile LPIT.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileLpit (
+ void **List)
+{
+ ACPI_STATUS Status;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+ DT_FIELD *SubtableStart;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_LPIT_HEADER *LpitHeader;
+
+
+ /* Note: Main table consists only of the standard ACPI table header */
+
+ while (*PFieldList)
+ {
+ SubtableStart = *PFieldList;
+
+ /* LPIT Subtable header */
+
+ Status = DtCompileTable (PFieldList, AcpiDmTableInfoLpitHdr,
+ &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPushSubtable (Subtable);
+
+ LpitHeader = ACPI_CAST_PTR (ACPI_LPIT_HEADER, Subtable->Buffer);
+
+ switch (LpitHeader->Type)
+ {
+ case ACPI_LPIT_TYPE_NATIVE_CSTATE:
+
+ InfoTable = AcpiDmTableInfoLpit0;
+ break;
+
+ case ACPI_LPIT_TYPE_SIMPLE_IO:
+
+ InfoTable = AcpiDmTableInfoLpit1;
+ break;
+
+ default:
+
+ DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "LPIT");
+ return (AE_ERROR);
+ }
+
+ /* LPIT Subtable */
+
+ Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+ DtPopSubtable ();
+ }
+
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: DtCompileMadt
*
* PARAMETERS: List - Current field list pointer
OpenPOWER on IntegriCloud