[packages/acpica] - updated to 20170303 with current Fedora patches - added man pages from Fedora

qboosh qboosh at pld-linux.org
Mon Jun 12 19:06:44 CEST 2017


commit 77760c90943819c7970776705a271ed2cf76ede4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jun 12 19:07:50 2017 +0200

    - updated to 20170303 with current Fedora patches
    - added man pages from Fedora

 OPT_LDFLAGS.patch          |   13 +-
 acpibin.1                  |   64 +
 acpica.spec                |   66 +-
 acpidump.1                 |  106 ++
 acpiexec.1                 |  102 ++
 acpihelp.1                 |   80 +
 acpinames.1                |   49 +
 acpisrc.1                  |   72 +
 acpixtract.1               |   60 +
 arm7hl.patch               |   20 +
 asllookup-miscompare.patch |   37 +-
 asllookup-ppc64.patch      |   23 +
 debian-big_endian.patch    |  727 +++-----
 debian-unaligned.patch     |   95 +-
 free.patch                 |   15 +
 iasl.1                     |  231 +++
 int-format.patch           |  343 ++++
 name-miscompare.patch      |   17 +-
 ppc64le.patch              |   15 +
 re-enable-big-endian.patch |   16 +-
 template.patch             |   22 +
 update-big-endian.patch    | 3949 ++++++++++++++++++++++++++++++++++++++++++++
 22 files changed, 5564 insertions(+), 558 deletions(-)
---
diff --git a/acpica.spec b/acpica.spec
index ca1a6d6..6954533 100644
--- a/acpica.spec
+++ b/acpica.spec
@@ -1,26 +1,39 @@
 #
 # Conditional build:
-%bcond_with	tests		# build without tests
+%bcond_with	tests		# ASL tests
 
 Summary:	ACPI Component Architecture - an assembler and disassembler for DSDT tables
 Summary(pl.UTF-8):	ACPI CA - asembler i disasembler dla tablic DSDT
 Name:		acpica
-Version:	20141107
+Version:	20170303
 Release:	1
 License:	GPL v2
 Group:		Development/Tools
-Source0:	https://acpica.org/sites/acpica/files/%{name}-unix2-%{version}.tar.gz
-# Source0-md5:	af9f1e67023fa85f9d6abf28b5345abd
+Source0:	https://acpica.org/sites/acpica/files/%{name}-unix-%{version}.tar.gz
+# Source0-md5:	704c7d0ba7ee826ea489995c4837ebd2
 Source1:	https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
-# Source1-md5:	64f6360eb986524254849930ff0a711f
+# Source1-md5:	2dc88f6782bb3be3c66bd1a052ee7972
+Source2:	iasl.1
+Source3:	acpibin.1
+Source4:	acpidump.1
+Source5:	acpiexec.1
+Source6:	acpihelp.1
+Source7:	acpinames.1
+Source8:	acpisrc.1
+Source9:	acpixtract.1
 Patch0:		debian-big_endian.patch
 Patch1:		debian-unaligned.patch
 Patch2:		name-miscompare.patch
-Patch3:		aapits-linux.patch
-Patch4:		asllookup-miscompare.patch
-Patch5:		aapits-makefile.patch
-Patch6:		re-enable-big-endian.patch
-Patch7:		OPT_LDFLAGS.patch
+Patch3:		asllookup-miscompare.patch
+Patch4:		re-enable-big-endian.patch
+Patch5:		OPT_LDFLAGS.patch
+Patch6:		int-format.patch
+Patch8:		asllookup-ppc64.patch
+Patch9:		template.patch
+Patch10:	free.patch
+Patch11:	update-big-endian.patch
+Patch12:	ppc64le.patch
+Patch13:	arm7hl.patch
 URL:		https://acpica.org/
 BuildRequires:	bison
 BuildRequires:	flex
@@ -38,7 +51,7 @@ Pakiet ACPI Component Architecture zawiera asembler i disasembler do
 tablic DSDT.
 
 %prep
-%setup -q -n %{name}-unix2-%{version}
+%setup -q -n %{name}-unix-%{version}
 tar -x --strip-components=1 -f %{SOURCE1}
 %patch0 -p1
 %patch1 -p1
@@ -47,7 +60,12 @@ tar -x --strip-components=1 -f %{SOURCE1}
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 
 %build
 %define	makeopts \\\
@@ -59,9 +77,6 @@ tar -x --strip-components=1 -f %{SOURCE1}
 %{__make} %{makeopts}
 
 %if %{with tests}
-%{__make} %{makeopts} -C tests/aapits
-%{__make} %{makeopts} -C tests/aapits/asl \
-	ASL=$(pwd)/generate/unix/bin/iasl
 %{__make} %{makeopts} -C tests/templates
 
 cd tests
@@ -70,12 +85,6 @@ cd tests
 ./aslts.sh # relies on non-zero exit
 [ $? -eq 0 ] || exit 1
 
-# API tests
-cd aapits/bin
-./aapitsrun
-[ $? -eq 0 ] || exit 1
-cd ../..
-
 # misc tests
 #./run-misc-tests.sh $RPM_BUILD_ROOT%{_bindir} %{version}
 
@@ -92,9 +101,16 @@ cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \
+	$RPM_BUILD_ROOT%{_mandir}/man1
+
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/acpiexamples
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -109,3 +125,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/acpisrc
 %attr(755,root,root) %{_bindir}/acpixtract
 %attr(755,root,root) %{_bindir}/iasl
+%{_mandir}/man1/acpibin.1*
+%{_mandir}/man1/acpidump.1*
+%{_mandir}/man1/acpiexec.1*
+%{_mandir}/man1/acpihelp.1*
+%{_mandir}/man1/acpinames.1*
+%{_mandir}/man1/acpisrc.1*
+%{_mandir}/man1/acpixtract.1*
+%{_mandir}/man1/iasl.1*
diff --git a/OPT_LDFLAGS.patch b/OPT_LDFLAGS.patch
index 70ffaf4..8a05c85 100644
--- a/OPT_LDFLAGS.patch
+++ b/OPT_LDFLAGS.patch
@@ -1,6 +1,7 @@
-diff -Naur acpica-unix2-20140926/generate/unix/Makefile.config acpica-unix2-20140926-patch/generate/unix/Makefile.config
---- acpica-unix2-20140926/generate/unix/Makefile.config	2014-09-26 12:02:29.000000000 -0600
-+++ acpica-unix2-20140926-patch/generate/unix/Makefile.config	2014-10-01 12:53:53.510530248 -0600
+Index: acpica-unix2-20170303/generate/unix/Makefile.config
+===================================================================
+--- acpica-unix2-20170303.orig/generate/unix/Makefile.config
++++ acpica-unix2-20170303/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.
@@ -11,7 +12,7 @@ diff -Naur acpica-unix2-20140926/generate/unix/Makefile.config acpica-unix2-2014
  # Notes:
  #   gcc should be version 4 or greater, otherwise some of the options
  #     used will not be recognized.
-@@ -43,7 +46,7 @@
+@@ -43,7 +46,7 @@ CC =    gcc
  OBJDIR =     obj
  BINDIR =     bin
  COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
@@ -20,8 +21,8 @@ diff -Naur acpica-unix2-20140926/generate/unix/Makefile.config acpica-unix2-2014
  PREFIX ?=    /usr
  INSTALLDIR = $(PREFIX)/bin
  UNAME_S := $(shell uname -s)
-@@ -136,6 +139,11 @@
- OPT_CFLAGS ?= $(CWARNINGFLAGS)
+@@ -157,6 +160,11 @@ LDFLAGS +=-m32
+ endif
  
  #
 +# Common linker flags
diff --git a/acpibin.1 b/acpibin.1
new file mode 100644
index 0000000..b8448a5
--- /dev/null
+++ b/acpibin.1
@@ -0,0 +1,64 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPIBIN 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpibin \- ACPI binary AML file utility
+.SH SYNOPSIS
+.B acpibin
+.RI [ <option> ... ]
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpibin
+command. The option list is taken from the acpibin interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpibin
+is a command provided to perform some basic and common operations on
+AML binary files.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.TP
+.B \-c <file1> <file2>
+Compare two binary AML files
+.TP
+.B \-d <in> <out>
+Dump AML binary to text file
+.TP
+.B \-e <sig> <in> <out>
+Extract binary AML table from acpidump file
+.TP
+.B \-h <file>
+Display table header for binary AML file
+.TP
+.B \-s <file>
+Update checksum for binary AML file
+.TP
+.B \-t
+Terse mode
+
+.SH AUTHOR
+acpibin was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpidump.1 b/acpidump.1
new file mode 100644
index 0000000..a3ab061
--- /dev/null
+++ b/acpidump.1
@@ -0,0 +1,106 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPIDUMP 1 "July 24, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpidump \- ACPI table dump utility
+.SH SYNOPSIS
+.B acpidump
+.RI [ <option> ... ]
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpidump
+command.  The option list is taken from the interactive help.
+.PP
+The
+.B acpidump
+command extracts the ACPI tables currently in use from the running
+kernel in a form usable for later processing by the
+.B acpixtract
+command.
+.PP
+Invocation of
+.B acpidump
+without parameters will dump all available ACPI tables.  Multiple mixed
+instances of the
+.B \-a
+,
+.B \-f
+, and
+.B \-n
+parameters can be used.
+
+.SH OPTIONS
+.PP
+.TP
+.B \-b
+Dump tables in binary format (versus the default human-readable form)
+
+.PP
+.TP
+.B \-h | \-?
+Display this help message
+
+.PP
+.TP
+.B \-o <file>
+Redirect output to a file.  This file can be used later by
+.B acpixtract
+to examine the contents of the ACPI tables.
+
+.PP
+.TP
+.B \-s
+Print table summaries only.
+
+.PP
+.TP
+.B \-v
+Print the version of this utility.
+
+.PP
+.TP
+.B \-z
+Verbose mode.
+
+.PP
+.TP
+.B \-a <address>
+Get a table from a physical address (must be superuser and you must be
+careful which address you use -- dmesg will typically report the addresses
+for the various tables).
+
+.PP
+.TP
+.B \-f <binary-file>
+Get a table from a binary file (see the
+.B \-b
+option).
+
+.PP
+.TP
+.B \-n <signature>
+Get a table via it's name or signature (e.g., MADT or SSDT).
+
+.SH SEE ALSO
+.B acpixtract(1)
+
+.SH AUTHOR
+acpidump was written by Robert Moore <robert.moore at intel.com> and
+Chao Guan <chao.guan at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpiexec.1 b/acpiexec.1
new file mode 100644
index 0000000..4b77daa
--- /dev/null
+++ b/acpiexec.1
@@ -0,0 +1,102 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPIEXEC 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpiexec \- ACPI AML execution and debug utility
+.SH SYNOPSIS
+.B acpiexec
+.RI [ <option> ... ]
+.RI <aml-file>
+.B ...
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpiexec
+command. The option list is taken from the acpiexec interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpiexec
+provides a simulated execution environment for AML code so that it
+can be more easily tested and debugged.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.TP
+.B \-?
+Display the help message
+.TP
+.B \-b "command-line"
+Batch mode command line execution (cmd1;cmd2;...)
+.TP
+.B \-M [<method>]
+Batch mode method execution (Default: MAIN)
+.TP
+.B \-da
+Disable method abort on error
+.TP
+.B \-di
+Disable execution of _STA/_INI methods during init
+.TP
+.B \-do
+Disable Operation Region address simulation
+.TP
+.B \-dr
+Disable repair of method return values
+.TP
+.B \-dt
+Disable allocation tracking (performance)
+.TP
+.B \-ef
+Enable display of final memory statistics
+.TP
+.B \-ei
+Enable additional tests for ACPICA interfaces
+.TP
+.B \-em
+Enable interpreter Serialized mode
+.TP
+.B \-es
+Enable interpreter Slack mode
+.TP
+.B \-et
+Enable debug semaphore timeour
+.TP
+.B \-f <value>
+Operation Region initialization fill value
+.TP
+.B \-r
+Use hardware-reduced FADT V5
+.TP
+.B \-vi
+Verbose initialization output
+.TP
+.B \-vr
+Verbose region handler output
+.TP
+.B \-x <debug-level>
+Debug output level
+
+.SH AUTHOR
+acpiexec was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpihelp.1 b/acpihelp.1
new file mode 100644
index 0000000..fc61014
--- /dev/null
+++ b/acpihelp.1
@@ -0,0 +1,80 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPIHELP 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpihelp \- ACPI help utility
+.SH SYNOPSIS
+.B acpihelp
+.RI <option> ...
+.RI [<name-prefix>|<hex-value>]
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpihelp
+command. The option list is taken from the acpihelp interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpihelp
+provides descriptive text for AML and ASL keywords, methods, and opcodes.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+.PP
+If neither a <name-prefix> or a <hex-value> is provided,
+.B acpihelp
+will do the logical equivalent of a "display all."
+.PP
+A default search (that is, a search with no options) and a <name-prefix>
+can mean two different things: (1) if <name-prefix> does not start with
+an underscore, find ASL operator names, or (2) if <name-prefix> does start
+with an underscore, find ASL predefined method names.
+
+.SH OPTIONS
+
+.PP
+.SS ACPI Names and Symbols
+.TP
+.B \-k [<name-prefix>]
+Find/Display ASL non-operator keyword(s)
+.TP
+.B \-m [<name-prefix>]
+Find/Display AML opcode name(s)
+.TP
+.B \-p [<name-prefix>]
+Find/Display ASL predefined method name(s)
+.TP
+.B \-s [<name-prefix>]
+Find/Display ASL operator name(s)
+
+.PP
+.SS ACPI Values
+.TP
+.B \-e [<hex-value>]
+Decode ACPICA exception code
+.TP
+.B \-i
+Display known ACPI Device IDs (_HID)
+.TP
+.B \-i [<hex-value>]
+Decode hex AML opcode
+
+.SH AUTHOR
+acpihelp was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpinames.1 b/acpinames.1
new file mode 100644
index 0000000..315d235
--- /dev/null
+++ b/acpinames.1
@@ -0,0 +1,49 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPINAMES 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpinames \- ACPI name space dump utility
+.SH SYNOPSIS
+.B acpinames
+.RI <option> ...
+.RI <aml-file>
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpinames
+command. The option list is taken from the acpinames interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpinames
+prints out the complete ACPI name space for an AML file.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.TP
+.B \-? [<name-prefix>]
+Display this help message
+
+.SH AUTHOR
+acpinames was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpisrc.1 b/acpisrc.1
new file mode 100644
index 0000000..37d8971
--- /dev/null
+++ b/acpisrc.1
@@ -0,0 +1,72 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPISRC 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpisrc \- ACPICA source code conversion utility
+.SH SYNOPSIS
+.B acpisrc
+.RI [ -c | -l | -u] [-d] [-s] [-v] [-y] <source-dir> <dest-dir>
+.RI <aml-file>
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpisrc
+command. The option list is taken from the acpisrc interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpisrc
+converts the ACPICA into various forms for use with different operating
+systems.
+Source for ACPICA may be obtained from http://www.acpica.org/source/.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.TP
+.B \-c
+Generate cleaned version of the source
+.TP
+.B \-h
+Insert dual-license header into all module
+.TP
+.B \-l
+Generate Linux version of the source
+.TP
+.B \-u
+Generate custom source translation
+.TP
+.B \-d
+Leave debug statements in code
+.TP
+.B \-s
+Generate source statistics only
+.TP
+.B \-v
+Verbose mode
+.TP
+.B \-y
+Suppress file overwrite prompts
+
+.SH AUTHOR
+acpisrc was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/acpixtract.1 b/acpixtract.1
new file mode 100644
index 0000000..65239e9
--- /dev/null
+++ b/acpixtract.1
@@ -0,0 +1,60 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ACPIXTRACT 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+acpixtract \- ACPICA source code conversion utility
+.SH SYNOPSIS
+.B acpixtract
+.RI [ <option> ... ]
+.RI <acpidump-file>
+
+.SH DESCRIPTION
+This manual page briefly documents the
+.B acpixtract
+command. The option list is taken from the acpixtract interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B acpixtract
+extracts binary ACPI tables from the output of the
+.B acpidump
+command (see the
+.B pm-tools
+package).  A default invocation will extract the DSDT and
+all SSDTs.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.TP
+.B \-a
+Extract all tables, not just DSDT/SSDT
+.TP
+.B \-l
+List table summaries, do not extract
+.TP
+.B \-s <signature>
+Extract all tables with <signature>
+
+.SH AUTHOR
+acpixtract was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Al Stone <ahs3 at redhat.com> for the
+Fedora project (but may be used by others).
diff --git a/arm7hl.patch b/arm7hl.patch
new file mode 100644
index 0000000..fb10291
--- /dev/null
+++ b/arm7hl.patch
@@ -0,0 +1,20 @@
+diff -Naur acpica-unix2-20170119/source/include/acmacros.h acpica-unix2-20170119-arm7hl/source/include/acmacros.h
+--- acpica-unix2-20170119/source/include/acmacros.h	2017-01-30 17:25:54.346151952 -0700
++++ acpica-unix2-20170119-arm7hl/source/include/acmacros.h	2017-01-30 17:22:25.249388742 -0700
+@@ -178,6 +178,8 @@
+ 
+ /* 16-bit source, 16/32/64 destination */
+ 
++#define ACPI_MOVE_16_TO_8(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];}
++
+ #define ACPI_MOVE_16_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
+                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
+ 
+@@ -199,6 +201,7 @@
+ 
+ /* 64-bit source, 16/32/64 destination */
+ 
++#define ACPI_MOVE_64_TO_8(d, s)         ACPI_MOVE_16_TO_8(d, s)    /* Truncate to 8 */
+ #define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
+ #define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
+ #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
diff --git a/asllookup-miscompare.patch b/asllookup-miscompare.patch
index 0067a22..9b2305c 100644
--- a/asllookup-miscompare.patch
+++ b/asllookup-miscompare.patch
@@ -1,22 +1,33 @@
-diff -urN acpica-unix2-20140214/source/compiler/asllookup.c acpica-unix2-20140214-patch/source/compiler/asllookup.c
---- acpica-unix2-20140214/source/compiler/asllookup.c	2014-02-14 16:23:33.000000000 -0700
-+++ acpica-unix2-20140214-patch/source/compiler/asllookup.c	2014-02-27 11:50:52.168659866 -0700
-@@ -119,6 +119,7 @@
+Make AslLookup endian independent
+
+From: Al Stone <ahs3 at redhat.com>
+
+
+---
+ source/compiler/asllookup.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+Index: acpica-unix2-20161222/source/compiler/asllookup.c
+===================================================================
+--- acpica-unix2-20161222.orig/source/compiler/asllookup.c
++++ acpica-unix2-20161222/source/compiler/asllookup.c
+@@ -119,6 +119,7 @@ LkIsObjectUsed (
  {
      ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
      ACPI_NAMESPACE_NODE     *Next;
-+    ACPI_NAME_UNION         tmp;
- 
- 
-     /* Referenced flag is set during the namespace xref */
-@@ -162,8 +163,9 @@
++    ACPI_NAME_UNION         tmp, tmp2;
+     ASL_METHOD_LOCAL        *MethodLocals;
+     ASL_METHOD_LOCAL        *MethodArgs;
+     UINT32                  i;
+@@ -228,8 +229,10 @@ LkIsObjectUsed (
               * Issue a remark even if it is a reserved name (starts
               * with an underscore).
               */
-+            ACPI_MOVE_32_TO_32(&tmp.Ascii, Next->Name.Ascii);
-             sprintf (MsgBuffer, "Name is within method [%4.4s]",
--                Next->Name.Ascii);
-+                tmp.Ascii);
++            ACPI_MOVE_32_TO_32(&tmp.Ascii, Node->Name.Ascii);
++            ACPI_MOVE_32_TO_32(&tmp2.Ascii, Next->Name.Ascii);
+             sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
+-                Node->Name.Ascii, Next->Name.Ascii);
++                tmp.Ascii, tmp2.Ascii);
              AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
                  LkGetNameOp (Node->Op), MsgBuffer);
              return (AE_OK);
