All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/5] iASL patches in Debian
@ 2010-07-04  4:43 malattia
  2010-07-04  4:43 ` [patch 1/5] allow overriding only some of the CFLAGS malattia
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi

Hi Robert,

Here is a series of patches that I've been carrying in the iasl Debian
package for some time. They are all refreshed and reworked to apply
cleanly on top of acpica-unix-20100528.
The series consists a couple of trivial patches to fix building on the
FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
compiling ASL on big endian architectures.
It would be great if you could apply the patches to your source tree and
ship new release with this work included.
Let me know if you want me to run more tests or change something in the
patches.

I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
have here) with the whole set applied and the results were identical on
BE and LE machines as well as being identical to what a clean iasl
produces on x86[1].
You can see build logs for all the architectures supported here:
https://buildd.debian.org/status/package.php?p=acpica-unix

Thanks

[1]: checked with (1) an hex dump of the AML file, (2) the C file
generated with -tc and (3) by decompiling the AML to DSL on x86 and
comparing the results.
As a side note pristine iasl on x86 sefaults when building
test/misc/grammar.asl, with these patches applied it doesn't.

-- 
mattia

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 1/5] allow overriding only some of the CFLAGS
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
@ 2010-07-04  4:43 ` malattia
  2010-07-04  4:43 ` [patch 2/5] Small tweak to define uintptr_t and successfully build on debian/kfreebsd malattia
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi, Mattia Dongili

[-- Attachment #1: overridable_cflags.patch --]
[-- Type: text/plain, Size: 3017 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 compiler/Makefile         |    6 +++++-
 tools/acpiexec/Makefile   |    6 +++++-
 tools/acpisrc/Makefile    |    5 ++++-
 tools/acpixtract/Makefile |    5 ++++-
 4 files changed, 18 insertions(+), 4 deletions(-)

Index: b/compiler/Makefile
===================================================================
--- a/compiler/Makefile	2010-07-02 21:42:26.849349488 +0900
+++ b/compiler/Makefile	2010-07-04 11:18:15.830519370 +0900
@@ -125,7 +125,8 @@
 	../osunixxf.c
 
 NOMAN=	YES
-CFLAGS+= -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -I../compiler
+MK_CFLAGS = -DACPI_ASL_COMPILER -I../include -I../compiler
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
 #YACC=	yacc
 YACC=	bison
@@ -141,6 +142,9 @@
 
 LDLIBS = -lpthread -lrt
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
+
 aslmain : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) \
 		$(LOADLIBES) $(LDLIBS) -o iasl
Index: b/tools/acpiexec/Makefile
===================================================================
--- a/tools/acpiexec/Makefile	2010-07-02 21:42:26.893349116 +0900
+++ b/tools/acpiexec/Makefile	2010-07-04 11:18:15.830519370 +0900
@@ -139,8 +139,12 @@
 	../../osunixxf.c
 
 
-CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../include 
+MK_CFLAGS = -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED \
+            -I../../include
+CFLAGS = -Wall -Wstrict-prototypes -O2 -g
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 acpiexec : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -lrt -lpthread -o $(PROG)
Index: b/tools/acpisrc/Makefile
===================================================================
--- a/tools/acpisrc/Makefile	2010-07-02 21:42:26.877349353 +0900
+++ b/tools/acpisrc/Makefile	2010-07-04 11:18:15.838518967 +0900
@@ -4,8 +4,11 @@
 SRCS=	ascase.c asconvrt.c asfile.c asmain.c asremove.c astable.c \
         asutils.c osunixdir.c ../../common/getopt.c
 
-CFLAGS+= -Wall -O2 -D_LINUX -DACPI_APPLICATION -Wstrict-prototypes -I../../include 
+MK_CFLAGS= -DACPI_APPLICATION -I../../include
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 aslmain : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)
Index: b/tools/acpixtract/Makefile
===================================================================
--- a/tools/acpixtract/Makefile	2010-07-02 21:42:26.861349031 +0900
+++ b/tools/acpixtract/Makefile	2010-07-04 11:18:15.838518967 +0900
@@ -3,8 +3,11 @@
 PROG=	acpixtract
 SRCS=	acpixtract.c
 
-CFLAGS+= -Wall -O2 -D_LINUX -DACPI_APPLICATION -Wstrict-prototypes -I../../include 
+MK_CFLAGS= -DACPI_APPLICATION -I../../include
+CFLAGS= -Wall -Wstrict-prototypes -O2
 
+%.o: %.c
+	$(CC) $(MK_CFLAGS) $(CFLAGS) -c -o $@ $<
 
 acpixtract : $(patsubst %.c,%.o, $(SRCS))
 	$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 2/5] Small tweak to define uintptr_t and successfully build on debian/kfreebsd
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
  2010-07-04  4:43 ` [patch 1/5] allow overriding only some of the CFLAGS malattia
@ 2010-07-04  4:43 ` malattia
  2010-07-04  4:43 ` [patch 3/5] Support compiling DSDT tables on big endian architectures malattia
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi, Mattia Dongili

[-- Attachment #1: fix_ftbfs_debian-kfreebsd.patch --]
[-- Type: text/plain, Size: 569 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 include/platform/acenv.h |    3 +++
 1 file changed, 3 insertions(+)

Index: b/include/platform/acenv.h
===================================================================
--- a/include/platform/acenv.h	2010-07-02 21:42:26.785349387 +0900
+++ b/include/platform/acenv.h	2010-07-04 11:18:37.250028892 +0900
@@ -182,6 +182,9 @@
 
 
 /*! [Begin] no source code translation */
+#if defined(__GLIBC__)
+#include <stdint.h>
+#endif
 
 /******************************************************************************
  *


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 3/5] Support compiling DSDT tables on big endian architectures
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
  2010-07-04  4:43 ` [patch 1/5] allow overriding only some of the CFLAGS malattia
  2010-07-04  4:43 ` [patch 2/5] Small tweak to define uintptr_t and successfully build on debian/kfreebsd malattia
@ 2010-07-04  4:43 ` malattia
  2010-07-04  4:43 ` [patch 4/5] Add architectures that do not support unaligned access and fix aligment issues malattia
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi, Mattia Dongili

[-- Attachment #1: big_endian.patch --]
[-- Type: text/plain, Size: 83400 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 compiler/aslcodegen.c      |  107 +++++++++++++++++++++--------------
 compiler/aslopcodes.c      |    4 +
 compiler/aslrestype1.c     |   68 +++++++++++++++-------
 compiler/aslrestype1i.c    |   29 +++++----
 compiler/aslrestype2.c     |   25 +++++---
 compiler/aslrestype2d.c    |  134 +++++++++++++++++++++++++--------------------
 compiler/aslrestype2e.c    |  117 +++++++++++++++++++++++++++------------
 compiler/aslrestype2q.c    |  117 +++++++++++++++++++++++++--------------
 compiler/aslrestype2w.c    |  127 +++++++++++++++++++++++++-----------------
 include/acmacros.h         |   15 +++--
 include/platform/aclinux.h |    7 ++
 11 files changed, 470 insertions(+), 280 deletions(-)

Index: b/include/platform/aclinux.h
===================================================================
--- a/include/platform/aclinux.h	2010-07-02 21:42:26.833348957 +0900
+++ b/include/platform/aclinux.h	2010-07-04 11:18:19.486018564 +0900
@@ -156,13 +156,14 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <unistd.h>
+#include <endian.h>
 
 /* Host-dependent types and defines for user-space ACPICA */
 
 #define ACPI_FLUSH_CPU_CACHE()
 #define ACPI_THREAD_ID              pthread_t
 
-#if defined(__ia64__) || defined(__x86_64__)
+#if defined(__ia64__) || defined(__x86_64__) || defined(__alpha__)
 #define ACPI_MACHINE_WIDTH          64
 #define COMPILER_DEPENDENT_INT64    long
 #define COMPILER_DEPENDENT_UINT64   unsigned long
@@ -173,6 +174,10 @@
 #define ACPI_USE_NATIVE_DIVIDE
 #endif
 
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define ACPI_BIG_ENDIAN
+#endif
+
 #ifndef __cdecl
 #define __cdecl
 #endif
Index: b/compiler/aslcodegen.c
===================================================================
--- a/compiler/aslcodegen.c	2010-07-02 21:42:26.601348618 +0900
+++ b/compiler/aslcodegen.c	2010-07-04 11:18:19.490018083 +0900
@@ -311,16 +311,12 @@
     ACPI_PARSE_OBJECT       *Op)
 {
     UINT8                   PkgLenFirstByte;
-    UINT32                  i;
-    union {
-        UINT16                  Opcode;
-        UINT8                   OpcodeBytes[2];
-    } Aml;
-    union {
-        UINT32                  Len;
-        UINT8                   LenBytes[4];
-    } PkgLen;
-
+    UINT8                   Byte;
+    UINT16                  Word;
+    UINT32                  DWord;
+    UINT64                  QWord;
+    UINT16                  AmlOpcode;
+    UINT32                  PkgLen;
 
     /* We expect some DEFAULT_ARGs, just ignore them */
 
@@ -343,45 +339,46 @@
 
         /* Special opcodes for within a field definition */
 
-        Aml.Opcode = 0x00;
+        AmlOpcode = 0x00;
         break;
 
     case AML_INT_ACCESSFIELD_OP:
 
-        Aml.Opcode = 0x01;
+        AmlOpcode = 0x01;
         break;
 
     default:
-        Aml.Opcode = Op->Asl.AmlOpcode;
+        AmlOpcode = Op->Asl.AmlOpcode;
         break;
     }
 
 
-    switch (Aml.Opcode)
+    switch (AmlOpcode)
     {
     case AML_PACKAGE_LENGTH:
 
         /* Value is the length to be encoded (Used in field definitions) */
 
-        PkgLen.Len = (UINT32) Op->Asl.Value.Integer;
+        PkgLen = (UINT32) Op->Asl.Value.Integer;
         break;
 
     default:
 
         /* Check for two-byte opcode */
 
-        if (Aml.Opcode > 0x00FF)
+        if (AmlOpcode > 0x00FF)
         {
             /* Write the high byte first */
-
-            CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[1], 1);
+            Byte = ACPI_HIBYTE(AmlOpcode);
+            CgLocalWriteAmlData (Op, &Byte, 1);
         }
 
-        CgLocalWriteAmlData (Op, &Aml.OpcodeBytes[0], 1);
+        Byte = ACPI_LOBYTE(AmlOpcode);
+        CgLocalWriteAmlData (Op, &Byte, 1);
 
         /* Subtreelength doesn't include length of package length bytes */
 
-        PkgLen.Len = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
+        PkgLen = Op->Asl.AmlSubtreeLength + Op->Asl.AmlPkgLenBytes;
         break;
     }
 
