Hello community,

here is the log from the commit of package acpica for openSUSE:Factory checked 
in at 2013-01-24 15:33:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/acpica (Old)
 and      /work/SRC/openSUSE:Factory/.acpica.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "acpica", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/acpica/acpica.changes    2012-11-14 
16:33:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.acpica.new/acpica.changes       2013-01-24 
15:33:49.000000000 +0100
@@ -1,0 +2,21 @@
+Wed Jan 23 11:07:28 UTC 2013 - [email protected]
+
+- Make use of -in (Ignore NoOp opcodes/operators)
+  to avoid false positive errors during compliation/disassembling
+
+-------------------------------------------------------------------
+Tue Jan 15 12:55:46 UTC 2013 - [email protected]
+
+- Update to version 20121018
+  -> remove some patches that got integrated
+  -> Add one patch (bob_noop.patch) which will get integrated
+     mainline: Stop and bail out when max error (200) count is reached.
+     Introduce -in compile/disassemble option.
+
+-------------------------------------------------------------------
+Wed Jan  9 01:05:33 UTC 2013 - [email protected]
+
+- Add acpi_validate script for easy disassembling and re-compilation
+  of local ACPI tables or of an already existing acpidump file
+
+-------------------------------------------------------------------

Old:
----
  acpica-unix2-20121018.tar.bz2
  acpica_acpisrc_fix_unused_result.patch
  acpica_makefile_whitespace_cleanup.patch

New:
----
  acpi_validate
  acpica-unix2-20121220.tar.bz2
  bob_noop.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ acpica.spec ++++++
--- /var/tmp/diff_new_pack.BNrYy4/_old  2013-01-24 15:33:54.000000000 +0100
+++ /var/tmp/diff_new_pack.BNrYy4/_new  2013-01-24 15:33:54.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package acpica
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 
 Name:           acpica
 Url:            http://acpica.org
-Version:        20121018
+Version:        20121220
 Release:        6
 License:        GPL-2.0
 %define src_dir acpica-unix2-%{version}
@@ -31,11 +31,11 @@
 Patch1:         acpica_make_CFLAGS_overridable
 Patch2:         acpidump-override-CFLAGS.patch
 Patch3:         acpica-no-compiletime.patch
-Patch4:         acpica_acpisrc_fix_unused_result.patch
-Patch5:         acpica_makefile_whitespace_cleanup.patch
+Patch4:         bob_noop.patch
 Source1:        ec_access.c
 Source2:        acpidump-%{dmp_ver}.tar.bz2
 Source3:        acpi_genl.tar.bz2
+Source4:        acpi_validate
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  %ix86 ia64 x86_64
 BuildRequires:  bison flex glibc-devel
@@ -68,7 +68,6 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 
 %build
 cc %{SOURCE1} $RPM_OPT_FLAGS -o ec_access
@@ -77,7 +76,7 @@
 make OPT_CFLAGS="$RPM_OPT_FLAGS"
 
 %install
-
+install -Dm 755 %{SOURCE4} %{buildroot}/usr/bin/acpi_validate
 install -Dm 755 ec_access %{buildroot}/usr/sbin/ec_access
 
 install -Dm 755 acpidump/acpidump %{buildroot}/usr/sbin/acpidump
@@ -100,6 +99,7 @@
 /usr/bin/acpibin
 /usr/bin/acpihelp
 /usr/bin/acpinames
+/usr/bin/acpi_validate
 
 %doc %{_docdir}/%{name}
 

++++++ acpi_validate ++++++
#!/bin/bash
#
# Copyright (c) 2012 SUSE Linux Products GmbH
# Thomas Renninger <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#
                                                                             
OUTPUT_DIR="$PWD"
VERBOSE=0
# Disable remarks and resource checks. The latter often/mostly generates
# false positive warnings. Can be overridden via -c option
COMPILE_OPTIONS="-sa -cr -vr -in"
DISASSEMBLE_OPTIONS="-in"
OUTPUT="/dev/null"
ACPIDUMP=""
MUST_BE_ROOT=1

