dttable.c revision 199767f8919635c4928607450d9e0abb932109ce
/******************************************************************************
*
* Module Name: dttable.c - handling for specific ACPI tables
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
/* Compile all complex data tables */
#define _COMPONENT DT_COMPILER
ACPI_MODULE_NAME ("dttable")
/* TBD: merge these into dmtbinfo.c? */
static ACPI_DMTABLE_INFO TableInfoAsfAddress[] =
{
{ACPI_DMT_BUFFER, 0, "Addresses", 0},
{ACPI_DMT_EXIT, 0, NULL, 0}
};
static ACPI_DMTABLE_INFO TableInfoDmarPciPath[] =
{
{ACPI_DMT_PCI_PATH, 0, "PCI Path", 0},
{ACPI_DMT_EXIT, 0, NULL, 0}
};
/* Local prototypes */
static ACPI_STATUS
void **List,
/******************************************************************************
*
* FUNCTION: DtCompileTwoSubtables
*
* PARAMETERS: List - Current field list pointer
* TableInfo1 - Info table 1
* TableInfo1 - Info table 2
*
* RETURN: Status
*
* DESCRIPTION: Compile tables with a header and one or more same subtables.
* Include CPEP, EINJ, ERST, MCFG, MSCT, WDAT
*
*****************************************************************************/
static ACPI_STATUS
void **List,
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileFacs
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile FACS.
*
*****************************************************************************/
{
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Large FACS reserved area at the end of the table */
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileRsdp
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile RSDP.
*
*****************************************************************************/
{
/* Compile the "common" RSDP (ACPI 1.0) */
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
{
/* Compile the "extended" part of the RSDP as a subtable */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Set length and extended checksum for entire RSDP */
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileAsf
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile ASF!.
*
*****************************************************************************/
void **List)
{
UINT32 i;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
{
case ACPI_ASF_TYPE_INFO:
break;
case ACPI_ASF_TYPE_ALERT:
break;
case ACPI_ASF_TYPE_CONTROL:
break;
case ACPI_ASF_TYPE_BOOT:
break;
case ACPI_ASF_TYPE_ADDRESS:
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
{
case ACPI_ASF_TYPE_INFO:
break;
case ACPI_ASF_TYPE_ALERT:
sizeof (ACPI_ASF_HEADER)))->Alerts;
break;
case ACPI_ASF_TYPE_CONTROL:
sizeof (ACPI_ASF_HEADER)))->Controls;
break;
case ACPI_ASF_TYPE_BOOT:
break;
case ACPI_ASF_TYPE_ADDRESS:
sizeof (ACPI_ASF_HEADER)))->Devices;
break;
default:
return (AE_ERROR);
}
if (DataInfoTable)
{
{
case ACPI_ASF_TYPE_ADDRESS:
while (DataCount > 0)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
break;
default:
for (i = 0; i < DataCount; i++)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
break;
}
}
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileCpep
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile CPEP.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileCsrt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile CSRT.
*
*****************************************************************************/
void **List)
{
/* Subtables (Resource Groups) */
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
/* Resource group subtable */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Compute the number of resource descriptors */
sizeof (ACPI_CSRT_GROUP);
sizeof (ACPI_CSRT_DESCRIPTOR));
ParentTable = DtPeekSubtable ();
/* Shared info subtable (One per resource group) */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Sub-Subtables (Resource Descriptors) */
while (*PFieldList && DescriptorCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
if (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (Subtable)
{
}
}
DtPopSubtable ();
ParentTable = DtPeekSubtable ();
}
DtPopSubtable ();
ParentTable = DtPeekSubtable ();
}
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileDbg2
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile DBG2.
*
*****************************************************************************/
void **List)
{
UINT32 i;
/* Main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Main table fields */
/* Process all Device Information subtables (Count = InfoCount) */
while (*PFieldList && SubtableCount)
{
/* Subtable: Debug Device Information */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
ParentTable = DtPeekSubtable ();
/* BaseAddressRegister GAS array (Required, size is RegisterCount) */
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
/* AddressSize array (Required, size = RegisterCount) */
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
/* NamespaceString device identifier (Required, size = NamePathLength) */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Update the device info header */
/* OemData - Variable-length data (Optional, size = OemDataLength) */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Update the device info header (zeros if no OEM data present) */
DeviceInfo->OemDataOffset = 0;
DeviceInfo->OemDataLength = 0;
/* Optional subtable (OemData) */
{
}
DtPopSubtable (); /* Get next Device Information subtable */
}
DtPopSubtable ();
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileDmar
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile DMAR.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
/* DMAR Header */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (DmarHeader->Type)
{
break;
break;
case ACPI_DMAR_TYPE_ROOT_ATS:
break;
break;
case ACPI_DMAR_TYPE_NAMESPACE:
break;
default:
return (AE_ERROR);
}
/* DMAR Subtable */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/*
* Optional Device Scope subtables
*/
{
/* These types do not support device scopes */
DtPopSubtable ();
continue;
}
while (DeviceScopeLength)
{
if (Status == AE_NOT_FOUND)
{
break;
}
ParentTable = DtPeekSubtable ();
/* Optional PCI Paths */
while (PciPathLength)
{
if (Status == AE_NOT_FOUND)
{
DtPopSubtable ();
break;
}
ParentTable = DtPeekSubtable ();
}
DtPopSubtable ();
}
DtPopSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileDrtm
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile DRTM.
*
*****************************************************************************/
void **List)
{
/* ACPI_TABLE_DRTM *Drtm; */
/* ACPI_DRTM_DPS_ID *DrtmDps; */
ParentTable = DtPeekSubtable ();
/* Compile DRTM header */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/*
* Using ACPI_SUB_PTR, We needn't define a seperate structure. Care
* should be taken to avoid accessing ACPI_TABLE_HADER fields.
*/
#if 0
#endif
/* Compile VTL */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
Count = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
Count++;
}
DtPopSubtable ();
ParentTable = DtPeekSubtable ();
/* Compile RL */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
Count = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
Count++;
}
DtPopSubtable ();
ParentTable = DtPeekSubtable ();
/* Compile DPS */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* DrtmDps = ACPI_CAST_PTR (ACPI_DRTM_DPS_ID, Subtable->Buffer);*/
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileEinj
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile EINJ.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileErst
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile ERST.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileFadt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile FADT.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
if (Revision == 2)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
else if (Revision >= 2)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (Revision >= 5)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
if (Revision >= 6)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileGtdt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile GTDT.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (GtdtHeader->Type)
{
break;
case ACPI_GTDT_TYPE_WATCHDOG:
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/*
* Additional GT block subtable data
*/
switch (GtdtHeader->Type)
{
ParentTable = DtPeekSubtable ();
while (GtCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
GtCount--;
}
DtPopSubtable ();
break;
default:
break;
}
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileFpdt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile FPDT.
*
*****************************************************************************/
void **List)
{
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (FpdtHeader->Type)
{
case ACPI_FPDT_TYPE_BOOT:
break;
case ACPI_FPDT_TYPE_S3PERF:
break;
default:
return (AE_ERROR);
break;
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileHest
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile HEST.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
/* Get subtable type */
switch (Type)
{
break;
break;
case ACPI_HEST_TYPE_IA32_NMI:
break;
break;
break;
break;
break;
default:
/* Cannot continue on unknown type */
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
/*
* Additional subtable data - IA32 Error Bank(s)
*/
BankCount = 0;
switch (Type)
{
break;
break;
default:
break;
}
while (BankCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
BankCount--;
}
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileIort
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile IORT.
*
*****************************************************************************/
void **List)
{
ParentTable = DtPeekSubtable ();
if (ACPI_FAILURE (Status))
{
return (Status);
}
/*
* Using ACPI_SUB_PTR, We needn't define a seperate structure. Care
* should be taken to avoid accessing ACPI_TABLE_HADER fields.
*/
/*
* OptionalPadding - Variable-length data
* (Optional, size = OffsetToNodes - sizeof (ACPI_TABLE_IORT))
* Optionally allows the generic data types to be used for filling
* this field.
*/
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (Subtable)
{
}
else
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
NodeNumber = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
{
case ACPI_IORT_NODE_ITS_GROUP:
if (ACPI_FAILURE (Status))
{
return (Status);
}
ItsNumber = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
ItsNumber++;
}
break;
if (ACPI_FAILURE (Status))
{
return (Status);
}
/*
* Padding - Variable-length data
* Optionally allows the offset of the ID mappings to be used
* for filling this field.
*/
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (Subtable)
{
}
else
{
{
return (AE_BAD_DATA);
}
{
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
}
break;
if (ACPI_FAILURE (Status))
{
return (Status);
}
break;
case ACPI_IORT_NODE_SMMU:
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Compile global interrupt array */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Compile context interrupt array */
ContextIrptNumber = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
}
/* Compile PMU interrupt array */
PmuIrptNumber = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
}
break;
default:
return (AE_ERROR);
}
/* Compile Array of ID mappings */
IdMappingNumber = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
break;
}
NodeLength += sizeof (ACPI_IORT_ID_MAPPING);
}
/*
* Node length can be determined by DT_LENGTH option
* IortNode->Length = NodeLength;
*/
DtPopSubtable ();
ParentTable = DtPeekSubtable ();
NodeNumber++;
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileIvrs
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile IVRS.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (IvrsHeader->Type)
{
case ACPI_IVRS_TYPE_HARDWARE:
break;
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
{
while (*PFieldList &&
{
switch (EntryType)
{
/* 4-byte device entries */
case ACPI_IVRS_TYPE_PAD4:
case ACPI_IVRS_TYPE_ALL:
case ACPI_IVRS_TYPE_SELECT:
case ACPI_IVRS_TYPE_START:
case ACPI_IVRS_TYPE_END:
break;
/* 8-byte entries, type A */
break;
/* 8-byte entries, type B */
case ACPI_IVRS_TYPE_PAD8:
case ACPI_IVRS_TYPE_EXT_START:
break;
/* 8-byte entries, type C */
case ACPI_IVRS_TYPE_SPECIAL:
break;
default:
"IVRS Device Entry");
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
}
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileLpit
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile LPIT.
*
*****************************************************************************/
void **List)
{
/* Note: Main table consists only of the standard ACPI table header */
while (*PFieldList)
{
/* LPIT Subtable header */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (LpitHeader->Type)
{
break;
default:
return (AE_ERROR);
}
/* LPIT Subtable */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileMadt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MADT.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (MadtHeader->Type)
{
break;
case ACPI_MADT_TYPE_IO_APIC:
break;
break;
break;
break;
break;
case ACPI_MADT_TYPE_IO_SAPIC:
break;
break;
break;
break;
break;
break;
break;
break;
break;
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileMcfg
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MCFG.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileMpst
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MPST.
*
*****************************************************************************/
void **List)
{
/* Main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList && SubtableCount)
{
/* Subtable: Memory Power Node(s) */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
ParentTable = DtPeekSubtable ();
/* Sub-subtables - Memory Power State Structure(s) */
while (*PFieldList && PowerStateCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
/* Sub-subtables - Physical Component ID Structure(s) */
while (*PFieldList && ComponentCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
DtPopSubtable ();
}
/* Subtable: Count of Memory Power State Characteristic structures */
DtPopSubtable ();
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
ParentTable = DtPeekSubtable ();
/* Subtable: Memory Power State Characteristics structure(s) */
while (*PFieldList && SubtableCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
DtPopSubtable ();
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileMsct
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MSCT.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileMtmr
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile MTMR.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileNfit
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile NFIT.
*
*****************************************************************************/
void **List)
{
/* Main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Subtables */
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (NfitHeader->Type)
{
break;
break;
break;
case ACPI_NFIT_TYPE_SMBIOS:
break;
break;
break;
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
switch (NfitHeader->Type)
{
Count = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
DtPopSubtable ();
break;
}
ParentTable = DtPeekSubtable ();
Count++;
}
DtPopSubtable ();
break;
case ACPI_NFIT_TYPE_SMBIOS:
if (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (Subtable)
{
}
}
break;
Count = 0;
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (!Subtable)
{
DtPopSubtable ();
break;
}
ParentTable = DtPeekSubtable ();
Count++;
}
DtPopSubtable ();
break;
default:
break;
}
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompilePcct
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile PCCT.
*
*****************************************************************************/
void **List)
{
/* Main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Subtables */
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (PcctHeader->Type)
{
break;
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompilePmtt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile PMTT.
*
*****************************************************************************/
void **List)
{
/* Main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
{
DtPopSubtable ();
if (PrevType == ACPI_PMTT_TYPE_SOCKET)
{
break;
}
PrevType--;
}
ParentTable = DtPeekSubtable ();
switch (PmttHeader->Type)
{
case ACPI_PMTT_TYPE_SOCKET:
/* Subtable: Socket Structure */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
break;
/* Subtable: Memory Controller Structure */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (DomainCount)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
DomainCount--;
}
break;
case ACPI_PMTT_TYPE_DIMM:
/* Subtable: Physical Component Structure */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
break;
default:
return (AE_ERROR);
}
}
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileRsdt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile RSDT.
*
*****************************************************************************/
void **List)
{
ParentTable = DtPeekSubtable ();
while (FieldList)
{
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileS3pt
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile S3PT (Pointed to by FPDT)
*
*****************************************************************************/
{
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (S3ptHeader->Type)
{
case ACPI_S3PT_TYPE_RESUME:
break;
case ACPI_S3PT_TYPE_SUSPEND:
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileSlic
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile SLIC.
*
*****************************************************************************/
void **List)
{
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileSlit
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile SLIT.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Compile each locality buffer */
FieldList = *PFieldList;
while (FieldList)
{
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileSrat
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile SRAT.
*
*****************************************************************************/
void **List)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
switch (SratHeader->Type)
{
break;
break;
break;
break;
default:
return (AE_ERROR);
}
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileStao
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile STAO.
*
*****************************************************************************/
void **List)
{
/* Compile the main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Compile each ASCII namestring as a subtable */
while (*PFieldList)
{
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileTcpa
*
* PARAMETERS: PFieldList - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile TCPA.
*
*****************************************************************************/
void **List)
{
/* Compile the main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/*
* Examine the PlatformClass field to determine the table type.
* Either a client or server table. Only one.
*/
switch (TcpaHeader->PlatformClass)
{
case ACPI_TCPA_CLIENT_TABLE:
break;
case ACPI_TCPA_SERVER_TABLE:
break;
default:
AcpiOsPrintf ("\n**** Unknown TCPA Platform Class 0x%X\n",
break;
}
ParentTable = DtPeekSubtable ();
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtGetGenericTableInfo
*
* PARAMETERS: Name - Generic type name
*
* RETURN: Info entry
*
* DESCRIPTION: Obtain table info for a generic name entry
*
*****************************************************************************/
char *Name)
{
UINT32 i;
if (!Name)
{
return (NULL);
}
/* Search info table for name match */
for (i = 0; ; i++)
{
Info = AcpiDmTableInfoGeneric[i];
{
break;
}
/* Use caseless compare for generic keywords */
{
break;
}
}
return (Info);
}
/******************************************************************************
*
* FUNCTION: DtCompileUefi
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile UEFI.
*
*****************************************************************************/
void **List)
{
/* Compile the predefined portion of the UEFI table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
*DataOffset = sizeof (ACPI_TABLE_UEFI);
ParentTable = DtPeekSubtable ();
/*
* Compile the "generic" portion of the UEFI table. This
* part of the table is not predefined and any of the generic
* operators may be used.
*/
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileVrtc
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile VRTC.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileWdat
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile WDAT.
*
*****************************************************************************/
void **List)
{
return (Status);
}
/******************************************************************************
*
* FUNCTION: DtCompileWpbt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile WPBT.
*
*****************************************************************************/
void **List)
{
/* Compile the main table */
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
/* Compile the argument list subtable */
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Extract the length of the Arguments buffer, insert into main table */
ParentTable = DtPeekSubtable ();
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileXsdt
*
* PARAMETERS: List - Current field list pointer
*
* RETURN: Status
*
* DESCRIPTION: Compile XSDT.
*
*****************************************************************************/
void **List)
{
ParentTable = DtPeekSubtable ();
while (FieldList)
{
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileGeneric
*
* PARAMETERS: List - Current field list pointer
* Name - Field name to end generic compiling
* Length - Compiled table length to return
*
* RETURN: Status
*
* DESCRIPTION: Compile generic unknown table.
*
*****************************************************************************/
void **List,
char *Name,
{
ParentTable = DtPeekSubtable ();
/*
* Compile the "generic" portion of the table. This
* part of the table is not predefined and any of the generic
* operators may be used.
*/
/* Find any and all labels in the entire generic portion */
/* Now we can actually compile the parse tree */
{
*Length = 0;
}
while (*PFieldList)
{
{
break;
}
if (!Info)
{
(*PFieldList)->Name);
(*PFieldList), MsgBuffer);
continue;
}
if (ACPI_SUCCESS (Status))
{
if (Length)
{
}
}
else
{
if (Status == AE_NOT_FOUND)
{
(*PFieldList)->Name);
(*PFieldList), MsgBuffer);
}
}
}
return (AE_OK);
}