@@ -392,8 +389,8 @@
         if (Op->Asl.AmlPkgLenBytes == 1)
         {
             /* Simplest case -- no bytes to follow, just write the count */
-
-            CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1);
+            Byte = ACPI_LOBYTE(PkgLen);
+            CgLocalWriteAmlData (Op, &Byte, 1);
         }
         else if (Op->Asl.AmlPkgLenBytes != 0)
         {
@@ -403,7 +400,7 @@
              */
             PkgLenFirstByte = (UINT8)
                 (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) |
-                (PkgLen.LenBytes[0] & 0x0F));
+                (PkgLen & 0x0F));
 
             CgLocalWriteAmlData (Op, &PkgLenFirstByte, 1);
 
@@ -411,37 +408,44 @@
              * 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 */
-
-            for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
+            Byte = ACPI_LOBYTE(PkgLen);
+            CgLocalWriteAmlData (Op, &Byte, 1);
+            if (Op->Asl.AmlPkgLenBytes >= 3)
+            {
+                Byte = ACPI_HIBYTE(PkgLen);
+                CgLocalWriteAmlData (Op, &Byte, 1);
+            }
+            if (Op->Asl.AmlPkgLenBytes >= 4)
             {
-                CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
+                Byte = ACPI_LOBYTE(ACPI_HIWORD(PkgLen));
+                CgLocalWriteAmlData (Op, &Byte, 1);
             }
         }
     }
 
-    switch (Aml.Opcode)
+    switch (AmlOpcode)
     {
     case AML_BYTE_OP:
-
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 1);
+        Byte = (UINT8) Op->Asl.Value.Integer;
+        CgLocalWriteAmlData (Op, &Byte, 1);
         break;
 
     case AML_WORD_OP:
-
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 2);
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &Word, 2);
        break;
 
     case AML_DWORD_OP:
-
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 4);
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &DWord, 4);
         break;
 
     case AML_QWORD_OP:
-
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, 8);
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &QWord, 8);
         break;
 
     case AML_STRING_OP:
@@ -473,6 +477,7 @@
     ACPI_PARSE_OBJECT       *Op)
 {
     ACPI_PARSE_OBJECT       *Child;
+    UINT32 DWord;
 
 
     /* AML filename */
@@ -509,19 +514,19 @@
     /* OEM Revision */
 
     Child = Child->Asl.Next;
-    TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
+    ACPI_MOVE_64_TO_32(&TableHeader.OemRevision, &Child->Asl.Value.Integer);
 
     /* Compiler ID */
 
     strncpy (TableHeader.AslCompilerId, CompilerCreatorId, 4);
 
     /* Compiler version */
-
-    TableHeader.AslCompilerRevision = CompilerCreatorRevision;
+    DWord = CompilerCreatorRevision;
+    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;
 
     CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
@@ -585,7 +590,10 @@
     ACPI_PARSE_OBJECT       *Op)
 {
     ASL_RESOURCE_NODE       *Rnode;
-
+    UINT8                   Byte;
+    UINT16                  Word;
+    UINT32                  DWord;
+    UINT64                  QWord;
 
     /* Always check for DEFAULT_ARG and other "Noop" nodes */
     /* TBD: this may not be the best place for this check */
@@ -603,13 +611,24 @@
     switch (Op->Asl.AmlOpcode)
     {
     case AML_RAW_DATA_BYTE:
+        Byte = (UINT8) Op->Asl.Value.Integer;
+        CgLocalWriteAmlData (Op, &Byte, 1);
+        return;
+
     case AML_RAW_DATA_WORD:
-    case AML_RAW_DATA_DWORD:
-    case AML_RAW_DATA_QWORD:
+        ACPI_MOVE_64_TO_16(&Word, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &Word, 2);
+        return;
 
-        CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength);
+    case AML_RAW_DATA_DWORD:
+        ACPI_MOVE_64_TO_32(&DWord, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &DWord, 4);
         return;
 
+    case AML_RAW_DATA_QWORD:
+        ACPI_MOVE_64_TO_64(&QWord, &Op->Asl.Value.Integer);
+        CgLocalWriteAmlData (Op, &QWord, 8);
+        return;
 
     case AML_RAW_DATA_BUFFER:
 
Index: b/compiler/aslopcodes.c
===================================================================
--- a/compiler/aslopcodes.c	2010-07-02 21:42:26.613360661 +0900
+++ b/compiler/aslopcodes.c	2010-07-04 11:18:19.490018083 +0900
@@ -449,6 +449,7 @@
     UINT32                  i;
     UINT8                   *AsciiString;
     UINT16                  *UnicodeString;
+    UINT16                  UChar;
     ACPI_PARSE_OBJECT       *BufferLengthOp;
 
 
@@ -475,7 +476,8 @@
 
     for (i = 0; i < Count; i++)
     {
-        UnicodeString[i] = (UINT16) AsciiString[i];
+        UChar = (UINT16) AsciiString[i];
+        ACPI_MOVE_16_TO_16(&UnicodeString[i], &UChar);
     }
 
     /*
Index: b/compiler/aslrestype1.c
===================================================================
--- a/compiler/aslrestype1.c	2010-07-02 21:42:26.661349406 +0900
+++ b/compiler/aslrestype1.c	2010-07-04 11:18:19.490018083 +0900
@@ -226,6 +226,11 @@
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  Minimum = 0;
+    UINT16                  Maximum = 0;
+    UINT16                  AddressLength = 0;
+    UINT16                  Alignment = 0;
+    UINT16                  ResourceLength;
     UINT32                  i;
 
 
@@ -234,7 +239,8 @@
 
     Descriptor = Rnode->Buffer;
     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 */
 
@@ -251,7 +257,7 @@
 
         case 1: /* Min Address */
 
-            Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
             MinOp = InitializerOp;
@@ -259,7 +265,7 @@
 
         case 2: /* Max Address */
 
-            Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
             MaxOp = InitializerOp;
@@ -267,7 +273,7 @@
 
         case 3: /* Alignment */
 
-            Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
+            Alignment = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
             AlignOp = InitializerOp;
@@ -275,7 +281,7 @@
 
         case 4: /* Length */
 
-            Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
             LengthOp = InitializerOp;
@@ -298,12 +304,17 @@
     /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
 
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
-        Descriptor->Memory24.Minimum,
-        Descriptor->Memory24.Maximum,
-        Descriptor->Memory24.AddressLength,
-        Descriptor->Memory24.Alignment,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Alignment,
         MinOp, MaxOp, LengthOp, NULL);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Minimum, &Minimum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Maximum, &Maximum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.AddressLength, &AddressLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Memory24.Alignment, &Alignment);
+
     return (Rnode);
 }
 
@@ -334,6 +345,11 @@
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT32                  Minimum = 0;
+    UINT32                  Maximum = 0;
+    UINT32                  AddressLength = 0;
+    UINT32                  Alignment = 0;
+    UINT16                  ResourceLength;
     UINT32                  i;
 
 
@@ -342,7 +358,8 @@
 
     Descriptor = Rnode->Buffer;
     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 */
 
@@ -359,7 +376,7 @@
 
         case 1:  /* Min Address */
 
-            Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
             MinOp = InitializerOp;
@@ -367,7 +384,7 @@
 
         case 2: /* Max Address */
 
-            Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
             MaxOp = InitializerOp;
@@ -375,7 +392,7 @@
 
         case 3: /* Alignment */
 
-            Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
+            Alignment = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
             AlignOp = InitializerOp;
@@ -383,7 +400,7 @@
 
         case 4: /* Length */
 
-            Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
             LengthOp = InitializerOp;
@@ -406,12 +423,17 @@
     /* Validate the Min/Max/Len/Align values */
 
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
-        Descriptor->Memory32.Minimum,
-        Descriptor->Memory32.Maximum,
-        Descriptor->Memory32.AddressLength,
-        Descriptor->Memory32.Alignment,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Alignment,
         MinOp, MaxOp, LengthOp, AlignOp);
 
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Minimum, &Minimum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Maximum, &Maximum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.AddressLength, &AddressLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Memory32.Alignment, &Alignment);
+
     return (Rnode);
 }
 
@@ -438,6 +460,7 @@
     AML_RESOURCE            *Descriptor;
     ACPI_PARSE_OBJECT       *InitializerOp;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  ResourceLength;
     UINT32                  i;
 
 
@@ -446,7 +469,8 @@
 
     Descriptor = Rnode->Buffer;
     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 */
 
@@ -463,14 +487,16 @@
 
         case 1: /* Address */
 
-            Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.Address,
+                &InitializerOp->Asl.Value.Integer);
             RsCreateByteField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
             break;
 
         case 2: /* Length */
 
-            Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
+            ACPI_MOVE_64_TO_32(&Descriptor->FixedMemory32.AddressLength,
+                &InitializerOp->Asl.Value.Integer);
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
             break;
Index: b/compiler/aslrestype1i.c
===================================================================
--- a/compiler/aslrestype1i.c	2010-07-02 21:42:26.649349305 +0900
+++ b/compiler/aslrestype1i.c	2010-07-04 11:18:19.494017882 +0900
@@ -275,6 +275,7 @@
     ACPI_PARSE_OBJECT       *InitializerOp;
     ACPI_PARSE_OBJECT       *AddressOp = NULL;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  Address = 0;
     UINT32                  i;
 
 
@@ -293,8 +294,7 @@
         {
         case 0: /* Base Address */
 
-            Descriptor->FixedIo.Address =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Address = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
             AddressOp = InitializerOp;
@@ -324,11 +324,13 @@
 
     /* Error checks */
 
-    if (Descriptor->FixedIo.Address > 0x03FF)
+    if (Address > 0x03FF)
     {
         AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
     }
 
+    ACPI_MOVE_16_TO_16(&Descriptor->FixedIo.Address, &Address);
+
     return (Rnode);
 }
 
@@ -359,6 +361,8 @@
     ACPI_PARSE_OBJECT       *LengthOp = NULL;
     ACPI_PARSE_OBJECT       *AlignOp = NULL;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  Minimum = 0;
+    UINT16                  Maximum = 0;
     UINT32                  i;
 
 
@@ -384,8 +388,7 @@
 
         case 1:  /* Min Address */
 
-            Descriptor->Io.Minimum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
             MinOp = InitializerOp;
@@ -393,8 +396,7 @@
 
         case 2: /* Max Address */
 
-            Descriptor->Io.Maximum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
             MaxOp = InitializerOp;
@@ -435,12 +437,15 @@
     /* Validate the Min/Max/Len/Align values */
 
     RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
-        Descriptor->Io.Minimum,
-        Descriptor->Io.Maximum,
+        Minimum,
+        Maximum,
         Descriptor->Io.AddressLength,
         Descriptor->Io.Alignment,
         MinOp, MaxOp, LengthOp, AlignOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Minimum, &Minimum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Io.Maximum, &Maximum);
