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 merge acpica 20220331 to 20221020
details: https://anonhg.NetBSD.org/src/rev/ddae966bc4f1
branches: trunk
changeset: 372581:ddae966bc4f1
user: christos <christos%NetBSD.org@localhost>
date: Sat Dec 10 17:40:49 2022 +0000
description:
merge acpica 20220331 to 20221020
diffstat:
sys/external/bsd/acpica/conf/files.acpica | 3 +-
sys/external/bsd/acpica/dist/common/dmtables.c | 2 +-
sys/external/bsd/acpica/dist/common/dmtbdump.c | 4 +-
sys/external/bsd/acpica/dist/compiler/aslcompile.c | 12 +-
sys/external/bsd/acpica/dist/compiler/aslerror.c | 1 -
sys/external/bsd/acpica/dist/compiler/asloptions.c | 30 +-
sys/external/bsd/acpica/dist/compiler/aslpredef.c | 2 +-
sys/external/bsd/acpica/dist/compiler/dtcompile.c | 42 +++
sys/external/bsd/acpica/dist/compiler/dtutils.c | 3 +-
sys/external/bsd/acpica/dist/events/evregion.c | 8 +
sys/external/bsd/acpica/dist/executer/exconfig.c | 3 +-
sys/external/bsd/acpica/dist/hardware/hwsleep.c | 10 +
sys/external/bsd/acpica/dist/include/acdisasm.h | 19 +
sys/external/bsd/acpica/dist/include/acglobal.h | 1 +
sys/external/bsd/acpica/dist/include/acpixf.h | 2 +-
sys/external/bsd/acpica/dist/include/actables.h | 10 -
sys/external/bsd/acpica/dist/include/actbl1.h | 179 ++++++++++++-
sys/external/bsd/acpica/dist/include/actypes.h | 10 +-
sys/external/bsd/acpica/dist/include/acutils.h | 25 +
sys/external/bsd/acpica/dist/tables/tbdata.c | 2 +-
sys/external/bsd/acpica/dist/tables/tbfadt.c | 2 +-
sys/external/bsd/acpica/dist/tables/tbutils.c | 2 +-
sys/external/bsd/acpica/dist/tables/tbxfroot.c | 32 +-
sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c | 2 +-
sys/external/bsd/acpica/dist/utilities/utglobal.c | 1 +
25 files changed, 364 insertions(+), 43 deletions(-)
diffs (truncated from 830 to 300 lines):
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/conf/files.acpica
--- a/sys/external/bsd/acpica/conf/files.acpica Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/conf/files.acpica Sat Dec 10 17:40:49 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.acpica,v 1.17 2019/01/05 20:40:05 christos Exp $
+# $NetBSD: files.acpica,v 1.18 2022/12/10 17:40:49 christos Exp $
define acpica
makeoptions acpi CPPFLAGS+="-I$S/external/bsd/acpica/dist/include"
@@ -183,6 +183,7 @@
file utilities/utascii.c acpica
file utilities/utbuffer.c acpica
file utilities/utcache.c acpica
+file utilities/utcksum.c acpica
file utilities/utcopy.c acpica
file utilities/utdebug.c acpica
file utilities/utdecode.c acpica
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/common/dmtables.c
--- a/sys/external/bsd/acpica/dist/common/dmtables.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtables.c Sat Dec 10 17:40:49 2022 +0000
@@ -188,7 +188,7 @@
AcpiOsPrintf ("\n * Checksum 0x%2.2X", Table->Checksum);
- Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
+ Checksum = AcpiUtChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
if (Checksum)
{
AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/common/dmtbdump.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump.c Sat Dec 10 17:40:49 2022 +0000
@@ -222,7 +222,7 @@
/* Validate the first checksum */
- Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON),
+ Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON),
Rsdp->Checksum);
if (Checksum != Rsdp->Checksum)
{
@@ -243,7 +243,7 @@
/* Validate the extended checksum over entire RSDP */
- Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP),
+ Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP),
Rsdp->ExtendedChecksum);
if (Checksum != Rsdp->ExtendedChecksum)
{
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/aslcompile.c
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c Sat Dec 10 17:40:49 2022 +0000
@@ -133,7 +133,7 @@
if (AslGbl_SyntaxError)
{
- fprintf (stderr,
+ AslError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
"Compiler aborting due to parser-detected syntax error(s)\n");
/* Flag this error in the FileNode for compilation summary */
@@ -142,6 +142,8 @@
FileNode->ParserErrorDetected = TRUE;
AslGbl_ParserErrorDetected = TRUE;
LsDumpParseTree ();
+ AePrintErrorLog(ASL_FILE_STDERR);
+
goto ErrorExit;
}
@@ -159,6 +161,8 @@
goto ErrorExit;
}
+ AePrintErrorLog(ASL_FILE_STDERR);
+
/* Flush out any remaining source after parse tree is complete */
Event = UtBeginEvent ("Flush source input");
@@ -175,10 +179,13 @@
LsDumpParseTree ();
+ AslGbl_ParserErrorDetected = FALSE;
+ AslGbl_SyntaxError = FALSE;
UtEndEvent (Event);
UtEndEvent (FullCompile);
- return (AE_OK);
+ AslGbl_ParserErrorDetected = FALSE;
+ AslGbl_SyntaxError = FALSE;
ErrorExit:
UtEndEvent (FullCompile);
return (AE_ERROR);
@@ -811,7 +818,6 @@
ASL_MAX_ERROR_COUNT);
}
- AslGbl_ExceptionCount[ASL_ERROR] = 0;
UtDisplaySummary (ASL_FILE_STDOUT);
/*
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/aslerror.c
--- a/sys/external/bsd/acpica/dist/compiler/aslerror.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslerror.c Sat Dec 10 17:40:49 2022 +0000
@@ -925,7 +925,6 @@
exit(1);
}
- AslGbl_ExceptionCount[ASL_ERROR] = 0;
return;
}
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/asloptions.c
--- a/sys/external/bsd/acpica/dist/compiler/asloptions.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloptions.c Sat Dec 10 17:40:49 2022 +0000
@@ -44,6 +44,7 @@
#include "aslcompiler.h"
#include "acapps.h"
#include "acdisasm.h"
+#include "acglobal.h"
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("asloption")
@@ -68,7 +69,7 @@
#define ASL_TOKEN_SEPARATORS " \t\n"
-#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|t|T+G^v^w|x:z"
+#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|:t|T+G^v^w|x:z"
/*******************************************************************************
@@ -162,7 +163,7 @@
BOOLEAN IsResponseFile)
{
ACPI_STATUS Status;
- UINT32 j;
+ INT32 j;
/* Get the command line options */
@@ -258,7 +259,6 @@
{
return (-1);
}
-
AslGbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
@@ -337,6 +337,28 @@
AcpiGbl_CstyleDisassembly = FALSE;
break;
+ case 's': /* Specify table signature (Only supported for CDAT table) */
+
+ /* Get the required argument */
+
+ if (AcpiGetoptArgument (argc, argv))
+ {
+ return (-1);
+ }
+
+ /* Check for exact string "CDAT" (upper or lower case) */
+
+ AcpiGbl_CDAT = ACPI_CAST_PTR (char, &AcpiGbl_Optarg);
+ if (AcpiUtStricmp (AcpiGbl_Optarg, ACPI_SIG_CDAT))
+ {
+ printf ("\nUnknown table signature: %s\n", AcpiGbl_Optarg);
+ return (-1);
+ }
+
+ AcpiGbl_CDAT = malloc (5);
+ AcpiUtSafeStrncpy ((char *) AcpiGbl_CDAT, ACPI_SIG_CDAT, 5);
+ break;
+
default:
printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
@@ -729,7 +751,7 @@
AslGbl_HexOutputFlag = HEX_OUTPUT_C;
break;
- case 'p': /* data table flex/bison prototype */
+ case 'p': /* data table flex/bison prototype */
AslGbl_DtLexBisonPrototype = TRUE;
break;
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/aslpredef.c
--- a/sys/external/bsd/acpica/dist/compiler/aslpredef.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslpredef.c Sat Dec 10 17:40:49 2022 +0000
@@ -455,7 +455,7 @@
if (Name[0] == 0)
{
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
- "zero length name found");
+ "Zero length name found");
}
/* All reserved names are prefixed with a single underscore */
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/dtcompile.c
--- a/sys/external/bsd/acpica/dist/compiler/dtcompile.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtcompile.c Sat Dec 10 17:40:49 2022 +0000
@@ -345,6 +345,48 @@
}
/*
+ * If the first field is named "CDAT Table Length" (not "Signature"),
+ * assume that we have a CDAT table (whose table header does not have
+ * a signature). Instead, the TableLength field is where the
+ * signature would (normally) be.
+ */
+ else if (!strcmp ((*FieldList)->Name, "CDAT Table Length"))
+ {
+ /* No longer true: (However, use this technique in the disassembler)
+ * We are assuming that there
+ * should be at least one non-ASCII byte in the 4-character
+ * Signature field, (At least the high-order byte should be zero).
+ */
+ Status = DtCompileTable (FieldList, AcpiDmTableInfoCdatTableHdr,
+ &AslGbl_RootTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Compile the CDAT */
+
+ DtPushSubtable (AslGbl_RootTable);
+ Status = DtCompileCdat ((void **) FieldList);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /*
+ * Set the overall table length and the table checksum.
+ * The entire compiled table (including the CDAT table header with
+ * the table length and checksum) is in AslGbl_RootTable->Buffer.
+ */
+ DtSetTableLength ();
+ DtSetTableChecksum (&ACPI_CAST_PTR (ACPI_TABLE_CDAT, AslGbl_RootTable->Buffer)->Checksum);
+
+ DtDumpFieldList (RootField);
+ DtDumpSubtableList ();
+ return (AE_OK);
+ }
+
+ /*
* All other tables must use the common ACPI table header. Insert the
* current iASL IDs (name, version), and compile the header now.
*/
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/compiler/dtutils.c
--- a/sys/external/bsd/acpica/dist/compiler/dtutils.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtutils.c Sat Dec 10 17:40:49 2022 +0000
@@ -493,6 +493,7 @@
case ACPI_DMT_AEST_XFACE:
case ACPI_DMT_AEST_XRUPT:
case ACPI_DMT_ASF:
+ case ACPI_DMT_CDAT:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
case ACPI_DMT_EINJACT:
@@ -692,7 +693,7 @@
UINT8 *Sum = ReturnValue;
- Checksum = AcpiTbChecksum (Subtable->Buffer, Subtable->Length);
+ Checksum = AcpiUtChecksum (Subtable->Buffer, Subtable->Length);
*Sum = (UINT8) (*Sum + Checksum);
}
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/events/evregion.c
--- a/sys/external/bsd/acpica/dist/events/evregion.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/events/evregion.c Sat Dec 10 17:40:49 2022 +0000
@@ -221,6 +221,14 @@
Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
}
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)
+ {
+ ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context;
+
+ Ctx->Length = RegionObj->Region.Length;
+ Ctx->Offset = RegionObj->Region.Address;
+ }
+
/*
* We must exit the interpreter because the region setup will
* potentially execute control methods (for example, the _REG method
diff -r 4418ba4931d5 -r ddae966bc4f1 sys/external/bsd/acpica/dist/executer/exconfig.c
--- a/sys/external/bsd/acpica/dist/executer/exconfig.c Sat Dec 10 16:52:02 2022 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconfig.c Sat Dec 10 17:40:49 2022 +0000
@@ -362,8 +362,7 @@
}
if (Target->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Type not integer: %X\n", Target->Common.Type));
Home |
Main Index |
Thread Index |
Old Index