diff --git a/asllookup-ppc64.patch b/asllookup-ppc64.patch
new file mode 100644
index 0000000..cef59c4
--- /dev/null
+++ b/asllookup-ppc64.patch
@@ -0,0 +1,23 @@
+Make sure AslLookup operates correctly on ppc64, too
+
+From: Al Stone <ahs3 at redhat.com>
+
+
+---
+ source/compiler/asllookup.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: acpica-unix2-20161222/source/compiler/asllookup.c
+===================================================================
+--- acpica-unix2-20161222.orig/source/compiler/asllookup.c
++++ acpica-unix2-20161222/source/compiler/asllookup.c
+@@ -176,7 +176,8 @@ LkIsObjectUsed (
+                  * We ignore the predefined methods since often, not
+                  * all arguments are needed or used.
+                  */
+-                if ((Node->Name.Ascii[0] != '_') &&
++                ACPI_MOVE_32_TO_32(&tmp.Ascii, Node->Name.Ascii);
++                if ((tmp.Ascii[0] != '_') &&
+                     (!(MethodArgs[i].Flags & ASL_ARG_REFERENCED)))
+                 {
+                     sprintf (MsgBuffer, "Arg%u", i);
diff --git a/debian-big_endian.patch b/debian-big_endian.patch
index 0900859..19ac6cc 100644
--- a/debian-big_endian.patch
+++ b/debian-big_endian.patch
@@ -1,7 +1,28 @@
-diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslcodegen.c
---- acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian	2014-04-24 11:48:59.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslcodegen.c	2014-06-06 20:43:34.711825238 -0400
-@@ -246,16 +246,12 @@ CgWriteAmlOpcode (
+Re-use a patch originally created for Debian to enable big-endian
+
+From: Al Stone <ahs3 at redhat.com>
+
+support
+---
+ source/compiler/aslcodegen.c      |  109 ++++++++++++++++++------------
+ source/compiler/aslopcodes.c      |    4 +
+ source/compiler/aslrestype1.c     |   68 +++++++++++++------
+ source/compiler/aslrestype1i.c    |   38 +++++++---
+ source/compiler/aslrestype2.c     |   25 ++++---
+ source/compiler/aslrestype2d.c    |  134 +++++++++++++++++++++----------------
+ source/compiler/aslrestype2e.c    |   39 +++++++----
+ source/compiler/aslrestype2q.c    |  117 +++++++++++++++++++++-----------
+ source/compiler/aslrestype2s.c    |   86 +++++++++++++++++-------
+ source/compiler/aslrestype2w.c    |  127 +++++++++++++++++++++--------------
+ source/include/acmacros.h         |   15 +++-
+ source/include/platform/aclinux.h |    8 ++
+ 12 files changed, 487 insertions(+), 283 deletions(-)
+
+Index: acpica-unix2-20170224/source/compiler/aslcodegen.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslcodegen.c
++++ acpica-unix2-20170224/source/compiler/aslcodegen.c
+@@ -238,16 +238,12 @@ CgWriteAmlOpcode (
      ACPI_PARSE_OBJECT       *Op)
  {
      UINT8                   PkgLenFirstByte;
@@ -24,7 +45,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
  
      /* We expect some DEFAULT_ARGs, just ignore them */
  
-@@ -278,51 +265,52 @@ CgWriteAmlOpcode (
+@@ -280,51 +276,52 @@ CgWriteAmlOpcode (
  
          /* Special opcodes for within a field definition */
  
@@ -88,7 +109,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
          break;
      }
  
-@@ -333,8 +322,8 @@ CgWriteAmlOpcode (
+@@ -335,8 +332,8 @@ CgWriteAmlOpcode (
          if (Op->Asl.AmlPkgLenBytes == 1)
          {
              /* Simplest case -- no bytes to follow, just write the count */
@@ -99,7 +120,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
          }
          else if (Op->Asl.AmlPkgLenBytes != 0)
          {
-@@ -344,7 +333,7 @@ CgWriteAmlOpcode (
+@@ -346,7 +343,7 @@ CgWriteAmlOpcode (
               */
              PkgLenFirstByte = (UINT8)
                  (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
@@ -108,15 +129,17 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
  
              CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
  
-@@ -352,37 +341,44 @@ CgWriteAmlOpcode (
+@@ -354,39 +351,47 @@ CgWriteAmlOpcode (
               * Shift the length over by the 4 bits we just stuffed
               * in the first byte
               */
 -            PkgLen.Len >>= 4;
 +            PkgLen >>= 4;
  
-             /* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
--
+             /*
+              * Now we can write the remaining bytes -
+              * either 1, 2, or 3 bytes
+              */
 -            for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
 +            Byte = ACPI_LOBYTE(PkgLen);
 +            CgLocalWriteAmlData (Op, &Byte, 1);
@@ -166,15 +189,15 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
          break;
  
      case AML_STRING_OP:
-@@ -416,6 +412,7 @@ CgWriteTableHeader (
+@@ -420,6 +425,7 @@ CgWriteTableHeader (
      ACPI_PARSE_OBJECT       *Op)
  {
      ACPI_PARSE_OBJECT       *Child;
-+    UINT32 DWord;
- 
++    UINT32                  DWord;
+     UINT32                  CommentLength;
+     ACPI_COMMENT_NODE       *Current;
  
-     /* AML filename */
-@@ -452,7 +449,7 @@ CgWriteTableHeader (
+@@ -473,7 +479,7 @@ CgWriteTableHeader (
      /* OEM Revision */
  
      Child = Child->Asl.Next;
@@ -183,22 +206,24 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
  
      /* Compiler ID */
  
-@@ -460,11 +457,12 @@ CgWriteTableHeader (
+@@ -481,12 +487,13 @@ CgWriteTableHeader (
  
      /* Compiler version */
  
--    TableHeader.AslCompilerRevision = ASL_REVISION;
-+    DWord = ASL_REVISION;
+-    TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
++    DWord = ACPI_CA_VERSION;
 +    ACPI_MOVE_32_TO_32(&TableHeader.AslCompilerRevision, &DWord);
  
      /* Table length. Checksum zero for now, will rewrite later */
  
--    TableHeader.Length   = Gbl_TableLength;
-+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &Gbl_TableLength);
-     TableHeader.Checksum = 0;
+-    TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
+-        Op->Asl.AmlSubtreeLength;
++    DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
++    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
  
-     CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
-@@ -528,7 +526,10 @@ CgWriteNode (
+     /* Calculate the comment lengths for this definition block parseOp */
+ 
+@@ -643,7 +650,10 @@ CgWriteNode (
      ACPI_PARSE_OBJECT       *Op)
  {
      ASL_RESOURCE_NODE       *Rnode;
@@ -208,9 +233,9 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
 +    UINT32                  DWord;
 +    UINT64                  QWord;
  
-     /* Always check for DEFAULT_ARG and other "Noop" nodes */
-     /* TBD: this may not be the best place for this check */
-@@ -546,13 +547,24 @@ CgWriteNode (
+     /* Write all comments here. */
+     if (Gbl_CaptureComments)
+@@ -672,13 +682,24 @@ CgWriteNode (
      switch (Op->Asl.AmlOpcode)
      {
      case AML_RAW_DATA_BYTE:
@@ -238,10 +263,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslcodegen.c.debian-big_endian ac
  
      case AML_RAW_DATA_BUFFER:
  
-diff -up acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslopcodes.c
---- acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian	2014-04-24 11:48:59.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslopcodes.c	2014-06-06 20:43:34.711825238 -0400
-@@ -531,6 +479,7 @@ OpcDoUnicode (
+Index: acpica-unix2-20170224/source/compiler/aslopcodes.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslopcodes.c
++++ acpica-unix2-20170224/source/compiler/aslopcodes.c
+@@ -485,6 +485,7 @@ OpcDoUnicode (
      UINT32                  i;
      UINT8                   *AsciiString;
      UINT16                  *UnicodeString;
@@ -249,7 +275,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian ac
      ACPI_PARSE_OBJECT       *BufferLengthOp;
  
  
-@@ -557,7 +505,8 @@ OpcDoUnicode (
+@@ -511,7 +512,8 @@ OpcDoUnicode (
  
      for (i = 0; i < Count; i++)
      {
@@ -259,10 +285,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslopcodes.c.debian-big_endian ac
      }
  
      /*
-diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype1.c
---- acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype1.c	2014-06-06 20:43:34.711825238 -0400
-@@ -143,6 +148,11 @@ RsDoMemory24Descriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype1.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype1.c
++++ acpica-unix2-20170224/source/compiler/aslrestype1.c
+@@ -142,6 +142,11 @@ RsDoMemory24Descriptor (
      ACPI_PARSE_OBJECT       *LengthOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -274,17 +301,17 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
      UINT32                  i;
  
  
-@@ -152,7 +153,8 @@ RsDoMemory24Descriptor (
+@@ -151,7 +156,8 @@ RsDoMemory24Descriptor (
  
      Descriptor = Rnode->Buffer;
-     Descriptor->Memory24.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY24;
+     Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
 -    Descriptor->Memory24.ResourceLength = 9;
 +    ResourceLength = 9;
 +    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.ResourceLength, &ResourceLength);
  
      /* Process all child initialization nodes */
  
-@@ -169,7 +169,7 @@ RsDoMemory24Descriptor (
+@@ -168,7 +174,7 @@ RsDoMemory24Descriptor (
  
          case 1: /* Min Address */
  
@@ -293,7 +320,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
              MinOp = InitializerOp;
-@@ -177,7 +177,7 @@ RsDoMemory24Descriptor (
+@@ -176,7 +182,7 @@ RsDoMemory24Descriptor (
  
          case 2: /* Max Address */
  
@@ -302,7 +329,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
              MaxOp = InitializerOp;
-@@ -185,14 +185,14 @@ RsDoMemory24Descriptor (
+@@ -184,14 +190,14 @@ RsDoMemory24Descriptor (
  
          case 3: /* Alignment */
  
@@ -319,7 +346,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
              LengthOp = InitializerOp;
-@@ -215,12 +220,17 @@ RsDoMemory24Descriptor (
+@@ -214,12 +220,17 @@ RsDoMemory24Descriptor (
      /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
  
      RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
@@ -341,7 +368,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
      return (Rnode);
  }
  
-@@ -249,6 +254,11 @@ RsDoMemory32Descriptor (
+@@ -248,6 +259,11 @@ RsDoMemory32Descriptor (
      ACPI_PARSE_OBJECT       *AlignOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -353,17 +380,17 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
      UINT32                  i;
  
  
-@@ -258,7 +259,8 @@ RsDoMemory32Descriptor (
+@@ -257,7 +273,8 @@ RsDoMemory32Descriptor (
  
      Descriptor = Rnode->Buffer;
-     Descriptor->Memory32.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY32;
+     Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
 -    Descriptor->Memory32.ResourceLength = 17;
 +    ResourceLength = 17;
 +    ACPI_MOVE_16_TO_16(&Descriptor->Memory32.ResourceLength, &ResourceLength);
  
      /* Process all child initialization nodes */
  
-@@ -275,7 +275,7 @@ RsDoMemory32Descriptor (
+@@ -274,7 +291,7 @@ RsDoMemory32Descriptor (
  
          case 1:  /* Min Address */
  
@@ -372,7 +399,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
              MinOp = InitializerOp;
-@@ -283,7 +283,7 @@ RsDoMemory32Descriptor (
+@@ -282,7 +299,7 @@ RsDoMemory32Descriptor (
  
          case 2: /* Max Address */
  
@@ -381,7 +408,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
              MaxOp = InitializerOp;
-@@ -291,7 +291,7 @@ RsDoMemory32Descriptor (
+@@ -290,7 +307,7 @@ RsDoMemory32Descriptor (
  
          case 3: /* Alignment */
  
@@ -390,7 +417,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
              AlignOp = InitializerOp;
-@@ -299,7 +299,7 @@ RsDoMemory32Descriptor (
+@@ -298,7 +315,7 @@ RsDoMemory32Descriptor (
  
          case 4: /* Length */
  
@@ -399,7 +426,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
              LengthOp = InitializerOp;
-@@ -322,12 +327,17 @@ RsDoMemory32Descriptor (
+@@ -321,12 +338,17 @@ RsDoMemory32Descriptor (
      /* Validate the Min/Max/Len/Align values */
  
      RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
@@ -421,7 +448,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
      return (Rnode);
  }
  
-@@ -352,6 +353,7 @@ RsDoMemory32FixedDescriptor (
+@@ -351,6 +373,7 @@ RsDoMemory32FixedDescriptor (
      ACPI_PARSE_OBJECT       *InitializerOp;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -429,17 +456,17 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
      UINT32                  i;
  
  
-@@ -361,7 +362,8 @@ RsDoMemory32FixedDescriptor (
+@@ -360,7 +383,8 @@ RsDoMemory32FixedDescriptor (
  
      Descriptor = Rnode->Buffer;
-     Descriptor->FixedMemory32.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
+     Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
 -    Descriptor->FixedMemory32.ResourceLength = 9;
 +    ResourceLength = 9;
 +    ACPI_MOVE_16_TO_16(&Descriptor->FixedMemory32.ResourceLength, &ResourceLength);
  
      /* Process all child initialization nodes */
  
-@@ -378,14 +380,16 @@ RsDoMemory32FixedDescriptor (
+@@ -377,14 +401,16 @@ RsDoMemory32FixedDescriptor (
  
          case 1: /* Address */
  
@@ -458,10 +485,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1.c.debian-big_endian a
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
              break;
-diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype1i.c
---- acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype1i.c	2014-06-06 20:43:34.711825238 -0400
-@@ -198,6 +200,8 @@ RsDoFixedDmaDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype1i.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype1i.c
++++ acpica-unix2-20170224/source/compiler/aslrestype1i.c
+@@ -198,6 +198,8 @@ RsDoFixedDmaDescriptor (
      ACPI_PARSE_OBJECT       *InitializerOp;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -470,7 +498,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      UINT32                  i;
  
  
-@@ -217,14 +217,14 @@ RsDoFixedDmaDescriptor (
+@@ -217,14 +219,14 @@ RsDoFixedDmaDescriptor (
          {
          case 0: /* DMA Request Lines [WORD] (_DMA) */
  
@@ -487,7 +515,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
              break;
-@@ -249,6 +252,9 @@ RsDoFixedDmaDescriptor (
+@@ -249,6 +251,9 @@ RsDoFixedDmaDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -497,7 +525,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      return (Rnode);
  }
  
-@@ -274,6 +275,7 @@ RsDoFixedIoDescriptor (
+@@ -274,6 +279,7 @@ RsDoFixedIoDescriptor (
      ACPI_PARSE_OBJECT       *AddressOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -505,7 +533,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      UINT32                  i;
  
  
-@@ -293,8 +292,7 @@ RsDoFixedIoDescriptor (
+@@ -293,8 +299,7 @@ RsDoFixedIoDescriptor (
          {
          case 0: /* Base Address */
  
@@ -515,7 +543,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
              AddressOp = InitializerOp;
-@@ -324,11 +326,13 @@ RsDoFixedIoDescriptor (
+@@ -324,11 +329,13 @@ RsDoFixedIoDescriptor (
  
      /* Error checks */
  
@@ -530,7 +558,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      return (Rnode);
  }
  
-@@ -357,6 +359,8 @@ RsDoIoDescriptor (
+@@ -357,6 +364,8 @@ RsDoIoDescriptor (
      ACPI_PARSE_OBJECT       *AlignOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -539,7 +567,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      UINT32                  i;
  
  
-@@ -383,8 +382,7 @@ RsDoIoDescriptor (
+@@ -383,8 +392,7 @@ RsDoIoDescriptor (
  
          case 1:  /* Min Address */
  
@@ -549,7 +577,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
              MinOp = InitializerOp;
-@@ -392,8 +391,7 @@ RsDoIoDescriptor (
+@@ -392,8 +400,7 @@ RsDoIoDescriptor (
  
          case 2: /* Max Address */
  
@@ -559,7 +587,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
              MaxOp = InitializerOp;
-@@ -434,12 +437,15 @@ RsDoIoDescriptor (
+@@ -434,12 +441,15 @@ RsDoIoDescriptor (
      /* Validate the Min/Max/Len/Align values */
  
      RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
@@ -577,7 +605,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      return (Rnode);
  }
  
-@@ -559,9 +559,9 @@ RsDoIrqDescriptor (
+@@ -559,9 +569,9 @@ RsDoIrqDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -589,7 +617,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
      return (Rnode);
  }
  
-@@ -660,6 +660,6 @@ RsDoIrqNoFlagsDescriptor (
+@@ -660,6 +670,6 @@ RsDoIrqNoFlagsDescriptor (
  
      /* Now we can set the interrupt mask */
  
@@ -597,10 +625,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype1i.c.debian-big_endian
 +    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
      return (Rnode);
  }
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2.c
---- acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2.c	2014-06-06 20:43:34.711825238 -0400
-@@ -76,6 +77,7 @@ RsDoGeneralRegisterDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2.c
+@@ -76,6 +76,7 @@ RsDoGeneralRegisterDescriptor (
      ACPI_PARSE_OBJECT       *InitializerOp;
      ASL_RESOURCE_NODE       *Rnode;
      UINT32                  CurrentByteOffset;
@@ -608,7 +637,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
      UINT32                  i;
  
  
-@@ -85,7 +87,9 @@ RsDoGeneralRegisterDescriptor (
+@@ -85,7 +86,9 @@ RsDoGeneralRegisterDescriptor (
  
      Descriptor = Rnode->Buffer;
      Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
@@ -619,7 +648,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
  
      /* Process all child initialization nodes */
  
-@@ -116,7 +117,8 @@ RsDoGeneralRegisterDescriptor (
+@@ -116,7 +119,8 @@ RsDoGeneralRegisterDescriptor (
  
          case 3: /* Register Address */
  
@@ -629,7 +658,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_ADDRESS,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
              break;
-@@ -171,6 +172,7 @@ RsDoInterruptDescriptor (
+@@ -177,6 +181,7 @@ RsDoInterruptDescriptor (
      AML_RESOURCE            *Rover = NULL;
      ACPI_PARSE_OBJECT       *InitializerOp;
      ASL_RESOURCE_NODE       *Rnode;
@@ -637,7 +666,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
      UINT16                  StringLength = 0;
      UINT32                  OptionIndex = 0;
      UINT32                  CurrentByteOffset;
-@@ -219,7 +219,7 @@ RsDoInterruptDescriptor (
+@@ -225,7 +230,7 @@ RsDoInterruptDescriptor (
       * Initial descriptor length -- may be enlarged if there are
       * optional fields present
       */
@@ -646,7 +675,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
      Descriptor->ExtendedIrq.InterruptCount  = 0;
  
      Rover = ACPI_CAST_PTR (AML_RESOURCE,
-@@ -327,10 +328,11 @@ RsDoInterruptDescriptor (
+@@ -333,10 +338,11 @@ RsDoInterruptDescriptor (
  
              /* Save the integer and move pointer to the next one */
  
@@ -660,7 +689,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
  
              /* Case 7: First interrupt number in list */
  
-@@ -366,7 +366,7 @@ RsDoInterruptDescriptor (
+@@ -372,7 +378,7 @@ RsDoInterruptDescriptor (
      {
          Rover->ByteItem = ResSourceIndex;
          Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
@@ -669,7 +698,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
      }
  
      /* Add optional ResSource string if present */
-@@ -378,13 +379,14 @@ RsDoInterruptDescriptor (
+@@ -384,14 +390,15 @@ RsDoInterruptDescriptor (
          Rover = ACPI_ADD_PTR (
                      AML_RESOURCE, &(Rover->ByteItem), StringLength);
  
@@ -678,27 +707,29 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2.c.debian-big_endian a
 +        ResourceLength = (UINT16) (ResourceLength + StringLength);
      }
  
-     Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
-                            ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
-                            + OptionIndex + StringLength;
+     Rnode->BufferLength =
+         (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
+         ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
+         + OptionIndex + StringLength;
 +    ACPI_MOVE_16_TO_16(&Descriptor->ExtendedIrq.ResourceLength,
 +		    &ResourceLength);
      return (Rnode);
  }
  
-@@ -432,7 +432,7 @@ RsDoVendorLargeDescriptor (
+@@ -439,7 +446,7 @@ RsDoVendorLargeDescriptor (
  
      Descriptor = Rnode->Buffer;
-     Descriptor->VendorLarge.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_LARGE;
+     Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
 -    Descriptor->VendorLarge.ResourceLength = (UINT16) i;
 +    ACPI_MOVE_32_TO_16(&Descriptor->VendorLarge.ResourceLength, &i);
  
      /* Point to end-of-descriptor for vendor data */
  
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2d.c
---- acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2d.c	2014-06-06 20:43:34.721825238 -0400
-@@ -79,7 +85,13 @@ RsDoDwordIoDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2d.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2d.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2d.c
+@@ -79,7 +79,13 @@ RsDoDwordIoDescriptor (
      ACPI_PARSE_OBJECT       *GranOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT16                  StringLength = 0;
@@ -712,7 +743,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      UINT8                   *OptionalFields;
      UINT32                  CurrentByteOffset;
      UINT32                  i;
-@@ -102,8 +101,7 @@ RsDoDwordIoDescriptor (
+@@ -102,8 +108,7 @@ RsDoDwordIoDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
@@ -722,7 +753,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -147,8 +146,7 @@ RsDoDwordIoDescriptor (
+@@ -147,8 +152,7 @@ RsDoDwordIoDescriptor (
  
          case 5: /* Address Granularity */
  
@@ -732,7 +763,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
              GranOp = InitializerOp;
-@@ -156,8 +155,7 @@ RsDoDwordIoDescriptor (
+@@ -156,8 +160,7 @@ RsDoDwordIoDescriptor (
  
          case 6: /* Address Min */
  
@@ -742,7 +773,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
              MinOp = InitializerOp;
-@@ -165,8 +164,7 @@ RsDoDwordIoDescriptor (
+@@ -165,8 +168,7 @@ RsDoDwordIoDescriptor (
  
          case 7: /* Address Max */
  
@@ -752,7 +783,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
              MaxOp = InitializerOp;
-@@ -174,16 +172,14 @@ RsDoDwordIoDescriptor (
+@@ -174,16 +176,14 @@ RsDoDwordIoDescriptor (
  
          case 8: /* Translation Offset */
  
@@ -780,7 +811,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -211,8 +210,7 @@ RsDoDwordIoDescriptor (
+@@ -211,8 +211,7 @@ RsDoDwordIoDescriptor (
                  {
                      /* Found a valid ResourceSource */
  
@@ -790,7 +821,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -272,13 +279,20 @@ RsDoDwordIoDescriptor (
+@@ -272,13 +271,20 @@ RsDoDwordIoDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -829,7 +860,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -332,11 +330,9 @@ RsDoDwordMemoryDescriptor (
+@@ -332,11 +344,9 @@ RsDoDwordMemoryDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
@@ -842,7 +873,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      /* Process all child initialization nodes */
  
      for (i = 0; InitializerOp; i++)
-@@ -385,8 +384,7 @@ RsDoDwordMemoryDescriptor (
+@@ -385,8 +395,7 @@ RsDoDwordMemoryDescriptor (
  
          case 6: /* Address Granularity */
  
@@ -852,7 +883,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
              GranOp = InitializerOp;
-@@ -394,8 +3926,7 @@ RsDoDwordMemoryDescriptor (
+@@ -394,8 +403,7 @@ RsDoDwordMemoryDescriptor (
  
          case 7: /* Min Address */
  
@@ -862,7 +893,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
              MinOp = InitializerOp;
-@@ -403,8 +402,7 @@ RsDoDwordMemoryDescriptor (
+@@ -403,8 +411,7 @@ RsDoDwordMemoryDescriptor (
  
          case 8: /* Max Address */
  
@@ -872,7 +903,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
              MaxOp = InitializerOp;
-@@ -412,16 +410,14 @@ RsDoDwordMemoryDescriptor (
+@@ -412,16 +419,14 @@ RsDoDwordMemoryDescriptor (
  
          case 9: /* Translation Offset */
  
@@ -891,7 +922,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
              LengthOp = InitializerOp;
-@@ -433,7 +433,7 @@ RsDoDwordMemoryDescriptor (
+@@ -433,7 +438,7 @@ RsDoDwordMemoryDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -900,7 +931,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -445,8 +445,8 @@ RsDoDwordMemoryDescriptor (
+@@ -445,8 +450,8 @@ RsDoDwordMemoryDescriptor (
              {
                  if (StringLength)
                  {
@@ -911,7 +942,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -507,13 +514,20 @@ RsDoDwordMemoryDescriptor (
+@@ -507,13 +512,20 @@ RsDoDwordMemoryDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -936,7 +967,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
          OptionIndex + StringLength;
      return (Rnode);
-@@ -545,7 +551,13 @@ RsDoDwordSpaceDescriptor (
+@@ -545,7 +557,13 @@ RsDoDwordSpaceDescriptor (
      ASL_RESOURCE_NODE       *Rnode;
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
@@ -950,7 +981,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -566,8 +565,7 @@ RsDoDwordSpaceDescriptor (
+@@ -566,8 +584,7 @@ RsDoDwordSpaceDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
@@ -960,7 +991,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -616,8 +615,7 @@ RsDoDwordSpaceDescriptor (
+@@ -616,8 +633,7 @@ RsDoDwordSpaceDescriptor (
  
          case 6: /* Address Granularity */
  
@@ -970,7 +1001,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
              GranOp = InitializerOp;
-@@ -625,8 +624,7 @@ RsDoDwordSpaceDescriptor (
+@@ -625,8 +641,7 @@ RsDoDwordSpaceDescriptor (
  
          case 7: /* Min Address */
  
@@ -980,7 +1011,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
              MinOp = InitializerOp;
-@@ -634,8 +633,7 @@ RsDoDwordSpaceDescriptor (
+@@ -634,8 +649,7 @@ RsDoDwordSpaceDescriptor (
  
          case 8: /* Max Address */
  
@@ -990,7 +1021,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
              MaxOp = InitializerOp;
-@@ -643,16 +641,14 @@ RsDoDwordSpaceDescriptor (
+@@ -643,16 +657,14 @@ RsDoDwordSpaceDescriptor (
  
          case 9: /* Translation Offset */
  
@@ -1009,7 +1040,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
              LengthOp = InitializerOp;
-@@ -664,7 +664,7 @@ RsDoDwordSpaceDescriptor (
+@@ -664,7 +676,7 @@ RsDoDwordSpaceDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -1018,7 +1049,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -676,8 +675,7 @@ RsDoDwordSpaceDescriptor (
+@@ -676,8 +688,7 @@ RsDoDwordSpaceDescriptor (
              {
                  if (StringLength)
                  {
@@ -1028,7 +1059,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -724,13 +731,20 @@ RsDoDwordSpaceDescriptor (
+@@ -724,13 +735,20 @@ RsDoDwordSpaceDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -1053,10 +1084,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2d.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
          OptionIndex + StringLength;
      return (Rnode);
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2e.c
---- acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2e.c	2014-06-06 20:43:34.721825238 -0400
-@@ -78,6 +85,13 @@ RsDoExtendedIoDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2e.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2e.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2e.c
+@@ -78,6 +78,13 @@ RsDoExtendedIoDescriptor (
      ACPI_PARSE_OBJECT       *GranOp = NULL;
      ASL_RESOURCE_NODE       *Rnode;
      UINT16                  StringLength = 0;
@@ -1070,11 +1102,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
  
-@@ -94,9 +95,10 @@ RsDoExtendedIoDescriptor (
-     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
-     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
+@@ -94,9 +101,10 @@ RsDoExtendedIoDescriptor (
+     Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
+     Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
  
--    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
+-    Descriptor->ExtAddress64.ResourceLength = (UINT16)
 -        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
 +    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
           sizeof (AML_RESOURCE_LARGE_HEADER));
@@ -1083,7 +1115,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
  
      /* Process all child initialization nodes */
  
-@@ -139,7 +139,7 @@ RsDoExtendedIoDescriptor (
+@@ -139,7 +147,7 @@ RsDoExtendedIoDescriptor (
  
          case 5: /* Address Granularity */
  
@@ -1092,7 +1124,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
              GranOp = InitializerOp;
-@@ -147,7 +147,7 @@ RsDoExtendedIoDescriptor (
+@@ -147,7 +155,7 @@ RsDoExtendedIoDescriptor (
  
          case 6: /* Address Min */
  
@@ -1101,7 +1133,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
              MinOp = InitializerOp;
-@@ -155,7 +155,7 @@ RsDoExtendedIoDescriptor (
+@@ -155,7 +163,7 @@ RsDoExtendedIoDescriptor (
  
          case 7: /* Address Max */
  
@@ -1110,7 +1142,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
              MaxOp = InitializerOp;
-@@ -163,14 +163,14 @@ RsDoExtendedIoDescriptor (
+@@ -163,14 +171,14 @@ RsDoExtendedIoDescriptor (
  
          case 8: /* Translation Offset */
  
@@ -1127,7 +1159,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
              LengthOp = InitializerOp;
-@@ -178,7 +178,7 @@ RsDoExtendedIoDescriptor (
+@@ -178,7 +186,7 @@ RsDoExtendedIoDescriptor (
  
          case 10: /* Type-Specific Attributes */
  
@@ -1136,7 +1168,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
              break;
-@@ -214,13 +221,20 @@ RsDoExtendedIoDescriptor (
+@@ -214,13 +222,20 @@ RsDoExtendedIoDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -1161,221 +1193,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2e.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) +
          StringLength;
      return (Rnode);
- }
-@@ -254,6 +270,13 @@ RsDoExtendedMemoryDescriptor (
-     ACPI_PARSE_OBJECT       *GranOp = NULL;
-     ASL_RESOURCE_NODE       *Rnode;
-     UINT16                  StringLength = 0;
-+    UINT16                  ResourceLength = 0;
-+    UINT64                  Minimum = 0;
-+    UINT64                  Maximum = 0;
-+    UINT64                  AddressLength = 0;
-+    UINT64                  Granularity = 0;
-+    UINT64                  TranslationOffset = 0;
-+    UINT64                  TypeSpecific = 0;
-     UINT32                  CurrentByteOffset;
-     UINT32                  i;
- 
-@@ -268,9 +291,10 @@ RsDoExtendedMemoryDescriptor (
-     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
-     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
- 
--    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
--        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
-+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
-          sizeof (AML_RESOURCE_LARGE_HEADER));
-+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
-+        &ResourceLength);
- 
-     /* Process all child initialization nodes */
- 
-@@ -320,7 +344,7 @@ RsDoExtendedMemoryDescriptor (
- 
-         case 6: /* Address Granularity */
- 
--            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
-+            Granularity = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
-             GranOp = InitializerOp;
-@@ -328,7 +352,7 @@ RsDoExtendedMemoryDescriptor (
- 
-         case 7: /* Min Address */
- 
--            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
-+            Minimum = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
-             MinOp = InitializerOp;
-@@ -336,7 +360,7 @@ RsDoExtendedMemoryDescriptor (
- 
-         case 8: /* Max Address */
- 
--            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
-+            Maximum = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
-             MaxOp = InitializerOp;
-@@ -344,14 +368,14 @@ RsDoExtendedMemoryDescriptor (
- 
-         case 9: /* Translation Offset */
- 
--            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
-+            TranslationOffset = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
-             break;
- 
-         case 10: /* Address Length */
- 
--            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
-+            AddressLength = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
-             LengthOp = InitializerOp;
-@@ -359,7 +383,7 @@ RsDoExtendedMemoryDescriptor (
- 
-         case 11: /* Type-Specific Attributes */
- 
--            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
-+            TypeSpecific = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
-             break;
-@@ -396,13 +420,20 @@ RsDoExtendedMemoryDescriptor (
-     /* Validate the Min/Max/Len/Gran values */
- 
-     RsLargeAddressCheck (
--        Descriptor->ExtAddress64.Minimum,
--        Descriptor->ExtAddress64.Maximum,
--        Descriptor->ExtAddress64.AddressLength,
--        Descriptor->ExtAddress64.Granularity,
-+        Minimum,
-+        Maximum,
-+        AddressLength,
-+        Granularity,
-         Descriptor->ExtAddress64.Flags,
-         MinOp, MaxOp, LengthOp, GranOp, Op);
- 
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
-+
-     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength;
-     return (Rnode);
- }
-@@ -435,6 +466,13 @@ RsDoExtendedSpaceDescriptor (
-     ACPI_PARSE_OBJECT       *GranOp = NULL;
-     ASL_RESOURCE_NODE       *Rnode;
-     UINT16                  StringLength = 0;
-+    UINT16                  ResourceLength = 0;
-+    UINT64                  Minimum = 0;
-+    UINT64                  Maximum = 0;
-+    UINT64                  AddressLength = 0;
-+    UINT64                  Granularity = 0;
-+    UINT64                  TranslationOffset = 0;
-+    UINT64                  TypeSpecific = 0;
-     UINT32                  i;
- 
- 
-@@ -448,9 +486,10 @@ RsDoExtendedSpaceDescriptor (
-     Descriptor->ExtAddress64.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
-     Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
- 
--    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
--        (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
-+    ResourceLength  = (UINT16) (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
-          sizeof (AML_RESOURCE_LARGE_HEADER));
-+    ACPI_MOVE_16_TO_16(&Descriptor->ExtAddress64.ResourceLength,
-+        &ResourceLength);
- 
-     /* Process all child initialization nodes */
- 
-@@ -498,7 +537,7 @@ RsDoExtendedSpaceDescriptor (
- 
-         case 6: /* Address Granularity */
- 
--            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
-+            Granularity = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
-             GranOp = InitializerOp;
-@@ -506,7 +545,7 @@ RsDoExtendedSpaceDescriptor (
- 
-         case 7: /* Min Address */
- 
--            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
-+            Minimum = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
-             MinOp = InitializerOp;
-@@ -514,7 +553,7 @@ RsDoExtendedSpaceDescriptor (
- 
-         case 8: /* Max Address */
- 
--            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
-+            Maximum = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
-             MaxOp = InitializerOp;
-@@ -522,14 +561,14 @@ RsDoExtendedSpaceDescriptor (
- 
-         case 9: /* Translation Offset */
- 
--            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
-+            TranslationOffset = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
-             break;
- 
-         case 10: /* Address Length */
- 
--            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
-+            AddressLength = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
-             LengthOp = InitializerOp;
-@@ -537,7 +576,7 @@ RsDoExtendedSpaceDescriptor (
- 
-         case 11: /* Type-Specific Attributes */
- 
--            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
-+            TypeSpecific = InitializerOp->Asl.Value.Integer;
-             RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
-                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
-             break;
-@@ -559,13 +598,20 @@ RsDoExtendedSpaceDescriptor (
-     /* Validate the Min/Max/Len/Gran values */
- 
-     RsLargeAddressCheck (
--        Descriptor->ExtAddress64.Minimum,
--        Descriptor->ExtAddress64.Maximum,
--        Descriptor->ExtAddress64.AddressLength,
--        Descriptor->ExtAddress64.Granularity,
-+        Minimum,
-+        Maximum,
-+        AddressLength,
-+        Granularity,
-         Descriptor->ExtAddress64.Flags,
-         MinOp, MaxOp, LengthOp, GranOp, Op);
- 
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Minimum, &Minimum);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Maximum, &Maximum);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.AddressLength, &AddressLength);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.Granularity, &Granularity);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TranslationOffset, &TranslationOffset);
-+    ACPI_MOVE_64_TO_64(&Descriptor->ExtAddress64.TypeSpecific, &TypeSpecific);
-+
-     Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength;
-     return (Rnode);
- }
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2q.c
---- acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2q.c	2014-06-06 20:43:34.721825238 -0400
-@@ -80,7 +86,13 @@ RsDoQwordIoDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2q.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2q.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2q.c
+@@ -80,7 +80,13 @@ RsDoQwordIoDescriptor (
      ASL_RESOURCE_NODE       *Rnode;
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
@@ -1389,7 +1211,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -102,8 +101,7 @@ RsDoQwordIoDescriptor (
+@@ -102,8 +108,7 @@ RsDoQwordIoDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
@@ -1399,7 +1221,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -147,7 +147,7 @@ RsDoQwordIoDescriptor (
+@@ -147,7 +152,7 @@ RsDoQwordIoDescriptor (
  
          case 5: /* Address Granularity */
  
@@ -1408,7 +1230,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
              GranOp = InitializerOp;
-@@ -155,7 +155,7 @@ RsDoQwordIoDescriptor (
+@@ -155,7 +160,7 @@ RsDoQwordIoDescriptor (
  
          case 6: /* Address Min */
  
@@ -1417,7 +1239,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
              MinOp = InitializerOp;
-@@ -163,7 +163,7 @@ RsDoQwordIoDescriptor (
+@@ -163,7 +168,7 @@ RsDoQwordIoDescriptor (
  
          case 7: /* Address Max */
  
@@ -1426,7 +1248,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
              MaxOp = InitializerOp;
-@@ -171,14 +171,14 @@ RsDoQwordIoDescriptor (
+@@ -171,14 +176,14 @@ RsDoQwordIoDescriptor (
  
          case 8: /* Translation Offset */
  
@@ -1443,7 +1265,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
              LengthOp = InitializerOp;
-@@ -190,7 +190,7 @@ RsDoQwordIoDescriptor (
+@@ -190,7 +195,7 @@ RsDoQwordIoDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -1452,7 +1274,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -202,8 +201,7 @@ RsDoQwordIoDescriptor (
+@@ -202,8 +207,7 @@ RsDoQwordIoDescriptor (
              {
                  if (StringLength)
                  {
@@ -1462,7 +1284,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -263,13 +270,20 @@ RsDoQwordIoDescriptor (
+@@ -263,13 +267,20 @@ RsDoQwordIoDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -1487,7 +1309,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
          OptionIndex + StringLength;
      return (Rnode);
-@@ -301,7 +307,13 @@ RsDoQwordMemoryDescriptor (
+@@ -301,7 +312,13 @@ RsDoQwordMemoryDescriptor (
      ASL_RESOURCE_NODE       *Rnode;
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
@@ -1501,7 +1323,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -323,8 +322,7 @@ RsDoQwordMemoryDescriptor (
+@@ -323,8 +340,7 @@ RsDoQwordMemoryDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
@@ -1511,7 +1333,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -375,7 +375,7 @@ RsDoQwordMemoryDescriptor (
+@@ -375,7 +391,7 @@ RsDoQwordMemoryDescriptor (
  
          case 6: /* Address Granularity */
  
@@ -1520,7 +1342,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
              GranOp = InitializerOp;
-@@ -383,7 +383,7 @@ RsDoQwordMemoryDescriptor (
+@@ -383,7 +399,7 @@ RsDoQwordMemoryDescriptor (
  
          case 7: /* Min Address */
  
@@ -1529,7 +1351,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
              MinOp = InitializerOp;
-@@ -391,7 +391,7 @@ RsDoQwordMemoryDescriptor (
+@@ -391,7 +407,7 @@ RsDoQwordMemoryDescriptor (
  
          case 8: /* Max Address */
  
@@ -1538,7 +1360,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
              MaxOp = InitializerOp;
-@@ -399,14 +399,14 @@ RsDoQwordMemoryDescriptor (
+@@ -399,14 +415,14 @@ RsDoQwordMemoryDescriptor (
  
          case 9: /* Translation Offset */
  
@@ -1555,7 +1377,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
              LengthOp = InitializerOp;
-@@ -418,7 +418,7 @@ RsDoQwordMemoryDescriptor (
+@@ -418,7 +434,7 @@ RsDoQwordMemoryDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -1564,7 +1386,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -430,8 +429,7 @@ RsDoQwordMemoryDescriptor (
+@@ -430,8 +446,7 @@ RsDoQwordMemoryDescriptor (
              {
                  if (StringLength)
                  {
@@ -1574,7 +1396,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -492,13 +499,20 @@ RsDoQwordMemoryDescriptor (
+@@ -492,13 +507,20 @@ RsDoQwordMemoryDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -1599,7 +1421,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
          OptionIndex + StringLength;
      return (Rnode);
-@@ -530,9 +536,15 @@ RsDoQwordSpaceDescriptor (
+@@ -530,9 +552,15 @@ RsDoQwordSpaceDescriptor (
      ASL_RESOURCE_NODE       *Rnode;
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
@@ -1615,7 +1437,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      BOOLEAN                 ResSourceIndex = FALSE;
  
  
-@@ -551,8 +550,7 @@ RsDoQwordSpaceDescriptor (
+@@ -551,8 +579,7 @@ RsDoQwordSpaceDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
@@ -1625,7 +1447,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -601,7 +601,7 @@ RsDoQwordSpaceDescriptor (
+@@ -601,7 +628,7 @@ RsDoQwordSpaceDescriptor (
  
          case 6: /* Address Granularity */
  
@@ -1634,7 +1456,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
              GranOp = InitializerOp;
-@@ -609,7 +609,7 @@ RsDoQwordSpaceDescriptor (
+@@ -609,7 +636,7 @@ RsDoQwordSpaceDescriptor (
  
          case 7: /* Min Address */
  
@@ -1643,7 +1465,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
              MinOp = InitializerOp;
-@@ -617,7 +617,7 @@ RsDoQwordSpaceDescriptor (
+@@ -617,7 +644,7 @@ RsDoQwordSpaceDescriptor (
  
          case 8: /* Max Address */
  
@@ -1652,7 +1474,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
              MaxOp = InitializerOp;
-@@ -625,14 +625,14 @@ RsDoQwordSpaceDescriptor (
+@@ -625,14 +652,14 @@ RsDoQwordSpaceDescriptor (
  
          case 9: /* Translation Offset */
  
@@ -1669,7 +1491,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
              RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
              LengthOp = InitializerOp;
-@@ -644,7 +644,7 @@ RsDoQwordSpaceDescriptor (
+@@ -644,7 +671,7 @@ RsDoQwordSpaceDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -1678,7 +1500,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -656,8 +655,7 @@ RsDoQwordSpaceDescriptor (
+@@ -656,8 +683,7 @@ RsDoQwordSpaceDescriptor (
              {
                  if (StringLength)
                  {
@@ -1688,7 +1510,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -703,13 +710,20 @@ RsDoQwordSpaceDescriptor (
+@@ -703,13 +729,20 @@ RsDoQwordSpaceDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -1713,10 +1535,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2q.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
          OptionIndex + StringLength;
      return (Rnode);
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2s.c
---- acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2s.c	2014-06-06 20:43:34.721825238 -0400
-@@ -290,6 +293,9 @@ RsDoGpioIntDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2s.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2s.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2s.c
+@@ -290,6 +290,9 @@ RsDoGpioIntDescriptor (
      UINT16                  VendorLength;
      UINT16                  InterruptLength;
      UINT16                  DescriptorSize;
@@ -1726,7 +1549,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  PinCount = 0;
      UINT32                  i;
-@@ -349,21 +349,21 @@ RsDoGpioIntDescriptor (
+@@ -346,21 +349,21 @@ RsDoGpioIntDescriptor (
          {
          case 0: /* Interrupt Mode - edge/level [Flag] (_MOD) */
  
@@ -1751,7 +1574,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3, 2);
              break;
-@@ -377,7 +377,7 @@ RsDoGpioIntDescriptor (
+@@ -374,7 +377,7 @@ RsDoGpioIntDescriptor (
  
          case 4: /* Debounce Timeout [WORD] (_DBT) */
  
@@ -1760,7 +1583,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.DebounceTimeout));
              break;
-@@ -403,7 +403,7 @@ RsDoGpioIntDescriptor (
+@@ -401,7 +404,7 @@ RsDoGpioIntDescriptor (
  
          case 7: /* Resource Usage (consumer/producer) */
  
@@ -1769,7 +1592,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              break;
  
          case 8: /* Resource Tag (Descriptor Name) */
-@@ -468,6 +472,10 @@ RsDoGpioIntDescriptor (
+@@ -466,6 +469,10 @@ RsDoGpioIntDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -1777,10 +1600,10 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
 +    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DebounceTimeout, &DebounceTimeout);
 +    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
 +
-     MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
+     MpSaveGpioInfo (Info->MappingOp, Descriptor,
+         PinCount, PinList, ResourceSource);
      return (Rnode);
- }
-@@ -500,6 +504,10 @@ RsDoGpioIoDescriptor (
+@@ -499,6 +506,10 @@ RsDoGpioIoDescriptor (
      UINT16                  VendorLength;
      UINT16                  InterruptLength;
      UINT16                  DescriptorSize;
@@ -1791,7 +1614,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  PinCount = 0;
      UINT32                  i;
-@@ -560,7 +560,7 @@ RsDoGpioIoDescriptor (
+@@ -555,7 +566,7 @@ RsDoGpioIoDescriptor (
          {
          case 0: /* Share Type [Flags] (_SHR) */
  
@@ -1800,7 +1623,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 3);
              break;
-@@ -574,21 +574,21 @@ RsDoGpioIoDescriptor (
+@@ -569,21 +580,21 @@ RsDoGpioIoDescriptor (
  
          case 2: /* Debounce Timeout [WORD] (_DBT) */
  
@@ -1825,7 +1648,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_IORESTRICTION,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.IntFlags), 0, 2);
              break;
-@@ -614,7 +614,7 @@ RsDoGpioIoDescriptor (
+@@ -609,7 +620,7 @@ RsDoGpioIoDescriptor (
  
          case 7: /* Resource Usage (consumer/producer) */
  
@@ -1834,7 +1657,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              break;
  
          case 8: /* Resource Tag (Descriptor Name) */
-@@ -678,6 +683,11 @@ RsDoGpioIoDescriptor (
+@@ -673,6 +684,11 @@ RsDoGpioIoDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -1843,10 +1666,10 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
 +    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.DriveStrength, &DriveStrength);
 +    ACPI_MOVE_16_TO_16(&Descriptor->Gpio.Flags, &Flags);
 +
-     MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
+     MpSaveGpioInfo (Info->MappingOp, Descriptor,
+         PinCount, PinList, ResourceSource);
      return (Rnode);
- }
-@@ -707,6 +710,9 @@ RsDoI2cSerialBusDescriptor (
+@@ -703,6 +719,9 @@ RsDoI2cSerialBusDescriptor (
      UINT16                  ResSourceLength;
      UINT16                  VendorLength;
      UINT16                  DescriptorSize;
@@ -1856,7 +1679,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
  
-@@ -756,7 +756,7 @@ RsDoI2cSerialBusDescriptor (
+@@ -752,7 +771,7 @@ RsDoI2cSerialBusDescriptor (
          {
          case 0: /* Slave Address [WORD] (_ADR) */
  
@@ -1865,7 +1688,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_ADDRESS,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.SlaveAddress));
              break;
-@@ -770,14 +770,14 @@ RsDoI2cSerialBusDescriptor (
+@@ -766,14 +785,14 @@ RsDoI2cSerialBusDescriptor (
  
          case 2: /* Connection Speed [DWORD] (_SPE) */
  
@@ -1882,7 +1705,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.TypeSpecificFlags), 0);
              break;
-@@ -825,6 +828,9 @@ RsDoI2cSerialBusDescriptor (
+@@ -833,6 +852,9 @@ RsDoI2cSerialBusDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -1892,7 +1715,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
      return (Rnode);
  }
-@@ -854,6 +857,9 @@ RsDoSpiSerialBusDescriptor (
+@@ -862,6 +884,9 @@ RsDoSpiSerialBusDescriptor (
      UINT16                  ResSourceLength;
      UINT16                  VendorLength;
      UINT16                  DescriptorSize;
@@ -1902,7 +1725,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
  
-@@ -903,21 +903,21 @@ RsDoSpiSerialBusDescriptor (
+@@ -912,21 +937,21 @@ RsDoSpiSerialBusDescriptor (
          {
          case 0: /* Device Selection [WORD] (_ADR) */
  
@@ -1927,7 +1750,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.TypeSpecificFlags), 0);
              break;
-@@ -938,7 +938,7 @@ RsDoSpiSerialBusDescriptor (
+@@ -947,7 +972,7 @@ RsDoSpiSerialBusDescriptor (
  
          case 5: /* Connection Speed [DWORD] (_SPE) */
  
@@ -1936,7 +1759,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.ConnectionSpeed));
              break;
-@@ -1000,6 +1004,10 @@ RsDoSpiSerialBusDescriptor (
+@@ -1021,6 +1046,10 @@ RsDoSpiSerialBusDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -1947,7 +1770,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
      return (Rnode);
  }
-@@ -1029,6 +1033,10 @@ RsDoUartSerialBusDescriptor (
+@@ -1050,6 +1079,10 @@ RsDoUartSerialBusDescriptor (
      UINT16                  ResSourceLength;
      UINT16                  VendorLength;
      UINT16                  DescriptorSize;
@@ -1958,7 +1781,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
  
-@@ -1078,21 +1078,21 @@ RsDoUartSerialBusDescriptor (
+@@ -1099,21 +1132,21 @@ RsDoUartSerialBusDescriptor (
          {
          case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
  
@@ -1983,7 +1806,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_STOPBITS,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 2, 2);
              break;
-@@ -1106,7 +1106,7 @@ RsDoUartSerialBusDescriptor (
+@@ -1127,7 +1160,7 @@ RsDoUartSerialBusDescriptor (
  
          case 4: /* Endianness [Flag] (_END) */
  
@@ -1992,7 +1815,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateBitField (InitializerOp, ACPI_RESTAG_ENDIANNESS,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TypeSpecificFlags), 7);
              break;
-@@ -1120,21 +1120,21 @@ RsDoUartSerialBusDescriptor (
+@@ -1141,21 +1174,21 @@ RsDoUartSerialBusDescriptor (
  
          case 6: /* Flow Control [Flags] (_FLC) */
  
@@ -2017,7 +1840,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH_TX,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.TxFifoSize));
              break;
-@@ -1192,6 +1197,11 @@ RsDoUartSerialBusDescriptor (
+@@ -1225,6 +1258,11 @@ RsDoUartSerialBusDescriptor (
          InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
      }
  
@@ -2029,10 +1852,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2s.c.debian-big_endian
      MpSaveSerialInfo (Info->MappingOp, Descriptor, ResourceSource);
      return (Rnode);
  }
-diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian acpica-unix2-20140424/source/compiler/aslrestype2w.c
---- acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian	2014-04-24 11:49:00.000000000 -0400
-+++ acpica-unix2-20140424/source/compiler/aslrestype2w.c	2014-06-06 20:43:34.721825238 -0400
-@@ -81,6 +87,12 @@ RsDoWordIoDescriptor (
+Index: acpica-unix2-20170224/source/compiler/aslrestype2w.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslrestype2w.c
++++ acpica-unix2-20170224/source/compiler/aslrestype2w.c
+@@ -81,6 +81,12 @@ RsDoWordIoDescriptor (
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
      UINT32                  OptionIndex = 0;
@@ -2045,7 +1869,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -102,8 +101,7 @@ RsDoWordIoDescriptor (
+@@ -102,8 +108,7 @@ RsDoWordIoDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
@@ -2055,7 +1879,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -147,7 +147,7 @@ RsDoWordIoDescriptor (
+@@ -147,7 +152,7 @@ RsDoWordIoDescriptor (
  
          case 5: /* Address Granularity */
  
@@ -2064,7 +1888,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
              GranOp = InitializerOp;
-@@ -155,7 +155,7 @@ RsDoWordIoDescriptor (
+@@ -155,7 +160,7 @@ RsDoWordIoDescriptor (
  
          case 6: /* Address Min */
  
@@ -2073,7 +1897,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
              MinOp = InitializerOp;
-@@ -163,7 +163,7 @@ RsDoWordIoDescriptor (
+@@ -163,7 +168,7 @@ RsDoWordIoDescriptor (
  
          case 7: /* Address Max */
  
@@ -2082,7 +1906,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
              MaxOp = InitializerOp;
-@@ -171,14 +171,14 @@ RsDoWordIoDescriptor (
+@@ -171,14 +176,14 @@ RsDoWordIoDescriptor (
  
          case 8: /* Translation Offset */
  
@@ -2099,7 +1923,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
                   CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
              LengthOp = InitializerOp;
-@@ -190,7 +190,7 @@ RsDoWordIoDescriptor (
+@@ -190,7 +195,7 @@ RsDoWordIoDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -2108,7 +1932,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -202,8 +201,7 @@ RsDoWordIoDescriptor (
+@@ -202,8 +207,7 @@ RsDoWordIoDescriptor (
              {
                  if (StringLength)
                  {
@@ -2118,7 +1942,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -263,13 +270,20 @@ RsDoWordIoDescriptor (
+@@ -263,13 +267,20 @@ RsDoWordIoDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -2143,7 +1967,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
          OptionIndex + StringLength;
      return (Rnode);
-@@ -302,6 +308,12 @@ RsDoWordBusNumberDescriptor (
+@@ -302,6 +313,12 @@ RsDoWordBusNumberDescriptor (
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
      UINT32                  OptionIndex = 0;
@@ -2156,7 +1980,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -323,8 +322,7 @@ RsDoWordBusNumberDescriptor (
+@@ -323,8 +340,7 @@ RsDoWordBusNumberDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
@@ -2166,7 +1990,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -361,8 +360,7 @@ RsDoWordBusNumberDescriptor (
+@@ -361,8 +377,7 @@ RsDoWordBusNumberDescriptor (
  
          case 4: /* Address Granularity */
  
@@ -2176,7 +2000,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
              GranOp = InitializerOp;
-@@ -370,8 +369,7 @@ RsDoWordBusNumberDescriptor (
+@@ -370,8 +385,7 @@ RsDoWordBusNumberDescriptor (
  
          case 5: /* Min Address */
  
@@ -2186,7 +2010,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
              MinOp = InitializerOp;
-@@ -379,8 +378,7 @@ RsDoWordBusNumberDescriptor (
+@@ -379,8 +393,7 @@ RsDoWordBusNumberDescriptor (
  
          case 6: /* Max Address */
  
@@ -2196,7 +2020,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
              MaxOp = InitializerOp;
-@@ -388,16 +386,14 @@ RsDoWordBusNumberDescriptor (
+@@ -388,16 +401,14 @@ RsDoWordBusNumberDescriptor (
  
          case 7: /* Translation Offset */
  
@@ -2215,7 +2039,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
                   CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
              LengthOp = InitializerOp;
-@@ -409,7 +409,7 @@ RsDoWordBusNumberDescriptor (
+@@ -409,7 +420,7 @@ RsDoWordBusNumberDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -2224,7 +2048,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -421,8 +420,7 @@ RsDoWordBusNumberDescriptor (
+@@ -421,8 +432,7 @@ RsDoWordBusNumberDescriptor (
              {
                  if (StringLength)
                  {
@@ -2234,7 +2058,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -468,13 +475,20 @@ RsDoWordBusNumberDescriptor (
+@@ -468,13 +478,20 @@ RsDoWordBusNumberDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -2259,7 +2083,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
          OptionIndex + StringLength;
      return (Rnode);
-@@ -507,6 +513,12 @@ RsDoWordSpaceDescriptor (
+@@ -507,6 +524,12 @@ RsDoWordSpaceDescriptor (
      UINT8                   *OptionalFields;
      UINT16                  StringLength = 0;
      UINT32                  OptionIndex = 0;
@@ -2272,7 +2096,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      UINT32                  CurrentByteOffset;
      UINT32                  i;
      BOOLEAN                 ResSourceIndex = FALSE;
-@@ -527,8 +526,7 @@ RsDoWordSpaceDescriptor (
+@@ -527,8 +550,7 @@ RsDoWordSpaceDescriptor (
       * optional fields present
       */
      OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
@@ -2282,7 +2106,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
           sizeof (AML_RESOURCE_LARGE_HEADER));
  
      /* Process all child initialization nodes */
-@@ -577,8 +576,7 @@ RsDoWordSpaceDescriptor (
+@@ -577,8 +599,7 @@ RsDoWordSpaceDescriptor (
  
          case 6: /* Address Granularity */
  
@@ -2292,7 +2116,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
              GranOp = InitializerOp;
-@@ -586,8 +585,7 @@ RsDoWordSpaceDescriptor (
+@@ -586,8 +607,7 @@ RsDoWordSpaceDescriptor (
  
          case 7: /* Min Address */
  
@@ -2302,7 +2126,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
              MinOp = InitializerOp;
-@@ -595,8 +594,7 @@ RsDoWordSpaceDescriptor (
+@@ -595,8 +615,7 @@ RsDoWordSpaceDescriptor (
  
          case 8: /* Max Address */
  
@@ -2312,7 +2136,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
              MaxOp = InitializerOp;
-@@ -604,16 +602,14 @@ RsDoWordSpaceDescriptor (
+@@ -604,16 +623,14 @@ RsDoWordSpaceDescriptor (
  
          case 9: /* Translation Offset */
  
@@ -2331,7 +2155,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
              RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
              LengthOp = InitializerOp;
-@@ -625,7 +625,7 @@ RsDoWordSpaceDescriptor (
+@@ -625,7 +642,7 @@ RsDoWordSpaceDescriptor (
              {
                  OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                  OptionIndex++;
@@ -2340,7 +2164,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
                  ResSourceIndex = TRUE;
              }
              break;
-@@ -637,8 +636,7 @@ RsDoWordSpaceDescriptor (
+@@ -637,8 +654,7 @@ RsDoWordSpaceDescriptor (
              {
                  if (StringLength)
                  {
@@ -2350,7 +2174,7 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
  
                      strcpy ((char *)
                          &OptionalFields[OptionIndex],
-@@ -684,13 +691,20 @@ RsDoWordSpaceDescriptor (
+@@ -684,13 +700,20 @@ RsDoWordSpaceDescriptor (
      /* Validate the Min/Max/Len/Gran values */
  
      RsLargeAddressCheck (
@@ -2375,10 +2199,11 @@ diff -up acpica-unix2-20140424/source/compiler/aslrestype2w.c.debian-big_endian
      Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
          OptionIndex + StringLength;
      return (Rnode);
-diff -up acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian acpica-unix2-20140424/source/include/acmacros.h
---- acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian	2014-04-24 11:49:05.000000000 -0400
-+++ acpica-unix2-20140424/source/include/acmacros.h	2014-06-06 20:43:34.721825238 -0400
-@@ -111,7 +111,8 @@
+Index: acpica-unix2-20170224/source/include/acmacros.h
+===================================================================
+--- acpica-unix2-20170224.orig/source/include/acmacros.h
++++ acpica-unix2-20170224/source/include/acmacros.h
+@@ -100,7 +100,8 @@
  
  /* 32-bit source, 16/32/64 destination */
  
@@ -2388,7 +2213,7 @@ diff -up acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian acpic
  
  #define ACPI_MOVE_32_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
                                           ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
-@@ -126,9 +127,13 @@
+@@ -115,9 +116,13 @@
  
  /* 64-bit source, 16/32/64 destination */
  
@@ -2404,7 +2229,7 @@ diff -up acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian acpic
  
  #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
                                           ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
-@@ -155,7 +160,9 @@
+@@ -144,7 +149,9 @@
  
  /* 32-bit source, 16/32/64 destination */
  
@@ -2415,35 +2240,15 @@ diff -up acpica-unix2-20140424/source/include/acmacros.h.debian-big_endian acpic
  #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)
  
-diff -up acpica-unix2-20140424/source/include/platform/aclinux.h.debian-big_endian acpica-unix2-20140424/source/include/platform/aclinux.h
---- acpica-unix2-20140424/source/include/platform/aclinux.h.debian-big_endian	2014-04-24 11:49:06.000000000 -0400
-+++ acpica-unix2-20140424/source/include/platform/aclinux.h	2014-06-06 20:44:28.781825238 -0400
-@@ -167,6 +167,7 @@
- #include <stdlib.h>
- #include <ctype.h>
+Index: acpica-unix2-20170224/source/include/platform/aclinux.h
+===================================================================
+--- acpica-unix2-20170224.orig/source/include/platform/aclinux.h
++++ acpica-unix2-20170224/source/include/platform/aclinux.h
+@@ -185,6 +185,7 @@
+ 
+ #ifdef ACPI_USE_STANDARD_HEADERS
  #include <unistd.h>
 +#include <endian.h>
- 
- /* Define/disable kernel-specific declarators */
- 
-@@ -179,8 +180,7 @@
- #define ACPI_FLUSH_CPU_CACHE()
- #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread))
- 
--#if defined(__ia64__)    || defined(__x86_64__) ||\
--    defined(__aarch64__) || defined(__PPC64__)
-+#if __SIZEOF_LONG__ == 8
- #define ACPI_MACHINE_WIDTH          64
- #define COMPILER_DEPENDENT_INT64    long
- #define COMPILER_DEPENDENT_UINT64   unsigned long
-@@ -191,6 +191,10 @@
- #define ACPI_USE_NATIVE_DIVIDE
  #endif
  
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#define ACPI_BIG_ENDIAN
-+#endif
-+
- #ifndef __cdecl
- #define __cdecl
- #endif
+ /* Define/disable kernel-specific declarators */
diff --git a/debian-unaligned.patch b/debian-unaligned.patch
index a042148..e6de0bd 100644
--- a/debian-unaligned.patch
+++ b/debian-unaligned.patch
@@ -1,4 +1,7 @@
 Patch carried over from the prior iasl package and updated.  This allows
+
+From: Al Stone <ahs3 at redhat.com>
+
 for builds on systems requiring aligned memory access. Please see
 http://lists.acpica.org/pipermail/devel/2010-July/000159.html.  Resolves
 BZ#865013 and BZ#856856.
@@ -10,17 +13,17 @@ Also fix callsites where wrong assumptions where made in terms of aligment.
 Signed-off-by: Mattia Dongili <malattia at linux.it>
 Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
 ---
- source/compiler/asltree.c             | 15 ++++++++++-----
- source/components/executer/exoparg2.c | 12 +++++++++---
- source/include/actypes.h              | 26 +++++++++++++-------------
- 3 file modificati, 32 inserzioni(+), 21 rimozioni(-)
+ source/compiler/asltree.c             |   15 ++++++++++-----
+ source/components/executer/exoparg2.c |   12 +++++++++---
+ source/include/actypes.h              |   26 +++++++++++++-------------
+ 3 files changed, 32 insertions(+), 21 deletions(-)
 
-diff --git a/source/compiler/asltree.c b/source/compiler/asltree.c
-index ebf87f3..fd859d7 100644
---- a/source/compiler/asltree.c
-+++ b/source/compiler/asltree.c
-@@ -782,28 +592,31 @@ TrCreateValuedLeafNode (
-         "\nCreateValuedLeafNode  Ln/Col %u/%u NewNode %p  Op %s  Value %8.8X%8.8X  ",
+Index: acpica-unix2-20170224/source/compiler/asltree.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/asltree.c
++++ acpica-unix2-20170224/source/compiler/asltree.c
+@@ -998,28 +998,31 @@ TrCreateValuedLeafNode (
+         "Op %s  Value %8.8X%8.8X  ",
          Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
          ACPI_FORMAT_UINT64 (Value));
 -    Op->Asl.Value.Integer = Value;
@@ -28,53 +31,54 @@ index ebf87f3..fd859d7 100644
      switch (ParseOpcode)
      {
      case PARSEOP_STRING_LITERAL:
-
+ 
 -        DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
 +        Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
 +        DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Op->Asl.Value.String);
          break;
  
      case PARSEOP_NAMESEG:
-
+ 
 -        DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
 +        Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
 +        DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Op->Asl.Value.String);
          break;
  
      case PARSEOP_NAMESTRING:
-
+ 
 -        DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
 +        Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
 +        DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Op->Asl.Value.String);
          break;
  
      case PARSEOP_EISAID:
-
+ 
 -        DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
 +        Op->Asl.Value.String = (ACPI_STRING) (ACPI_SIZE) Value;
 +        DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Op->Asl.Value.String);
          break;
  
      case PARSEOP_METHOD:
-@@ -813,11 +622,13 @@ TrCreateValuedLeafNode (
+@@ -1029,12 +1032,14 @@ TrCreateValuedLeafNode (
  
      case PARSEOP_INTEGER:
-
+ 
 +        Op->Asl.Value.Integer = Value;
-         DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
+         DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
+             ACPI_FORMAT_UINT64 (Value));
          break;
  
      default:
-
+ 
 +        Op->Asl.Value.Integer = Value;
          break;
      }
  
-diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
-index e55f40c..ed5b1fd 100644
---- a/source/components/executer/exoparg2.c
-+++ b/source/components/executer/exoparg2.c
-@@ -172,6 +176,8 @@ AcpiExOpcode_2A_2T_1R (
+Index: acpica-unix2-20170224/source/components/executer/exoparg2.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/executer/exoparg2.c
++++ acpica-unix2-20170224/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;
      ACPI_OPERAND_OBJECT     *ReturnDesc2 = NULL;
@@ -83,20 +87,20 @@ index e55f40c..ed5b1fd 100644
      ACPI_STATUS             Status;
  
  
-@@ -205,8 +211,10 @@ AcpiExOpcode_2A_2T_1R (
- 
-         Status = AcpiUtDivide (Operand[0]->Integer.Value,
-                                Operand[1]->Integer.Value,
--                               &ReturnDesc1->Integer.Value,
--                               &ReturnDesc2->Integer.Value);
-+                               &ReturnValue1, &ReturnValue2);
+@@ -206,8 +208,10 @@ AcpiExOpcode_2A_2T_1R (
+         Status = AcpiUtDivide (
+             Operand[0]->Integer.Value,
+             Operand[1]->Integer.Value,
+-            &ReturnDesc1->Integer.Value,
+-            &ReturnDesc2->Integer.Value);
++            &ReturnValue1, &ReturnValue2);
 +        ReturnDesc1->Integer.Value = ReturnValue1;
 +        ReturnDesc2->Integer.Value = ReturnValue2;
 +
          if (ACPI_FAILURE (Status))
          {
              goto Cleanup;
-@@ -280,6 +285,7 @@ AcpiExOpcode_2A_1T_1R (
+@@ -282,6 +286,7 @@ AcpiExOpcode_2A_1T_1R (
      ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
      ACPI_OPERAND_OBJECT     *ReturnDesc = NULL;
      UINT64                  Index;
@@ -104,21 +108,21 @@ index e55f40c..ed5b1fd 100644
      ACPI_STATUS             Status = AE_OK;
      ACPI_SIZE               Length = 0;
  
-@@ -323,7 +333,8 @@ AcpiExOpcode_2A_1T_1R (
-         Status = AcpiUtDivide (Operand[0]->Integer.Value,
-                                Operand[1]->Integer.Value,
-                                NULL,
--                               &ReturnDesc->Integer.Value);
-+                               &ReturnValue);
+@@ -327,7 +332,8 @@ AcpiExOpcode_2A_1T_1R (
+             Operand[0]->Integer.Value,
+             Operand[1]->Integer.Value,
+             NULL,
+-            &ReturnDesc->Integer.Value);
++            &ReturnValue);
 +        ReturnDesc->Integer.Value = ReturnValue;
          break;
  
-     case AML_CONCAT_OP: /* Concatenate (Data1, Data2, Result) */
-diff --git a/source/include/actypes.h b/source/include/actypes.h
-index 07fb7d5..08bdf2f 100644
---- a/source/include/actypes.h
-+++ b/source/include/actypes.h
-@@ -143,6 +156,19 @@ typedef COMPILER_DEPENDENT_INT64        INT64;
+     case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */
+Index: acpica-unix2-20170224/source/include/actypes.h
+===================================================================
+--- acpica-unix2-20170224.orig/source/include/actypes.h
++++ acpica-unix2-20170224/source/include/actypes.h
+@@ -143,6 +143,19 @@ typedef COMPILER_DEPENDENT_INT64
   */
  #define ACPI_THREAD_ID                  UINT64
  
@@ -138,7 +142,7 @@ index 07fb7d5..08bdf2f 100644
  
  /*******************************************************************************
   *
-@@ -169,19 +182,6 @@ typedef UINT64                          ACPI_PHYSICAL_ADDRESS;
+@@ -169,19 +182,6 @@ typedef UINT64
  #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
  #define ACPI_USE_NATIVE_DIVIDE          /* Has native 64-bit integer support */
  
@@ -158,6 +162,3 @@ index 07fb7d5..08bdf2f 100644
  
  /*******************************************************************************
   *
--- 
-1.7.12.1
-
diff --git a/free.patch b/free.patch
new file mode 100644
index 0000000..03488fc
--- /dev/null
+++ b/free.patch
@@ -0,0 +1,15 @@
+This prevents a segfault when an Include file does not exist.
+
+Index: acpica-unix2-20161222/source/compiler/aslfiles.c
+===================================================================
+--- acpica-unix2-20161222.orig/source/compiler/aslfiles.c
++++ acpica-unix2-20161222/source/compiler/aslfiles.c
+@@ -319,7 +319,7 @@ FlOpenIncludeWithPrefix (
+     if (!IncludeFile)
+     {
+         fprintf (stderr, "Could not open include file %s\n", Pathname);
+-        ACPI_FREE (Pathname);
++        /* ACPI_FREE (Pathname); <-- forces free() segfault */
+         return (NULL);
+     }
+ 
diff --git a/iasl.1 b/iasl.1
new file mode 100644
index 0000000..1938c7b
--- /dev/null
+++ b/iasl.1
@@ -0,0 +1,231 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH IASL 1 "January 23, 2013"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+iasl \- ACPI Source Language compiler/decompiler
+.SH SYNOPSIS
+.B iasl
+.RI [ <option> ... ]
+.RI <input-file>
+.B ...
+.SH DESCRIPTION
+This manual page briefly documents the
+.B iasl
+command. The option list is taken from the iasl interactive help.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+.B iasl
+is an ASL compiler and decompiler.  This command provides both the ability
+to translate one or more ASL source files to their corresponding AML binary
+files, and the ability to translate AML binary files back to readable
+ASL source.
+.PP
+Much more detailed documentation may be found at
+http://www.acpica.org/documentation/.
+
+.SH OPTIONS
+
+.PP
+.SS Global
+.TP
+.B \-@ <file>
+Specify command file
+.TP
+.B \-I <dir>
+Specify additional include directory
+.TP
+.B \-T <sig>|ALL|*
+Create table template file for ACPI <sig>
+.TP
+.B \-v
+Display compiler version
+
+.PP
+.SS Preprocessor
+.TP
+.B \-D <symbol>
+Define sybol for preprocessor use
+.TP
+.B \-li
+Create prepocessed output file (*.i)
+.TP
+.B \-P
+Preprocess only and create preprocessor output file (*.i)
+.TP
+.B \-Pn
+Disable preprocessor
+
+.PP
+.SS General Output
+.TP
+.B \-p <prefix>
+Specify path/filename prefix for all output files
+.TP
+.B \-va
+Disable all errors and warnings (summary only)
+.TP
+.B \-vi
+Less verbose errors and warnings for use with IDEs
+.TP
+.B \-vo
+Enable optimization comments
+.TP
+.B \-vr
+Disable remarks
+.TP
+.B \-vs
+Disable signon
+.TP
+.B \-w{1|2|3}
+Set warning reporting level
+.TP
+.B \-we
+Report warnings as errors
+
+.PP
+.SS AML and Data Output Files
+.TP
+.B \-s{a|c}
+Create assembler or C source file (*.asm or *.c)
+.TP
+.B \-i{a|c}
+Create assembler or C include file (*.inc or *.h)
+.TP
+.B \-t{a|c|s}
+Create assembler, C, or ASL hex table (*.hex)
+
+.PP
+.SS AML Code Generation
+.TP
+.B \-oa
+Disable all optimizations (compatibility mode)
+.TP
+.B \-of
+Disable constant folding
+.TP
+.B \-oi
+Disable integer optimization to Zero/One/Ones
+.TP
+.B \-on
+Disable named reference string optimization
+.TP
+.B \-cr
+Disable Resource Descriptor error checking
+.TP
+.B \-in
+Ignore NoOp operators
+.TP
+.B \-r <revision>
+Override table header Revision (1-255)
+
+.PP
+.SS ASL Listing Files
+.TP
+.B \-l
+Create mixed listing file (ASL source and AML) (*.lst)
+.TP
+.B \-ln
+Create namespace file (*.nsp)
+.TP
+.B \-ls
+Create combined source file (expanded includes) (*.src)
+
+.PP
+.SS ACPI Data Tables
+.TP
+.B \-G
+Compile custom table containing generic operators
+.TP
+.B \-vt
+Create verbose templates (full disassembly)
+
+.PP
+.SS AML Disassembler
+.TP
+.B \-d [<file>]
+Disassemble AML to ASL source code file (*.dsl)
+.TP
+.B \-da [<file1>,<file2>]
+Disassemble multiple tables from single namespace
+.TP
+.B \-db
+Do not translate Buffers to Resource Templates
+.TP
+.B \-dc [<file>]
+Disassemble AML and immediately compile it
+.br
+(Obtain DSDT from current system if no input file)
+.TP
+.B \-e [<file1>,<file2>]
+Include ACPI table(s) for external symbol resolution
+.TP
+.B \-g
+Get ACPI tables and write to files (*.dat)
+.TP
+.B \-in
+Ignore NoOp opcodes
+.TP
+.B \-vt
+Dump binary table date in hex format within output file
+
+.PP
+.SS Help
+.TP
+.B \-h
+Additional help and compiler debug options
+.TP
+.B \-hc
+Display operators allowed in constant expressions
+.TP
+.B \-hf
+Display help for output file name generation
+.TP
+.B \-hr
+Display ACPI reserved method names
+.TP
+.B \-ht
+Display currently supported ACPI table names
+
+.PP
+.SS Debug
+.TP
+.B \-b{f|t}
+Create debug file (full or parse tree only) (*.txt)
+.TP
+.B \-f
+Ignore errors, force creation of AML output file(s)
+.TP
+.B \-n
+Parse only, no output generation
+.TP
+.B \-ot
+Display compiles times and statistics
+.TP
+.B \-x <level>
+Set debug level for trace output
+.TP
+.B \-z
+Do not insert new compiler ID for DataTables
+
+.SH AUTHOR
+iasl was written by Robert Moore <robert.moore at intel.com>.
+.PP
+This manual page was written by Mattia Dongili <malattia at debian.org>,
+for the Debian project (but may be used by others).  It was updated for
+the Fedora project by Al Stone <ahs3 at redhat.com> (and may also be used
+by others).
diff --git a/int-format.patch b/int-format.patch
new file mode 100644
index 0000000..3d94243
--- /dev/null
+++ b/int-format.patch
@@ -0,0 +1,343 @@
+Use proper integer formatting
+
+From: Al Stone <ahs3 at redhat.com>
+
+
+---
+ source/compiler/aslcompile.c            |    2 +-
+ source/compiler/aslerror.c              |    4 ++--
+ source/compiler/aslopt.c                |    2 +-
+ source/compiler/aslpredef.c             |    2 +-
+ source/compiler/aslprepkg.c             |    2 +-
+ source/components/debugger/dbexec.c     |    2 +-
+ source/components/dispatcher/dsmthdat.c |    4 ++--
+ source/components/dispatcher/dsutils.c  |    2 +-
+ source/components/dispatcher/dswscope.c |    4 ++--
+ source/components/events/evgpe.c        |    4 ++--
+ source/components/executer/exdump.c     |    2 +-
+ source/components/executer/exfldio.c    |    4 ++--
+ source/components/executer/exnames.c    |    4 ++--
+ source/components/hardware/hwregs.c     |    2 +-
+ source/components/tables/tbfadt.c       |    6 +++---
+ source/components/tables/tbxfroot.c     |    6 +++---
+ source/components/utilities/utownerid.c |    2 +-
+ source/tools/acpiexec/aemain.c          |    2 +-
+ 18 files changed, 28 insertions(+), 28 deletions(-)
+
+Index: acpica-unix2-20170224/source/compiler/aslcompile.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslcompile.c
++++ acpica-unix2-20170224/source/compiler/aslcompile.c
+@@ -750,7 +750,7 @@ CmCleanupAndExit (
+ 
+     if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
+     {
+-        printf ("\nMaximum error count (%u) exceeded\n",
++        printf ("\nMaximum error count (%d) exceeded\n",
+             ASL_MAX_ERROR_COUNT);
+     }
+ 
+Index: acpica-unix2-20170224/source/compiler/aslerror.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslerror.c
++++ acpica-unix2-20170224/source/compiler/aslerror.c
+@@ -687,7 +687,7 @@ AslCommonError (
+     Gbl_ExceptionCount[Level]++;
+     if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
+     {
+-        printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
++        printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT);
+ 
+         Gbl_SourceLine = 0;
+         Gbl_NextError = Gbl_ErrorLog;
+@@ -733,7 +733,7 @@ AslDisableException (
+ 
+     if (Gbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
+     {
+-        printf ("Too many messages have been disabled (max %u)\n",
++        printf ("Too many messages have been disabled (max %d)\n",
+             ASL_MAX_DISABLED_MESSAGES);
+         return (AE_LIMIT);
+     }
+Index: acpica-unix2-20170224/source/compiler/aslopt.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslopt.c
++++ acpica-unix2-20170224/source/compiler/aslopt.c
+@@ -584,7 +584,7 @@ OptOptimizeNamePath (
+     }
+ 
+     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
+-        "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ",
++        "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ",
+         Op->Asl.LogicalLineNumber,
+         AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode),
+         AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
+Index: acpica-unix2-20170224/source/compiler/aslpredef.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslpredef.c
++++ acpica-unix2-20170224/source/compiler/aslpredef.c
+@@ -114,7 +114,7 @@ ApCheckForPredefinedMethod (
+ 
+         if (MethodInfo->NumArguments != 0)
+         {
+-            sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
++            sprintf (MsgBuffer, "%s requires %d", Op->Asl.ExternalName, 0);
+ 
+             AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
+                 MsgBuffer);
+Index: acpica-unix2-20170224/source/compiler/aslprepkg.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/compiler/aslprepkg.c
++++ acpica-unix2-20170224/source/compiler/aslprepkg.c
+@@ -309,7 +309,7 @@ ApCheckPackage (
+ 
+         if (Count & 1)
+         {
+-            sprintf (MsgBuffer, "%4.4s: Package length, %d, must be even.",
++            sprintf (MsgBuffer, "%4.4s: Package length, %u, must be even.",
+                 Predefined->Info.Name, Count);
+ 
+             AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
+Index: acpica-unix2-20170224/source/components/debugger/dbexec.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/debugger/dbexec.c
++++ acpica-unix2-20170224/source/components/debugger/dbexec.c
+@@ -214,7 +214,7 @@ AcpiDbExecuteMethod (
+             ACPI_ERROR ((AE_INFO,
+                 "Possible overflow of internal debugger "
+                 "buffer (size 0x%X needed 0x%X)",
+-                ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
++                (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
+         }
+     }
+ 
+Index: acpica-unix2-20170224/source/components/dispatcher/dsmthdat.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/dispatcher/dsmthdat.c
++++ acpica-unix2-20170224/source/components/dispatcher/dsmthdat.c
+@@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
+         if (Index > ACPI_METHOD_MAX_LOCAL)
+         {
+             ACPI_ERROR ((AE_INFO,
+-                "Local index %u is invalid (max %u)",
++                "Local index %u is invalid (max %d)",
+                 Index, ACPI_METHOD_MAX_LOCAL));
+             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
+         }
+@@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
+         if (Index > ACPI_METHOD_MAX_ARG)
+         {
+             ACPI_ERROR ((AE_INFO,
+-                "Arg index %u is invalid (max %u)",
++                "Arg index %u is invalid (max %d)",
+                 Index, ACPI_METHOD_MAX_ARG));
+             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
+         }
+Index: acpica-unix2-20170224/source/components/dispatcher/dsutils.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/dispatcher/dsutils.c
++++ acpica-unix2-20170224/source/components/dispatcher/dsutils.c
+@@ -793,7 +793,7 @@ AcpiDsCreateOperands (
+     }
+ 
+     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+-        "NumOperands %d, ArgCount %d, Index %d\n",
++        "NumOperands %d, ArgCount %u, Index %u\n",
+         WalkState->NumOperands, ArgCount, Index));
+ 
+     /* Create the interpreter arguments, in reverse order */
+Index: acpica-unix2-20170224/source/components/dispatcher/dswscope.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/dispatcher/dswscope.c
++++ acpica-unix2-20170224/source/components/dispatcher/dswscope.c
+@@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
+     WalkState->ScopeDepth++;
+ 
+     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+-        "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
++        "[%.2d] Pushed scope ", WalkState->ScopeDepth));
+ 
+     OldScopeInfo = WalkState->ScopeInfo;
+     if (OldScopeInfo)
+@@ -212,7 +212,7 @@ AcpiDsScopeStackPop (
+     WalkState->ScopeDepth--;
+ 
+     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+-        "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
++        "[%.2u] Popped scope [%4.4s] (%s), New scope -> ",
+         (UINT32) WalkState->ScopeDepth,
+         AcpiUtGetNodeName (ScopeInfo->Scope.Node),
+         AcpiUtGetTypeName (ScopeInfo->Common.Value)));
+Index: acpica-unix2-20170224/source/components/events/evgpe.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/events/evgpe.c
++++ acpica-unix2-20170224/source/components/events/evgpe.c
+@@ -494,7 +494,7 @@ AcpiEvGpeDetect (
+                     "Ignore disabled registers for GPE %02X-%02X: "
+                     "RunEnable=%02X, WakeEnable=%02X\n",
+                     GpeRegisterInfo->BaseGpeNumber,
+-                    GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
++                    (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
+                     GpeRegisterInfo->EnableForRun,
+                     GpeRegisterInfo->EnableForWake));
+                 continue;
+@@ -520,7 +520,7 @@ AcpiEvGpeDetect (
+                 "Read registers for GPE %02X-%02X: Status=%02X, Enable=%02X, "
+                 "RunEnable=%02X, WakeEnable=%02X\n",
+                 GpeRegisterInfo->BaseGpeNumber,
+-                GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
++                (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
+                 StatusReg, EnableReg,
+                 GpeRegisterInfo->EnableForRun,
+                 GpeRegisterInfo->EnableForWake));
+Index: acpica-unix2-20170224/source/components/executer/exdump.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/executer/exdump.c
++++ acpica-unix2-20170224/source/components/executer/exdump.c
+@@ -668,7 +668,7 @@ AcpiExDumpOperand (
+     if (Depth > 0)
+     {
+         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
+-            Depth, " ", Depth, ObjDesc));
++            (int) Depth, " ", Depth, ObjDesc));
+     }
+     else
+     {
+Index: acpica-unix2-20170224/source/components/executer/exfldio.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/executer/exfldio.c
++++ acpica-unix2-20170224/source/components/executer/exfldio.c
+@@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
+ 
+             ACPI_ERROR ((AE_INFO,
+                 "Unknown UpdateRule value: 0x%X",
+-                (ObjDesc->CommonField.FieldFlags &
+-                    AML_FIELD_UPDATE_RULE_MASK)));
++                (unsigned int) (ObjDesc->CommonField.FieldFlags &
++                                   AML_FIELD_UPDATE_RULE_MASK)));
+             return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
+         }
+     }
+Index: acpica-unix2-20170224/source/components/executer/exnames.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/executer/exnames.c
++++ acpica-unix2-20170224/source/components/executer/exnames.c
+@@ -240,7 +240,7 @@ AcpiExNameSegment (
+          */
+         ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+             "Leading character is not alpha: %02Xh (not a name)\n",
+-            CharBuf[0]));
++            (unsigned int) CharBuf[0]));
+         Status = AE_CTRL_PENDING;
+     }
+     else
+@@ -252,7 +252,7 @@ AcpiExNameSegment (
+         Status = AE_AML_BAD_NAME;
+         ACPI_ERROR ((AE_INFO,
+             "Bad character 0x%02x in name, at %p",
+-            *AmlAddress, AmlAddress));
++            (unsigned int) (*AmlAddress), AmlAddress));
+     }
+ 
+     *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
+Index: acpica-unix2-20170224/source/components/hardware/hwregs.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/hardware/hwregs.c
++++ acpica-unix2-20170224/source/components/hardware/hwregs.c
+@@ -464,7 +464,7 @@ AcpiHwClearAcpiStatus (
+ 
+ 
+     ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
+-        ACPI_BITMASK_ALL_FIXED_STATUS,
++        (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS,
+         ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
+ 
+     LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
+Index: acpica-unix2-20170224/source/components/tables/tbfadt.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/tables/tbfadt.c
++++ acpica-unix2-20170224/source/components/tables/tbfadt.c
+@@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
+         if (!(Flags & ACPI_FADT_GPE_REGISTER))
+         {
+             ACPI_ERROR ((AE_INFO,
+-                "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
++                "%s - 32-bit FADT register is too long (%u bytes, %d bits) "
+                 "to convert to GAS struct - 255 bits max, truncating",
+                 RegisterName, ByteWidth, (ByteWidth * 8)));
+         }
+@@ -304,7 +304,7 @@ AcpiTbSelectAddress (
+ 
+         ACPI_BIOS_WARNING ((AE_INFO,
+             "32/64X %s address mismatch in FADT: "
+-            "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
++            "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
+             RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64),
+             AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
+ 
+@@ -620,7 +620,7 @@ AcpiTbConvertFadt (
+ 
+                     ACPI_BIOS_WARNING ((AE_INFO,
+                         "32/64X address mismatch in FADT/%s: "
+-                        "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
++                        "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
+                         Name, Address32,
+                         ACPI_FORMAT_UINT64 (Address64->Address),
+                         AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
+Index: acpica-unix2-20170224/source/components/tables/tbxfroot.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/tables/tbxfroot.c
++++ acpica-unix2-20170224/source/components/tables/tbxfroot.c
+@@ -177,7 +177,7 @@ AcpiFindRootPointer (
+     {
+         ACPI_ERROR ((AE_INFO,
+             "Could not map memory at 0x%8.8X for length %u",
+-            ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
++            (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH));
+ 
+         return_ACPI_STATUS (AE_NO_MEMORY);
+     }
+@@ -204,7 +204,7 @@ AcpiFindRootPointer (
+         {
+             ACPI_ERROR ((AE_INFO,
+                 "Could not map memory at 0x%8.8X for length %u",
+-                PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
++                PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
+ 
+             return_ACPI_STATUS (AE_NO_MEMORY);
+         }
+@@ -236,7 +236,7 @@ AcpiFindRootPointer (
+     {
+         ACPI_ERROR ((AE_INFO,
+             "Could not map memory at 0x%8.8X for length %u",
+-            ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
++            (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE));
+ 
+         return_ACPI_STATUS (AE_NO_MEMORY);
+     }
+Index: acpica-unix2-20170224/source/components/utilities/utownerid.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/components/utilities/utownerid.c
++++ acpica-unix2-20170224/source/components/utilities/utownerid.c
+@@ -231,7 +231,7 @@ AcpiUtReleaseOwnerId (
+     else
+     {
+         ACPI_ERROR ((AE_INFO,
+-            "Release of non-allocated OwnerId: 0x%2.2X", OwnerId + 1));
++            "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
+     }
+ 
+     (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
+Index: acpica-unix2-20170224/source/tools/acpiexec/aemain.c
+===================================================================
+--- acpica-unix2-20170224.orig/source/tools/acpiexec/aemain.c
++++ acpica-unix2-20170224/source/tools/acpiexec/aemain.c
+@@ -203,7 +203,7 @@ AeDoOptions (
+ 
+         if (strlen (AcpiGbl_Optarg) > (AE_BUFFER_SIZE -1))
+         {
+-            printf ("**** The length of command line (%u) exceeded maximum (%u)\n",
++            printf ("**** The length of command line (%u) exceeded maximum (%d)\n",
+                 (UINT32) strlen (AcpiGbl_Optarg), (AE_BUFFER_SIZE -1));
+             return (-1);
+         }
diff --git a/name-miscompare.patch b/name-miscompare.patch
index c7b136f..bdaa5c2 100644
--- a/name-miscompare.patch
+++ b/name-miscompare.patch
@@ -1,13 +1,20 @@
 On big-endian machines, a test case looking for the methods _L1D and _E1D
+
+From: Al Stone <ahs3 at redhat.com>
+
 in the same scope would fail (see tests/misc/badcode.asl:184).  The names
 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.
+---
+ source/compiler/aslanalyze.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff -urN acpica-unix2-20130214/source/compiler/aslanalyze.c acpica-unix2-20130214-names/source/compiler/aslanalyze.c
---- acpica-unix2-20130214/source/compiler/aslanalyze.c	2013-03-21 17:31:25.803324990 -0600
-+++ acpica-unix2-20130214-names/source/compiler/aslanalyze.c	2013-03-21 17:43:45.357616802 -0600
-@@ -445,7 +445,7 @@
+Index: acpica-unix2-20161222/source/compiler/aslanalyze.c
+===================================================================
+--- acpica-unix2-20161222.orig/source/compiler/aslanalyze.c
++++ acpica-unix2-20161222/source/compiler/aslanalyze.c
+@@ -461,7 +461,7 @@ ApCheckForGpeNameConflict (
  
      /* Need a null-terminated string version of NameSeg */
  
@@ -16,7 +23,7 @@ diff -urN acpica-unix2-20130214/source/compiler/aslanalyze.c acpica-unix2-201302
      Name[ACPI_NAME_SIZE] = 0;
  
      /*
-@@ -472,7 +472,7 @@
+@@ -488,7 +488,7 @@ ApCheckForGpeNameConflict (
       * We are now sure we have an _Lxx or _Exx.
       * Create the target name that would cause collision (Flip E/L)
       */
diff --git a/ppc64le.patch b/ppc64le.patch
new file mode 100644
index 0000000..0972149
--- /dev/null
+++ b/ppc64le.patch
@@ -0,0 +1,15 @@
+diff -Naur acpica-unix2-20170119.orig/source/include/platform/aclinux.h acpica-unix2-20170119/source/include/platform/aclinux.h
+--- acpica-unix2-20170119.orig/source/include/platform/aclinux.h	2017-01-30 15:38:53.465753721 -0700
++++ acpica-unix2-20170119/source/include/platform/aclinux.h	2017-01-30 15:42:55.911358257 -0700
+@@ -219,9 +219,11 @@
+ #define __cdecl
+ #endif
+ 
++#if defined(__BIG_ENDIAN__)
+ #if defined(__PPC64__) || defined(__s390x__)
+ #define ACPI_BIG_ENDIAN
+ #endif
++#endif
+ 
+ #endif /* __KERNEL__ */
+ 
diff --git a/re-enable-big-endian.patch b/re-enable-big-endian.patch
index 9c1e86e..7221ee5 100644
--- a/re-enable-big-endian.patch
+++ b/re-enable-big-endian.patch
@@ -1,11 +1,17 @@
 Re-enable use of these tools on big-endian machines.
 
+From: Al Stone <ahs3 at redhat.com>
+
 Al Stone <ahs3 at redhat.com>
+---
+ source/compiler/aslmain.c |   12 ------------
+ 1 file changed, 12 deletions(-)
 
-diff -Naur acpica-unix2-20140424/source/compiler/aslmain.c acpica-unix2-20140424-patch/source/compiler/aslmain.c
---- acpica-unix2-20140424/source/compiler/aslmain.c	2014-04-24 09:48:59.000000000 -0600
-+++ acpica-unix2-20140424-patch/source/compiler/aslmain.c	2014-05-22 12:55:47.634904320 -0600
-@@ -331,18 +319,6 @@
+Index: acpica-unix2-20161222/source/compiler/aslmain.c
+===================================================================
+--- acpica-unix2-20161222.orig/source/compiler/aslmain.c
++++ acpica-unix2-20161222/source/compiler/aslmain.c
+@@ -99,18 +99,6 @@ main (
      int                     ReturnStatus = 0;
  
  
@@ -14,7 +20,7 @@ diff -Naur acpica-unix2-20140424/source/compiler/aslmain.c acpica-unix2-20140424
 -     * be little-endian, and support for big-endian machines needs to
 -     * be implemented.
 -     */
--    if (AcpiIsBigEndianMachine ())
+-    if (UtIsBigEndianMachine ())
 -    {
 -        fprintf (stderr,
 -            "iASL is not currently supported on big-endian machines.\n");
diff --git a/template.patch b/template.patch
new file mode 100644
index 0000000..e8b06f5
--- /dev/null
+++ b/template.patch
@@ -0,0 +1,22 @@
+Add in a needed parameter for a test file template
+
+From: Al Stone <ahs3 at redhat.com>
+
+
+---
+ tests/templates/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: acpica-unix2-20161222/tests/templates/Makefile
+===================================================================
+--- acpica-unix2-20161222.orig/tests/templates/Makefile
++++ acpica-unix2-20161222/tests/templates/Makefile
+@@ -2,7 +2,7 @@
+ PROG= templates
+ 
+ templates :
+-	sh templates.sh
++	sh templates.sh 1
+ 
+ clean :
+ 	rm -f *.asl *.aml *.dsl *.hex diff.log
diff --git a/update-big-endian.patch b/update-big-endian.patch
new file mode 100644
index 0000000..4cb1b6d
--- /dev/null
+++ b/update-big-endian.patch
@@ -0,0 +1,3949 @@
+Index: acpica-unix2-20170303/source/common/acfileio.c
+===================================================================
+--- acpica-unix2-20170303.orig/source/common/acfileio.c
++++ acpica-unix2-20170303/source/common/acfileio.c
+@@ -250,6 +250,7 @@ AcGetOneTableFromFile (
+     ACPI_TABLE_HEADER       *Table;
+     INT32                   Count;
+     long                    TableOffset;
++    UINT32		    TableLen;
+ 
+ 
+     *ReturnTable = NULL;
+@@ -289,7 +290,8 @@ AcGetOneTableFromFile (
+ 
+     /* Allocate a buffer for the entire table */
+ 
+-    Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
++    ACPI_MOVE_32_TO_32(&TableLen, &TableHeader.Length);
++    Table = AcpiOsAllocate ((ACPI_SIZE) TableLen);
+     if (!Table)
+     {
+         return (AE_NO_MEMORY);
+@@ -299,8 +301,8 @@ AcGetOneTableFromFile (
+ 
+     fseek (File, TableOffset, SEEK_SET);
+ 
+-    Count = fread (Table, 1, TableHeader.Length, File);
+-    if (Count != (INT32) TableHeader.Length)
++    Count = fread (Table, 1, TableLen, File);
++    if (Count != (INT32) TableLen)
+     {
+         Status = AE_ERROR;
+         goto ErrorExit;
+@@ -308,7 +310,7 @@ AcGetOneTableFromFile (
+ 
+     /* Validate the checksum (just issue a warning) */
+ 
+-    Status = AcpiTbVerifyChecksum (Table, TableHeader.Length);
++    Status = AcpiTbVerifyChecksum (Table, TableLen);
+     if (ACPI_FAILURE (Status))
+     {
+         Status = AcCheckTextModeCorruption (Table);
+@@ -400,6 +402,7 @@ AcValidateTableHeader (
+     ACPI_SIZE               Actual;
+     long                    OriginalOffset;
+     UINT32                  FileSize;
++    UINT32                  TableLength;
+     UINT32                  i;
+ 
+ 
+@@ -431,11 +434,12 @@ AcValidateTableHeader (
+     /* Validate table length against bytes remaining in the file */
+ 
+     FileSize = CmGetFileSize (File);
+-    if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
++    ACPI_MOVE_32_TO_32(&TableLength, &TableHeader.Length);
++    if (TableLength > (UINT32) (FileSize - TableOffset))
+     {
+         fprintf (stderr, "Table [%4.4s] is too long for file - "
+             "needs: 0x%.2X, remaining in file: 0x%.2X\n",
+-            TableHeader.Signature, TableHeader.Length,
++            TableHeader.Signature, TableLength,
+             (UINT32) (FileSize - TableOffset));
+         return (AE_BAD_HEADER);
+     }
+Index: acpica-unix2-20170303/source/common/dmtable.c
+===================================================================
+--- acpica-unix2-20170303.orig/source/common/dmtable.c
++++ acpica-unix2-20170303/source/common/dmtable.c
+@@ -499,7 +499,7 @@ AcpiDmDumpDataTable (
+      */
+     if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS))
+     {
+-        Length = Table->Length;
++        ACPI_MOVE_32_TO_32(&Length, &Table->Length);
+         Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
+         if (ACPI_FAILURE (Status))
+         {
+@@ -513,13 +513,14 @@ AcpiDmDumpDataTable (
+     else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT))
+     {
+         Length = AcpiDmDumpS3pt (Table);
++        ACPI_MOVE_32_TO_32(&Length, &Table->Length);
+     }
+     else
+     {
+         /*
+          * All other tables must use the common ACPI table header, dump it now
+          */
+-        Length = Table->Length;
++        ACPI_MOVE_32_TO_32(&Length, &Table->Length);
+         Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
+         if (ACPI_FAILURE (Status))
+         {
+@@ -730,6 +731,7 @@ AcpiDmDumpTable (
+     BOOLEAN                 LastOutputBlankLine = FALSE;
+     ACPI_STATUS             Status;
+     char                    RepairedName[8];
++    UINT16		    Val16;
+ 
+ 
+     if (!Info)
+@@ -1097,8 +1099,9 @@ AcpiDmDumpTable (
+             /* Checksum, display and validate */
+ 
+             AcpiOsPrintf ("%2.2X", *Target);
+-            Temp8 = AcpiDmGenerateChecksum (Table,
+-                ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
++	    ACPI_MOVE_32_TO_32(&Temp32,
++			&ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length);
++            Temp8 = AcpiDmGenerateChecksum (Table, Temp32,
+                 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
+ 
+             if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
+@@ -1163,14 +1166,14 @@ AcpiDmDumpTable (
+ 
+             /* DMAR subtable types */
+ 
+-            Temp16 = ACPI_GET16 (Target);
++            Val16 = ACPI_GET16 (Target);
++	    ACPI_MOVE_16_TO_16(&Temp16, &Val16);
+             if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
+             {
+                 Temp16 = ACPI_DMAR_TYPE_RESERVED;
+             }
+ 
+-            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+-                AcpiDmDmarSubnames[Temp16]);
++            AcpiOsPrintf (UINT16_FORMAT, Temp16, AcpiDmDmarSubnames[Temp16]);
+             break;
+ 
+         case ACPI_DMT_DMAR_SCOPE:
+@@ -1261,14 +1264,14 @@ AcpiDmDumpTable (
+ 
+             /* HEST subtable types */
+ 
+-            Temp16 = ACPI_GET16 (Target);
++            Val16 = ACPI_GET16 (Target);
++	    ACPI_MOVE_16_TO_16(&Temp16, &Val16);
+             if (Temp16 > ACPI_HEST_TYPE_RESERVED)
+             {
+                 Temp16 = ACPI_HEST_TYPE_RESERVED;
+             }
+ 
+-            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+-                AcpiDmHestSubnames[Temp16]);
++            AcpiOsPrintf (UINT16_FORMAT, Temp16, AcpiDmHestSubnames[Temp16]);
+             break;
+ 
+         case ACPI_DMT_HESTNTFY:
+@@ -1334,13 +1337,14 @@ AcpiDmDumpTable (
+ 
+             /* NFIT subtable types */
+ 
+-            Temp16 = ACPI_GET16 (Target);
++            Val16 = ACPI_GET16 (Target);
++            ACPI_MOVE_16_TO_16(&Temp16, &Val16);
+             if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
+             {
+                 Temp16 = ACPI_NFIT_TYPE_RESERVED;
+             }
+ 
+-            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
++            AcpiOsPrintf (UINT16_FORMAT, Temp16,
+                 AcpiDmNfitSubnames[Temp16]);
+             break;
+ 
+Index: acpica-unix2-20170303/source/common/dmtables.c
+===================================================================
+--- acpica-unix2-20170303.orig/source/common/dmtables.c
++++ acpica-unix2-20170303/source/common/dmtables.c
+@@ -142,7 +142,9 @@ AdCreateTableHeader (
+     ACPI_TABLE_HEADER       *Table)
+ {
+     UINT8                   Checksum;
+-
++    UINT32		    TableLen;
++    UINT32		    OemRev;
++    UINT32		    CompilerRev;
+ 
+     /* Reset globals for External statements */
+ 
+@@ -154,9 +156,10 @@ AdCreateTableHeader (
+      */
+     AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
+ 
++    ACPI_MOVE_32_TO_32(&TableLen, &Table->Length);
+     AcpiOsPrintf (" * Original Table Header:\n");
+     AcpiOsPrintf (" *     Signature        \"%4.4s\"\n",    Table->Signature);
+-    AcpiOsPrintf (" *     Length           0x%8.8X (%u)\n", Table->Length, Table->Length);
++    AcpiOsPrintf (" *     Length           0x%8.8X (%u)\n", TableLen, TableLen);
+ 
+     /* Print and validate the revision */
+ 
+@@ -188,7 +191,7 @@ AdCreateTableHeader (
+ 
+     AcpiOsPrintf ("\n *     Checksum         0x%2.2X",        Table->Checksum);
+ 
+-    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
++    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), TableLen);
+     if (Checksum)
+     {
+         AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
+@@ -198,9 +201,11 @@ AdCreateTableHeader (
+     AcpiOsPrintf ("\n");
+     AcpiOsPrintf (" *     OEM ID           \"%.6s\"\n",     Table->OemId);
+     AcpiOsPrintf (" *     OEM Table ID     \"%.8s\"\n",     Table->OemTableId);
+-    AcpiOsPrintf (" *     OEM Revision     0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
++    ACPI_MOVE_32_TO_32(&OemRev, &Table->OemRevision);
++    AcpiOsPrintf (" *     OEM Revision     0x%8.8X (%u)\n", OemRev, OemRev);
+     AcpiOsPrintf (" *     Compiler ID      \"%.4s\"\n",     Table->AslCompilerId);
+-    AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
++    ACPI_MOVE_32_TO_32(&CompilerRev, &Table->AslCompilerRevision);
++    AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", CompilerRev, CompilerRev);
+     AcpiOsPrintf (" */\n");
+ 
+     /*
+@@ -221,7 +226,7 @@ AdCreateTableHeader (
+     AcpiOsPrintf (
+         "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
+         Table->Signature, Table->Revision,
+-        Table->OemId, Table->OemTableId, Table->OemRevision);
++        Table->OemId, Table->OemTableId, OemRev);
+ }
+ 
+ 
+@@ -396,7 +401,8 @@ AdParseTable (
+ 
+     fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
+ 
+-    AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
++    ACPI_MOVE_32_TO_32(&AmlLength, &Table->Length);
++    AmlLength -= sizeof (ACPI_TABLE_HEADER);
+     AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
+     ASL_CV_INIT_FILETREE(Table, AmlStart, AmlLength);
+ 
+Index: acpica-unix2-20170303/source/common/dmtbdump.c
+===================================================================
+--- acpica-unix2-20170303.orig/source/common/dmtbdump.c
++++ acpica-unix2-20170303/source/common/dmtbdump.c
+@@ -277,6 +277,8 @@ AcpiDmDumpRsdt (
+     UINT32                  Entries;
+     UINT32                  Offset;
+     UINT32                  i;
++    UINT32		    Length;
++    UINT32		    Address;
+ 
+ 
+     /* Point to start of table pointer array */
+@@ -286,12 +288,14 @@ AcpiDmDumpRsdt (
+ 
+     /* RSDT uses 32-bit pointers */
+ 
+-    Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT32);
++    ACPI_MOVE_32_TO_32(&Length, &Table->Length);
++    Entries = (Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT32);
+ 
+     for (i = 0; i < Entries; i++)
+     {
+         AcpiDmLineHeader2 (Offset, sizeof (UINT32), "ACPI Table Address", i);
+-        AcpiOsPrintf ("%8.8X\n", Array[i]);
++	ACPI_MOVE_32_TO_32(&Address, &Array[i]);
++        AcpiOsPrintf ("%8.8X\n", Address);
+         Offset += sizeof (UINT32);
+     }
+ }
+@@ -317,6 +321,8 @@ AcpiDmDumpXsdt (
+     UINT32                  Entries;
+     UINT32                  Offset;
+     UINT32                  i;
++    UINT32                  Length;
++    UINT64		    Address;
+ 
+ 
+     /* Point to start of table pointer array */
+@@ -326,12 +332,14 @@ AcpiDmDumpXsdt (
+ 
+     /* XSDT uses 64-bit pointers */
+ 
+-    Entries = (Table->Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64);
++    ACPI_MOVE_32_TO_32(&Length, &Table->Length);
++    Entries = (Length - sizeof (ACPI_TABLE_HEADER)) / sizeof (UINT64);
+ 
+     for (i = 0; i < Entries; i++)
+     {
+         AcpiDmLineHeader2 (Offset, sizeof (UINT64), "ACPI Table Address", i);
+-        AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array[i]));
++	ACPI_MOVE_64_TO_64(&Address, &Array[i]);
++        AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Address));
+         Offset += sizeof (UINT64);
+     }
+ }
+@@ -524,17 +532,21 @@ AcpiDmDumpAsf (
+     UINT32                  DataOffset = 0;
+     UINT32                  i;
+     UINT8                   Type;
++    UINT32		    Len;
++    UINT16		    SubLen;
+ 
+ 
+     /* No main table, only subtables */
<Skipped 3647 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/acpica.git/commitdiff/77760c90943819c7970776705a271ed2cf76ede4



More information about the pld-cvs-commit mailing list