+
     return (Rnode);
 }
 
@@ -561,9 +566,9 @@
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
     }
 
-    /* Now we can set the channel mask */
+    /* Now we can set the interrupt mask */
 
-    Descriptor->Irq.IrqMask = IrqMask;
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
     return (Rnode);
 }
 
@@ -663,6 +668,6 @@
 
     /* Now we can set the interrupt mask */
 
-    Descriptor->Irq.IrqMask = IrqMask;
+    ACPI_MOVE_16_TO_16(&Descriptor->Irq.IrqMask, &IrqMask);
     return (Rnode);
 }
Index: b/compiler/aslrestype2.c
===================================================================
--- a/compiler/aslrestype2.c	2010-07-02 21:42:26.625349241 +0900
+++ b/compiler/aslrestype2.c	2010-07-04 11:18:19.494017882 +0900
@@ -152,6 +152,7 @@
     AML_RESOURCE            *Descriptor;
     ACPI_PARSE_OBJECT       *InitializerOp;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  ResourceLength;
     UINT32                  i;
 
 
@@ -160,7 +161,9 @@
 
     Descriptor = Rnode->Buffer;
     Descriptor->GenericReg.DescriptorType = ACPI_RESOURCE_NAME_GENERIC_REGISTER;
-    Descriptor->GenericReg.ResourceLength = 12;
+    ResourceLength = 12;
+    ACPI_MOVE_16_TO_16(&Descriptor->GenericReg.ResourceLength,
+		    &ResourceLength);
 
     /* Process all child initialization nodes */
 
@@ -191,7 +194,8 @@
 
         case 3: /* Register Address */
 
-            Descriptor->GenericReg.Address = InitializerOp->Asl.Value.Integer;
+	    ACPI_MOVE_64_TO_64(&Descriptor->GenericReg.Address,
+			    &InitializerOp->Asl.Value.Integer);
             RsCreateByteField (InitializerOp, ACPI_RESTAG_ADDRESS,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.Address));
             break;
@@ -249,6 +253,7 @@
     AML_RESOURCE            *Rover = NULL;
     ACPI_PARSE_OBJECT       *InitializerOp;
     ASL_RESOURCE_NODE       *Rnode;
+    UINT16                  ResourceLength = 0;
     UINT16                  StringLength = 0;
     UINT32                  OptionIndex = 0;
     UINT32                  i;
@@ -295,7 +300,7 @@
      * Initial descriptor length -- may be enlarged if there are
      * optional fields present
      */
-    Descriptor->ExtendedIrq.ResourceLength  = 2;  /* Flags and table length byte */
+    ResourceLength  = 2;  /* Flags and table length byte */
     Descriptor->ExtendedIrq.InterruptCount  = 0;
 
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
@@ -403,10 +408,11 @@
 
             /* Save the integer and move pointer to the next one */
 
-            Rover->DwordItem = (UINT32) InitializerOp->Asl.Value.Integer;
+            ACPI_MOVE_64_TO_32(&Rover->DwordItem,
+                &InitializerOp->Asl.Value.Integer);
             Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->DwordItem), 4);
             Descriptor->ExtendedIrq.InterruptCount++;
-            Descriptor->ExtendedIrq.ResourceLength += 4;
+            ResourceLength += 4;
 
             /* Case 7: First interrupt number in list */
 
@@ -442,7 +448,7 @@
     {
         Rover->ByteItem = ResSourceIndex;
         Rover = ACPI_ADD_PTR (AML_RESOURCE, &(Rover->ByteItem), 1);
-        Descriptor->ExtendedIrq.ResourceLength += 1;
+        ResourceLength += 1;
     }
 
     /* Add optional ResSource string if present */
@@ -454,13 +460,14 @@
         Rover = ACPI_ADD_PTR (
                     AML_RESOURCE, &(Rover->ByteItem), StringLength);
 
-        Descriptor->ExtendedIrq.ResourceLength = (UINT16)
-            (Descriptor->ExtendedIrq.ResourceLength + StringLength);
+        ResourceLength = (UINT16) (ResourceLength + 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);
 }
 
@@ -511,7 +518,7 @@
 
     Descriptor = Rnode->Buffer;
     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 */
 
Index: b/compiler/aslrestype2d.c
===================================================================
--- a/compiler/aslrestype2d.c	2010-07-02 21:42:26.585349064 +0900
+++ b/compiler/aslrestype2d.c	2010-07-04 11:18:19.494017882 +0900
@@ -156,7 +156,13 @@
     ACPI_PARSE_OBJECT       *GranOp = NULL;
     ASL_RESOURCE_NODE       *Rnode;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT32                  Minimum = 0;
+    UINT32                  Maximum = 0;
+    UINT32                  AddressLength = 0;
+    UINT32                  Granularity = 0;
+    UINT32                  TranslationOffset = 0;
     UINT8                   *OptionalFields;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
@@ -177,8 +183,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
-    Descriptor->Address32.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS32) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -222,8 +227,7 @@
 
         case 5: /* Address Granularity */
 
-            Descriptor->Address32.Granularity =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
             GranOp = InitializerOp;
@@ -231,8 +235,7 @@
 
         case 6: /* Address Min */
 
-            Descriptor->Address32.Minimum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
             MinOp = InitializerOp;
@@ -240,8 +243,7 @@
 
         case 7: /* Address Max */
 
-            Descriptor->Address32.Maximum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
             MaxOp = InitializerOp;
@@ -249,16 +251,14 @@
 
         case 8: /* Translation Offset */
 
-            Descriptor->Address32.TranslationOffset =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
             break;
 
         case 9: /* Address Length */
 
-            Descriptor->Address32.AddressLength =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
             LengthOp = InitializerOp;
@@ -272,7 +272,7 @@
 
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address32.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -286,8 +286,7 @@
                 {
                     /* Found a valid ResourceSource */
 
-                    Descriptor->Address32.ResourceLength = (UINT16)
-                        (Descriptor->Address32.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -347,13 +346,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address32.Minimum,
-        Descriptor->Address32.Maximum,
-        Descriptor->Address32.AddressLength,
-        Descriptor->Address32.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address32.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -388,7 +394,13 @@
     ASL_RESOURCE_NODE       *Rnode;
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT32                  Minimum = 0;
+    UINT32                  Maximum = 0;
+    UINT32                  AddressLength = 0;
+    UINT32                  Granularity = 0;
+    UINT32                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -408,11 +420,9 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
-    Descriptor->Address32.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS32) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
-
     /* Process all child initialization nodes */
 
     for (i = 0; InitializerOp; i++)
@@ -461,8 +471,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->Address32.Granularity =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
             GranOp = InitializerOp;
@@ -470,8 +479,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->Address32.Minimum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
             MinOp = InitializerOp;
@@ -479,8 +487,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->Address32.Maximum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
             MaxOp = InitializerOp;
@@ -488,16 +495,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->Address32.TranslationOffset =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
             break;
 
         case 10: /* Address Length */
 
-            Descriptor->Address32.AddressLength =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
             LengthOp = InitializerOp;
@@ -509,7 +514,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address32.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -521,8 +526,8 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address32.ResourceLength = (UINT16)
-                        (Descriptor->Address32.ResourceLength + StringLength);
+
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -583,13 +588,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address32.Minimum,
-        Descriptor->Address32.Maximum,
-        Descriptor->Address32.AddressLength,
-        Descriptor->Address32.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address32.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -624,7 +636,13 @@
     ASL_RESOURCE_NODE       *Rnode;
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT32                  Minimum = 0;
+    UINT32                  Maximum = 0;
+    UINT32                  AddressLength = 0;
+    UINT32                  Granularity = 0;
+    UINT32                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -643,8 +661,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS32);
-    Descriptor->Address32.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS32) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS32) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -693,8 +710,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->Address32.Granularity =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Granularity));
             GranOp = InitializerOp;
@@ -702,8 +718,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->Address32.Minimum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Minimum));
             MinOp = InitializerOp;
@@ -711,8 +726,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->Address32.Maximum =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.Maximum));
             MaxOp = InitializerOp;
@@ -720,16 +734,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->Address32.TranslationOffset =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.TranslationOffset));
             break;
 
         case 10: /* Address Length */
 
-            Descriptor->Address32.AddressLength =
-                (UINT32) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address32.AddressLength));
             LengthOp = InitializerOp;
@@ -741,7 +753,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address32.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -753,8 +765,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address32.ResourceLength = (UINT16)
-                        (Descriptor->Address32.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -801,13 +812,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address32.Minimum,
-        Descriptor->Address32.Maximum,
-        Descriptor->Address32.AddressLength,
-        Descriptor->Address32.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address32.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address32.ResourceLength, &ResourceLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Minimum, &Minimum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Maximum, &Maximum);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.AddressLength, &AddressLength);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.Granularity, &Granularity);
+    ACPI_MOVE_32_TO_32(&Descriptor->Address32.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) +
                             OptionIndex + StringLength;
     return (Rnode);
Index: b/compiler/aslrestype2e.c
===================================================================
--- a/compiler/aslrestype2e.c	2010-07-02 21:42:26.637349971 +0900
+++ b/compiler/aslrestype2e.c	2010-07-04 11:18:19.498018099 +0900
@@ -156,6 +156,13 @@
     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;
 
 
@@ -170,9 +177,10 @@
     Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_IO_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 */
 
@@ -215,7 +223,7 @@
 
         case 5: /* Address Granularity */
 
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
             GranOp = InitializerOp;
@@ -223,7 +231,7 @@
 
         case 6: /* Address Min */
 
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
             MinOp = InitializerOp;
@@ -231,7 +239,7 @@
 
         case 7: /* Address Max */
 
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
             MaxOp = InitializerOp;
@@ -239,14 +247,14 @@
 
         case 8: /* Translation Offset */
 
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset));
             break;
 
         case 9: /* Address Length */
 
-            Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
             LengthOp = InitializerOp;
@@ -254,7 +262,7 @@
 
         case 10: /* Type-Specific Attributes */
 
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
             break;
@@ -290,13 +298,20 @@
     /* 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);
 
+    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);
 }
@@ -329,6 +344,13 @@
     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;
 
 
@@ -343,9 +365,10 @@
     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 */
 
@@ -395,7 +418,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
             GranOp = InitializerOp;
@@ -403,7 +426,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
             MinOp = InitializerOp;
@@ -411,7 +434,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
             MaxOp = InitializerOp;
@@ -419,14 +442,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (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;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
             LengthOp = InitializerOp;
@@ -434,7 +457,7 @@
 
         case 11: /* Type-Specific Attributes */
 
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
             break;
@@ -471,13 +494,20 @@
     /* 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);
 
+    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);
 }
@@ -510,6 +540,13 @@
     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;
 
 
@@ -523,9 +560,10 @@
     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 */
 
@@ -573,7 +611,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
             GranOp = InitializerOp;
@@ -581,7 +619,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum));
             MinOp = InitializerOp;
