]> git.pld-linux.org Git - packages/acpica.git/blob - 0004-Re-enable-support-for-big-endian-machines.patch
- added verbose patch not to hide compiler command line, disable stripping on install
[packages/acpica.git] / 0004-Re-enable-support-for-big-endian-machines.patch
1 From 16734feab4204d6930c1ede62e527920607daace Mon Sep 17 00:00:00 2001
2 From: Al Stone <ahs3@redhat.com>
3 Date: Wed, 16 Sep 2020 16:27:06 -0600
4 Subject: [PATCH 04/45] Re-enable support for big-endian machines
5
6 First, disable the big-endian check and fail.  Then, make sure the
7 namespace gets initialized properly (NB: needed even if we are only
8 compiling/disassembling data tables).
9
10 Signed-off-by: Al Stone <ahs3@redhat.com>
11 ---
12  source/compiler/aslmain.c             | 12 ------------
13  source/components/namespace/nsutils.c |  7 +++++--
14  2 files changed, 5 insertions(+), 14 deletions(-)
15
16 Index: acpica-unix2-20220331/source/compiler/aslmain.c
17 ===================================================================
18 --- acpica-unix2-20220331.orig/source/compiler/aslmain.c
19 +++ acpica-unix2-20220331/source/compiler/aslmain.c
20 @@ -101,18 +101,6 @@ main (
21  
22      signal (SIGINT, AslSignalHandler);
23  
24 -    /*
25 -     * Big-endian machines are not currently supported. ACPI tables must
26 -     * be little-endian, and support for big-endian machines needs to
27 -     * be implemented.
28 -     */
29 -    if (UtIsBigEndianMachine ())
30 -    {
31 -        fprintf (stderr,
32 -            "iASL is not currently supported on big-endian machines.\n");
33 -        return (-1);
34 -    }
35 -
36      AcpiOsInitialize ();
37      ACPI_DEBUG_INITIALIZE (); /* For debug version only */
38  
39 Index: acpica-unix2-20220331/source/components/namespace/nsutils.c
40 ===================================================================
41 --- acpica-unix2-20220331.orig/source/components/namespace/nsutils.c
42 +++ acpica-unix2-20220331/source/components/namespace/nsutils.c
43 @@ -272,6 +272,7 @@ AcpiNsBuildInternalName (
44      const char              *ExternalName = Info->NextExternalChar;
45      char                    *Result = NULL;
46      UINT32                  i;
47 +    char                    TmpSeg[ACPI_NAMESEG_SIZE+1];
48  
49  
50      ACPI_FUNCTION_TRACE (NsBuildInternalName);
51 @@ -335,6 +336,7 @@ AcpiNsBuildInternalName (
52  
53      for (; NumSegments; NumSegments--)
54      {
55 +        memset (TmpSeg, 0, ACPI_NAMESEG_SIZE+1);
56          for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
57          {
58              if (ACPI_IS_PATH_SEPARATOR (*ExternalName) ||
59 @@ -342,16 +344,17 @@ AcpiNsBuildInternalName (
60              {
61                  /* Pad the segment with underscore(s) if segment is short */
62  
63 -                Result[i] = '_';
64 +                TmpSeg[i] = '_';
65              }
66              else
67              {
68                  /* Convert the character to uppercase and save it */
69  
70 -                Result[i] = (char) toupper ((int) *ExternalName);
71 +                TmpSeg[i] = (char) toupper ((int) *ExternalName);
72                  ExternalName++;
73              }
74          }
75 +    AcpiUtWriteUint (Result, ACPI_NAMESEG_SIZE, TmpSeg, ACPI_NAMESEG_SIZE);
76  
77          /* Now we must have a path separator, or the pathname is bad */
78  
This page took 0.051007 seconds and 3 git commands to generate.