function usage()
{
    echo "acpi_validate [ -o output_dir ] [ -v ] [ -a acpidump ]"
    echo "              [ -c compile_options ] [ -d disassemble_options ]"
    echo
    echo "This tool extracts, disassembles and recompiles ACPI BIOS tables."
    echo "The disassembled files will be copied into the local or specified"
    echo "output directory (-o option)."
    echo
    echo "The underlying iasl compiler verifies and may complain about"
    echo "correctness of some of the BIOS tables."
    echo "These can give a pointer to possible malfunction of the system."
    echo
    echo "If you think you found a bug in the iasl compiler or related tools,"
    echo "you can ask here for help: [email protected]"
    echo "You may also want to ask there if you are not sure whether it really"
    echo "is a BIOS bug."
    echo
    echo "If you are sure you found a BIOS issue, complain to your hardware 
vendor."
    echo "The iasl compiler typically provides a description of the 
warning/error in a way,"
    echo "so that BIOS authors can easily fix it."
    echo
    echo "Options"
    echo "   -o output_dir: Copy tables to this directory instead of local one"
    echo "   -v:          : be more verbose"
    echo "   -a acpidump  : Use this acpidump file"
    echo "                  instead of the tables from the local machine"
    echo "   -d options   : Pass iasl disassemble options"
    echo "   -c options   : Pass iasl compile options"
    echo "                  will override -sa -cr -vr (default options)"
    echo "   -h           : Show help"
    exit 1
}

while getopts hva:o:c:d: name ; do
    case $name in
        o)
            OUTPUT_DIR="$OPTARG"
            if [ ! -d "$OUTPUT_DIR" ];then
                mkdir "$OUTPUT_DIR"
                if [[ $? != 0 ]];then
                    echo "Cannot create directory $OUTPUT_DIR"
                    exit 1
                fi
            elif [ ! -w "$OUTPUT_DIR" ];then
                echo "Cannot write into directory $OUTPUT_DIR"
                exit 1
            fi

            [[ $VERBOSE == 1 ]] && echo "Installing for architecture: 
$OUTPUT_DIR"
            ;;
        a)
            ACPIDUMP="$OPTARG"
            if [ ! -r "$ACPIDUMP" ];then
                echo "$ACPIDUMP does not exist"
                exit 1
            fi
            [[ $VERBOSE == 1 ]] && echo "acpidump file: $ACPIDUMP"
            MUST_BE_ROOT=0
            ;;
        c)
            COMPILE_OPTIONS="$OPTARG"
            [[ $VERBOSE == 1 ]] && echo "Compile options: $COMPILE_OPTIONS"
            ;;
        c)
            DISASSEMBLE_OPTIONS="$OPTARG"
            [[ $VERBOSE == 1 ]] && echo "Disassemble options: 
$DISASSEMBLE_OPTIONS"
            ;;
        v)
            VERBOSE=1
            OUTPUT="1"
            ;;
        ?)
            usage
            ;;
    esac
done
shift $(($OPTIND -1))

if [[ $MUST_BE_ROOT == 1 ]] && [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root"
   echo "(or use -a acpidump option and pass already dumped acpi tables)"
   exit 1
fi

shopt -s nocasematch
TEMP_DIR=$(mktemp -d)
[[ $VERBOSE == 1 ]] && echo "Using temporary directory: $TEMP_DIR"

if [ -r "$ACPIDUMP" ];then
    cp "$ACPIDUMP" "$TEMP_DIR"/acpidump
fi

pushd "$TEMP_DIR" >/dev/null

mkdir log
mkdir err
if [ ! -r acpidump ];then
    acpidump >acpidump
fi
acpixtract -a acpidump >&$OUTPUT 2>&1


# ACPICA changed from uppercase to lowercase, try to find both:
SDTs=$(ls [SD]DST*.dat 2>/dev/null)
SDTs="${SDTs}$(ls [sd]sdt*.dat 2>/dev/null)"

for file in *.dat;do
    table=${file/.dat/}
    # Enable case insensitive pattern matching

    case $file in
        [DS]SDT*.dat | [sd]sdt*.dat)
                # Use other [sd]sdt*.dat tables to reference possible
                # external symbols. Pass the table itself for disassembling
                # comma separted.
                # For example you we have:
                # dsdt.dat ssdt1 ssdt2.dat
                # and the current table to disassemble is ssdt1.dat the
                # command has to be:
                # iasl -e dsdt.dat,ssdt2.dat -d ssdt1.dat

                # Get rid of the table which gets disassembled
                # could have leading or trailing whitespace depending whether
                # it is at the end or the beginning of the list
                REF_TABLE_LIST=${SDTs/[[:space:]]$file/}
                REF_TABLE_LIST=${SDTs/$file[[:space:]]/}
                # Convert the whitespace list into a comma separated one:
                REF_TABLE_LIST=${REF_TABLE_LIST//[[:space:]]/,}
                if [ "$REF_TABLE_LIST" != "" ];then
                    FINAL_DISASSEMBLE_OPTIONS="-e ${REF_TABLE_LIST} 
$DISASSEMBLE_OPTIONS"
                else
                    FINAL_DISASSEMBLE_OPTIONS="$DISASSEMBLE_OPTIONS"
                fi
                echo "stdout and stderr of $file disassembling:" 
>log/${table}.log
                [[ $VERBOSE == 1 ]] && echo "iasl $FINAL_DISASSEMBLE_OPTIONS -d 
$file 1>>log/${table}.log 2>&1"
                iasl $FINAL_DISASSEMBLE_OPTIONS -d $file 1>>log/${table}.log 
2>&1
                [[ $VERBOSE == 1 ]] && echo "iasl $COMPILE_OPTIONS ${table}.dsl 
1>>log/${table}.log 2>>err/${table}.err"
                iasl $COMPILE_OPTIONS ${table}.dsl 1>>log/${table}.log 
2>>err/${table}.err
                ;;
        *.dat)
                iasl -d $file 1>log/${table}.log 2>&1
                iasl -sa ${table}.dsl 1>log/${table}.log 2>err/${table}.err
                ;;
    esac