@@ -589,7 +627,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum));
             MaxOp = InitializerOp;
@@ -597,14 +635,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (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;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength));
             LengthOp = InitializerOp;
@@ -612,7 +650,7 @@
 
         case 11: /* Type-Specific Attributes */
 
-            Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer;
+            TypeSpecific = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific));
             break;
@@ -634,13 +672,20 @@
     /* 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);
 
+    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);
 }
Index: b/compiler/aslrestype2q.c
===================================================================
--- a/compiler/aslrestype2q.c	2010-07-02 21:42:26.673349159 +0900
+++ b/compiler/aslrestype2q.c	2010-07-04 11:18:19.498018099 +0900
@@ -157,7 +157,13 @@
     ASL_RESOURCE_NODE       *Rnode;
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT64                  Minimum = 0;
+    UINT64                  Maximum = 0;
+    UINT64                  AddressLength = 0;
+    UINT64                  Granularity = 0;
+    UINT64                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -177,8 +183,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
-    Descriptor->Address64.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS64) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -222,7 +227,7 @@
 
         case 5: /* Address Granularity */
 
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
             GranOp = InitializerOp;
@@ -230,7 +235,7 @@
 
         case 6: /* Address Min */
 
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
             MinOp = InitializerOp;
@@ -238,7 +243,7 @@
 
         case 7: /* Address Max */
 
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
             MaxOp = InitializerOp;
@@ -246,14 +251,14 @@
 
         case 8: /* Translation Offset */
 
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
             break;
 
         case 9: /* Address Length */
 
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
             LengthOp = InitializerOp;
@@ -265,7 +270,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address64.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -277,8 +282,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address64.ResourceLength = (UINT16)
-                        (Descriptor->Address64.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -338,13 +342,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address64.Minimum,
-        Descriptor->Address64.Maximum,
-        Descriptor->Address64.AddressLength,
-        Descriptor->Address64.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address64.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -379,7 +390,13 @@
     ASL_RESOURCE_NODE       *Rnode;
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT64                  Minimum = 0;
+    UINT64                  Maximum = 0;
+    UINT64                  AddressLength = 0;
+    UINT64                  Granularity = 0;
+    UINT64                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -399,8 +416,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
-    Descriptor->Address64.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS64) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -451,7 +467,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
             GranOp = InitializerOp;
@@ -459,7 +475,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
             MinOp = InitializerOp;
@@ -467,7 +483,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
             MaxOp = InitializerOp;
@@ -475,14 +491,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
             break;
 
         case 10: /* Address Length */
 
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
             LengthOp = InitializerOp;
@@ -494,7 +510,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address64.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -506,8 +522,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address64.ResourceLength = (UINT16)
-                        (Descriptor->Address64.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -568,13 +583,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address64.Minimum,
-        Descriptor->Address64.Maximum,
-        Descriptor->Address64.AddressLength,
-        Descriptor->Address64.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address64.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -609,8 +631,14 @@
     ASL_RESOURCE_NODE       *Rnode;
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  OptionIndex = 0;
     UINT32                  i;
+    UINT64                  Minimum = 0;
+    UINT64                  Maximum = 0;
+    UINT64                  AddressLength = 0;
+    UINT64                  Granularity = 0;
+    UINT64                  TranslationOffset = 0;
     BOOLEAN                 ResSourceIndex = FALSE;
 
 
@@ -628,8 +656,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS64);
-    Descriptor->Address64.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS64) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -678,7 +705,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->Address64.Granularity = InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Granularity));
             GranOp = InitializerOp;
@@ -686,7 +713,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->Address64.Minimum = InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Minimum));
             MinOp = InitializerOp;
@@ -694,7 +721,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->Address64.Maximum = InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.Maximum));
             MaxOp = InitializerOp;
@@ -702,14 +729,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->Address64.TranslationOffset = InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.TranslationOffset));
             break;
 
         case 10: /* Address Length */
 
-            Descriptor->Address64.AddressLength = InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address64.AddressLength));
             LengthOp = InitializerOp;
@@ -721,7 +748,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address64.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -733,8 +760,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address64.ResourceLength = (UINT16)
-                        (Descriptor->Address64.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -780,13 +806,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address64.Minimum,
-        Descriptor->Address64.Maximum,
-        Descriptor->Address64.AddressLength,
-        Descriptor->Address64.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address64.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address64.ResourceLength, &ResourceLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Minimum, &Minimum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Maximum, &Maximum);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.AddressLength, &AddressLength);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.Granularity, &Granularity);
+    ACPI_MOVE_64_TO_64(&Descriptor->Address64.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) +
                             OptionIndex + StringLength;
     return (Rnode);
Index: b/compiler/aslrestype2w.c
===================================================================
--- a/compiler/aslrestype2w.c	2010-07-02 21:42:26.689348992 +0900
+++ b/compiler/aslrestype2w.c	2010-07-04 11:18:19.502017898 +0900
@@ -158,6 +158,12 @@
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT16                  ResourceLength = 0;
+    UINT16                  Minimum = 0;
+    UINT16                  Maximum = 0;
+    UINT16                  AddressLength = 0;
+    UINT16                  Granularity = 0;
+    UINT16                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -177,8 +183,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
-    Descriptor->Address16.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS16) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -222,7 +227,7 @@
 
         case 5: /* Address Granularity */
 
-            Descriptor->Address16.Granularity = (UINT16) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
             GranOp = InitializerOp;
@@ -230,7 +235,7 @@
 
         case 6: /* Address Min */
 
-            Descriptor->Address16.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
             MinOp = InitializerOp;
@@ -238,7 +243,7 @@
 
         case 7: /* Address Max */
 
-            Descriptor->Address16.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
             MaxOp = InitializerOp;
@@ -246,14 +251,14 @@
 
         case 8: /* Translation Offset */
 
-            Descriptor->Address16.TranslationOffset = (UINT16) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
             break;
 
         case 9: /* Address Length */
 
-            Descriptor->Address16.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
             LengthOp = InitializerOp;
@@ -265,7 +270,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address16.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -277,8 +282,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address16.ResourceLength = (UINT16)
-                        (Descriptor->Address16.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -338,13 +342,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address16.Minimum,
-        Descriptor->Address16.Maximum,
-        Descriptor->Address16.AddressLength,
-        Descriptor->Address16.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address16.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -380,6 +391,12 @@
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT16                  ResourceLength = 0;
+    UINT16                  Minimum = 0;
+    UINT16                  Maximum = 0;
+    UINT16                  AddressLength = 0;
+    UINT16                  Granularity = 0;
+    UINT16                  TranslationOffset = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -399,8 +416,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
-    Descriptor->Address16.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS16) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -437,8 +453,7 @@
 
         case 4: /* Address Granularity */
 
-            Descriptor->Address16.Granularity =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
             GranOp = InitializerOp;
@@ -446,8 +461,7 @@
 
         case 5: /* Min Address */
 
-            Descriptor->Address16.Minimum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
             MinOp = InitializerOp;
@@ -455,8 +469,7 @@
 
         case 6: /* Max Address */
 
-            Descriptor->Address16.Maximum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
             MaxOp = InitializerOp;
@@ -464,16 +477,14 @@
 
         case 7: /* Translation Offset */
 
-            Descriptor->Address16.TranslationOffset =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
             break;
 
         case 8: /* Address Length */
 
-            Descriptor->Address16.AddressLength =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                  CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
             LengthOp = InitializerOp;
@@ -485,7 +496,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address16.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -497,8 +508,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address16.ResourceLength = (UINT16)
-                        (Descriptor->Address16.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -544,13 +554,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address16.Minimum,
-        Descriptor->Address16.Maximum,
-        Descriptor->Address16.AddressLength,
-        Descriptor->Address16.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address16.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
                             OptionIndex + StringLength;
     return (Rnode);
@@ -586,6 +603,12 @@
     UINT8                   *OptionalFields;
     UINT16                  StringLength = 0;
     UINT32                  OptionIndex = 0;
+    UINT16                  Minimum = 0;
+    UINT16                  Maximum = 0;
+    UINT16                  AddressLength = 0;
+    UINT16                  Granularity = 0;
+    UINT16                  TranslationOffset = 0;
+    UINT16                  ResourceLength = 0;
     UINT32                  i;
     BOOLEAN                 ResSourceIndex = FALSE;
 
@@ -604,8 +627,7 @@
      * optional fields present
      */
     OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
-    Descriptor->Address16.ResourceLength = (UINT16)
-        (sizeof (AML_RESOURCE_ADDRESS16) -
+    ResourceLength = (UINT16) (sizeof (AML_RESOURCE_ADDRESS16) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
     /* Process all child initialization nodes */
@@ -654,8 +676,7 @@
 
         case 6: /* Address Granularity */
 
-            Descriptor->Address16.Granularity =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Granularity = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
             GranOp = InitializerOp;
@@ -663,8 +684,7 @@
 
         case 7: /* Min Address */
 
-            Descriptor->Address16.Minimum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Minimum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
             MinOp = InitializerOp;
@@ -672,8 +692,7 @@
 
         case 8: /* Max Address */
 
-            Descriptor->Address16.Maximum =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            Maximum = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
             MaxOp = InitializerOp;
@@ -681,16 +700,14 @@
 
         case 9: /* Translation Offset */
 
-            Descriptor->Address16.TranslationOffset =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            TranslationOffset = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
             break;
 
         case 10: /* Address Length */
 
-            Descriptor->Address16.AddressLength =
-                (UINT16) InitializerOp->Asl.Value.Integer;
+            AddressLength = InitializerOp->Asl.Value.Integer;
             RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
             LengthOp = InitializerOp;
@@ -702,7 +719,7 @@
             {
                 OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
                 OptionIndex++;
-                Descriptor->Address16.ResourceLength++;
+                ResourceLength++;
                 ResSourceIndex = TRUE;
             }
             break;
@@ -714,8 +731,7 @@
             {
                 if (StringLength)
                 {
-                    Descriptor->Address16.ResourceLength = (UINT16)
-                        (Descriptor->Address16.ResourceLength + StringLength);
+                    ResourceLength = (UINT16) (ResourceLength + StringLength);
 
                     strcpy ((char *)
                         &OptionalFields[OptionIndex],
@@ -761,13 +777,20 @@
     /* Validate the Min/Max/Len/Gran values */
 
     RsLargeAddressCheck (
-        Descriptor->Address16.Minimum,
-        Descriptor->Address16.Maximum,
-        Descriptor->Address16.AddressLength,
-        Descriptor->Address16.Granularity,
+        Minimum,
+        Maximum,
+        AddressLength,
+        Granularity,
         Descriptor->Address16.Flags,
         MinOp, MaxOp, LengthOp, GranOp);
 
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.ResourceLength, &ResourceLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Minimum, &Minimum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Maximum, &Maximum);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.AddressLength, &AddressLength);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.Granularity, &Granularity);
+    ACPI_MOVE_16_TO_16(&Descriptor->Address16.TranslationOffset, &TranslationOffset);
+
     Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) +
                             OptionIndex + StringLength;
     return (Rnode);
Index: b/include/acmacros.h
===================================================================
--- a/include/acmacros.h	2010-07-02 21:42:26.573348963 +0900
+++ b/include/acmacros.h	2010-07-04 11:18:19.502017898 +0900
@@ -175,7 +175,8 @@
 
 /* 32-bit source, 16/32/64 destination */
 
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];}
 
 #define ACPI_MOVE_32_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
