Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist merge changes from acpica-20210...
details: https://anonhg.NetBSD.org/src/rev/67a3f9fb9374
branches: trunk
changeset: 1027750:67a3f9fb9374
user: christos <christos%NetBSD.org@localhost>
date: Sat Dec 18 17:58:48 2021 +0000
description:
merge changes from acpica-20210930 to acpica-20211217
diffstat:
sys/external/bsd/acpica/dist/common/dmtbinfo.c | 6 +-
sys/external/bsd/acpica/dist/compiler/aslfiles.c | 4 +-
sys/external/bsd/acpica/dist/compiler/aslutils.c | 2 +-
sys/external/bsd/acpica/dist/compiler/dttable.c | 59 +++++++++++++-
sys/external/bsd/acpica/dist/compiler/dtutils.c | 13 ++-
sys/external/bsd/acpica/dist/dispatcher/dsopcode.c | 1 +
sys/external/bsd/acpica/dist/events/evregion.c | 9 ++
sys/external/bsd/acpica/dist/events/evrgnini.c | 58 ++++++++++++++
sys/external/bsd/acpica/dist/executer/exconfig.c | 2 +-
sys/external/bsd/acpica/dist/executer/exdebug.c | 12 +-
sys/external/bsd/acpica/dist/include/acapps.h | 2 +-
sys/external/bsd/acpica/dist/include/acdisasm.h | 16 +++
sys/external/bsd/acpica/dist/include/acpixf.h | 10 +-
sys/external/bsd/acpica/dist/include/actables.h | 5 +-
sys/external/bsd/acpica/dist/include/actypes.h | 12 ++
sys/external/bsd/acpica/dist/resources/rsdumpinfo.c | 6 +-
sys/external/bsd/acpica/dist/tables/tbdata.c | 85 +++++++++++++++-----
sys/external/bsd/acpica/dist/tables/tbfadt.c | 6 +-
sys/external/bsd/acpica/dist/tables/tbinstal.c | 16 +-
sys/external/bsd/acpica/dist/tables/tbutils.c | 8 +-
sys/external/bsd/acpica/dist/tables/tbxfload.c | 60 +++++++++----
sys/external/bsd/acpica/dist/utilities/utdelete.c | 1 +
22 files changed, 308 insertions(+), 85 deletions(-)
diffs (truncated from 958 to 300 lines):
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/common/dmtbinfo.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c Sat Dec 18 17:58:48 2021 +0000
@@ -184,7 +184,7 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{
{ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Facs), "FACS Address", 0},
- {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", DT_NON_ZERO},
+ {ACPI_DMT_UINT32, ACPI_FADT_OFFSET (Dsdt), "DSDT Address", 0},
{ACPI_DMT_UINT8, ACPI_FADT_OFFSET (Model), "Model", 0},
{ACPI_DMT_FADTPM, ACPI_FADT_OFFSET (PreferredProfile), "PM Profile", 0},
{ACPI_DMT_UINT16, ACPI_FADT_OFFSET (SciInterrupt), "SCI Interrupt", 0},
@@ -300,7 +300,7 @@
ACPI_DMT_TERMINATOR
};
-/* ACPI 5.0 Extensions (FADT version 5) */
+/* Extensions for FADT version 5 */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
{
@@ -309,7 +309,7 @@
ACPI_DMT_TERMINATOR
};
-/* ACPI 6.0 Extensions (FADT version 6) */
+/* Extensions for FADT version 6 */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] =
{
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/compiler/aslfiles.c
--- a/sys/external/bsd/acpica/dist/compiler/aslfiles.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfiles.c Sat Dec 18 17:58:48 2021 +0000
@@ -727,8 +727,8 @@
* RETURN: Status
*
* DESCRIPTION: Open the specified input file, and save the directory path to
- * the file so that include files can be opened in
- * the same directory.
+ * the file so that include files can be opened in the same
+ * directory. NOTE: File is opened in text mode.
*
******************************************************************************/
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/compiler/aslutils.c
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c Sat Dec 18 17:58:48 2021 +0000
@@ -530,7 +530,7 @@
/* Compiler name and version number */
FlPrintFile (FileId, "%s version %X [%s]\n\n",
- ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, "2017-01-19");
+ ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_DATE);
}
/* Summary of main input and output files */
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/compiler/dttable.c
--- a/sys/external/bsd/acpica/dist/compiler/dttable.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dttable.c Sat Dec 18 17:58:48 2021 +0000
@@ -115,10 +115,12 @@
*
* RETURN: Status
*
- * DESCRIPTION: Compile FADT.
+ * DESCRIPTION: Compile FADT (signature FACP).
*
*****************************************************************************/
+#define ACPI_XDSDT_LOCATION_IN_LIST 11
+
ACPI_STATUS
DtCompileFadt (
void **List)
@@ -127,10 +129,17 @@
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
- ACPI_TABLE_HEADER *Table;
+ DT_FIELD *DsdtFieldList;
+ ACPI_TABLE_FADT *Table;
UINT8 Revision;
+ UINT32 DsdtAddress;
+ UINT64 X_DsdtAddress;
+ UINT32 i;
+ /* Get the table revision and 32-bit DSDT Address definition */
+
+ DsdtFieldList = (*PFieldList)->Next;
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt1,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -141,8 +150,16 @@
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
- Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
- Revision = Table->Revision;
+ Table = ACPI_CAST_PTR (ACPI_TABLE_FADT, ParentTable->Buffer);
+ Revision = Table->Header.Revision;
+ DsdtAddress = Table->Dsdt;
+
+ /* FADT version 1 has only 32-bit addresses - error if DSDT address is NULL */
+
+ if ((Revision == 1) && (!DsdtAddress))
+ {
+ DtError (ASL_ERROR, ASL_MSG_ZERO_VALUE, DsdtFieldList, NULL);
+ }
if (Revision == 2)
{
@@ -155,8 +172,24 @@
DtInsertSubtable (ParentTable, Subtable);
}
- else if (Revision >= 2)
+
+ else if (Revision > 2)
{
+ /*
+ * Rev 3 and greater have 64-bit addresses (as well as 32-bit).
+ * Get the 64-bit DSDT (X_DSDT) Address definition. Note: This
+ * appears at field list offset 11 within AcpiDmTableInfoFadt3.
+ */
+ DsdtFieldList = *PFieldList;
+ for (i = 0; i < ACPI_XDSDT_LOCATION_IN_LIST; i++)
+ {
+ DsdtFieldList = DsdtFieldList->Next;
+ if (!DsdtFieldList)
+ {
+ return (ASL_MSG_BAD_PARSE_TREE);
+ }
+ }
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt3,
&Subtable);
if (ACPI_FAILURE (Status))
@@ -166,6 +199,20 @@
DtInsertSubtable (ParentTable, Subtable);
+ Table = ACPI_CAST_PTR (ACPI_TABLE_FADT, ParentTable->Buffer);
+ X_DsdtAddress = Table->XDsdt;
+
+ /*
+ * Error if both the 32-bit DSDT address and the
+ * 64-bit X_DSDT address are zero.
+ */
+ if ((!X_DsdtAddress) && (!DsdtAddress))
+ {
+ DtError (ASL_ERROR, ASL_MSG_TWO_ZERO_VALUES, DsdtFieldList, NULL);
+ }
+
+ /* Fields specific to FADT Revision 5 (appended to previous) */
+
if (Revision >= 5)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt5,
@@ -178,6 +225,8 @@
DtInsertSubtable (ParentTable, Subtable);
}
+ /* Fields specific to FADT Revision 6 (appended to previous) */
+
if (Revision >= 6)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt6,
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/compiler/dtutils.c
--- a/sys/external/bsd/acpica/dist/compiler/dtutils.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtutils.c Sat Dec 18 17:58:48 2021 +0000
@@ -329,6 +329,7 @@
case ACPI_DMT_BUF10:
case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
+ case ACPI_DMT_BUF18:
case ACPI_DMT_BUF128:
case ACPI_DMT_PCI_PATH:
case ACPI_DMT_PMTT_VENDOR:
@@ -475,6 +476,10 @@
case ACPI_DMT_MADT:
case ACPI_DMT_NHLT1:
case ACPI_DMT_NHLT1a:
+ case ACPI_DMT_NHLT1b:
+ case ACPI_DMT_NHLT1c:
+ case ACPI_DMT_NHLT1d:
+ case ACPI_DMT_NHLT1f:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
case ACPI_DMT_PPTT:
@@ -503,6 +508,7 @@
case ACPI_DMT_HEST:
case ACPI_DMT_HMAT:
case ACPI_DMT_NFIT:
+ case ACPI_DMT_NHLT1e:
case ACPI_DMT_PCI_PATH:
case ACPI_DMT_PHAT:
@@ -574,7 +580,7 @@
else
{ /* At this point, this is a fatal error */
- sprintf (AslGbl_MsgBuffer, "Expected \"%s\"", Info->Name);
+ snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
return (0);
}
@@ -629,6 +635,11 @@
ByteLength = 16;
break;
+ case ACPI_DMT_BUF18:
+
+ ByteLength = 18;
+ break;
+
case ACPI_DMT_BUF128:
ByteLength = 128;
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
--- a/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c Sat Dec 18 17:58:48 2021 +0000
@@ -599,6 +599,7 @@
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
ObjDesc->Region.Length = Table->Length;
+ ObjDesc->Region.Pointer = Table;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/events/evregion.c
--- a/sys/external/bsd/acpica/dist/events/evregion.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/events/evregion.c Sat Dec 18 17:58:48 2021 +0000
@@ -212,6 +212,15 @@
return_ACPI_STATUS (AE_NOT_EXIST);
}
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)
+ {
+ ACPI_PCC_INFO *Ctx = HandlerDesc->AddressSpace.Context;
+
+ Ctx->InternalBuffer = FieldObj->Field.InternalPccBuffer;
+ Ctx->Length = (UINT16) RegionObj->Region.Length;
+ Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
+ }
+
/*
* We must exit the interpreter because the region setup will
* potentially execute control methods (for example, the _REG method
diff -r 2278cb1f4f34 -r 67a3f9fb9374 sys/external/bsd/acpica/dist/events/evrgnini.c
--- a/sys/external/bsd/acpica/dist/events/evrgnini.c Sat Dec 18 16:41:37 2021 +0000
+++ b/sys/external/bsd/acpica/dist/events/evrgnini.c Sat Dec 18 17:58:48 2021 +0000
@@ -493,6 +493,64 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiEvDataTableRegionSetup
+ *
+ * PARAMETERS: Handle - Region we are interested in
+ * Function - Start or stop
+ * HandlerContext - Address space handler context
+ * RegionContext - Region specific context
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Setup a DataTableRegion
+ *
+ * MUTEX: Assumes namespace is not locked
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEvDataTableRegionSetup (
+ ACPI_HANDLE Handle,
+ UINT32 Function,
+ void *HandlerContext,
+ void **RegionContext)
+{
+ ACPI_OPERAND_OBJECT *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
+ ACPI_DATA_TABLE_MAPPING *LocalRegionContext;
+
+
+ ACPI_FUNCTION_TRACE (EvDataTableRegionSetup);
+
+
+ if (Function == ACPI_REGION_DEACTIVATE)
+ {
+ if (*RegionContext)
+ {
+ ACPI_FREE (*RegionContext);
+ *RegionContext = NULL;
+ }
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Create a new context */
+
+ LocalRegionContext = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_DATA_TABLE_MAPPING));
+ if (!(LocalRegionContext))
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
Home |
Main Index |
Thread Index |
Old Index