done

# remove empty error files
rm $(find err -size 0)
ERR_TABLES=$(ls err)
ERR_TABLES=${ERR_TABLES//.err/}

popd >/dev/null
cp -r "$TEMP_DIR"/* "$OUTPUT_DIR"

if [[ $VERBOSE == 1 ]];then
    echo "Temporary directory (undeleted): $TEMP_DIR"
else
    rm -rf "$TEMP_DIR"
fi

if [ "$ERR_TABLES" = "" ];then
    echo "No errors or warnings detected"
    exit 0
else
    echo "These tables have warnings or errors (details in "$OUTPUT_DIR"/err 
directory):"
    for err in $ERR_TABLES;do
        echo -n $err $'\t'
        sed -n -e 's/Compilation complete. \(.* Errors, .* Warnings\).*/\1/p' 
"$OUTPUT_DIR"/log/$err.log
    done
    exit 1
fi
++++++ acpica-unix2-20121018.tar.bz2 -> acpica-unix2-20121220.tar.bz2 ++++++
++++ 21558 lines of diff (skipped)

++++++ bob_noop.patch ++++++
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index 6737c80..f981796 100644
--- a/source/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
@@ -273,7 +273,7 @@ NamePathTail                [.]{NameSeg}
 "Mutex"                     { count (2); return (PARSEOP_MUTEX); }
 "Name"                      { count (2); return (PARSEOP_NAME); }
 "NAnd"                      { count (3); return (PARSEOP_NAND); }
-"Noop"                      { count (3); return (PARSEOP_NOOP); }
+"Noop"                      { if (!AcpiGbl_IgnoreNoopOperator) {count (3); 
return (PARSEOP_NOOP);} }
 "NOr"                       { count (3); return (PARSEOP_NOR); }
 "Not"                       { count (3); return (PARSEOP_NOT); }
 "Notify"                    { count (3); return (PARSEOP_NOTIFY); }
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c
index 99e4a41..e515fda 100644
--- a/source/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
@@ -732,7 +732,6 @@ AslCommonError (
 
         Gbl_SourceLine = 0;
         Gbl_NextError = Gbl_ErrorLog;
-        CmDoOutputFiles ();
         CmCleanupAndExit ();
         exit(1);
     }
diff --git a/source/compiler/asllisting.c b/source/compiler/asllisting.c
index 991ef17..0247040 100644
--- a/source/compiler/asllisting.c
+++ b/source/compiler/asllisting.c
@@ -189,6 +189,8 @@ LsTreeWriteWalk (
     UINT32                  Level,
     void                    *Context);
 
+#define ASL_LISTING_LINE_PREFIX         ":  "
+
 
 
/*******************************************************************************
  *
@@ -737,7 +739,8 @@ LsWriteListingHexBytes (
             {
             case ASL_FILE_LISTING_OUTPUT:
 
-                FlPrintFile (FileId, "%8.8X....", Gbl_CurrentAmlOffset);
+                FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset,
+                    ASL_LISTING_LINE_PREFIX);
                 break;
 
             case ASL_FILE_ASM_SOURCE_OUTPUT:
@@ -797,6 +800,24 @@ LsWriteOneSourceLine (
     Gbl_SourceLine++;
     Gbl_ListingNode->LineNumber++;
 
+    /* Ignore lines that are completely blank (but count the line above) */
+
+    if (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) != AE_OK)
+    {
+        return (0);
+    }
+    if (FileByte == '\n')
+    {
+        return (1);
+    }
+
+    /*
+     * This is a non-empty line, we will print the entire line with
+     * the line number and possibly other prefixes and transforms.
+     */
+
+    /* Line prefixes for special files, C and ASM output */
+
     if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
     {
         FlPrintFile (FileId, "     *");
@@ -812,19 +833,21 @@ LsWriteOneSourceLine (
          * This file contains "include" statements, print the current
          * filename and line number within the current file
          */
-        FlPrintFile (FileId, "%12s %5d....",
-                    Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber);
+        FlPrintFile (FileId, "%12s %5d%s",
+            Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber,
+            ASL_LISTING_LINE_PREFIX);
     }
     else
     {
         /* No include files, just print the line number */
 
-        FlPrintFile (FileId, "%8d....", Gbl_SourceLine);
+        FlPrintFile (FileId, "%8u%s", Gbl_SourceLine,
+            ASL_LISTING_LINE_PREFIX);
     }
 
-    /* Read one line (up to a newline or EOF) */
+    /* Read the rest of this line (up to a newline or EOF) */
 
-    while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK)
+    do
     {
         if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
         {
@@ -838,13 +861,15 @@ LsWriteOneSourceLine (
         if (FileByte == '\n')
         {
             /*
+             * This line has been completed.
              * Check if an error occurred on this source line during the 
compile.
              * If so, we print the error message after the source line.
              */
             LsCheckException (Gbl_SourceLine, FileId);
             return (1);
         }
-    }
+
+    } while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK);
 
     /* EOF on the input file was reached */
 