@@ -190,9 +191,13 @@
 
 /* 64-bit source, 16/32/64 destination */
 
-#define ACPI_MOVE_64_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];}
 
-#define ACPI_MOVE_64_TO_32(d, s)        ACPI_MOVE_32_TO_32(d, s)    /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_32(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
+                                         ((  UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
+                                         ((  UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];}
 
 #define ACPI_MOVE_64_TO_64(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
                                          ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
@@ -219,7 +224,9 @@
 
 /* 32-bit source, 16/32/64 destination */
 
-#define ACPI_MOVE_32_TO_16(d, s)        ACPI_MOVE_16_TO_16(d, s)    /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_16(d, s)        {((  UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
+                                         ((  UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
+
 #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)
 


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 4/5] Add architectures that do not support unaligned access and fix aligment issues
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
                   ` (2 preceding siblings ...)
  2010-07-04  4:43 ` [patch 3/5] Support compiling DSDT tables on big endian architectures malattia
@ 2010-07-04  4:43 ` malattia
  2010-07-04  4:43 ` [patch 5/5] Fix FTBFS on hurd-i386 malattia
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi, Mattia Dongili

[-- Attachment #1: unaligned.patch --]
[-- Type: text/plain, Size: 5474 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 compiler/asltree.c  |   15 ++++++++++-----
 executer/exoparg2.c |   12 +++++++++---
 include/actypes.h   |   26 +++++++++++++-------------
 3 files changed, 32 insertions(+), 21 deletions(-)

Index: b/include/actypes.h
===================================================================
--- a/include/actypes.h	2010-07-02 21:42:26.465350281 +0900
+++ b/include/actypes.h	2010-07-04 11:18:22.506529460 +0900
@@ -205,6 +205,19 @@
 
 /*! [End] no source code translation !*/
 
+/*
+ * In the case of the Itanium Processor Family (IPF), the hardware does not
+ * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
+ * to indicate that special precautions must be taken to avoid alignment faults.
+ * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
+ *
+ * Note: EM64T and other X86-64 processors support misaligned transfers,
+ * so there is no need to define this flag.
+ */
+#if defined (__IA64__) || defined (__ia64__) | defined(__alpha__) || defined(__sparc__) || defined(__hppa__) || defined(__arm__)
+#define ACPI_MISALIGNMENT_NOT_SUPPORTED
+#endif
+
 
 /*******************************************************************************
  *
@@ -231,19 +244,6 @@
 #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
 #define ACPI_USE_NATIVE_DIVIDE          /* Has native 64-bit integer support */
 
-/*
- * In the case of the Itanium Processor Family (IPF), the hardware does not
- * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
- * to indicate that special precautions must be taken to avoid alignment faults.
- * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
- *
- * Note: EM64T and other X86-64 processors support misaligned transfers,
- * so there is no need to define this flag.
- */
-#if defined (__IA64__) || defined (__ia64__)
-#define ACPI_MISALIGNMENT_NOT_SUPPORTED
-#endif
-
 
 /*******************************************************************************
  *
Index: b/executer/exoparg2.c
===================================================================
--- a/executer/exoparg2.c	2010-07-02 21:42:26.477349196 +0900
+++ b/executer/exoparg2.c	2010-07-04 11:18:22.506529460 +0900
@@ -248,6 +248,8 @@
     ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
     ACPI_OPERAND_OBJECT     *ReturnDesc1 = NULL;
     ACPI_OPERAND_OBJECT     *ReturnDesc2 = NULL;
+    UINT64                  ReturnValue1 = 0;
+    UINT64                  ReturnValue2 = 0;
     ACPI_STATUS             Status;
 
 
@@ -281,8 +283,10 @@
 
         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;
@@ -357,6 +361,7 @@
     ACPI_OPERAND_OBJECT     **Operand = &WalkState->Operands[0];
     ACPI_OPERAND_OBJECT     *ReturnDesc = NULL;
     UINT64                  Index;
+    UINT64                  ReturnValue = 0;
     ACPI_STATUS             Status = AE_OK;
     ACPI_SIZE               Length;
 
@@ -400,7 +405,8 @@
         Status = AcpiUtDivide (Operand[0]->Integer.Value,
                                Operand[1]->Integer.Value,
                                NULL,
-                               &ReturnDesc->Integer.Value);
+                               &ReturnValue);
+        ReturnDesc->Integer.Value = ReturnValue;
         break;
 
 
Index: b/compiler/asltree.c
===================================================================
--- a/compiler/asltree.c	2010-07-02 21:42:26.529349893 +0900
+++ b/compiler/asltree.c	2010-07-04 11:18:22.510539385 +0900
@@ -501,24 +501,27 @@
         "\nCreateValuedLeafNode  Ln/Col %u/%u NewNode %p  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;
 
     switch (ParseOpcode)
     {
     case PARSEOP_STRING_LITERAL:
-        DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
+        Op->Asl.Value.String = (ACPI_STRING) Value;
+        DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", (ACPI_STRING) Value);
         break;
 
     case PARSEOP_NAMESEG:
-        DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
+        Op->Asl.Value.String = (ACPI_STRING) Value;
+        DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", (ACPI_STRING) Value);
         break;
 
     case PARSEOP_NAMESTRING:
-        DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
+        Op->Asl.Value.String = (ACPI_STRING) Value;
+        DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", (ACPI_STRING) Value);
         break;
 
     case PARSEOP_EISAID:
-        DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
+        Op->Asl.Value.String = (ACPI_STRING) Value;
+        DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", (ACPI_STRING) Value);
         break;
 
     case PARSEOP_METHOD:
@@ -526,10 +529,12 @@
         break;
 
     case PARSEOP_INTEGER:
+        Op->Asl.Value.Integer = Value;
         DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
         break;
 
     default:
+        Op->Asl.Value.Integer = Value;
         break;
     }
 


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 5/5] Fix FTBFS on hurd-i386.
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
                   ` (3 preceding siblings ...)
  2010-07-04  4:43 ` [patch 4/5] Add architectures that do not support unaligned access and fix aligment issues malattia
@ 2010-07-04  4:43 ` malattia
  2010-07-05  1:01   ` [Devel] " Lin Ming
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-04  4:43 UTC (permalink / raw)
  To: Robert Moore; +Cc: Len Brown, linux-acpi, Mattia Dongili

[-- Attachment #1: fix_ftbfs_debian-hurd.patch --]
[-- Type: text/plain, Size: 671 bytes --]

Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 include/platform/acenv.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/include/platform/acenv.h
===================================================================
--- a/include/platform/acenv.h	2010-07-04 11:18:17.506017933 +0900
+++ b/include/platform/acenv.h	2010-07-04 11:18:24.686018064 +0900
@@ -193,7 +193,7 @@
  *
  *****************************************************************************/
 
-#if defined(_LINUX) || defined(__linux__)
+#if defined(_LINUX) || defined(__linux__) || defined(__GNU__)
 #include "aclinux.h"
 
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
@ 2010-07-05  1:01   ` Lin Ming
  0 siblings, 0 replies; 23+ messages in thread
From: Lin Ming @ 2010-07-05  1:01 UTC (permalink / raw)
  To: malattia, devel; +Cc: Moore, Robert, Len Brown, linux-acpi

On Sun, 2010-07-04 at 12:43 +0800, malattia@linux.it wrote:
> Hi Robert,
> 
> Here is a series of patches that I've been carrying in the iasl Debian
> package for some time. They are all refreshed and reworked to apply
> cleanly on top of acpica-unix-20100528.
> The series consists a couple of trivial patches to fix building on the
> FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
> compiling ASL on big endian architectures.
> It would be great if you could apply the patches to your source tree and
> ship new release with this work included.
> Let me know if you want me to run more tests or change something in the
> patches.
> 
> I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
> have here) with the whole set applied and the results were identical on
> BE and LE machines as well as being identical to what a clean iasl
> produces on x86[1].
> You can see build logs for all the architectures supported here:
> https://buildd.debian.org/status/package.php?p=acpica-unix

Hi,

Thanks for the patches.

(linux-acpi@vger.kernel.org is for linux-specific acpi dicussion. Better
to post these patches to ACPICA maillist devel@acpica.org)

I read these patches but not clear what the problem they solved.
Could you add info in the log of each patch?

Thanks,
Lin Ming


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Devel] [patch 0/5] iASL patches in Debian
@ 2010-07-05  1:01   ` Lin Ming
  0 siblings, 0 replies; 23+ messages in thread
From: Lin Ming @ 2010-07-05  1:01 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

On Sun, 2010-07-04 at 12:43 +0800, malattia(a)linux.it wrote:
> Hi Robert,
> 
> Here is a series of patches that I've been carrying in the iasl Debian
> package for some time. They are all refreshed and reworked to apply
> cleanly on top of acpica-unix-20100528.
> The series consists a couple of trivial patches to fix building on the
> FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
> compiling ASL on big endian architectures.
> It would be great if you could apply the patches to your source tree and
> ship new release with this work included.
> Let me know if you want me to run more tests or change something in the
> patches.
> 
> I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
> have here) with the whole set applied and the results were identical on
> BE and LE machines as well as being identical to what a clean iasl
> produces on x86[1].
> You can see build logs for all the architectures supported here:
> https://buildd.debian.org/status/package.php?p=acpica-unix

Hi,

Thanks for the patches.

(linux-acpi(a)vger.kernel.org is for linux-specific acpi dicussion. Better
to post these patches to ACPICA maillist devel(a)acpica.org)

I read these patches but not clear what the problem they solved.
Could you add info in the log of each patch?

Thanks,
Lin Ming


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
@ 2010-07-05 11:49     ` malattia
  0 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-05 11:49 UTC (permalink / raw)
  To: Lin Ming; +Cc: devel, Moore, Robert, Len Brown, linux-acpi

On Mon, Jul 05, 2010 at 09:01:39AM +0800, Lin Ming wrote:
> On Sun, 2010-07-04 at 12:43 +0800, malattia@linux.it wrote:
> > Hi Robert,
> > 
> > Here is a series of patches that I've been carrying in the iasl Debian
> > package for some time. They are all refreshed and reworked to apply
> > cleanly on top of acpica-unix-20100528.
...
> Hi,
> 
> Thanks for the patches.
> 
> (linux-acpi@vger.kernel.org is for linux-specific acpi dicussion. Better
> to post these patches to ACPICA maillist devel@acpica.org)
> 
> I read these patches but not clear what the problem they solved.
> Could you add info in the log of each patch?

Sure, thanks for the ML pointer too.
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Devel] [patch 0/5] iASL patches in Debian
@ 2010-07-05 11:49     ` malattia
  0 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-05 11:49 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

On Mon, Jul 05, 2010 at 09:01:39AM +0800, Lin Ming wrote:
> On Sun, 2010-07-04 at 12:43 +0800, malattia(a)linux.it wrote:
> > Hi Robert,
> > 
> > Here is a series of patches that I've been carrying in the iasl Debian
> > package for some time. They are all refreshed and reworked to apply
> > cleanly on top of acpica-unix-20100528.
...
> Hi,
> 
> Thanks for the patches.
> 
> (linux-acpi(a)vger.kernel.org is for linux-specific acpi dicussion. Better
> to post these patches to ACPICA maillist devel(a)acpica.org)
> 
> I read these patches but not clear what the problem they solved.
> Could you add info in the log of each patch?

Sure, thanks for the ML pointer too.
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [patch 0/5] iASL patches in Debian
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
                   ` (5 preceding siblings ...)
  2010-07-05  1:01   ` [Devel] " Lin Ming
@ 2010-07-06 17:01 ` Moore, Robert
  2010-07-07 19:27 ` Moore, Robert
  7 siblings, 0 replies; 23+ messages in thread
From: Moore, Robert @ 2010-07-06 17:01 UTC (permalink / raw)
  To: malattia; +Cc: Len Brown, linux-acpi

OK, We will look closely at these. I'm moving my office this week, so please be patient.

Thanks,
Bob


>-----Original Message-----
>From: malattia@linux.it [mailto:malattia@linux.it]
>Sent: Saturday, July 03, 2010 9:44 PM
>To: Moore, Robert
>Cc: Len Brown; linux-acpi@vger.kernel.org
>Subject: [patch 0/5] iASL patches in Debian
>
>Hi Robert,
>
>Here is a series of patches that I've been carrying in the iasl Debian
>package for some time. They are all refreshed and reworked to apply
>cleanly on top of acpica-unix-20100528.
>The series consists a couple of trivial patches to fix building on the
>FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
>compiling ASL on big endian architectures.
>It would be great if you could apply the patches to your source tree and
>ship new release with this work included.
>Let me know if you want me to run more tests or change something in the
>patches.
>
>I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
>have here) with the whole set applied and the results were identical on
>BE and LE machines as well as being identical to what a clean iasl
>produces on x86[1].
>You can see build logs for all the architectures supported here:
>https://buildd.debian.org/status/package.php?p=acpica-unix
>
>Thanks
>
>[1]: checked with (1) an hex dump of the AML file, (2) the C file
>generated with -tc and (3) by decompiling the AML to DSL on x86 and
>comparing the results.
>As a side note pristine iasl on x86 sefaults when building
>test/misc/grammar.asl, with these patches applied it doesn't.
>
>--
>mattia

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [patch 0/5] iASL patches in Debian
  2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
                   ` (6 preceding siblings ...)
  2010-07-06 17:01 ` Moore, Robert
@ 2010-07-07 19:27 ` Moore, Robert
  2010-07-07 22:07   ` malattia
  7 siblings, 1 reply; 23+ messages in thread
From: Moore, Robert @ 2010-07-07 19:27 UTC (permalink / raw)
  To: malattia; +Cc: Len Brown, linux-acpi

If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.


>-----Original Message-----
>From: malattia@linux.it [mailto:malattia@linux.it]
>Sent: Saturday, July 03, 2010 9:44 PM
>To: Moore, Robert
>Cc: Len Brown; linux-acpi@vger.kernel.org
>Subject: [patch 0/5] iASL patches in Debian
>
>Hi Robert,
>
>Here is a series of patches that I've been carrying in the iasl Debian
>package for some time. They are all refreshed and reworked to apply
>cleanly on top of acpica-unix-20100528.
>The series consists a couple of trivial patches to fix building on the
>FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
>compiling ASL on big endian architectures.
>It would be great if you could apply the patches to your source tree and
>ship new release with this work included.
>Let me know if you want me to run more tests or change something in the
>patches.
>
>I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
>have here) with the whole set applied and the results were identical on
>BE and LE machines as well as being identical to what a clean iasl
>produces on x86[1].
>You can see build logs for all the architectures supported here:
>https://buildd.debian.org/status/package.php?p=acpica-unix
>
>Thanks
>
>[1]: checked with (1) an hex dump of the AML file, (2) the C file
>generated with -tc and (3) by decompiling the AML to DSL on x86 and
>comparing the results.
>As a side note pristine iasl on x86 sefaults when building
>test/misc/grammar.asl, with these patches applied it doesn't.
>
>--
>mattia

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-07 19:27 ` Moore, Robert
@ 2010-07-07 22:07   ` malattia
  2010-07-07 23:41     ` Moore, Robert
  2010-07-08  0:49     ` Lin Ming
  0 siblings, 2 replies; 23+ messages in thread
From: malattia @ 2010-07-07 22:07 UTC (permalink / raw)
  To: Moore, Robert; +Cc: Len Brown, linux-acpi

On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.

I'll give it a go :)
Is the one found in the meego git repository what I should try?

Just one note that probably was not clear from my initial email: the
patches I sent to support BE architectures are only for compiling asl
code.
I'd like to add support for decompiling too eventually.

Thanks!

> >-----Original Message-----
> >From: malattia@linux.it [mailto:malattia@linux.it]
> >Sent: Saturday, July 03, 2010 9:44 PM
> >To: Moore, Robert
> >Cc: Len Brown; linux-acpi@vger.kernel.org
> >Subject: [patch 0/5] iASL patches in Debian
> >
> >Hi Robert,
> >
> >Here is a series of patches that I've been carrying in the iasl Debian
> >package for some time. They are all refreshed and reworked to apply
> >cleanly on top of acpica-unix-20100528.
> >The series consists a couple of trivial patches to fix building on the
> >FreeBSD and Hurd kernel flavours of Debian and some larger ones to enable
> >compiling ASL on big endian architectures.
> >It would be great if you could apply the patches to your source tree and
> >ship new release with this work included.
> >Let me know if you want me to run more tests or change something in the
> >patches.
> >
> >I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
> >have here) with the whole set applied and the results were identical on
> >BE and LE machines as well as being identical to what a clean iasl
> >produces on x86[1].
> >You can see build logs for all the architectures supported here:
> >https://buildd.debian.org/status/package.php?p=acpica-unix
> >
> >Thanks
> >
> >[1]: checked with (1) an hex dump of the AML file, (2) the C file
> >generated with -tc and (3) by decompiling the AML to DSL on x86 and
> >comparing the results.
> >As a side note pristine iasl on x86 sefaults when building
> >test/misc/grammar.asl, with these patches applied it doesn't.
> >
> >--
> >mattia
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [patch 0/5] iASL patches in Debian
  2010-07-07 22:07   ` malattia
@ 2010-07-07 23:41     ` Moore, Robert
  2010-07-08 13:41       ` malattia
  2010-07-08  0:49     ` Lin Ming
  1 sibling, 1 reply; 23+ messages in thread
From: Moore, Robert @ 2010-07-07 23:41 UTC (permalink / raw)
  To: malattia; +Cc: Len Brown, linux-acpi

Then be sure to disable the disassembler with an appropriate error message on these architectures.

Note, we now have a data table compiler, you should look at that also.


>-----Original Message-----
>From: malattia@linux.it [mailto:malattia@linux.it]
>Sent: Wednesday, July 07, 2010 3:08 PM
>To: Moore, Robert
>Cc: Len Brown; linux-acpi@vger.kernel.org
>Subject: Re: [patch 0/5] iASL patches in Debian
>
>On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
>> If you'd like to get ambitious, run the ASLTS suite on the big-endian
>machines.
>
>I'll give it a go :)
>Is the one found in the meego git repository what I should try?
>
>Just one note that probably was not clear from my initial email: the
>patches I sent to support BE architectures are only for compiling asl
>code.
>I'd like to add support for decompiling too eventually.
>
>Thanks!
>
>> >-----Original Message-----
>> >From: malattia@linux.it [mailto:malattia@linux.it]
>> >Sent: Saturday, July 03, 2010 9:44 PM
>> >To: Moore, Robert
>> >Cc: Len Brown; linux-acpi@vger.kernel.org
>> >Subject: [patch 0/5] iASL patches in Debian
>> >
>> >Hi Robert,
>> >
>> >Here is a series of patches that I've been carrying in the iasl Debian
>> >package for some time. They are all refreshed and reworked to apply
>> >cleanly on top of acpica-unix-20100528.
>> >The series consists a couple of trivial patches to fix building on the
>> >FreeBSD and Hurd kernel flavours of Debian and some larger ones to
>enable
>> >compiling ASL on big endian architectures.
>> >It would be great if you could apply the patches to your source tree and
>> >ship new release with this work included.
>> >Let me know if you want me to run more tests or change something in the
>> >patches.
>> >
>> >I tested building tests/misc/grammar.asl (plus a number or other DSDTs I
>> >have here) with the whole set applied and the results were identical on
>> >BE and LE machines as well as being identical to what a clean iasl
>> >produces on x86[1].
>> >You can see build logs for all the architectures supported here:
>> >https://buildd.debian.org/status/package.php?p=acpica-unix
>> >
>> >Thanks
>> >
>> >[1]: checked with (1) an hex dump of the AML file, (2) the C file
>> >generated with -tc and (3) by decompiling the AML to DSL on x86 and
>> >comparing the results.
>> >As a side note pristine iasl on x86 sefaults when building
>> >test/misc/grammar.asl, with these patches applied it doesn't.
>> >
>> >--
>> >mattia
>--
>mattia
>:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-07 22:07   ` malattia
  2010-07-07 23:41     ` Moore, Robert
@ 2010-07-08  0:49     ` Lin Ming
  2010-07-08 13:49       ` malattia
  1 sibling, 1 reply; 23+ messages in thread
From: Lin Ming @ 2010-07-08  0:49 UTC (permalink / raw)
  To: malattia; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
> On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> > If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.
> 
> I'll give it a go :)
> Is the one found in the meego git repository what I should try?

Or acpica git repository (git://git.moblin.org/acpica)

acpica/tests/aslts


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-07 23:41     ` Moore, Robert
@ 2010-07-08 13:41       ` malattia
  2010-07-08 22:14         ` Lin Ming
  0 siblings, 1 reply; 23+ messages in thread
From: malattia @ 2010-07-08 13:41 UTC (permalink / raw)
  To: Moore, Robert; +Cc: Len Brown, linux-acpi

On Wed, Jul 07, 2010 at 04:41:11PM -0700, Moore, Robert wrote:
> Then be sure to disable the disassembler with an appropriate error
> message on these architectures.

Right, makes sense.
It may take a few more days before I get the time to get back to digging
into iasl code, I'll see if it's not too hard to support disassembling
before doing as you suggests.

> Note, we now have a data table compiler, you should look at that also.

sure, any pointer to a starting point? :)

Thanks!
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-08  0:49     ` Lin Ming
@ 2010-07-08 13:49       ` malattia
  2010-07-08 22:06         ` Lin Ming
  0 siblings, 1 reply; 23+ messages in thread
From: malattia @ 2010-07-08 13:49 UTC (permalink / raw)
  To: Lin Ming; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, Jul 08, 2010 at 08:49:24AM +0800, Lin Ming wrote:
> On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
> > On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> > > If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.
> > 
> > I'll give it a go :)
> > Is the one found in the meego git repository what I should try?
> 
> Or acpica git repository (git://git.moblin.org/acpica)
> 
> acpica/tests/aslts

For now I only ran "Do 0 aslts" and the results are not too bad. I cleaned
up the build logs a bit and here's the diff between sparc64 and x86_64:

--- /proc/self/fd/11	2010-07-08 22:33:25.614802828 +0900
+++ /proc/self/fd/13	2010-07-08 22:33:25.614802828 +0900
@@ -1,6 +1,10 @@
-Linux smetana 2.6.26-2-sparc64-smp #1 SMP Mon Jun 21 16:31:11 UTC 2010 sparc64 GNU/Linux
+Linux caligola 2.6.34 #37 SMP PREEMPT Sat May 29 11:36:03 JST 2010 x86_64 GNU/Linux
 
 Make-install all the provided test cases
+install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/32
+install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/64
+install -d -m 775 ../../../../../../tmp/aml/20100528/opt/32
+install -d -m 775 ../../../../../../tmp/aml/20100528/opt/64
 ASL Input:  MAIN.asl - 78 lines, 1734433 bytes, 21705 keywords
 AML Output: bdemo.aml - 282587 bytes, 4188 named objects, 17517 executable opcodes
 
@@ -90,11 +94,11 @@
 
 Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
 ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
-AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403 executable opcodes
+AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403 executable opcodes
 
 Compilation complete. 0 Errors, 1852 Warnings, 18 Remarks, 7775 Optimizations
 ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
-AML Output: oconst.aml - 261267 bytes, 862 named objects, 19403 executable opcodes
+AML Output: oconst.aml - 261272 bytes, 862 named objects, 19403 executable opcodes
 
 Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 7908 Optimizations
 ASL Input:  MAIN.asl - 66 lines, 256106 bytes, 3194 keywords
@@ -666,11 +670,11 @@
 
 Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 0 Optimizations
 ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
-AML Output: dynobj.aml - 57915 bytes, 599 named objects, 4286 executable opcodes
+AML Output: dynobj.aml - 57916 bytes, 599 named objects, 4286 executable opcodes
 
 Compilation complete. 0 Errors, 129 Warnings, 10 Remarks, 2101 Optimizations
 ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
-AML Output: dynobj.aml - 57919 bytes, 599 named objects, 4286 executable opcodes
+AML Output: dynobj.aml - 57920 bytes, 599 named objects, 4286 executable opcodes
 
 Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 2101 Optimizations
 ASL Input:  MAIN.asl - 60 lines, 94913 bytes, 1410 keywords

Looks like I have some more work to do ;)
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-08 22:06         ` Lin Ming
@ 2010-07-08 14:40           ` malattia
  2010-07-14  1:42             ` Lin Ming
  2010-07-08 14:44           ` Moore, Robert
  1 sibling, 1 reply; 23+ messages in thread
From: malattia @ 2010-07-08 14:40 UTC (permalink / raw)
  To: Lin Ming; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, Jul 08, 2010 at 10:06:47PM +0000, Lin Ming wrote:
> On Thu, 2010-07-08 at 21:49 +0800, malattia@linux.it wrote:
> > On Thu, Jul 08, 2010 at 08:49:24AM +0800, Lin Ming wrote:
> > > On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
> > > > On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> > > > > If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.
> > > > 
> > > > I'll give it a go :)
> > > > Is the one found in the meego git repository what I should try?
> > > 
> > > Or acpica git repository (git://git.moblin.org/acpica)
> > > 
> > > acpica/tests/aslts
> > 
> > For now I only ran "Do 0 aslts" and the results are not too bad. I cleaned
> > up the build logs a bit and here's the diff between sparc64 and x86_64:
> 
> Good. Thanks!
> 
> > 
> > --- /proc/self/fd/11	2010-07-08 22:33:25.614802828 +0900
> > +++ /proc/self/fd/13	2010-07-08 22:33:25.614802828 +0900
> > @@ -1,6 +1,10 @@
> > -Linux smetana 2.6.26-2-sparc64-smp #1 SMP Mon Jun 21 16:31:11 UTC 2010 sparc64 GNU/Linux
> > +Linux caligola 2.6.34 #37 SMP PREEMPT Sat May 29 11:36:03 JST 2010 x86_64 GNU/Linux
> >  
> >  Make-install all the provided test cases
> > +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/32
> > +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/64
> > +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/32
> > +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/64
> >  ASL Input:  MAIN.asl - 78 lines, 1734433 bytes, 21705 keywords
> >  AML Output: bdemo.aml - 282587 bytes, 4188 named objects, 17517 executable opcodes
> >  
> > @@ -90,11 +94,11 @@
> >  
> >  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
> >  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
> > -AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403 executable opcodes
> > +AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403 executable opcodes
> 
> Why do the aml files have different size?
> Is it caused by big/small endian?

They should be identical, possibly my patch is incomplete or not
correct. Out of the ~180 tests only the ones in the diff show
differences.
I'll have to check what is wrong on sparc64 for them.

...
> > +AML Output: oconst.aml - 261272 bytes, 862 named objects, 19403 executable opcodes
> > +AML Output: dynobj.aml - 57916 bytes, 599 named objects, 4286 executable opcodes
> > +AML Output: dynobj.aml - 57920 bytes, 599 named objects, 4286 executable opcodes
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [patch 0/5] iASL patches in Debian
  2010-07-08 22:06         ` Lin Ming
  2010-07-08 14:40           ` malattia
@ 2010-07-08 14:44           ` Moore, Robert
  1 sibling, 0 replies; 23+ messages in thread
From: Moore, Robert @ 2010-07-08 14:44 UTC (permalink / raw)
  To: Lin, Ming M, malattia; +Cc: Len Brown, linux-acpi

Output files should (and must) be identical. ACPI tables are not endian-specific.



>-----Original Message-----
>From: Lin, Ming M
>Sent: Thursday, July 08, 2010 3:07 PM
>To: malattia@linux.it
>Cc: Moore, Robert; Len Brown; linux-acpi@vger.kernel.org
>Subject: Re: [patch 0/5] iASL patches in Debian
>
>On Thu, 2010-07-08 at 21:49 +0800, malattia@linux.it wrote:
>> On Thu, Jul 08, 2010 at 08:49:24AM +0800, Lin Ming wrote:
>> > On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
>> > > On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
>> > > > If you'd like to get ambitious, run the ASLTS suite on the big-
>endian machines.
>> > >
>> > > I'll give it a go :)
>> > > Is the one found in the meego git repository what I should try?
>> >
>> > Or acpica git repository (git://git.moblin.org/acpica)
>> >
>> > acpica/tests/aslts
>>
>> For now I only ran "Do 0 aslts" and the results are not too bad. I
>cleaned
>> up the build logs a bit and here's the diff between sparc64 and x86_64:
>
>Good. Thanks!
>
>>
>> --- /proc/self/fd/11	2010-07-08 22:33:25.614802828 +0900
>> +++ /proc/self/fd/13	2010-07-08 22:33:25.614802828 +0900
>> @@ -1,6 +1,10 @@
>> -Linux smetana 2.6.26-2-sparc64-smp #1 SMP Mon Jun 21 16:31:11 UTC 2010
>sparc64 GNU/Linux
>> +Linux caligola 2.6.34 #37 SMP PREEMPT Sat May 29 11:36:03 JST 2010
>x86_64 GNU/Linux
>>
>>  Make-install all the provided test cases
>> +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/32
>> +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/64
>> +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/32
>> +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/64
>>  ASL Input:  MAIN.asl - 78 lines, 1734433 bytes, 21705 keywords
>>  AML Output: bdemo.aml - 282587 bytes, 4188 named objects, 17517
>executable opcodes
>>
>> @@ -90,11 +94,11 @@
>>
>>  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
>>  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
>> -AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403
>executable opcodes
>> +AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403
>executable opcodes
>
>Why do the aml files have different size?
>Is it caused by big/small endian?
>
>Lin Ming
>
>>
>>  Compilation complete. 0 Errors, 1852 Warnings, 18 Remarks, 7775
>Optimizations
>>  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
>> -AML Output: oconst.aml - 261267 bytes, 862 named objects, 19403
>executable opcodes
>> +AML Output: oconst.aml - 261272 bytes, 862 named objects, 19403
>executable opcodes
>>
>>  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 7908
>Optimizations
>>  ASL Input:  MAIN.asl - 66 lines, 256106 bytes, 3194 keywords
>> @@ -666,11 +670,11 @@
>>
>>  Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 0
>Optimizations
>>  ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
>> -AML Output: dynobj.aml - 57915 bytes, 599 named objects, 4286 executable
>opcodes
>> +AML Output: dynobj.aml - 57916 bytes, 599 named objects, 4286 executable
>opcodes
>>
>>  Compilation complete. 0 Errors, 129 Warnings, 10 Remarks, 2101
>Optimizations
>>  ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
>> -AML Output: dynobj.aml - 57919 bytes, 599 named objects, 4286 executable
>opcodes
>> +AML Output: dynobj.aml - 57920 bytes, 599 named objects, 4286 executable
>opcodes
>>
>>  Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 2101
>Optimizations
>>  ASL Input:  MAIN.asl - 60 lines, 94913 bytes, 1410 keywords
>>
>> Looks like I have some more work to do ;)
>


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-08 13:49       ` malattia
@ 2010-07-08 22:06         ` Lin Ming
  2010-07-08 14:40           ` malattia
  2010-07-08 14:44           ` Moore, Robert
  0 siblings, 2 replies; 23+ messages in thread
From: Lin Ming @ 2010-07-08 22:06 UTC (permalink / raw)
  To: malattia; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, 2010-07-08 at 21:49 +0800, malattia@linux.it wrote:
> On Thu, Jul 08, 2010 at 08:49:24AM +0800, Lin Ming wrote:
> > On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
> > > On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> > > > If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.
> > > 
> > > I'll give it a go :)
> > > Is the one found in the meego git repository what I should try?
> > 
> > Or acpica git repository (git://git.moblin.org/acpica)
> > 
> > acpica/tests/aslts
> 
> For now I only ran "Do 0 aslts" and the results are not too bad. I cleaned
> up the build logs a bit and here's the diff between sparc64 and x86_64:

Good. Thanks!

> 
> --- /proc/self/fd/11	2010-07-08 22:33:25.614802828 +0900
> +++ /proc/self/fd/13	2010-07-08 22:33:25.614802828 +0900
> @@ -1,6 +1,10 @@
> -Linux smetana 2.6.26-2-sparc64-smp #1 SMP Mon Jun 21 16:31:11 UTC 2010 sparc64 GNU/Linux
> +Linux caligola 2.6.34 #37 SMP PREEMPT Sat May 29 11:36:03 JST 2010 x86_64 GNU/Linux
>  
>  Make-install all the provided test cases
> +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/32
> +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/64
> +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/32
> +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/64
>  ASL Input:  MAIN.asl - 78 lines, 1734433 bytes, 21705 keywords
>  AML Output: bdemo.aml - 282587 bytes, 4188 named objects, 17517 executable opcodes
>  
> @@ -90,11 +94,11 @@
>  
>  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
>  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
> -AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403 executable opcodes
> +AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403 executable opcodes

Why do the aml files have different size?
Is it caused by big/small endian?

Lin Ming

>  
>  Compilation complete. 0 Errors, 1852 Warnings, 18 Remarks, 7775 Optimizations
>  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
> -AML Output: oconst.aml - 261267 bytes, 862 named objects, 19403 executable opcodes
> +AML Output: oconst.aml - 261272 bytes, 862 named objects, 19403 executable opcodes
>  
>  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 7908 Optimizations
>  ASL Input:  MAIN.asl - 66 lines, 256106 bytes, 3194 keywords
> @@ -666,11 +670,11 @@
>  
>  Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 0 Optimizations
>  ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
> -AML Output: dynobj.aml - 57915 bytes, 599 named objects, 4286 executable opcodes
> +AML Output: dynobj.aml - 57916 bytes, 599 named objects, 4286 executable opcodes
>  
>  Compilation complete. 0 Errors, 129 Warnings, 10 Remarks, 2101 Optimizations
>  ASL Input:  MAIN.asl - 71 lines, 229960 bytes, 4885 keywords
> -AML Output: dynobj.aml - 57919 bytes, 599 named objects, 4286 executable opcodes
> +AML Output: dynobj.aml - 57920 bytes, 599 named objects, 4286 executable opcodes
>  
>  Compilation complete. 0 Errors, 127 Warnings, 10 Remarks, 2101 Optimizations
>  ASL Input:  MAIN.asl - 60 lines, 94913 bytes, 1410 keywords
> 
> Looks like I have some more work to do ;)



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-08 13:41       ` malattia
@ 2010-07-08 22:14         ` Lin Ming
  0 siblings, 0 replies; 23+ messages in thread
From: Lin Ming @ 2010-07-08 22:14 UTC (permalink / raw)
  To: malattia; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, 2010-07-08 at 21:41 +0800, malattia@linux.it wrote:
> On Wed, Jul 07, 2010 at 04:41:11PM -0700, Moore, Robert wrote:
> > Then be sure to disable the disassembler with an appropriate error
> > message on these architectures.
> 
> Right, makes sense.
> It may take a few more days before I get the time to get back to digging
> into iasl code, I'll see if it's not too hard to support disassembling
> before doing as you suggests.
> 
> > Note, we now have a data table compiler, you should look at that also.
> 
> sure, any pointer to a starting point? :)

We have a nice document, see 
http://www.acpica.org/download/aslcompiler.pdf

Section 2.4 Data Table Compiler

> 
> Thanks!



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-08 14:40           ` malattia
@ 2010-07-14  1:42             ` Lin Ming
  2010-07-15 21:29               ` malattia
  0 siblings, 1 reply; 23+ messages in thread
From: Lin Ming @ 2010-07-14  1:42 UTC (permalink / raw)
  To: malattia; +Cc: Moore, Robert, Len Brown, linux-acpi

On Thu, 2010-07-08 at 22:40 +0800, malattia@linux.it wrote:
> On Thu, Jul 08, 2010 at 10:06:47PM +0000, Lin Ming wrote:
> > On Thu, 2010-07-08 at 21:49 +0800, malattia@linux.it wrote:
> > > On Thu, Jul 08, 2010 at 08:49:24AM +0800, Lin Ming wrote:
> > > > On Thu, 2010-07-08 at 06:07 +0800, malattia@linux.it wrote:
> > > > > On Wed, Jul 07, 2010 at 12:27:20PM -0700, Moore, Robert wrote:
> > > > > > If you'd like to get ambitious, run the ASLTS suite on the big-endian machines.
> > > > > 
> > > > > I'll give it a go :)
> > > > > Is the one found in the meego git repository what I should try?
> > > > 
> > > > Or acpica git repository (git://git.moblin.org/acpica)
> > > > 
> > > > acpica/tests/aslts
> > > 
> > > For now I only ran "Do 0 aslts" and the results are not too bad. I cleaned
> > > up the build logs a bit and here's the diff between sparc64 and x86_64:
> > 
> > Good. Thanks!
> > 
> > > 
> > > --- /proc/self/fd/11	2010-07-08 22:33:25.614802828 +0900
> > > +++ /proc/self/fd/13	2010-07-08 22:33:25.614802828 +0900
> > > @@ -1,6 +1,10 @@
> > > -Linux smetana 2.6.26-2-sparc64-smp #1 SMP Mon Jun 21 16:31:11 UTC 2010 sparc64 GNU/Linux
> > > +Linux caligola 2.6.34 #37 SMP PREEMPT Sat May 29 11:36:03 JST 2010 x86_64 GNU/Linux
> > >  
> > >  Make-install all the provided test cases
> > > +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/32
> > > +install -d -m 775 ../../../../../../tmp/aml/20100528/nopt/64
> > > +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/32
> > > +install -d -m 775 ../../../../../../tmp/aml/20100528/opt/64
> > >  ASL Input:  MAIN.asl - 78 lines, 1734433 bytes, 21705 keywords
> > >  AML Output: bdemo.aml - 282587 bytes, 4188 named objects, 17517 executable opcodes
> > >  
> > > @@ -90,11 +94,11 @@
> > >  
> > >  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
> > >  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
> > > -AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403 executable opcodes
> > > +AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403 executable opcodes
> > 
> > Why do the aml files have different size?
> > Is it caused by big/small endian?
> 
> They should be identical, possibly my patch is incomplete or not
> correct. Out of the ~180 tests only the ones in the diff show
> differences.
> I'll have to check what is wrong on sparc64 for them.

Hi, 

Did you find out why they are different?

You can disassemble the aml files and see what the differences are.

Thanks,
Lin Ming

> 
> ...
> > > +AML Output: oconst.aml - 261272 bytes, 862 named objects, 19403 executable opcodes
> > > +AML Output: dynobj.aml - 57916 bytes, 599 named objects, 4286 executable opcodes
> > > +AML Output: dynobj.aml - 57920 bytes, 599 named objects, 4286 executable opcodes


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 0/5] iASL patches in Debian
  2010-07-14  1:42             ` Lin Ming
@ 2010-07-15 21:29               ` malattia
  0 siblings, 0 replies; 23+ messages in thread
From: malattia @ 2010-07-15 21:29 UTC (permalink / raw)
  To: Lin Ming; +Cc: Moore, Robert, Len Brown, linux-acpi

On Wed, Jul 14, 2010 at 09:42:43AM +0800, Lin Ming wrote:
> On Thu, 2010-07-08 at 22:40 +0800, malattia@linux.it wrote:
> > On Thu, Jul 08, 2010 at 10:06:47PM +0000, Lin Ming wrote:
...
> > > >  Compilation complete. 0 Errors, 83 Warnings, 18 Remarks, 0 Optimizations
> > > >  ASL Input:  MAIN.asl - 62 lines, 962044 bytes, 20265 keywords
> > > > -AML Output: oconst.aml - 255557 bytes, 862 named objects, 19403 executable opcodes
> > > > +AML Output: oconst.aml - 255575 bytes, 862 named objects, 19403 executable opcodes
> > > 
> > > Why do the aml files have different size?
> > > Is it caused by big/small endian?
> > 
> > They should be identical, possibly my patch is incomplete or not
> > correct. Out of the ~180 tests only the ones in the diff show
> > differences.
> > I'll have to check what is wrong on sparc64 for them.
> 
> Hi, 
> 
> Did you find out why they are different?
> 
> You can disassemble the aml files and see what the differences are.

haven't had the time to go after it yet. apologies.

But on a separate note, I assume there is interest in applying the
patches to the upstream tree (at least once they are complete).

Thanks!
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2010-07-15 21:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-04  4:43 [patch 0/5] iASL patches in Debian malattia
2010-07-04  4:43 ` [patch 1/5] allow overriding only some of the CFLAGS malattia
2010-07-04  4:43 ` [patch 2/5] Small tweak to define uintptr_t and successfully build on debian/kfreebsd malattia
2010-07-04  4:43 ` [patch 3/5] Support compiling DSDT tables on big endian architectures malattia
2010-07-04  4:43 ` [patch 4/5] Add architectures that do not support unaligned access and fix aligment issues malattia
2010-07-04  4:43 ` [patch 5/5] Fix FTBFS on hurd-i386 malattia
2010-07-05  1:01 ` [patch 0/5] iASL patches in Debian Lin Ming
2010-07-05  1:01   ` [Devel] " Lin Ming
2010-07-05 11:49   ` malattia
2010-07-05 11:49     ` [Devel] " malattia
2010-07-06 17:01 ` Moore, Robert
2010-07-07 19:27 ` Moore, Robert
2010-07-07 22:07   ` malattia
2010-07-07 23:41     ` Moore, Robert
2010-07-08 13:41       ` malattia
2010-07-08 22:14         ` Lin Ming
2010-07-08  0:49     ` Lin Ming
2010-07-08 13:49       ` malattia
2010-07-08 22:06         ` Lin Ming
2010-07-08 14:40           ` malattia
2010-07-14  1:42             ` Lin Ming
2010-07-15 21:29               ` malattia
2010-07-08 14:44           ` Moore, Robert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.