From 7a1ae3babefbbb62701f0aea7fff465aa82f386e Mon Sep 17 00:00:00 2001 From: Al Stone Date: Jun 30 2015 22:09:21 +0000 Subject: Update to 20150619 version and refresh patches --- diff --git a/debian/badcode.asl.result b/debian/badcode.asl.result index 39c8f0a..27a4125 100644 --- a/debian/badcode.asl.result +++ b/debian/badcode.asl.result @@ -70,25 +70,25 @@ Warning 3122 - ^ Called method may not always return a val badcode.asl 126: Method (MTH5) {Store (MTH4(), Local0)} Error 6080 - Called method returns no value ^ -badcode.asl 132: Name (_HID, "*PNP0C0A") +badcode.asl 132: Name (_HID, "*PNP0C0A") // Illegal leading asterisk Error 6061 - Invalid leading asterisk ^ (*PNP0C0A) -badcode.asl 136: Name (_HID, "PNP") +badcode.asl 136: Name (_HID, "PNP") // Too short, must be 7 or 8 chars Error 6033 - ^ _HID string must be exactly 7 or 8 characters (PNP) -badcode.asl 140: Name (_HID, "MYDEVICE01") +badcode.asl 140: Name (_HID, "MYDEVICE01") // Too long, must be 7 or 8 chars Error 6033 - ^ _HID string must be exactly 7 or 8 characters (MYDEVICE01) -badcode.asl 144: Name (_HID, "acpi0001") +badcode.asl 144: Name (_HID, "acpi0001") // non-hex chars must be uppercase Error 6034 - ^ _HID prefix must be all uppercase or decimal digits (acpi0001) -badcode.asl 148: Name (_HID, "PNP-123") +badcode.asl 148: Name (_HID, "PNP-123") // HID must be alphanumeric Error 6002 - ^ String must be entirely alphanumeric (PNP-123) -badcode.asl 152: Name (_HID, "") +badcode.asl 152: Name (_HID, "") // Illegal Null HID Error 6091 - ^ Invalid zero-length (null) string -badcode.asl 153: Name (_CID, "") +badcode.asl 153: Name (_CID, "") // Illegal Null CID Error 6091 - ^ Invalid zero-length (null) string badcode.asl 158: Name (_PRW, 4) @@ -142,49 +142,49 @@ Error 6019 - ^ Dependent function macros can badcode.asl 225: }) Error 6070 - ^ Missing EndDependentFn() macro in dependent resource list -badcode.asl 242: 0x00002000, +badcode.asl 242: 0x00002000, // Length Error 6049 - ^ Length is larger than Min/Max window -badcode.asl 247: 0x00001001, +badcode.asl 247: 0x00001001, // Range Minimum Error 6001 - ^ Must be a multiple of alignment/granularity value -badcode.asl 248: 0x00002002, +badcode.asl 248: 0x00002002, // Range Maximum Error 6001 - ^ Must be a multiple of alignment/granularity value -badcode.asl 255: 0xFFFF, +badcode.asl 255: 0xFFFF, // Address Warning 3060 - ^ Maximum 10-bit ISA address (0x3FF) -badcode.asl 264: 0x05 +badcode.asl 264: 0x05 // Access Size Error 6042 - ^ Invalid AccessSize (Maximum is 4 - QWord access) badcode.asl 268: QWordSpace (0xB0, ResourceConsumer, PosDecode, MinFixed, MaxFixed, 0xA5, Error 6139 - Constant out of range ^ (0xB0, allowable: 0xC0-0xFF) -badcode.asl 279: 0x0200, +badcode.asl 279: 0x0200, // Range Minimum Error 6051 - ^ Address Min is greater than Address Max -badcode.asl 291: 0x00001002, +badcode.asl 291: 0x00001002, // Length Error 6049 - ^ Length is larger than Min/Max window badcode.asl 296: 0x00000010, Error 6048 - ^ Granularity must be zero or a power of two minus one -badcode.asl 305: 0x0000000000000B02, +badcode.asl 305: 0x0000000000000B02, // Range Minimum Error 6001 - ^ Must be a multiple of alignment/granularity value -badcode.asl 315: 0x00000000002FFFFE, +badcode.asl 315: 0x00000000002FFFFE, // Range Maximum Error 6001 - ^ Must be a multiple of alignment/granularity value (-1) -badcode.asl 326: 0x00000000, +badcode.asl 326: 0x00000000, // Length Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags -badcode.asl 335: 0x00000100, +badcode.asl 335: 0x00000100, // Length Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags -badcode.asl 344: 0x00000200, +badcode.asl 344: 0x00000200, // Length Error 6043 - ^ Invalid combination of Length and Min/Max fixed flags -badcode.asl 349: 0x0000000F, +badcode.asl 349: 0x0000000F, // Granularity Error 6047 - ^ Granularity must be zero for fixed Min/Max badcode.asl 358: DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, @@ -242,7 +242,7 @@ Copyright (c) 2000 - 2015 Intel Corporation Ignoring all errors, forcing AML file generation -ASL Input: badcode.asl - 401 lines, 6935 bytes, 79 keywords +ASL Input: badcode.asl - 402 lines, 11480 bytes, 79 keywords AML Output: badcode.aml - 1184 bytes, 60 named objects, 19 executable opcodes Compilation complete. 46 Errors, 22 Warnings, 11 Remarks, 16 Optimizations, 1 Constants Folded diff --git a/debian/changelog b/debian/changelog index 202472f..fcfcf80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +acpica-unix (20150619-1) unstable; urgency=medium + + * Upgrade to latest upstream. + * Refresh patches as needed. Patches for NFIT UUIDs, ARM GICs, + and /dev/mem removed as no longer needed. + + -- ahs3 Tue, 30 Jun 2015 15:57:26 -0600 + acpica-unix (20150515-2) unstable; urgency=medium * Replace the patch for systems with no /dev/mem with a more robust version; diff --git a/debian/grammar.asl.result b/debian/grammar.asl.result index 4aa8e99..ee5b7f6 100644 --- a/debian/grammar.asl.result +++ b/debian/grammar.asl.result @@ -49,25 +49,25 @@ Remark 2098 - ^ Recursive method call (RCIV) grammar.asl 701: CreateField (\_SB_.SBUF, 148, 96, FLDV) Remark 2089 - Object is not referenced ^ (Name is within method [_INI]) -grammar.asl 715: MinFixed, +grammar.asl 715: MinFixed, // Range is notfixed Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 716: MaxFixed, +grammar.asl 716: MaxFixed, // Range is not fixed Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 717: SubDecode, +grammar.asl 717: SubDecode, // SubDecode Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 718: 0x0000, +grammar.asl 718: 0x0000, // Granularity Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 720: 0xfff2, +grammar.asl 720: 0xfff2, // Max Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 721: 0x0032, +grammar.asl 721: 0x0032, // Translation Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) -grammar.asl 722: 0x0002,,, +grammar.asl 722: 0x0002,,, // Range Length Remark 2089 - Object is not referenced ^ (Name is within method [_CRS]) grammar.asl 733: Method(_SRS) @@ -229,10 +229,10 @@ Warning 3046 - Invalid or unknown escape sequence ^ grammar.asl 6706: Device (BITI) Warning 3141 - Missing dependency ^ (Device object requires a _HID or _ADR in same scope) -grammar.asl 6814: And (Local0, 1, Local0) +grammar.asl 6814: And (Local0, 1, Local0) // Local0 &= 1 Error 6066 - ^ Method local variable is not initialized (Local0) -grammar.asl 6900: Name (_HID, "*PNP0C0A") +grammar.asl 6900: Name (_HID, "*PNP0C0A") // Control Method Battey ID Error 6061 - Invalid leading asterisk ^ (*PNP0C0A) grammar.asl 6909: Device (IDX3) @@ -290,7 +290,7 @@ Copyright (c) 2000 - 2015 Intel Corporation Ignoring all errors, forcing AML file generation -ASL Input: grammar.asl - 10281 lines, 228124 bytes, 4818 keywords +ASL Input: grammar.asl - 10282 lines, 322891 bytes, 4818 keywords AML Output: grammar.aml - 43476 bytes, 670 named objects, 4148 executable opcodes Compilation complete. 6 Errors, 64 Warnings, 25 Remarks, 1105 Optimizations diff --git a/debian/patches/OPT_LDFLAGS.patch b/debian/patches/OPT_LDFLAGS.patch index 53838c7..1f96a91 100644 --- a/debian/patches/OPT_LDFLAGS.patch +++ b/debian/patches/OPT_LDFLAGS.patch @@ -1,7 +1,7 @@ -Index: acpica-unix/generate/unix/Makefile.config +Index: acpica-unix-20150619/generate/unix/Makefile.config =================================================================== ---- acpica-unix.orig/generate/unix/Makefile.config -+++ acpica-unix/generate/unix/Makefile.config +--- acpica-unix-20150619.orig/generate/unix/Makefile.config ++++ acpica-unix-20150619/generate/unix/Makefile.config @@ -23,6 +23,9 @@ # OPT_CFLAGS can be overridden on the make command line by # adding OPT_CFLAGS="..." to the invocation. diff --git a/debian/patches/aapits-linux.patch b/debian/patches/aapits-linux.patch index d118e31..268aa08 100644 --- a/debian/patches/aapits-linux.patch +++ b/debian/patches/aapits-linux.patch @@ -1,7 +1,7 @@ -Index: acpica-unix-20150408/tests/aapits/atexec.c +Index: acpica-unix-20150619/tests/aapits/atexec.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atexec.c -+++ acpica-unix-20150408/tests/aapits/atexec.c +--- acpica-unix-20150619.orig/tests/aapits/atexec.c ++++ acpica-unix-20150619/tests/aapits/atexec.c @@ -639,6 +639,7 @@ AtBuildLocalFADT2 ( } @@ -66,10 +66,10 @@ Index: acpica-unix-20150408/tests/aapits/atexec.c return (AE_NO_MEMORY); } Results.Pointer = Object; -Index: acpica-unix-20150408/tests/aapits/atinit.c +Index: acpica-unix-20150619/tests/aapits/atinit.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atinit.c -+++ acpica-unix-20150408/tests/aapits/atinit.c +--- acpica-unix-20150619.orig/tests/aapits/atinit.c ++++ acpica-unix-20150619/tests/aapits/atinit.c @@ -3024,7 +3024,7 @@ AtInitTest0041(void) AapiErrors++; printf ("API Error: AcpiGetSystemInfo() returned" @@ -115,10 +115,10 @@ Index: acpica-unix-20150408/tests/aapits/atinit.c return (AE_ERROR); } else -Index: acpica-unix-20150408/tests/aapits/atmain.c +Index: acpica-unix-20150619/tests/aapits/atmain.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atmain.c -+++ acpica-unix-20150408/tests/aapits/atmain.c +--- acpica-unix-20150619.orig/tests/aapits/atmain.c ++++ acpica-unix-20150619/tests/aapits/atmain.c @@ -345,7 +345,7 @@ ExecuteTest ( { printf ("ACPICA API TS err: test num %ld of test case %ld" @@ -146,10 +146,10 @@ Index: acpica-unix-20150408/tests/aapits/atmain.c return (AtRetBadParam); } -Index: acpica-unix-20150408/tests/aapits/atnamespace.c +Index: acpica-unix-20150619/tests/aapits/atnamespace.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atnamespace.c -+++ acpica-unix-20150408/tests/aapits/atnamespace.c +--- acpica-unix-20150619.orig/tests/aapits/atnamespace.c ++++ acpica-unix-20150619/tests/aapits/atnamespace.c @@ -2535,7 +2535,8 @@ AtGetObjectInfoTypeCommon( #else printf ("API Error: Address of %s (0x%llX) != (0x%llX)\n", @@ -190,10 +190,10 @@ Index: acpica-unix-20150408/tests/aapits/atnamespace.c return (AE_ERROR); } } -Index: acpica-unix-20150408/tests/aapits/atosxfctrl.c +Index: acpica-unix-20150619/tests/aapits/atosxfctrl.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atosxfctrl.c -+++ acpica-unix-20150408/tests/aapits/atosxfctrl.c +--- acpica-unix-20150619.orig/tests/aapits/atosxfctrl.c ++++ acpica-unix-20150619/tests/aapits/atosxfctrl.c @@ -737,13 +737,15 @@ ACPI_OSXF_EMUL_REG #if ACPI_MACHINE_WIDTH == 64 #ifdef _MSC_VER @@ -270,10 +270,10 @@ Index: acpica-unix-20150408/tests/aapits/atosxfctrl.c Reg = Reg->Next; i++; } -Index: acpica-unix-20150408/tests/aapits/atresource.c +Index: acpica-unix-20150619/tests/aapits/atresource.c =================================================================== ---- acpica-unix-20150408.orig/tests/aapits/atresource.c -+++ acpica-unix-20150408/tests/aapits/atresource.c +--- acpica-unix-20150619.orig/tests/aapits/atresource.c ++++ acpica-unix-20150619/tests/aapits/atresource.c @@ -174,7 +174,7 @@ AtRsrcTest0000(void) AapiErrors++; printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d," diff --git a/debian/patches/add-testing.patch b/debian/patches/add-testing.patch index 36b62fa..c28db32 100644 --- a/debian/patches/add-testing.patch +++ b/debian/patches/add-testing.patch @@ -1,7 +1,7 @@ -Index: acpica-unix-20150408/Makefile +Index: acpica-unix-20150619/Makefile =================================================================== ---- acpica-unix-20150408.orig/Makefile -+++ acpica-unix-20150408/Makefile +--- acpica-unix-20150619.orig/Makefile ++++ acpica-unix-20150619/Makefile @@ -20,3 +20,25 @@ else include generate/unix/Makefile.config include generate/unix/Makefile.common @@ -15,7 +15,7 @@ Index: acpica-unix-20150408/Makefile + $(CURDIR)/debian/run-aapits.sh $(CURDIR)/tests/aapits $(CURDIR)/generate/unix/bin + + # misc tests -+ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) 20150515 ++ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) 20150619 + + # Template tests + cd $(CURDIR)/tests/templates diff --git a/debian/patches/arm-madt.patch b/debian/patches/arm-madt.patch deleted file mode 100644 index d262cf3..0000000 --- a/debian/patches/arm-madt.patch +++ /dev/null @@ -1,44 +0,0 @@ -ACPI 6.0 specified MADT generic distributor version values, but -the detail definition is missing, add its support in this patch. - -Signed-off-by: Hanjun Guo ---- -Hi Bob, Lv, - -As discussed with Lv on linux-acpi maillist, I prepared this -patch for review. - -Please treat this patch as a fix for next ACPICA version and -linux kernel 4.2 material, because we still can not -use the newest ACPICA for linux when this enum is missing, -any comments are welcomed. - -Thanks -Hanjun - - source/include/actbl1.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -Index: acpica-unix-20150515/source/include/actbl1.h -=================================================================== ---- acpica-unix-20150515.orig/source/include/actbl1.h -+++ acpica-unix-20150515/source/include/actbl1.h -@@ -978,6 +978,18 @@ typedef struct acpi_madt_generic_distrib - - } ACPI_MADT_GENERIC_DISTRIBUTOR; - -+/* Values for Version in Generic Distributor (ACPI 6.0) */ -+ -+enum AcpiMadtGicVersionType -+{ -+ ACPI_MADT_GIC_VER_UNKNOWN = 0, -+ ACPI_MADT_GIC_VER_V1 = 1, -+ ACPI_MADT_GIC_VER_V2 = 2, -+ ACPI_MADT_GIC_VER_V3 = 3, -+ ACPI_MADT_GIC_VER_V4 = 4, -+ ACPI_MADT_GIC_VER_RESERVED = 5 /* 5 and greater are reserved */ -+}; -+ - - /* 13: Generic MSI Frame (ACPI 5.1) */ - diff --git a/debian/patches/asllookup-miscompare.patch b/debian/patches/asllookup-miscompare.patch index 1557659..2ba1937 100644 --- a/debian/patches/asllookup-miscompare.patch +++ b/debian/patches/asllookup-miscompare.patch @@ -1,7 +1,7 @@ -Index: acpica-unix-20150408/source/compiler/asllookup.c +Index: acpica-unix-20150619/source/compiler/asllookup.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/asllookup.c -+++ acpica-unix-20150408/source/compiler/asllookup.c +--- acpica-unix-20150619.orig/source/compiler/asllookup.c ++++ acpica-unix-20150619/source/compiler/asllookup.c @@ -119,6 +119,7 @@ LkIsObjectUsed ( { ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); diff --git a/debian/patches/debian-big_endian.patch b/debian/patches/debian-big_endian.patch index 9d3ef23..0459977 100644 --- a/debian/patches/debian-big_endian.patch +++ b/debian/patches/debian-big_endian.patch @@ -1,8 +1,8 @@ -Index: acpica-unix-20150408/source/compiler/aslcodegen.c +Index: acpica-unix-20150619/source/compiler/aslcodegen.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslcodegen.c -+++ acpica-unix-20150408/source/compiler/aslcodegen.c -@@ -246,16 +246,12 @@ CgWriteAmlOpcode ( +--- acpica-unix-20150619.orig/source/compiler/aslcodegen.c ++++ acpica-unix-20150619/source/compiler/aslcodegen.c +@@ -249,16 +249,12 @@ CgWriteAmlOpcode ( ACPI_PARSE_OBJECT *Op) { UINT8 PkgLenFirstByte; @@ -25,7 +25,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c /* We expect some DEFAULT_ARGs, just ignore them */ -@@ -278,51 +274,52 @@ CgWriteAmlOpcode ( +@@ -281,51 +277,52 @@ CgWriteAmlOpcode ( /* Special opcodes for within a field definition */ @@ -89,7 +89,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c break; } -@@ -333,8 +330,8 @@ CgWriteAmlOpcode ( +@@ -336,8 +333,8 @@ CgWriteAmlOpcode ( if (Op->Asl.AmlPkgLenBytes == 1) { /* Simplest case -- no bytes to follow, just write the count */ @@ -100,7 +100,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c } else if (Op->Asl.AmlPkgLenBytes != 0) { -@@ -344,7 +341,7 @@ CgWriteAmlOpcode ( +@@ -347,7 +344,7 @@ CgWriteAmlOpcode ( */ PkgLenFirstByte = (UINT8) (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) | @@ -109,7 +109,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1); -@@ -352,37 +349,44 @@ CgWriteAmlOpcode ( +@@ -355,37 +352,44 @@ CgWriteAmlOpcode ( * Shift the length over by the 4 bits we just stuffed * in the first byte */ @@ -167,7 +167,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c break; case AML_STRING_OP: -@@ -416,6 +420,7 @@ CgWriteTableHeader ( +@@ -419,6 +423,7 @@ CgWriteTableHeader ( ACPI_PARSE_OBJECT *Op) { ACPI_PARSE_OBJECT *Child; @@ -175,7 +175,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c /* AML filename */ -@@ -452,7 +457,7 @@ CgWriteTableHeader ( +@@ -455,7 +460,7 @@ CgWriteTableHeader ( /* OEM Revision */ Child = Child->Asl.Next; @@ -184,7 +184,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c /* Compiler ID */ -@@ -460,11 +465,12 @@ CgWriteTableHeader ( +@@ -463,11 +468,12 @@ CgWriteTableHeader ( /* Compiler version */ @@ -199,7 +199,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c TableHeader.Checksum = 0; CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER)); -@@ -528,7 +534,10 @@ CgWriteNode ( +@@ -531,7 +537,10 @@ CgWriteNode ( ACPI_PARSE_OBJECT *Op) { ASL_RESOURCE_NODE *Rnode; @@ -211,7 +211,7 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c /* Always check for DEFAULT_ARG and other "Noop" nodes */ /* TBD: this may not be the best place for this check */ -@@ -546,13 +555,24 @@ CgWriteNode ( +@@ -549,13 +558,24 @@ CgWriteNode ( switch (Op->Asl.AmlOpcode) { case AML_RAW_DATA_BYTE: @@ -239,10 +239,10 @@ Index: acpica-unix-20150408/source/compiler/aslcodegen.c case AML_RAW_DATA_BUFFER: -Index: acpica-unix-20150408/source/compiler/aslopcodes.c +Index: acpica-unix-20150619/source/compiler/aslopcodes.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslopcodes.c -+++ acpica-unix-20150408/source/compiler/aslopcodes.c +--- acpica-unix-20150619.orig/source/compiler/aslopcodes.c ++++ acpica-unix-20150619/source/compiler/aslopcodes.c @@ -531,6 +531,7 @@ OpcDoUnicode ( UINT32 i; UINT8 *AsciiString; @@ -261,10 +261,10 @@ Index: acpica-unix-20150408/source/compiler/aslopcodes.c } /* -Index: acpica-unix-20150408/source/compiler/aslrestype1.c +Index: acpica-unix-20150619/source/compiler/aslrestype1.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype1.c -+++ acpica-unix-20150408/source/compiler/aslrestype1.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype1.c ++++ acpica-unix-20150619/source/compiler/aslrestype1.c @@ -143,6 +143,11 @@ RsDoMemory24Descriptor ( ACPI_PARSE_OBJECT *LengthOp = NULL; ASL_RESOURCE_NODE *Rnode; @@ -461,10 +461,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype1.c RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH, CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength)); break; -Index: acpica-unix-20150408/source/compiler/aslrestype1i.c +Index: acpica-unix-20150619/source/compiler/aslrestype1i.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype1i.c -+++ acpica-unix-20150408/source/compiler/aslrestype1i.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype1i.c ++++ acpica-unix-20150619/source/compiler/aslrestype1i.c @@ -198,6 +198,8 @@ RsDoFixedDmaDescriptor ( ACPI_PARSE_OBJECT *InitializerOp; ASL_RESOURCE_NODE *Rnode; @@ -601,10 +601,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype1i.c + ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask); return (Rnode); } -Index: acpica-unix-20150408/source/compiler/aslrestype2.c +Index: acpica-unix-20150619/source/compiler/aslrestype2.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2.c -+++ acpica-unix-20150408/source/compiler/aslrestype2.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2.c ++++ acpica-unix-20150619/source/compiler/aslrestype2.c @@ -76,6 +76,7 @@ RsDoGeneralRegisterDescriptor ( ACPI_PARSE_OBJECT *InitializerOp; ASL_RESOURCE_NODE *Rnode; @@ -700,10 +700,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2.c /* Point to end-of-descriptor for vendor data */ -Index: acpica-unix-20150408/source/compiler/aslrestype2d.c +Index: acpica-unix-20150619/source/compiler/aslrestype2d.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2d.c -+++ acpica-unix-20150408/source/compiler/aslrestype2d.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2d.c ++++ acpica-unix-20150619/source/compiler/aslrestype2d.c @@ -79,7 +79,13 @@ RsDoDwordIoDescriptor ( ACPI_PARSE_OBJECT *GranOp = NULL; ASL_RESOURCE_NODE *Rnode; @@ -1059,10 +1059,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2d.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix-20150408/source/compiler/aslrestype2e.c +Index: acpica-unix-20150619/source/compiler/aslrestype2e.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2e.c -+++ acpica-unix-20150408/source/compiler/aslrestype2e.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2e.c ++++ acpica-unix-20150619/source/compiler/aslrestype2e.c @@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor ( ACPI_PARSE_OBJECT *GranOp = NULL; ASL_RESOURCE_NODE *Rnode; @@ -1168,10 +1168,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2e.c Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; return (Rnode); -Index: acpica-unix-20150408/source/compiler/aslrestype2q.c +Index: acpica-unix-20150619/source/compiler/aslrestype2q.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2q.c -+++ acpica-unix-20150408/source/compiler/aslrestype2q.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2q.c ++++ acpica-unix-20150619/source/compiler/aslrestype2q.c @@ -80,7 +80,13 @@ RsDoQwordIoDescriptor ( ASL_RESOURCE_NODE *Rnode; UINT8 *OptionalFields; @@ -1510,10 +1510,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2q.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix-20150408/source/compiler/aslrestype2s.c +Index: acpica-unix-20150619/source/compiler/aslrestype2s.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2s.c -+++ acpica-unix-20150408/source/compiler/aslrestype2s.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2s.c ++++ acpica-unix-20150619/source/compiler/aslrestype2s.c @@ -290,6 +290,9 @@ RsDoGpioIntDescriptor ( UINT16 VendorLength; UINT16 InterruptLength; @@ -1827,10 +1827,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2s.c MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource); return (Rnode); } -Index: acpica-unix-20150408/source/compiler/aslrestype2w.c +Index: acpica-unix-20150619/source/compiler/aslrestype2w.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslrestype2w.c -+++ acpica-unix-20150408/source/compiler/aslrestype2w.c +--- acpica-unix-20150619.orig/source/compiler/aslrestype2w.c ++++ acpica-unix-20150619/source/compiler/aslrestype2w.c @@ -81,6 +81,12 @@ RsDoWordIoDescriptor ( UINT8 *OptionalFields; UINT16 StringLength = 0; @@ -2174,10 +2174,10 @@ Index: acpica-unix-20150408/source/compiler/aslrestype2w.c Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; return (Rnode); -Index: acpica-unix-20150408/source/include/acmacros.h +Index: acpica-unix-20150619/source/include/acmacros.h =================================================================== ---- acpica-unix-20150408.orig/source/include/acmacros.h -+++ acpica-unix-20150408/source/include/acmacros.h +--- acpica-unix-20150619.orig/source/include/acmacros.h ++++ acpica-unix-20150619/source/include/acmacros.h @@ -100,7 +100,8 @@ /* 32-bit source, 16/32/64 destination */ @@ -2215,10 +2215,10 @@ Index: acpica-unix-20150408/source/include/acmacros.h #define ACPI_MOVE_32_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s) #define ACPI_MOVE_32_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s) -Index: acpica-unix-20150408/source/include/platform/aclinux.h +Index: acpica-unix-20150619/source/include/platform/aclinux.h =================================================================== ---- acpica-unix-20150408.orig/source/include/platform/aclinux.h -+++ acpica-unix-20150408/source/include/platform/aclinux.h +--- acpica-unix-20150619.orig/source/include/platform/aclinux.h ++++ acpica-unix-20150619/source/include/platform/aclinux.h @@ -167,6 +167,7 @@ #include #include diff --git a/debian/patches/debian-unaligned.patch b/debian/patches/debian-unaligned.patch index 9e36cda..a9bb874 100644 --- a/debian/patches/debian-unaligned.patch +++ b/debian/patches/debian-unaligned.patch @@ -15,10 +15,10 @@ Signed-off-by: Paolo Bonzini source/include/actypes.h | 26 +++++++++++++------------- 3 file modificati, 32 inserzioni(+), 21 rimozioni(-) -Index: acpica-unix-20150408/source/compiler/asltree.c +Index: acpica-unix-20150619/source/compiler/asltree.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/asltree.c -+++ acpica-unix-20150408/source/compiler/asltree.c +--- acpica-unix-20150619.orig/source/compiler/asltree.c ++++ acpica-unix-20150619/source/compiler/asltree.c @@ -862,28 +862,31 @@ TrCreateValuedLeafNode ( "\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X ", Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode), @@ -71,10 +71,10 @@ Index: acpica-unix-20150408/source/compiler/asltree.c break; } -Index: acpica-unix-20150408/source/components/executer/exoparg2.c +Index: acpica-unix-20150619/source/components/executer/exoparg2.c =================================================================== ---- acpica-unix-20150408.orig/source/components/executer/exoparg2.c -+++ acpica-unix-20150408/source/components/executer/exoparg2.c +--- acpica-unix-20150619.orig/source/components/executer/exoparg2.c ++++ acpica-unix-20150619/source/components/executer/exoparg2.c @@ -172,6 +172,8 @@ AcpiExOpcode_2A_2T_1R ( ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0]; ACPI_OPERAND_OBJECT *ReturnDesc1 = NULL; @@ -115,10 +115,10 @@ Index: acpica-unix-20150408/source/components/executer/exoparg2.c break; case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */ -Index: acpica-unix-20150408/source/include/actypes.h +Index: acpica-unix-20150619/source/include/actypes.h =================================================================== ---- acpica-unix-20150408.orig/source/include/actypes.h -+++ acpica-unix-20150408/source/include/actypes.h +--- acpica-unix-20150619.orig/source/include/actypes.h ++++ acpica-unix-20150619/source/include/actypes.h @@ -143,6 +143,19 @@ typedef COMPILER_DEPENDENT_INT64 */ #define ACPI_THREAD_ID UINT64 diff --git a/debian/patches/fix_ftbfs_debian-hurd.patch b/debian/patches/fix_ftbfs_debian-hurd.patch index fbf5150..6b8c39e 100644 --- a/debian/patches/fix_ftbfs_debian-hurd.patch +++ b/debian/patches/fix_ftbfs_debian-hurd.patch @@ -3,10 +3,10 @@ Fix FTBFS on hurd-i386. source/include/platform/acenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: acpica-unix-20150408/source/include/platform/acenv.h +Index: acpica-unix-20150619/source/include/platform/acenv.h =================================================================== ---- acpica-unix-20150408.orig/source/include/platform/acenv.h -+++ acpica-unix-20150408/source/include/platform/acenv.h +--- acpica-unix-20150619.orig/source/include/platform/acenv.h ++++ acpica-unix-20150619/source/include/platform/acenv.h @@ -172,7 +172,7 @@ * *****************************************************************************/ diff --git a/debian/patches/fix_ftbfs_debian-kfreebsd.patch b/debian/patches/fix_ftbfs_debian-kfreebsd.patch index 7b32dc9..64b780b 100644 --- a/debian/patches/fix_ftbfs_debian-kfreebsd.patch +++ b/debian/patches/fix_ftbfs_debian-kfreebsd.patch @@ -22,10 +22,10 @@ Thanks in advance source/include/platform/acenv.h | 3 +++ 1 file changed, 3 insertions(+) -Index: acpica-unix-20150408/source/include/platform/acenv.h +Index: acpica-unix-20150619/source/include/platform/acenv.h =================================================================== ---- acpica-unix-20150408.orig/source/include/platform/acenv.h -+++ acpica-unix-20150408/source/include/platform/acenv.h +--- acpica-unix-20150619.orig/source/include/platform/acenv.h ++++ acpica-unix-20150619/source/include/platform/acenv.h @@ -161,6 +161,9 @@ diff --git a/debian/patches/name-miscompare.patch b/debian/patches/name-miscompare.patch index 71df887..9c6f86b 100644 --- a/debian/patches/name-miscompare.patch +++ b/debian/patches/name-miscompare.patch @@ -4,10 +4,10 @@ to be compared were being treated as 32-bit ints, and not strings. Hence, the characters were re-ordered incorrectly, mismatching the assumptions made in the remainder of the function. -Index: acpica-unix-20150408/source/compiler/aslanalyze.c +Index: acpica-unix-20150619/source/compiler/aslanalyze.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslanalyze.c -+++ acpica-unix-20150408/source/compiler/aslanalyze.c +--- acpica-unix-20150619.orig/source/compiler/aslanalyze.c ++++ acpica-unix-20150619/source/compiler/aslanalyze.c @@ -445,7 +445,7 @@ ApCheckForGpeNameConflict ( /* Need a null-terminated string version of NameSeg */ diff --git a/debian/patches/nodevmem.patch b/debian/patches/nodevmem.patch deleted file mode 100644 index 3568ab6..0000000 --- a/debian/patches/nodevmem.patch +++ /dev/null @@ -1,783 +0,0 @@ -diff -Naur acpica-unix2-20150515/generate/unix/acpidump/Makefile acpica-unix2-20150515.devmem/generate/unix/acpidump/Makefile ---- acpica-unix2-20150515/generate/unix/acpidump/Makefile 2015-05-15 17:49:17.000000000 -0600 -+++ acpica-unix2-20150515.devmem/generate/unix/acpidump/Makefile 2015-06-02 15:00:31.813746336 -0600 -@@ -67,10 +67,17 @@ - OBJECTS += \ - $(OBJDIR)/osbsdtbl.o - else -+ -+ifeq ($(NO_DEV_MEM), true) -+OBJECTS += \ -+ $(OBJDIR)/oslinuxtbl_nodevmem.o -+else - OBJECTS += \ - $(OBJDIR)/oslinuxtbl.o - endif - -+endif -+ - # - # Flags specific to acpidump - # -diff -Naur acpica-unix2-20150515/generate/unix/Makefile.config acpica-unix2-20150515.devmem/generate/unix/Makefile.config ---- acpica-unix2-20150515/generate/unix/Makefile.config 2015-06-03 14:57:30.328724317 -0600 -+++ acpica-unix2-20150515.devmem/generate/unix/Makefile.config 2015-06-02 15:03:53.727560100 -0600 -@@ -49,6 +49,7 @@ - LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS) - PREFIX ?= /usr - INSTALLDIR = $(PREFIX)/bin -+UNAME_M := $(shell uname -m) - UNAME_S := $(shell uname -s) - - # -@@ -70,6 +71,12 @@ - HOST = _NetBSD - endif - -+ifeq ($(UNAME_S), Linux) -+ifeq ($(UNAME_M), aarch64) -+NO_DEV_MEM ?= true -+endif -+endif -+ - ifeq ($(HOST), _APPLE) - INSTALL = cp - INSTALLFLAGS ?= -f -diff -Naur acpica-unix2-20150515/source/os_specific/service_layers/oslinuxtbl_nodevmem.c acpica-unix2-20150515.devmem/source/os_specific/service_layers/oslinuxtbl_nodevmem.c ---- acpica-unix2-20150515/source/os_specific/service_layers/oslinuxtbl_nodevmem.c 1969-12-31 17:00:00.000000000 -0700 -+++ acpica-unix2-20150515.devmem/source/os_specific/service_layers/oslinuxtbl_nodevmem.c 2015-06-02 16:14:38.088031027 -0600 -@@ -0,0 +1,734 @@ -+/****************************************************************************** -+ * -+ * Module Name: oslinuxtbl_nodevmem - Linux OSL for obtaining ACPI tables -+ * that assumes you cannot use /dev/mem -+ * -+ *****************************************************************************/ -+ -+#include "acpidump.h" -+ -+ -+#define _COMPONENT ACPI_OS_SERVICES -+ ACPI_MODULE_NAME ("oslinuxtbl_nodevmem") -+ -+ -+#ifndef PATH_MAX -+#define PATH_MAX 256 -+#endif -+ -+ -+/* List of information about obtained ACPI tables */ -+ -+typedef struct osl_table_info -+{ -+ struct osl_table_info *Next; -+ UINT32 Instance; -+ char Signature[ACPI_NAME_SIZE]; -+ -+} OSL_TABLE_INFO; -+ -+/* Local prototypes */ -+ -+static ACPI_STATUS -+OslTableInitialize ( -+ void); -+ -+static ACPI_STATUS -+OslTableNameFromFile ( -+ char *Filename, -+ char *Signature, -+ UINT32 *Instance); -+ -+static ACPI_STATUS -+OslAddTableToList ( -+ char *Signature, -+ UINT32 Instance); -+ -+static ACPI_STATUS -+OslReadTableFromFile ( -+ char *Filename, -+ ACPI_SIZE FileOffset, -+ char *Signature, -+ ACPI_TABLE_HEADER **Table); -+ -+static ACPI_STATUS -+OslListAcpiTables ( -+ char *Directory); -+ -+static ACPI_STATUS -+OslGetAcpiTable ( -+ char *Pathname, -+ char *Signature, -+ UINT32 Instance, -+ ACPI_TABLE_HEADER **Table, -+ ACPI_PHYSICAL_ADDRESS *Address); -+ -+static ACPI_STATUS -+OslGetLastStatus ( -+ ACPI_STATUS DefaultStatus); -+ -+ -+/* File locations */ -+ -+#define DYNAMIC_TABLE_DIR "/sys/firmware/acpi/tables/dynamic" -+#define STATIC_TABLE_DIR "/sys/firmware/acpi/tables" -+ -+/* Should we get dynamically loaded SSDTs from DYNAMIC_TABLE_DIR? */ -+ -+UINT8 Gbl_DumpDynamicTables = TRUE; -+ -+/* Initialization flags */ -+ -+UINT8 Gbl_TableListInitialized = FALSE; -+ -+/* Revision of RSD PTR */ -+ -+UINT8 Gbl_Revision = 0; -+ -+OSL_TABLE_INFO *Gbl_TableListHead = NULL; -+UINT32 Gbl_TableCount = 0; -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslGetLastStatus -+ * -+ * PARAMETERS: DefaultStatus - Default error status to return -+ * -+ * RETURN: Status; Converted from errno. -+ * -+ * DESCRIPTION: Get last errno and conver it to ACPI_STATUS. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslGetLastStatus ( -+ ACPI_STATUS DefaultStatus) -+{ -+ -+ switch (errno) -+ { -+ case EACCES: -+ case EPERM: -+ -+ return (AE_ACCESS); -+ -+ case ENOENT: -+ -+ return (AE_NOT_FOUND); -+ -+ case ENOMEM: -+ -+ return (AE_NO_MEMORY); -+ -+ default: -+ -+ return (DefaultStatus); -+ } -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: AcpiOsGetTableByAddress -+ * -+ * PARAMETERS: Address - Physical address of the ACPI table -+ * Table - Where a pointer to the table is returned -+ * -+ * RETURN: Status; Table buffer is returned if AE_OK. -+ * AE_NOT_FOUND: A valid table was not found at the address -+ * -+ * DESCRIPTION: Get an ACPI table via a physical memory address. -+ * -+ *****************************************************************************/ -+ -+ACPI_STATUS -+AcpiOsGetTableByAddress ( -+ ACPI_PHYSICAL_ADDRESS Address, -+ ACPI_TABLE_HEADER **Table) -+{ -+ /* -+ * If this source file is being used, there is no reliable access -+ * to /dev/mem on this system. Hence, we cannot retrieve a table -+ * by address at all and will always return AE_NOT_FOUND. -+ */ -+ -+ return AE_NOT_FOUND; -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: AcpiOsGetTableByName -+ * -+ * PARAMETERS: Signature - ACPI Signature for desired table. Must be -+ * a null terminated 4-character string. -+ * Instance - Multiple table support for SSDT/UEFI (0...n) -+ * Must be 0 for other tables. -+ * Table - Where a pointer to the table is returned -+ * Address - Where the table physical address is returned -+ * -+ * RETURN: Status; Table buffer and physical address returned if AE_OK. -+ * AE_LIMIT: Instance is beyond valid limit -+ * AE_NOT_FOUND: A table with the signature was not found -+ * -+ * NOTE: Assumes the input signature is uppercase. -+ * -+ *****************************************************************************/ -+ -+ACPI_STATUS -+AcpiOsGetTableByName ( -+ char *Signature, -+ UINT32 Instance, -+ ACPI_TABLE_HEADER **Table, -+ ACPI_PHYSICAL_ADDRESS *Address) -+{ -+ ACPI_STATUS Status; -+ -+ -+ /* Get main ACPI tables from memory on first invocation of this function */ -+ -+ Status = OslTableInitialize (); -+ if (ACPI_FAILURE (Status)) -+ { -+ return (Status); -+ } -+ -+ /* Attempt to get the table from the static directory */ -+ -+ Status = OslGetAcpiTable (STATIC_TABLE_DIR, Signature, -+ Instance, Table, Address); -+ -+ if (ACPI_FAILURE (Status) && Status == AE_LIMIT) -+ { -+ if (Gbl_DumpDynamicTables) -+ { -+ /* Attempt to get a dynamic table */ -+ -+ Status = OslGetAcpiTable (DYNAMIC_TABLE_DIR, Signature, -+ Instance, Table, Address); -+ } -+ } -+ -+ return (Status); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslAddTableToList -+ * -+ * PARAMETERS: Signature - Table signature -+ * Instance - Table instance -+ * -+ * RETURN: Status; Successfully added if AE_OK. -+ * AE_NO_MEMORY: Memory allocation error -+ * -+ * DESCRIPTION: Insert a table structure into OSL table list. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslAddTableToList ( -+ char *Signature, -+ UINT32 Instance) -+{ -+ OSL_TABLE_INFO *NewInfo; -+ OSL_TABLE_INFO *Next; -+ UINT32 NextInstance = 0; -+ BOOLEAN Found = FALSE; -+ -+ -+ NewInfo = calloc (1, sizeof (OSL_TABLE_INFO)); -+ if (!NewInfo) -+ { -+ return (AE_NO_MEMORY); -+ } -+ -+ ACPI_MOVE_NAME (NewInfo->Signature, Signature); -+ -+ if (!Gbl_TableListHead) -+ { -+ Gbl_TableListHead = NewInfo; -+ } -+ else -+ { -+ Next = Gbl_TableListHead; -+ while (1) -+ { -+ if (ACPI_COMPARE_NAME (Next->Signature, Signature)) -+ { -+ if (Next->Instance == Instance) -+ { -+ Found = TRUE; -+ } -+ if (Next->Instance >= NextInstance) -+ { -+ NextInstance = Next->Instance + 1; -+ } -+ } -+ -+ if (!Next->Next) -+ { -+ break; -+ } -+ Next = Next->Next; -+ } -+ Next->Next = NewInfo; -+ } -+ -+ if (Found) -+ { -+ if (Instance) -+ { -+ fprintf (stderr, -+ "%4.4s: Warning unmatched table instance %d, expected %d\n", -+ Signature, Instance, NextInstance); -+ } -+ Instance = NextInstance; -+ } -+ -+ NewInfo->Instance = Instance; -+ Gbl_TableCount++; -+ -+ return (AE_OK); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: AcpiOsGetTableByIndex -+ * -+ * PARAMETERS: Index - Which table to get -+ * Table - Where a pointer to the table is returned -+ * Instance - Where a pointer to the table instance no. is -+ * returned -+ * Address - Where the table physical address is returned -+ * -+ * RETURN: Status; Table buffer and physical address returned if AE_OK. -+ * AE_LIMIT: Index is beyond valid limit -+ * -+ * DESCRIPTION: Get an ACPI table via an index value (0 through n). Returns -+ * AE_LIMIT when an invalid index is reached. Index is not -+ * necessarily an index into the RSDT/XSDT. -+ * -+ *****************************************************************************/ -+ -+ACPI_STATUS -+AcpiOsGetTableByIndex ( -+ UINT32 Index, -+ ACPI_TABLE_HEADER **Table, -+ UINT32 *Instance, -+ ACPI_PHYSICAL_ADDRESS *Address) -+{ -+ OSL_TABLE_INFO *Info; -+ ACPI_STATUS Status; -+ UINT32 i; -+ -+ -+ /* Get main ACPI tables from memory on first invocation of this function */ -+ -+ Status = OslTableInitialize (); -+ if (ACPI_FAILURE (Status)) -+ { -+ return (Status); -+ } -+ -+ /* Validate Index */ -+ -+ if (Index >= Gbl_TableCount) -+ { -+ return (AE_LIMIT); -+ } -+ -+ /* Point to the table list entry specified by the Index argument */ -+ -+ Info = Gbl_TableListHead; -+ for (i = 0; i < Index; i++) -+ { -+ Info = Info->Next; -+ } -+ -+ /* Now we can just get the table via the signature */ -+ -+ Status = AcpiOsGetTableByName (Info->Signature, Info->Instance, -+ Table, Address); -+ -+ if (ACPI_SUCCESS (Status)) -+ { -+ *Instance = Info->Instance; -+ } -+ return (Status); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslTableInitialize -+ * -+ * PARAMETERS: None -+ * -+ * RETURN: Status -+ * -+ * DESCRIPTION: Initialize ACPI table data. Get and store main ACPI tables to -+ * local variables. Main ACPI tables include RSDT, FADT, RSDT, -+ * and/or XSDT. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslTableInitialize ( -+ void) -+{ -+ ACPI_STATUS Status; -+ -+ if (Gbl_TableListInitialized) -+ { -+ return (AE_OK); -+ } -+ -+ /* Add all tables found in the static directory */ -+ -+ Status = OslListAcpiTables (STATIC_TABLE_DIR); -+ if (ACPI_FAILURE (Status)) -+ { -+ return (Status); -+ } -+ -+ if (Gbl_DumpDynamicTables) -+ { -+ /* Add all dynamically loaded tables in the dynamic directory */ -+ -+ Status = OslListAcpiTables (DYNAMIC_TABLE_DIR); -+ if (ACPI_FAILURE (Status)) -+ { -+ return (Status); -+ } -+ } -+ -+ Gbl_TableListInitialized = TRUE; -+ return (AE_OK); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslListAcpiTables -+ * -+ * PARAMETERS: Directory - Directory that contains the tables -+ * -+ * RETURN: Status; Table list is initialized if AE_OK. -+ * -+ * DESCRIPTION: Add ACPI tables to the table list from a directory. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslListAcpiTables ( -+ char *Directory) -+{ -+ void *TableDir; -+ UINT32 Instance; -+ char TempName[ACPI_NAME_SIZE]; -+ char *Filename; -+ ACPI_STATUS Status = AE_OK; -+ -+ -+ /* Open the requested directory */ -+ -+ TableDir = AcpiOsOpenDirectory (Directory, "*", REQUEST_FILE_ONLY); -+ if (!TableDir) -+ { -+ return (OslGetLastStatus (AE_NOT_FOUND)); -+ } -+ -+ /* Examine all entries in this directory */ -+ -+ while ((Filename = AcpiOsGetNextFilename (TableDir))) -+ { -+ /* Extract table name and instance number */ -+ -+ Status = OslTableNameFromFile (Filename, TempName, &Instance); -+ -+ /* Ignore meaningless files */ -+ -+ if (ACPI_FAILURE (Status)) -+ { -+ continue; -+ } -+ -+ /* Add new info node to global table list */ -+ -+ Status = OslAddTableToList (TempName, Instance); -+ if (ACPI_FAILURE (Status)) -+ { -+ break; -+ } -+ } -+ -+ AcpiOsCloseDirectory (TableDir); -+ return (Status); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslTableNameFromFile -+ * -+ * PARAMETERS: Filename - File that contains the desired table -+ * Signature - Pointer to 4-character buffer to store -+ * extracted table signature. -+ * Instance - Pointer to integer to store extracted -+ * table instance number. -+ * -+ * RETURN: Status; Table name is extracted if AE_OK. -+ * -+ * DESCRIPTION: Extract table signature and instance number from a table file -+ * name. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslTableNameFromFile ( -+ char *Filename, -+ char *Signature, -+ UINT32 *Instance) -+{ -+ -+ /* Ignore meaningless files */ -+ -+ if (strlen (Filename) < ACPI_NAME_SIZE) -+ { -+ return (AE_BAD_SIGNATURE); -+ } -+ -+ /* Extract instance number */ -+ -+ if (isdigit ((int) Filename[ACPI_NAME_SIZE])) -+ { -+ sscanf (&Filename[ACPI_NAME_SIZE], "%u", Instance); -+ } -+ else if (strlen (Filename) != ACPI_NAME_SIZE) -+ { -+ return (AE_BAD_SIGNATURE); -+ } -+ else -+ { -+ *Instance = 0; -+ } -+ -+ /* Extract signature */ -+ -+ ACPI_MOVE_NAME (Signature, Filename); -+ return (AE_OK); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslReadTableFromFile -+ * -+ * PARAMETERS: Filename - File that contains the desired table -+ * FileOffset - Offset of the table in file -+ * Signature - Optional ACPI Signature for desired table. -+ * A null terminated 4-character string. -+ * Table - Where a pointer to the table is returned -+ * -+ * RETURN: Status; Table buffer is returned if AE_OK. -+ * -+ * DESCRIPTION: Read a ACPI table from a file. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslReadTableFromFile ( -+ char *Filename, -+ ACPI_SIZE FileOffset, -+ char *Signature, -+ ACPI_TABLE_HEADER **Table) -+{ -+ FILE *TableFile; -+ ACPI_TABLE_HEADER Header; -+ ACPI_TABLE_HEADER *LocalTable = NULL; -+ UINT32 TableLength; -+ INT32 Count; -+ ACPI_STATUS Status = AE_OK; -+ -+ -+ /* Open the file */ -+ -+ TableFile = fopen (Filename, "rb"); -+ if (TableFile == NULL) -+ { -+ fprintf (stderr, "Could not open table file: %s\n", Filename); -+ return (OslGetLastStatus (AE_NOT_FOUND)); -+ } -+ -+ fseek (TableFile, FileOffset, SEEK_SET); -+ -+ /* Read the Table header to get the table length */ -+ -+ Count = fread (&Header, 1, sizeof (ACPI_TABLE_HEADER), TableFile); -+ if (Count != sizeof (ACPI_TABLE_HEADER)) -+ { -+ fprintf (stderr, "Could not read table header: %s\n", Filename); -+ Status = AE_BAD_HEADER; -+ goto Exit; -+ } -+ -+ /* If signature is specified, it must match the table */ -+ -+ if (Signature) -+ { -+ if (ACPI_VALIDATE_RSDP_SIG (Signature)) -+ { -+ if (!ACPI_VALIDATE_RSDP_SIG (Header.Signature)) { -+ fprintf (stderr, "Incorrect RSDP signature: found %8.8s\n", -+ Header.Signature); -+ Status = AE_BAD_SIGNATURE; -+ goto Exit; -+ } -+ } -+ else if (!ACPI_COMPARE_NAME (Signature, Header.Signature)) -+ { -+ fprintf (stderr, "Incorrect signature: Expecting %4.4s, found %4.4s\n", -+ Signature, Header.Signature); -+ Status = AE_BAD_SIGNATURE; -+ goto Exit; -+ } -+ } -+ -+ TableLength = ApGetTableLength (&Header); -+ if (TableLength == 0) -+ { -+ Status = AE_BAD_HEADER; -+ goto Exit; -+ } -+ -+ /* Read the entire table into a local buffer */ -+ -+ LocalTable = calloc (1, TableLength); -+ if (!LocalTable) -+ { -+ fprintf (stderr, -+ "%4.4s: Could not allocate buffer for table of length %X\n", -+ Header.Signature, TableLength); -+ Status = AE_NO_MEMORY; -+ goto Exit; -+ } -+ -+ fseek (TableFile, FileOffset, SEEK_SET); -+ -+ Count = fread (LocalTable, 1, TableLength, TableFile); -+ if (Count != TableLength) -+ { -+ fprintf (stderr, "%4.4s: Could not read table content\n", -+ Header.Signature); -+ Status = AE_INVALID_TABLE_LENGTH; -+ goto Exit; -+ } -+ -+ /* Validate checksum */ -+ -+ (void) ApIsValidChecksum (LocalTable); -+ -+Exit: -+ fclose (TableFile); -+ *Table = LocalTable; -+ return (Status); -+} -+ -+ -+/****************************************************************************** -+ * -+ * FUNCTION: OslGetAcpiTable -+ * -+ * PARAMETERS: Pathname - Directory to find Linux ACPI table -+ * Signature - ACPI Signature for desired table. Must be -+ * a null terminated 4-character string. -+ * Instance - Multiple table support for SSDT/UEFI (0...n) -+ * Must be 0 for other tables. -+ * Table - Where a pointer to the table is returned -+ * Address - Where the table physical address is returned -+ * -+ * RETURN: Status; Table buffer is returned if AE_OK. -+ * AE_LIMIT: Instance is beyond valid limit -+ * AE_NOT_FOUND: A table with the signature was not found -+ * -+ * DESCRIPTION: Get an OS ACPI table. -+ * -+ *****************************************************************************/ -+ -+static ACPI_STATUS -+OslGetAcpiTable ( -+ char *Pathname, -+ char *Signature, -+ UINT32 Instance, -+ ACPI_TABLE_HEADER **Table, -+ ACPI_PHYSICAL_ADDRESS *Address) -+{ -+ void *TableDir; -+ UINT32 CurrentInstance = 0; -+ char TempName[ACPI_NAME_SIZE]; -+ char TableFilename[PATH_MAX]; -+ char *Filename; -+ ACPI_STATUS Status; -+ -+ -+ /* Open the directory for ACPI tables */ -+ -+ TableDir = AcpiOsOpenDirectory (Pathname, "*", REQUEST_FILE_ONLY); -+ if (!TableDir) -+ { -+ return (OslGetLastStatus (AE_NOT_FOUND)); -+ } -+ -+ /* Attempt to find the table in the directory */ -+ -+ while ((Filename = AcpiOsGetNextFilename (TableDir))) -+ { -+ /* Ignore meaningless files */ -+ -+ if (!ACPI_COMPARE_NAME (Filename, Signature)) -+ { -+ continue; -+ } -+ -+ /* Extract table name and instance number */ -+ -+ Status = OslTableNameFromFile (Filename, TempName, &CurrentInstance); -+ -+ /* Ignore meaningless files */ -+ -+ if (ACPI_FAILURE (Status) || CurrentInstance != Instance) -+ { -+ continue; -+ } -+ -+ /* Create the table pathname */ -+ -+ if (Instance != 0) -+ { -+ sprintf (TableFilename, "%s/%4.4s%d", Pathname, TempName, Instance); -+ } -+ else -+ { -+ sprintf (TableFilename, "%s/%4.4s", Pathname, TempName); -+ } -+ break; -+ } -+ -+ AcpiOsCloseDirectory (TableDir); -+ -+ if (!Filename) -+ { -+ return (AE_LIMIT); -+ } -+ -+ /* There is no physical address saved for ACPI tables, use zero */ -+ -+ *Address = 0; -+ Status = OslReadTableFromFile (TableFilename, 0, NULL, Table); -+ -+ return (Status); -+} diff --git a/debian/patches/re-enable-big-endian.patch b/debian/patches/re-enable-big-endian.patch index f89d2d9..92a14d2 100644 --- a/debian/patches/re-enable-big-endian.patch +++ b/debian/patches/re-enable-big-endian.patch @@ -2,10 +2,10 @@ Re-enable use of these tools on big-endian machines. Al Stone -Index: acpica-unix-20150408/source/compiler/aslmain.c +Index: acpica-unix-20150619/source/compiler/aslmain.c =================================================================== ---- acpica-unix-20150408.orig/source/compiler/aslmain.c -+++ acpica-unix-20150408/source/compiler/aslmain.c +--- acpica-unix-20150619.orig/source/compiler/aslmain.c ++++ acpica-unix-20150619/source/compiler/aslmain.c @@ -336,18 +336,6 @@ main ( int ReturnStatus = 0; diff --git a/debian/patches/segfault.patch b/debian/patches/segfault.patch deleted file mode 100644 index 751b6b7..0000000 --- a/debian/patches/segfault.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -Naur acpica-unix2-20150515.orig/source/components/disassembler/dmcstyle.c acpica-unix2-20150515/source/components/disassembler/dmcstyle.c ---- acpica-unix2-20150515.orig/source/components/disassembler/dmcstyle.c 2015-06-01 14:32:51.769218887 -0600 -+++ acpica-unix2-20150515/source/components/disassembler/dmcstyle.c 2015-06-01 14:37:38.973898839 -0600 -@@ -407,7 +407,7 @@ - { - AcpiDmPromoteTarget (Op, Target); - -- if (!Target->Common.OperatorSymbol) -+ if (Target && !Target->Common.OperatorSymbol) - { - Target->Common.OperatorSymbol = " = "; - } -@@ -425,7 +425,7 @@ - Target = Child1->Common.Next; - AcpiDmPromoteTarget (Op, Target); - -- if (!Target->Common.OperatorSymbol) -+ if (Target && !Target->Common.OperatorSymbol) - { - Target->Common.OperatorSymbol = " = "; - } -@@ -446,7 +446,10 @@ - /* Valid target, not a placeholder */ - - AcpiDmPromoteTarget (Op, Target); -- Target->Common.OperatorSymbol = " = ~"; -+ if (Target) -+ { -+ Target->Common.OperatorSymbol = " = ~"; -+ } - } - else - { diff --git a/debian/patches/series b/debian/patches/series index 5daa5d7..23a0b80 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,7 +8,3 @@ aapits-linux.patch asllookup-miscompare.patch re-enable-big-endian.patch OPT_LDFLAGS.patch -acuuid.patch -nodevmem.patch -arm-madt.patch -segfault.patch diff --git a/debian/rules b/debian/rules index d14c326..026a759 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPP DESTDIR ?= debian/acpica-tools -VERSION = 20150515 +VERSION = 20150619 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)