mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 18:04:08 +03:00
ACPI 6.0: Add support for STAO table.
_STA override table.
This commit is contained in:
parent
c7b38bcba2
commit
532bf402a5
@ -416,6 +416,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
|
||||
{ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr, "Serial Port Console Redirection table"},
|
||||
{ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi, "Server Platform Management Interface table"},
|
||||
{ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat, "System Resource Affinity Table"},
|
||||
{ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao, "Status Override table"},
|
||||
{ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, NULL, TemplateTcpa, "Trusted Computing Platform Alliance table"},
|
||||
{ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2, "Trusted Platform Module hardware interface table"},
|
||||
{ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi, "UEFI Boot Optimization Table"},
|
||||
@ -630,7 +631,6 @@ AcpiDmDumpDataTable (
|
||||
* PARAMETERS: Offset - Current byte offset, from table start
|
||||
* ByteLength - Length of the field in bytes, 0 for flags
|
||||
* Name - Name of this field
|
||||
* Value - Optional value, displayed on left of ':'
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
|
@ -2790,6 +2790,56 @@ NextSubTable:
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpStao
|
||||
*
|
||||
* PARAMETERS: Table - A STAO table
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Format the contents of a STAO. This is a variable-length
|
||||
* table that contains an open-ended number of ASCII strings
|
||||
* at the end of the table.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDmDumpStao (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
char *Namepath;
|
||||
UINT32 Length = Table->Length;
|
||||
UINT32 StringLength;
|
||||
UINT32 Offset = sizeof (ACPI_TABLE_STAO);
|
||||
|
||||
|
||||
/* Main table */
|
||||
|
||||
Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoStao);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* The rest of the table consists of Namepath strings */
|
||||
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
Namepath = ACPI_ADD_PTR (char, Table, Offset);
|
||||
StringLength = ACPI_STRLEN (Namepath) + 1;
|
||||
|
||||
AcpiDmLineHeader (Offset, StringLength, "Namestring");
|
||||
AcpiOsPrintf ("\"%s\"\n", Namepath);
|
||||
|
||||
/* Point to next namepath */
|
||||
|
||||
Offset += StringLength;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpVrtc
|
||||
|
@ -182,6 +182,7 @@
|
||||
#define ACPI_SPCR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
|
||||
#define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
|
||||
#define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
|
||||
#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
|
||||
#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
|
||||
#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
|
||||
#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
|
||||
@ -2280,6 +2281,25 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* STAO - Status Override Table (_STA override) - ACPI 6.0
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoStao[] =
|
||||
{
|
||||
{ACPI_DMT_UINT8, ACPI_STAO_OFFSET (IgnoreUart), "Ignore UART", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[] =
|
||||
{
|
||||
{ACPI_DMT_STRING, 0, "Namepath", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* TCPA - Trusted Computing Platform Alliance table
|
||||
|
@ -580,6 +580,10 @@ ACPI_STATUS
|
||||
DtCompileSrat (
|
||||
void **PFieldList);
|
||||
|
||||
ACPI_STATUS
|
||||
DtCompileStao (
|
||||
void **PFieldList);
|
||||
|
||||
ACPI_STATUS
|
||||
DtCompileUefi (
|
||||
void **PFieldList);
|
||||
@ -642,6 +646,7 @@ extern const unsigned char TemplateSlit[];
|
||||
extern const unsigned char TemplateSpcr[];
|
||||
extern const unsigned char TemplateSpmi[];
|
||||
extern const unsigned char TemplateSrat[];
|
||||
extern const unsigned char TemplateStao[];
|
||||
extern const unsigned char TemplateTcpa[];
|
||||
extern const unsigned char TemplateTpm2[];
|
||||
extern const unsigned char TemplateUefi[];
|
||||
|
@ -2483,6 +2483,59 @@ DtCompileSrat (
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtCompileStao
|
||||
*
|
||||
* PARAMETERS: PFieldList - Current field list pointer
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Compile STAO.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
DtCompileStao (
|
||||
void **List)
|
||||
{
|
||||
DT_FIELD **PFieldList = (DT_FIELD **) List;
|
||||
DT_SUBTABLE *Subtable;
|
||||
DT_SUBTABLE *ParentTable;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
/* Compile the main table */
|
||||
|
||||
Status = DtCompileTable (PFieldList, AcpiDmTableInfoStao,
|
||||
&Subtable, TRUE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
|
||||
/* Compile each ASCII namestring as a subtable */
|
||||
|
||||
while (*PFieldList)
|
||||
{
|
||||
Status = DtCompileTable (PFieldList, AcpiDmTableInfoStaoStr,
|
||||
&Subtable, TRUE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtGetGenericTableInfo
|
||||
@ -2652,6 +2705,7 @@ DtCompileXsdt (
|
||||
DT_FIELD *FieldList = *(DT_FIELD **) List;
|
||||
UINT64 Address;
|
||||
|
||||
|
||||
ParentTable = DtPeekSubtable ();
|
||||
|
||||
while (FieldList)
|
||||
|
@ -1071,6 +1071,26 @@ const unsigned char TemplateSrat[] =
|
||||
0x00,0x00 /* 00000090 ".." */
|
||||
};
|
||||
|
||||
const unsigned char TemplateStao[] =
|
||||
{
|
||||
0x53,0x54,0x41,0x4F,0x7E,0x00,0x00,0x00, /* 00000000 "STAO~..." */
|
||||
0x01,0x7F,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
|
||||
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
|
||||
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
|
||||
0x10,0x04,0x15,0x20,0x01,0x5C,0x5F,0x53, /* 00000020 "... .\_S" */
|
||||
0x42,0x30,0x2E,0x42,0x55,0x53,0x30,0x2E, /* 00000028 "B0.BUS0." */
|
||||
0x44,0x45,0x56,0x31,0x00,0x5C,0x5F,0x53, /* 00000030 "DEV1.\_S" */
|
||||
0x42,0x30,0x2E,0x42,0x55,0x53,0x30,0x2E, /* 00000038 "B0.BUS0." */
|
||||
0x44,0x45,0x56,0x32,0x00,0x5C,0x5F,0x53, /* 00000040 "DEV2.\_S" */
|
||||
0x42,0x30,0x2E,0x42,0x55,0x53,0x31,0x2E, /* 00000048 "B0.BUS1." */
|
||||
0x44,0x45,0x56,0x31,0x2E,0x44,0x45,0x56, /* 00000050 "DEV1.DEV" */
|
||||
0x32,0x00,0x5C,0x5F,0x53,0x42,0x30,0x2E, /* 00000058 "2.\_SB0." */
|
||||
0x42,0x55,0x53,0x31,0x2E,0x44,0x45,0x56, /* 00000060 "BUS1.DEV" */
|
||||
0x32,0x2E,0x44,0x45,0x56,0x32,0x00,0x5C, /* 00000068 "2.DEV2.\" */
|
||||
0x55,0x53,0x42,0x31,0x2E,0x48,0x55,0x42, /* 00000070 "USB1.HUB" */
|
||||
0x31,0x2E,0x50,0x54,0x31,0x00 /* 00000078 "1.PT1." */
|
||||
};
|
||||
|
||||
const unsigned char TemplateTcpa[] =
|
||||
{
|
||||
0x54,0x43,0x50,0x41,0x32,0x00,0x00,0x00, /* 00000000 "TCPA2..." */
|
||||
|
@ -434,6 +434,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpa[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
|
||||
@ -605,6 +607,10 @@ void
|
||||
AcpiDmDumpSrat (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpStao (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpVrtc (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
@ -142,6 +142,7 @@
|
||||
#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
|
||||
#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
|
||||
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
|
||||
#define ACPI_SIG_STAO "STAO" /* Status Override table */
|
||||
#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
|
||||
|
||||
#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
|
||||
@ -875,6 +876,24 @@ enum AcpiRasfStatus
|
||||
#define ACPI_RASF_STATUS (0x1F<<3)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* STAO - Status Override Table (_STA override) - ACPI 6.0
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to "ACPI Specification for Status Override Table"
|
||||
* 6 January 2015
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_stao
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT8 IgnoreUart;
|
||||
|
||||
} ACPI_TABLE_STAO;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
|
||||
|
@ -608,6 +608,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
|
||||
{"ACPI_TABLE_SPCR", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_SPMI", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_SRAT", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_STAO", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_TCPA", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_TPM2", SRC_TYPE_STRUCT},
|
||||
{"ACPI_TABLE_UEFI", SRC_TYPE_STRUCT},
|
||||
|
Loading…
x
Reference in New Issue
Block a user