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 conflicts
details: https://anonhg.NetBSD.org/src/rev/6c73f91f3fe0
branches: trunk
changeset: 353351:6c73f91f3fe0
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 30 23:13:36 2017 +0000
description:
merge conflicts
diffstat:
sys/external/bsd/acpica/dist/common/dmtbinfo.c | 10 +-
sys/external/bsd/acpica/dist/compiler/aslcompile.c | 31 +++-
sys/external/bsd/acpica/dist/compiler/aslcompiler.h | 16 +
sys/external/bsd/acpica/dist/compiler/aslcompiler.l | 5 +-
sys/external/bsd/acpica/dist/compiler/aslfiles.c | 32 +++-
sys/external/bsd/acpica/dist/compiler/asloptions.c | 63 ++++++-
sys/external/bsd/acpica/dist/compiler/aslsupport.l | 114 ++++++++++--
sys/external/bsd/acpica/dist/compiler/asltree.c | 175 ++++++++++++++++++-
sys/external/bsd/acpica/dist/compiler/aslwalks.c | 2 +-
sys/external/bsd/acpica/dist/debugger/dbmethod.c | 1 +
sys/external/bsd/acpica/dist/disassembler/dmcstyle.c | 51 +++--
sys/external/bsd/acpica/dist/disassembler/dmwalk.c | 105 +++++++++--
sys/external/bsd/acpica/dist/dispatcher/dscontrol.c | 2 +-
sys/external/bsd/acpica/dist/dispatcher/dsopcode.c | 4 +-
sys/external/bsd/acpica/dist/dispatcher/dsutils.c | 6 +-
sys/external/bsd/acpica/dist/include/acdisasm.h | 14 +
sys/external/bsd/acpica/dist/include/acglobal.h | 44 ++++
sys/external/bsd/acpica/dist/include/aclocal.h | 118 ++++++++++-
sys/external/bsd/acpica/dist/include/acmacros.h | 35 +++
sys/external/bsd/acpica/dist/include/acpixf.h | 2 +-
sys/external/bsd/acpica/dist/namespace/nsaccess.c | 2 +-
sys/external/bsd/acpica/dist/namespace/nsrepair2.c | 6 +-
sys/external/bsd/acpica/dist/parser/psopcode.c | 13 +-
sys/external/bsd/acpica/dist/parser/psopinfo.c | 2 +-
sys/external/bsd/acpica/dist/utilities/utcache.c | 2 +-
sys/external/bsd/acpica/dist/utilities/utdebug.c | 1 +
26 files changed, 735 insertions(+), 121 deletions(-)
diffs (truncated from 1720 to 300 lines):
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/common/dmtbinfo.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c Sun Apr 30 23:13:36 2017 +0000
@@ -171,6 +171,7 @@
#define ACPI_IORT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f)
#define ACPI_IORT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f)
#define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f)
+#define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f)
#define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
#define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f)
#define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f)
@@ -259,6 +260,7 @@
#define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o)
#define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o)
#define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o)
+#define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o)
#define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o)
#define ACPI_IORTA_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o)
#define ACPI_IORTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o)
@@ -1549,8 +1551,12 @@
ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[] =
{
- {ACPI_DMT_UINT64, 0, "SMMU_NSgIrpt Interrupt", 0},
- {ACPI_DMT_UINT64, 0, "SMMU_NSgCfgIrpt Interrupt", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgIrpt), "NSgIrpt", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgIrptFlags), "NSgIrpt Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_IORT3a_FLAG_OFFSET (NSgIrptFlags, 0), "Edge Triggered", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgCfgIrpt), "NSgCfgIrpt", 0},
+ {ACPI_DMT_UINT32, ACPI_IORT3A_OFFSET (NSgCfgIrptFlags), "NSgCfgIrpt Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_IORT3a_FLAG_OFFSET (NSgCfgIrptFlags, 0), "Edge Triggered", 0},
ACPI_DMT_TERMINATOR
};
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/compiler/aslcompile.c
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c Sun Apr 30 23:13:36 2017 +0000
@@ -285,8 +285,17 @@
{
Event = UtBeginEvent ("Resolve all Externals");
DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n");
- TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
- ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
+
+ if (Gbl_DoExternalsInPlace)
+ {
+ TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
+ ExAmlExternalWalkBegin, NULL, NULL);
+ }
+ else
+ {
+ TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
+ ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
+ }
UtEndEvent (Event);
}
@@ -347,6 +356,18 @@
NULL, &AnalysisWalkInfo);
UtEndEvent (Event);
+ /*
+ * ASL-/ASL+ converter: Gbl_ParseTreeRoot->CommentList contains the
+ * very last comment of a given ASL file because it's the last constructed
+ * node during compilation. We take the very last comment and save it in a
+ * global for it to be used by the disassembler.
+ */
+ if (Gbl_CaptureComments)
+ {
+ AcpiGbl_LastListHead = Gbl_ParseTreeRoot->Asl.CommentList;
+ Gbl_ParseTreeRoot->Asl.CommentList = NULL;
+ }
+
/* Calculate all AML package lengths */
Event = UtBeginEvent ("Finish AML package length generation");
@@ -800,7 +821,11 @@
/* Final cleanup after compiling one file */
- CmDeleteCaches ();
+ if (!Gbl_DoAslConversion)
+ {
+ CmDeleteCaches ();
+ }
+
}
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/compiler/aslcompiler.h
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.h Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.h Sun Apr 30 23:13:36 2017 +0000
@@ -576,6 +576,12 @@
CgGenerateAmlOutput (
void);
+void
+CgLocalWriteAmlData (
+ ACPI_PARSE_OBJECT *Op,
+ void *Buffer,
+ UINT32 Length);
+
/*
* aslfile
@@ -1360,4 +1366,14 @@
DtCreateTemplates (
char **argv);
+
+/*
+ * ASL/ASL+ converter debug
+ */
+void
+CvDbgPrint (
+ char *Fmt,
+ ...);
+
+
#endif /* __ASLCOMPILER_H */
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/compiler/aslcompiler.l
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Sun Apr 30 23:13:36 2017 +0000
@@ -44,6 +44,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acconvert.h"
#include <stdlib.h>
#include <string.h>
@@ -66,10 +67,10 @@
static void
AslDoLineDirective (void);
-static char
+static BOOLEAN
AslDoComment (void);
-static char
+static BOOLEAN
AslDoCommentType2 (void);
static char
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/compiler/aslfiles.c
--- a/sys/external/bsd/acpica/dist/compiler/aslfiles.c Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfiles.c Sun Apr 30 23:13:36 2017 +0000
@@ -511,8 +511,14 @@
if (!Filename)
{
/* Create the output AML filename */
-
- Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE);
+ if (!Gbl_CaptureComments)
+ {
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_AML_CODE);
+ }
+ else
+ {
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_CONVERT_AML);
+ }
if (!Filename)
{
AslCommonError (ASL_ERROR, ASL_MSG_OUTPUT_FILENAME,
@@ -854,6 +860,28 @@
AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
}
+ /* Create a debug file for the converter */
+
+ if (AcpiGbl_DebugAslConversion)
+ {
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_CONVERT_DEBUG);
+ if (!Filename)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
+ 0, 0, 0, 0, NULL, NULL);
+ return (AE_ERROR);
+ }
+
+ /* Open the converter debug file, text mode */
+
+ FlOpenFile (ASL_FILE_CONV_DEBUG_OUTPUT, Filename, "w+t");
+
+ AslCompilerSignon (ASL_FILE_CONV_DEBUG_OUTPUT);
+ AslCompilerFileHeader (ASL_FILE_CONV_DEBUG_OUTPUT);
+
+ AcpiGbl_ConvDebugFile = Gbl_Files[ASL_FILE_CONV_DEBUG_OUTPUT].Handle;
+ }
+
return (AE_OK);
}
diff -r f3c5ff62c675 -r 6c73f91f3fe0 sys/external/bsd/acpica/dist/compiler/asloptions.c
--- a/sys/external/bsd/acpica/dist/compiler/asloptions.c Sun Apr 30 20:57:21 2017 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloptions.c Sun Apr 30 23:13:36 2017 +0000
@@ -68,7 +68,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^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"
#ifdef ACPI_REPRO
static char ASL_BUILD_DATE[] = "Jan 1, 1970";
@@ -214,6 +214,24 @@
switch (AcpiGbl_Optarg[0])
{
+
+ case 'c':
+
+ printf ("Debug ASL to ASL+ conversion\n");
+
+ Gbl_DoAslConversion = TRUE;
+ Gbl_FoldConstants = FALSE;
+ Gbl_IntegerOptimizationFlag = FALSE;
+ Gbl_ReferenceOptimizationFlag = FALSE;
+ Gbl_OptimizeTrivialParseNodes = FALSE;
+ Gbl_CaptureComments = TRUE;
+ AcpiGbl_DoDisassemblerOptimizations = FALSE;
+ AcpiGbl_DebugAslConversion = TRUE;
+ AcpiGbl_DmEmitExternalOpcodes = TRUE;
+ Gbl_DoExternalsInPlace = TRUE;
+
+ return (0);
+
case 'f':
AslCompilerdebug = 1; /* same as yydebug */
@@ -265,6 +283,22 @@
switch (AcpiGbl_Optarg[0])
{
+
+ case 'a':
+
+ printf ("Convert ASL to ASL+ with comments\n");
+ Gbl_DoAslConversion = TRUE;
+ Gbl_FoldConstants = FALSE;
+ Gbl_IntegerOptimizationFlag = FALSE;
+ Gbl_ReferenceOptimizationFlag = FALSE;
+ Gbl_OptimizeTrivialParseNodes = FALSE;
+ Gbl_CaptureComments = TRUE;
+ AcpiGbl_DoDisassemblerOptimizations = FALSE;
+ AcpiGbl_DmEmitExternalOpcodes = TRUE;
+ Gbl_DoExternalsInPlace = TRUE;
+
+ return (0);
+
case 'r':
Gbl_NoResourceChecking = TRUE;
@@ -557,6 +591,8 @@
Gbl_FoldConstants = FALSE;
Gbl_IntegerOptimizationFlag = FALSE;
Gbl_ReferenceOptimizationFlag = FALSE;
+ Gbl_OptimizeTrivialParseNodes = FALSE;
+
break;
case 'c':
@@ -575,15 +611,21 @@
case 'e':
- /* iASL: Disable External opcode generation */
-
- Gbl_DoExternals = FALSE;
-
/* Disassembler: Emit embedded external operators */
AcpiGbl_DmEmitExternalOpcodes = TRUE;
break;
+ case 'E':
+
+ /*
+ * iASL: keep External opcodes in place.
+ * No affect if Gbl_DoExternals is false.
+ */
+
+ Gbl_DoExternalsInPlace = TRUE;
+ break;
+
case 'f':
/* Disable folding on "normal" expressions */
@@ -648,6 +690,17 @@
Gbl_UseDefaultAmlFilename = FALSE;
break;
+ case 'q': /* ASL/ASl+ converter: compile only and leave badaml. */
+
+ printf ("Convert ASL to ASL+ with comments\n");
+ Gbl_FoldConstants = FALSE;
+ Gbl_IntegerOptimizationFlag = FALSE;
+ Gbl_ReferenceOptimizationFlag = FALSE;
+ Gbl_OptimizeTrivialParseNodes = FALSE;
+ Gbl_CaptureComments = TRUE;
Home |
Main Index |
Thread Index |
Old Index