Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 00:40:45 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237412 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disa...
Message-ID:  <201206220040.q5M0ejNk045397@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Jun 22 00:40:44 2012
New Revision: 237412
URL: http://svn.freebsd.org/changeset/base/237412

Log:
  Merge ACPICA 20120620.

Added:
  head/sys/contrib/dev/acpica/common/ahpredef.c
     - copied, changed from r237408, vendor-sys/acpica/dist/source/common/ahpredef.c
Modified:
  head/sys/contrib/dev/acpica/changes.txt   (contents, props changed)
  head/sys/contrib/dev/acpica/common/dmextern.c
  head/sys/contrib/dev/acpica/common/dmrestag.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/asllookup.c
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslsupport.l
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.c
  head/sys/contrib/dev/acpica/components/debugger/dbdisply.c
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbutils.c
  head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
  head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
  head/sys/contrib/dev/acpica/components/events/evgpe.c
  head/sys/contrib/dev/acpica/components/events/evgpeutil.c
  head/sys/contrib/dev/acpica/components/events/evxfgpe.c
  head/sys/contrib/dev/acpica/components/executer/exconfig.c
  head/sys/contrib/dev/acpica/components/utilities/utmisc.c
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acglobal.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/acpredef.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)
  head/sys/contrib/dev/acpica/common/   (props changed)
  head/sys/contrib/dev/acpica/compiler/   (props changed)
  head/sys/contrib/dev/acpica/components/debugger/   (props changed)
  head/sys/contrib/dev/acpica/components/disassembler/   (props changed)
  head/sys/contrib/dev/acpica/components/dispatcher/   (props changed)
  head/sys/contrib/dev/acpica/components/events/   (props changed)
  head/sys/contrib/dev/acpica/components/executer/   (props changed)
  head/sys/contrib/dev/acpica/components/utilities/   (props changed)
  head/sys/contrib/dev/acpica/include/   (props changed)

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/changes.txt	Fri Jun 22 00:40:44 2012	(r237412)
@@ -1,4 +1,68 @@
 ----------------------------------------
+20 June 2012. Summary of changes for version 20120620:
+
+This release is available at https://www.acpica.org/downloads
+The ACPI 5.0 specification is available at www.acpi.info
+
+1) ACPICA Kernel-resident Subsystem:
+
+Implemented support to expand the "implicit notify" feature to allow multiple 
+devices to be notified by a single GPE. This feature automatically generates a 
+runtime device notification in the absence of a BIOS-provided GPE control 
+method (_Lxx/_Exx) or a host-installed handler for the GPE. Implicit notify is 
+provided by ACPICA for Windows compatibility, and is a workaround for BIOS AML 
+code errors. See the description of the AcpiSetupGpeForWake interface in the 
+APCICA reference. Bob Moore, Rafael Wysocki. ACPICA BZ 918.
+
+Changed some comments and internal function names to simplify and ensure 
+correctness of the Linux code translation. No functional changes.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug 
+version of the code includes the debug output trace mechanism and has a much 
+larger code and data size.
+
+  Previous Release:
+    Non-Debug Version:  93.0K Code, 25.1K Data, 118.1K Total
+    Debug Version:     172.7K Code, 73.6K Data, 246.3K Total
+  Current Release:
+    Non-Debug Version:  93.1K Code, 25.1K Data, 118.2K Total
+    Debug Version:     172.9K Code, 73.6K Data, 246.5K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Added support to emit short, commented descriptions for the ACPI 
+predefined names in order to improve the readability of the disassembled 
+output. ACPICA BZ 959. Changes include:
+  1) Emit descriptions for all standard predefined names (_INI, _STA, _PRW, 
+etc.)
+  2) Emit generic descriptions for the special names (_Exx, _Qxx, etc.)
+  3) Emit descriptions for the resource descriptor names (_MIN, _LEN, etc.)
+
+AcpiSrc: Fixed several long-standing Linux code translation issues. Argument 
+descriptions in function headers are now translated properly to lower case and 
+underscores. ACPICA BZ 961. Also fixes translation problems such as these: 
+(old -> new)
+  i_aSL -> iASL
+  00-7_f -> 00-7F
+  16_k -> 16K
+  local_fADT -> local_FADT
+  execute_oSI -> execute_OSI
+
+iASL: Fixed a problem where null bytes were inadvertently emitted into some 
+listing files.
+
+iASL: Added the existing debug options to the standard help screen. There are 
+no longer two different help screens. ACPICA BZ 957.
+
+AcpiHelp: Fixed some typos in the various predefined name descriptions. Also 
+expand some of the descriptions where appropriate.
+
+iASL: Fixed the -ot option (display compile times/statistics). Was not working 
+properly for standard output; only worked for the debug file case.
+
+----------------------------------------
 18 May 2012. Summary of changes for version 20120518:
 
 