diff --git a/source/compiler/aslmain.c b/source/compiler/aslmain.c
index 5243024..d4e18aa 100644
--- a/source/compiler/aslmain.c
+++ b/source/compiler/aslmain.c
@@ -225,6 +225,7 @@ Options (
     ACPI_OPTION ("-oi",             "Disable integer optimization to 
Zero/One/Ones");
     ACPI_OPTION ("-on",             "Disable named reference string 
optimization");
     ACPI_OPTION ("-cr",             "Disable Resource Descriptor error 
checking");
+    ACPI_OPTION ("-in",             "Ignore NoOp operators");
     ACPI_OPTION ("-r <revision>",   "Override table header Revision (1-255)");
 
     printf ("\nASL Listing Files:\n");
@@ -244,6 +245,7 @@ Options (
     ACPI_OPTION ("",                "(Obtain DSDT from current system if no 
input file)");
     ACPI_OPTION ("-e  [f1,f2]",     "Include ACPI table(s) for external symbol 
resolution");
     ACPI_OPTION ("-g",              "Get ACPI tables and write to files 
(*.dat)");
+    ACPI_OPTION ("-in",             "Ignore NoOp opcodes");
     ACPI_OPTION ("-vt",             "Dump binary table data in hex format 
within output file");
 
     printf ("\nHelp:\n");
@@ -694,6 +696,13 @@ AslDoOptions (
             Gbl_C_IncludeOutputFlag = TRUE;
             break;
 
+        case 'n':
+
+            /* Compiler/Disassembler: Ignore the NOOP operator */
+
+            AcpiGbl_IgnoreNoopOperator = TRUE;
+            break;
+
         default:
             printf ("Unknown option: -i%s\n", AcpiGbl_Optarg);
             return (-1);
diff --git a/source/components/disassembler/dmwalk.c 
b/source/components/disassembler/dmwalk.c
index 93e6b2f..a924830 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -513,7 +513,30 @@ AcpiDmDescendingOp (
              * This is a first-level element of a term list,
              * indent a new line
              */
-            AcpiDmIndent (Level);
+            switch (Op->Common.AmlOpcode)
+            {
+            case AML_NOOP_OP:
+                /*
+                 * Optionally just ignore this opcode. Some tables use
+                 * NoOp opcodes for "padding" out packages that the BIOS
+                 * changes dynamically. This can leave hundreds or
+                 * thousands of NoOp opcodes that if disassembled,
+                 * cannot be compiled because they are syntactically
+                 * incorrect.
+                 */
+                if (AcpiGbl_IgnoreNoopOperator)
+                {
+                    Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+                    return (AE_OK);
+                }
+
+                /* Fallthrough */
+
+            default:
+                AcpiDmIndent (Level);
+                break;
+            }
+
             Info->LastLevel = Level;
             Info->Count = 0;
     }
diff --git a/source/include/acglobal.h b/source/include/acglobal.h
index d17082a..7a71c33 100644
--- a/source/include/acglobal.h
+++ b/source/include/acglobal.h
@@ -484,7 +484,7 @@ ACPI_EXTERN UINT32                      
AcpiGbl_TraceDbgLayer;
 
 /*****************************************************************************
  *
- * Debugger globals
+ * Debugger and Disassembler globals
  *
  ****************************************************************************/
 
@@ -492,6 +492,8 @@ ACPI_EXTERN UINT8                       
AcpiGbl_DbOutputFlags;
 
 #ifdef ACPI_DISASSEMBLER
 
+BOOLEAN     ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE);
+
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;
 ACPI_EXTERN ACPI_EXTERNAL_LIST         *AcpiGbl_ExternalList;
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to