Copied and modified: head/sys/contrib/dev/acpica/common/ahpredef.c (from r237408, vendor-sys/acpica/dist/source/common/ahpredef.c)
==============================================================================
--- vendor-sys/acpica/dist/source/common/ahpredef.c	Thu Jun 21 18:22:50 2012	(r237408, copy source)
+++ head/sys/contrib/dev/acpica/common/ahpredef.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -41,8 +41,8 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#include "acpi.h"
-#include "accommon.h"
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
 
 /*
  * iASL only needs a partial table (short descriptions only).

Modified: head/sys/contrib/dev/acpica/common/dmextern.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmextern.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/common/dmextern.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -221,8 +221,10 @@ AcpiDmNormalizeParentPrefix (
      */
     ACPI_STRCAT (Fullpath, ParentPath);
 
-    /* Add dot separator (don't need dot if parent fullpath is a single "\") */
-
+    /*
+     * Add dot separator
+     * (don't need dot if parent fullpath is a single backslash)
+     */
     if (ParentPath[1])
     {
         ACPI_STRCAT (Fullpath, ".");

Modified: head/sys/contrib/dev/acpica/common/dmrestag.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmrestag.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/common/dmrestag.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -73,6 +73,7 @@ AcpiDmGetResourceTag (
 
 static char *
 AcpiGetTagPathname (
+    ACPI_PARSE_OBJECT       *Op,
     ACPI_NAMESPACE_NODE     *BufferNode,
     ACPI_NAMESPACE_NODE     *ResourceNode,
     UINT32                  BitIndex);
@@ -443,7 +444,6 @@ AcpiDmCheckResourceReference (
     ACPI_NAMESPACE_NODE     *BufferNode;
     ACPI_NAMESPACE_NODE     *ResourceNode;
     const ACPI_OPCODE_INFO  *OpInfo;
-    char                    *Pathname;
     UINT32                  BitIndex;
 
 
@@ -519,14 +519,7 @@ AcpiDmCheckResourceReference (
 
     /* Translate the Index to a resource tag pathname */
 
-    Pathname = AcpiGetTagPathname (BufferNode, ResourceNode, BitIndex);
-    if (Pathname)
-    {
-        /* Complete the conversion of the Index to a symbol */
-
-        IndexOp->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
-        IndexOp->Common.Value.String = Pathname;
-    }
+    AcpiGetTagPathname (IndexOp, BufferNode, ResourceNode, BitIndex);
 }
 
 
@@ -597,6 +590,7 @@ AcpiDmGetResourceNode (
 
 static char *
 AcpiGetTagPathname (
+    ACPI_PARSE_OBJECT       *IndexOp,
     ACPI_NAMESPACE_NODE     *BufferNode,
     ACPI_NAMESPACE_NODE     *ResourceNode,
     UINT32                  BitIndex)
@@ -689,6 +683,15 @@ AcpiGetTagPathname (
 
     AcpiNsInternalizeName (Pathname, &InternalPath);
     ACPI_FREE (Pathname);
+
+    /* Update the Op with the symbol */
+
+    AcpiPsInitOp (IndexOp, AML_INT_NAMEPATH_OP);
+    IndexOp->Common.Value.String = InternalPath;
+
+    /* We will need the tag later. Cheat by putting it in the Node field */
+
+    IndexOp->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Tag);
     return (InternalPath);
 }
 

Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcompile.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslcompile.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -67,6 +67,10 @@ FlConsumeNewComment (
     FILE                    *Handle,
     ASL_FILE_STATUS         *Status);
 
+static void
+CmDumpAllEvents (
+    void);
+
 
 /*******************************************************************************
  *
@@ -717,45 +721,65 @@ CmDoOutputFiles (
 
 /*******************************************************************************
  *
- * FUNCTION:    CmDumpEvent
+ * FUNCTION:    CmDumpAllEvents
  *
- * PARAMETERS:  Event           - A compiler event struct
+ * PARAMETERS:  None
  *
  * RETURN:      None.
  *
- * DESCRIPTION: Dump a compiler event struct
+ * DESCRIPTION: Dump all compiler events
  *
  ******************************************************************************/
 
 static void
-CmDumpEvent (
-    ASL_EVENT_INFO          *Event)
+CmDumpAllEvents (
+    void)
 {
+    ASL_EVENT_INFO          *Event;
     UINT32                  Delta;
     UINT32                  USec;
     UINT32                  MSec;
+    UINT32                  i;
+
 
-    if (!Event->Valid)
+    Event = AslGbl_Events;
+
+    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
+    if (Gbl_CompileTimesFlag)
     {
-        return;
+        printf ("\nElapsed time for major events\n\n");
     }
 
-    /* Delta will be in 100-nanosecond units */
+    for (i = 0; i < AslGbl_NextEvent; i++)
+    {
+        if (Event->Valid)
+        {
+            /* Delta will be in 100-nanosecond units */
 
-    Delta = (UINT32) (Event->EndTime - Event->StartTime);
+            Delta = (UINT32) (Event->EndTime - Event->StartTime);
 
-    USec = Delta / 10;
-    MSec = Delta / 10000;
+            USec = Delta / 10;
+            MSec = Delta / 10000;
 
-    /* Round milliseconds up */
+            /* Round milliseconds up */
 
-    if ((USec - (MSec * 1000)) >= 500)
-    {
-        MSec++;
-    }
+            if ((USec - (MSec * 1000)) >= 500)
+            {
+                MSec++;
+            }
+
+            DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
+                USec, MSec, Event->EventName);
+
+            if (Gbl_CompileTimesFlag)
+            {
+                printf ("%8u usec %8u msec - %s\n",
+                    USec, MSec, Event->EventName);
+            }
+        }
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
-        USec, MSec, Event->EventName);
+        Event++;
+    }
 }
 
 
@@ -786,20 +810,12 @@ CmCleanupAndExit (
         AePrintErrorLog (ASL_FILE_STDOUT);
     }
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
-    for (i = 0; i < AslGbl_NextEvent; i++)
-    {
-        CmDumpEvent (&AslGbl_Events[i]);
-    }
+    /* Emit compile times if enabled */
+
+    CmDumpAllEvents ();
 
     if (Gbl_CompileTimesFlag)
     {
-        printf ("\nElapsed time for major events\n\n");
-        for (i = 0; i < AslGbl_NextEvent; i++)
-        {
-            CmDumpEvent (&AslGbl_Events[i]);
-        }
-
         printf ("\nMiscellaneous compile statistics\n\n");
         printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
         printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");

Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslerror.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslerror.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -341,7 +341,7 @@ AePrintException (
 
         if (Gbl_VerboseErrors)
         {
-            fprintf (OutputFile, "%s %4.4d - ",
+            fprintf (OutputFile, "%s %4.4d -",
                         AslErrorLevel[Enode->Level],
                         Enode->MessageId + ((Enode->Level+1) * 1000));
         }

Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslfiles.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslfiles.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -754,7 +754,7 @@ FlOpenInputFile (
 
     /* Open the input ASL file, text mode */
 
-    FlOpenFile (ASL_FILE_INPUT, InputFilename, "r");
+    FlOpenFile (ASL_FILE_INPUT, InputFilename, "rt");
     AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
 
     return (AE_OK);
@@ -838,7 +838,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the hex file, text mode */
 
-        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
@@ -889,7 +889,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the listing file, text mode */
 
-        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_LISTING_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
@@ -907,7 +907,7 @@ FlOpenMiscOutputFiles (
             return (AE_ERROR);
         }
 
-        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
+        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+t");
     }
 
     /* All done for data table compiler */
@@ -952,7 +952,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the assembly code source file, text mode */
 
-        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_ASM_SOURCE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_ASM_SOURCE_OUTPUT);
@@ -972,7 +972,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the C code source file, text mode */
 
-        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+t");
 
         FlPrintFile (ASL_FILE_C_SOURCE_OUTPUT, "/*\n");
         AslCompilerSignon (ASL_FILE_C_SOURCE_OUTPUT);
@@ -993,7 +993,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the assembly include file, text mode */
 
-        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_ASM_INCLUDE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_ASM_INCLUDE_OUTPUT);
@@ -1013,7 +1013,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the C include file, text mode */
 
-        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+t");
 
         FlPrintFile (ASL_FILE_C_INCLUDE_OUTPUT, "/*\n");
         AslCompilerSignon (ASL_FILE_C_INCLUDE_OUTPUT);
@@ -1034,7 +1034,7 @@ FlOpenMiscOutputFiles (
 
         /* Open the namespace file, text mode */
 
-        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_NAMESPACE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);

Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asllookup.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/asllookup.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -1098,7 +1098,7 @@ LkNamespaceLocateBegin (
 
             if (Message)
             {
-                sprintf (MsgBuffer, "Tag: %u bit%s, Field: %u bit%s",
+                sprintf (MsgBuffer, "Size mismatch, Tag: %u bit%s, Field: %u bit%s",
                     TagBitLength, (TagBitLength > 1) ? "s" : "",
                     FieldBitLength, (FieldBitLength > 1) ? "s" : "");
 

Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslmain.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslmain.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -63,7 +63,7 @@ Options (
     void);
 
 static void
-HelpMessage (
+FilenameHelp (
     void);
 
 static void
@@ -170,27 +170,36 @@ Options (
     ACPI_OPTION ("-g",              "Get ACPI tables and write to files (*.dat)");
 
     printf ("\nHelp:\n");
-    ACPI_OPTION ("-h",              "Additional help and compiler debug options");
+    ACPI_OPTION ("-h",              "This message");
     ACPI_OPTION ("-hc",             "Display operators allowed in constant expressions");
+    ACPI_OPTION ("-hf",             "Display help for output filename generation");
     ACPI_OPTION ("-hr",             "Display ACPI reserved method names");
     ACPI_OPTION ("-ht",             "Display currently supported ACPI table names");
+
+    printf ("\nDebug Options:\n");
+    ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
+    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
+    ACPI_OPTION ("-n",              "Parse only, no output generation");
+    ACPI_OPTION ("-ot",             "Display compile times and statistics");
+    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
+    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
 }
 
 
 /*******************************************************************************
  *
- * FUNCTION:    HelpMessage
+ * FUNCTION:    FilenameHelp
  *
  * PARAMETERS:  None
  *
  * RETURN:      None
  *
- * DESCRIPTION: Display help message
+ * DESCRIPTION: Display help message for output filename generation
  *
  ******************************************************************************/
 
 static void
-HelpMessage (
+FilenameHelp (
     void)
 {
 
@@ -202,17 +211,6 @@ HelpMessage (
     printf ("    2) The prefix of the AMLFileName in the ASL Definition Block\n");
     printf ("    3) The prefix of the input filename\n");
     printf ("\n");
-
-    Options ();
-
-    printf ("\nCompiler/Disassembler Debug Options:\n");
-    ACPI_OPTION ("-bb -bp -bt",     "Create compiler debug/trace file (*.txt)");
-    ACPI_OPTION ("",                "Types: Parse/Tree/Both");
-    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
-    ACPI_OPTION ("-n",              "Parse only, no output generation");
-    ACPI_OPTION ("-ot",             "Display compile times");
-    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
-    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
 }
 
 
@@ -430,13 +428,7 @@ AslDoOptions (
     case 'b':   /* Debug output options */
         switch (AcpiGbl_Optarg[0])
         {
-        case 'b':
-            AslCompilerdebug = 1; /* same as yydebug */
-            DtParserdebug = 1;
-            PrParserdebug = 1;
-            break;
-
-        case 'p':
+        case 'f':
             AslCompilerdebug = 1; /* same as yydebug */
             DtParserdebug = 1;
             PrParserdebug = 1;
@@ -530,13 +522,17 @@ AslDoOptions (
         switch (AcpiGbl_Optarg[0])
         {
         case '^':
-            HelpMessage ();
+            Usage ();
             exit (0);
 
         case 'c':
             UtDisplayConstantOpcodes ();
             exit (0);
 
+        case 'f':
+            FilenameHelp ();
+            exit (0);
+
         case 'r':
             /* reserved names */
 

Modified: head/sys/contrib/dev/acpica/compiler/aslsupport.l
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslsupport.l	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslsupport.l	Fri Jun 22 00:40:44 2012	(r237412)
@@ -92,19 +92,23 @@ static void
 AslDoLineDirective (
     void)
 {
-    char                    c;
+    int                     c;
     char                    *Token;
     UINT32                  LineNumber;
     char                    *Filename;
+    UINT32                  i;
 
 
     /* Eat the entire line that contains the #line directive */
 
-    while ((c = (char) input()) != '\n' && c != EOF)
+    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
+
+    while ((c = input()) != '\n' && c != EOF)
     {
-        AslInsertLineBuffer (c);
+        *Gbl_LineBufPtr = c;
+        Gbl_LineBufPtr++;
     }
-    AslInsertLineBuffer (0);
+    *Gbl_LineBufPtr = 0;
 
     /* First argument is the actual line number */
 
@@ -114,10 +118,23 @@ AslDoLineDirective (
         goto ResetAndExit;
     }
 
-    /* Convert line number. Subtract one to handle _this_ line */
+    /* First argument is the line number */
 
     LineNumber = (UINT32) UtDoConstant (Token);
-    FlSetLineNumber (LineNumber - 1);
+
+    /* Emit the appropriate number of newlines */
+
+    Gbl_CurrentColumn = 0;
+    if (LineNumber > Gbl_CurrentLineNumber)
+    {
+        for (i = 0; i < (LineNumber - Gbl_CurrentLineNumber); i++)
+        {
+            FlWriteFile (ASL_FILE_SOURCE_OUTPUT, "\n", 1);
+            Gbl_CurrentColumn++;
+        }
+    }
+
+    FlSetLineNumber (LineNumber);
 
     /* Second argument is the optional filename (in double quotes) */
 
@@ -132,7 +149,12 @@ AslDoLineDirective (
     /* Third argument is not supported at this time */
 
 ResetAndExit:
-    AslResetCurrentLineBuffer ();
+
+    /* Reset globals for a new line */
+
+    Gbl_CurrentLineOffset += Gbl_CurrentColumn;
+    Gbl_CurrentColumn = 0;
+    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
 }
 
 
@@ -408,8 +430,8 @@ static char
 AslDoComment (
     void)
 {
-    char                c;
-    char                c1 = 0;
+    int                 c;
+    int                 c1 = 0;
 
 
     AslInsertLineBuffer ('/');
@@ -419,7 +441,7 @@ loop:
 
     /* Eat chars until end-of-comment */
 
-    while ((c = (char) input()) != '*' && c != EOF)
+    while ((c = input()) != '*' && c != EOF)
     {
         AslInsertLineBuffer (c);
         c1 = c;
@@ -446,7 +468,7 @@ loop:
 
     AslInsertLineBuffer (c);
 
-    if ((c1 = (char) input()) != '/' && c1 != EOF)
+    if ((c1 = input()) != '/' && c1 != EOF)
     {
         unput(c1);
         goto loop;
@@ -489,13 +511,13 @@ static char
 AslDoCommentType2 (
     void)
 {
-    char                c;
+    int                 c;
 
 
     AslInsertLineBuffer ('/');
     AslInsertLineBuffer ('/');
 
-    while ((c = (char) input()) != '\n' && c != EOF)
+    while ((c = input()) != '\n' && c != EOF)
     {
         AslInsertLineBuffer (c);
     }
@@ -531,7 +553,7 @@ AslDoStringLiteral (
     char                *StringBuffer = MsgBuffer;
     char                *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
     char                *CleanString;
-    char                StringChar;
+    int                 StringChar;
     UINT32              State = ASL_NORMAL_CHAR;
     UINT32              i = 0;
     UINT8               Digit;
@@ -544,7 +566,7 @@ AslDoStringLiteral (
      * source line buffer.
      */
     AslInsertLineBuffer ('\"');
-    while ((StringChar = (char) input()) != EOF)
+    while ((StringChar = input()) != EOF)
     {
         AslInsertLineBuffer (StringChar);
 

Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslutils.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/aslutils.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -139,7 +139,7 @@ UtDisplaySupportedTables (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiPsDisplayConstantOpcodes
+ * FUNCTION:    UtDisplayConstantOpcodes
  *
  * PARAMETERS:  None
  *
@@ -172,11 +172,11 @@ UtDisplayConstantOpcodes (
  *
  * FUNCTION:    UtLocalCalloc
  *
- * PARAMETERS:  Size        - Bytes to be allocated
+ * PARAMETERS:  Size                - Bytes to be allocated
  *
- * RETURN:      Pointer to the allocated memory.  Guaranteed to be valid.
+ * RETURN:      Pointer to the allocated memory. Guaranteed to be valid.
  *
- * DESCRIPTION: Allocate zero-initialized memory.  Aborts the compile on an
+ * DESCRIPTION: Allocate zero-initialized memory. Aborts the compile on an
  *              allocation failure, on the assumption that nothing more can be
  *              accomplished.
  *
@@ -211,9 +211,9 @@ UtLocalCalloc (
  *
  * FUNCTION:    UtBeginEvent
  *
- * PARAMETERS:  Name        - Ascii name of this event
+ * PARAMETERS:  Name                - Ascii name of this event
  *
- * RETURN:      Event       - Event number (integer index)
+ * RETURN:      Event number (integer index)
  *
  * DESCRIPTION: Saves the current time with this event
  *
@@ -244,7 +244,7 @@ UtBeginEvent (
  *
  * FUNCTION:    UtEndEvent
  *
- * PARAMETERS:  Event       - Event number (integer index)
+ * PARAMETERS:  Event               - Event number (integer index)
  *
  * RETURN:      None
  *
@@ -254,7 +254,7 @@ UtBeginEvent (
 
 void
 UtEndEvent (
-    UINT8                  Event)
+    UINT8                   Event)
 {
 
     if (Event >= ASL_NUM_EVENTS)
@@ -272,7 +272,7 @@ UtEndEvent (
  *
  * FUNCTION:    UtHexCharToValue
  *
- * PARAMETERS:  HexChar         - Hex character in Ascii
+ * PARAMETERS:  HexChar             - Hex character in Ascii
  *
  * RETURN:      The binary value of the hex character
  *
@@ -303,12 +303,13 @@ UtHexCharToValue (
  *
  * FUNCTION:    UtConvertByteToHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -331,12 +332,13 @@ UtConvertByteToHex (
  *
  * FUNCTION:    UtConvertByteToAsmHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -358,13 +360,13 @@ UtConvertByteToAsmHex (
  *
  * FUNCTION:    DbgPrint
  *
- * PARAMETERS:  Type            - Type of output
- *              Fmt             - Printf format string
- *              ...             - variable printf list
+ * PARAMETERS:  Type                - Type of output
+ *              Fmt                 - Printf format string
+ *              ...                 - variable printf list
  *
  * RETURN:      None
  *
- * DESCRIPTION: Conditional print statement.  Prints to stderr only if the
+ * DESCRIPTION: Conditional print statement. Prints to stderr only if the
  *              debug flag is set.
  *
  ******************************************************************************/
@@ -438,7 +440,7 @@ UtPrintFormattedName (
  *
  * FUNCTION:    UtSetParseOpName
  *
- * PARAMETERS:  Op
+ * PARAMETERS:  Op                  - Parse op to be named.
  *
  * RETURN:      None
  *
@@ -460,7 +462,7 @@ UtSetParseOpName (
  *
  * FUNCTION:    UtDisplaySummary
  *
- * PARAMETERS:  FileID          - ID of outpout file
+ * PARAMETERS:  FileID              - ID of outpout file
  *
  * RETURN:      None
  *
@@ -571,11 +573,11 @@ UtDisplaySummary (
 
 /*******************************************************************************
  *
- * FUNCTION:    UtDisplaySummary
+ * FUNCTION:    UtCheckIntegerRange
  *
- * PARAMETERS:  Op              - Integer parse node
- *              LowValue        - Smallest allowed value
- *              HighValue       - Largest allowed value
+ * PARAMETERS:  Op                  - Integer parse node
+ *              LowValue            - Smallest allowed value
+ *              HighValue           - Largest allowed value
  *
  * RETURN:      Op if OK, otherwise NULL
  *
@@ -626,11 +628,11 @@ UtCheckIntegerRange (
  *
  * FUNCTION:    UtGetStringBuffer
  *
- * PARAMETERS:  Length          - Size of buffer requested
+ * PARAMETERS:  Length              - Size of buffer requested
  *
- * RETURN:      Pointer to the buffer.  Aborts on allocation failure
+ * RETURN:      Pointer to the buffer. Aborts on allocation failure
  *
- * DESCRIPTION: Allocate a string buffer.  Bypass the local
+ * DESCRIPTION: Allocate a string buffer. Bypass the local
  *              dynamic memory manager for performance reasons (This has a
  *              major impact on the speed of the compiler.)
  *
@@ -661,8 +663,8 @@ UtGetStringBuffer (
  *
  * FUNCTION:    UtInternalizeName
  *
- * PARAMETERS:  ExternalName            - Name to convert
- *              ConvertedName           - Where the converted name is returned
+ * PARAMETERS:  ExternalName        - Name to convert
+ *              ConvertedName       - Where the converted name is returned
  *
  * RETURN:      Status
  *
@@ -714,8 +716,8 @@ UtInternalizeName (
  *
  * FUNCTION:    UtPadNameWithUnderscores
  *
- * PARAMETERS:  NameSeg         - Input nameseg
- *              PaddedNameSeg   - Output padded nameseg
+ * PARAMETERS:  NameSeg             - Input nameseg
+ *              PaddedNameSeg       - Output padded nameseg
  *
  * RETURN:      Padded nameseg.
  *
@@ -752,8 +754,8 @@ UtPadNameWithUnderscores (
  *
  * FUNCTION:    UtAttachNameseg
  *
- * PARAMETERS:  Op              - Parent parse node
- *              Name            - Full ExternalName
+ * PARAMETERS:  Op                  - Parent parse node
+ *              Name                - Full ExternalName
  *
  * RETURN:      None; Sets the NameSeg field in parent node
  *
@@ -809,12 +811,12 @@ UtAttachNameseg (
  *
  * FUNCTION:    UtAttachNamepathToOwner
  *
- * PARAMETERS:  Op            - Parent parse node
- *              NameOp        - Node that contains the name
+ * PARAMETERS:  Op                  - Parent parse node
+ *              NameOp              - Node that contains the name
  *
  * RETURN:      Sets the ExternalName and Namepath in the parent node
  *
- * DESCRIPTION: Store the name in two forms in the parent node:  The original
+ * DESCRIPTION: Store the name in two forms in the parent node: The original
  *              (external) name, and the internalized name that is used within
  *              the ACPI namespace manager.
  *
@@ -854,11 +856,11 @@ UtAttachNamepathToOwner (
  *
  * FUNCTION:    UtDoConstant
  *
- * PARAMETERS:  String      - Hex, Octal, or Decimal string
+ * PARAMETERS:  String              - Hex, Octal, or Decimal string
  *
  * RETURN:      Converted Integer
  *
- * DESCRIPTION: Convert a string to an integer.  With error checking.
+ * DESCRIPTION: Convert a string to an integer, with error checking.
  *
  ******************************************************************************/
 
@@ -889,10 +891,10 @@ UtDoConstant (
  *
  * FUNCTION:    UtStrtoul64
  *
- * PARAMETERS:  String          - Null terminated string
- *              Terminater      - Where a pointer to the terminating byte is
- *                                returned
- *              Base            - Radix of the string
+ * PARAMETERS:  String              - Null terminated string
+ *              Terminater          - Where a pointer to the terminating byte
+ *                                    is returned
+ *              Base                - Radix of the string
  *
  * RETURN:      Converted value
  *
@@ -1072,5 +1074,3 @@ ErrorExit:
 
     return (Status);
 }
-
-

Modified: head/sys/contrib/dev/acpica/compiler/dttemplate.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/dttemplate.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/compiler/dttemplate.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -226,7 +226,7 @@ DtCreateAllTemplates (
     }
 
     /*
-     * Create the "special ACPI tables:
+     * Create the special ACPI tables:
      * 1) DSDT/SSDT are AML tables, not data tables
      * 2) FACS and RSDP have non-standard headers
      */

Modified: head/sys/contrib/dev/acpica/components/debugger/dbdisply.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbdisply.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/components/debugger/dbdisply.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -792,10 +792,12 @@ AcpiDbDisplayGpes (
     ACPI_GPE_EVENT_INFO     *GpeEventInfo;
     ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
     char                    *GpeType;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
     UINT32                  GpeIndex;
     UINT32                  Block = 0;
     UINT32                  i;
     UINT32                  j;
+    UINT32                  Count;
     char                    Buffer[80];
     ACPI_BUFFER             RetBuf;
     ACPI_STATUS             Status;
@@ -916,7 +918,14 @@ AcpiDbDisplayGpes (
                         AcpiOsPrintf ("Handler");
                         break;
                     case ACPI_GPE_DISPATCH_NOTIFY:
-                        AcpiOsPrintf ("Notify");
+                        Count = 0;
+                        Notify = GpeEventInfo->Dispatch.NotifyList;
+                        while (Notify)
+                        {
+                            Count++;
+                            Notify = Notify->Next;
+                        }
+                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
                         break;
                     default:
                         AcpiOsPrintf ("UNKNOWN: %X",

Modified: head/sys/contrib/dev/acpica/components/debugger/dbexec.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbexec.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/components/debugger/dbexec.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -872,8 +872,8 @@ AcpiDbMethodThread (
 
     if (Info->InitArgs)
     {
-        AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
-        AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
+        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
+        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
     }
 
     if (Info->Threads && (Info->NumCreated < Info->NumThreads))
@@ -1063,7 +1063,7 @@ AcpiDbCreateExecutionThreads (
     AcpiGbl_DbMethodInfo.ArgTypes[1] = ACPI_TYPE_INTEGER;
     AcpiGbl_DbMethodInfo.ArgTypes[2] = ACPI_TYPE_INTEGER;
 
-    AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
+    AcpiDbUint32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
 
     AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
 

Modified: head/sys/contrib/dev/acpica/components/debugger/dbutils.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbutils.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/components/debugger/dbutils.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -360,7 +360,7 @@ AcpiDbLocalNsLookup (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiDbUInt32ToHexString
+ * FUNCTION:    AcpiDbUint32ToHexString
  *
  * PARAMETERS:  Value           - The value to be converted to string
  *              Buffer          - Buffer for result (not less than 11 bytes)
@@ -375,7 +375,7 @@ AcpiDbLocalNsLookup (
  ******************************************************************************/
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer)
 {

Modified: head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c	Thu Jun 21 22:06:57 2012	(r237411)
+++ head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c	Fri Jun 22 00:40:44 2012	(r237412)
@@ -46,6 +46,7 @@
 #include <contrib/dev/acpica/include/acparser.h>
 #include <contrib/dev/acpica/include/amlcode.h>
 #include <contrib/dev/acpica/include/acdisasm.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
 
 #ifdef ACPI_DISASSEMBLER
 
@@ -61,6 +62,218 @@ AcpiDmMatchKeyword (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmPredefinedDescription
+ *
+ * PARAMETERS:  Op              - Name() parse object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Emit a description comment for a predefined ACPI name.
+ *              Used for iASL compiler only.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op)
+{
+#ifdef ACPI_ASL_COMPILER
+    const AH_PREDEFINED_NAME    *Info;
+    char                        *NameString;
+    int                         LastCharIsDigit;
+    int                         LastCharsAreHex;
+
+
+    if (!Op)
+    {
+        return;
+    }
+
+    /* Ensure that the comment field is emitted only once */
+
+    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
+    {
+        return;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206220040.q5M0ejNk045397>