acpica-tools/re-enable-big-endian.patch
Al Stone fad899c950 Re-enable big-endian use of iasl.
Signed-off-by: Al Stone <ahs3@redhat.com>
2014-05-22 13:01:15 -06:00

50 lines
17 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Re-enable use of these tools on big-endian machines.
Al Stone <ahs3@redhat.com>
diff -Naur acpica-unix2-20140424/source/compiler/aslmain.c acpica-unix2-20140424-patch/source/compiler/aslmain.c
--- acpica-unix2-20140424/source/compiler/aslmain.c 2014-04-24 09:48:59.000000000 -0600
+++ acpica-unix2-20140424-patch/source/compiler/aslmain.c 2014-05-22 12:55:47.634904320 -0600
@@ -329,18 +329,6 @@
int Index2;
- /*
- * Big-endian machines are not currently supported. ACPI tables must
- * be little-endian, and support for big-endian machines needs to
- * be implemented.
- */
- if (AcpiIsBigEndianMachine ())
- {
- fprintf (stderr,
- "iASL is not currently supported on big-endian machines.\n");
- return (-1);
- }
-
ACPI_DEBUG_INITIALIZE (); /* For debug version only */
/* Initialize preprocessor and compiler before command line processing */
diff -Naur acpica-unix2-20140424/source/compiler/.aslmain.c.swp acpica-unix2-20140424-patch/source/compiler/.aslmain.c.swp
--- acpica-unix2-20140424/source/compiler/.aslmain.c.swp 1969-12-31 17:00:00.000000000 -0700
+++ acpica-unix2-20140424-patch/source/compiler/.aslmain.c.swp 2014-05-22 12:54:12.502798042 -0600
@@ -0,0 +1,18 @@
+b0VIM 7.4k2YSm&´ïahs3fidelio.ahs3~ahs3/projects/acpica/fedora-scm/acpica-unix2-20140424/source/compiler/aslmain.c
3210#"! UtppÿÿÿÿÿÿÿÿFqþÿÿÿÿÿÿÿi·w adãp°­wt$# öÞÛOCþ
¹
<00>
Q

Ê  b  É 8 ï
+×
+Ô
+Å
+~
+9
+ð ¨ Z  Æ6ðÐÌ˲±˜nZY/ÜÙ<00>NK

+į«ªta?>2"÷ìëêolWT&ôñª§VUO6,*ùÓµ´ljihþûæãâ * * PARAMETERS: None * * FUNCTION: Usage */*******************************************************************************} return (Overlay.Bytes[0]); /* Returns 0xFF (TRUE) for big endian */ } Overlay = {0xFF000000}; UINT8 Bytes[4]; UINT32 Integer; union {{ void)AcpiIsBigEndianMachine (UINT8 ******************************************************************************/ * * DESCRIPTION: Detect whether machine is little endian or big endian. * * FALSE if machine is little endian * RETURN: TRUE if machine is big endian * * PARAMETERS: None * * FUNCTION: AcpiIsBigEndianMachine */******************************************************************************* void);AcpiIsBigEndianMachine (UINT8 void);AslInitialize (static void int Sig);AslSignalHandler (static void ACPI_SYSTEM_XFACE/* Local prototypes */ */ * expand wildcards. * Windows: The setargv.obj module must be linked in to automatically * * Linux/Unix systems: Shell expands wildcards automatically. * * wildcard support - it is not implemented locally. For example: * Portability note: The compiler depends upon the host for command-line * * Main routine for the iASL compiler./* ACPI_MODULE_NAME ("aslmain")#define _COMPONENT ACPI_COMPILER#include <signal.h>#include "acdisasm.h"#include "acapps.h"#include "aslcompiler.h"#define _DECLARE_GLOBALS */ * POSSIBILITY OF SUCH DAMAGES. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * NO WARRANTY * * Software Foundation. * GNU General Public License ("GPL") version 2 as published by the Free * Alternatively, this software may be distributed under the terms of the * * from this software without specific prior written permission. * of any contributors may be used to endorse or promote products derived * 3. Neither the names of the above-listed copyright holders nor the names * binary redistribution. * including a substantially similar Disclaimer requirement for further * ("Disclaimer") and any redistribution must be conditioned upon * substantially similar to the "NO WARRANTY" disclaimer below * 2. Redistributions in binary form must reproduce at minimum a disclaimer * without modification. * notice, this list of conditions, and the following disclaimer, * 1. Redistributions of source code must retain the above copyright * are met: * modification, are permitted provided that the following conditions * Redistribution and use in source and binary forms, with or without * * All rights reserved. * Copyright (C) 2000 - 2014, Intel Corp./* *****************************************************************************/ * * Module Name: aslmain - compiler main and utilities */******************************************************************************adãÛwôäÚع¸·<00>e?98ÒÑŸkihgþ
û
Ø
Õ
¬
©
`

¼ » ¥ ž | X V 2  ê é è á ˜ R ; 3 
+ ñ
+§
+
+Œ
+
+P
+O
+
+
+Ù ´ ž } g f 3 2 ðïÒµˆlfI?þ×ɬž<00>}wv('ý·bX#æÜÛ­Šg]\JDC!ôîíÝÛÚ} return (0); } AcpiDmClearExternalFileList(); { if (AcpiGbl_ExternalFileList) } Index2++; } return (-1); { if (ACPI_FAILURE (Status)) Status = AslDoOneFile (argv[Index2]); } UtConvertBackslashes (Gbl_OutputFilenamePrefix); Gbl_OutputFilenamePrefix = argv[Index2]; { if (Gbl_UseDefaultAmlFilename) */ * output filename prefix * If -p not specified, we will use the input filename as the /* { while (argv[Index2]) /* Process each pathname/filename in the list, with possible wildcards */ } } Index1++; } return (-1); { if (ACPI_FAILURE (Status)) Status = AcpiDmAddToExternalFileList (argv[Index1]); { while (argv[Index1]) { if (Gbl_DisassembleAll) /* Perform global actions first/only */ UtExpandLineBuffers (); Gbl_LineBufferSize /= 2; /* Allocate the line buffer(s), must be after command line */ Index1 = Index2 = AslCommandLine (argc, argv); AslInitialize (); PrInitializePreprocessor (); AcpiDbgLevel = 0; AcpiGbl_ExternalFileList = NULL; signal (SIGINT, AslSignalHandler); /* Initialize preprocessor and compiler before command line processing */ ACPI_DEBUG_INITIALIZE (); /* For debug version only */ } return (-1); "iASL is not currently supported on big-endian machines.\n"); fprintf (stderr, { if (AcpiIsBigEndianMachine ()) */ * be implemented. * be little-endian, and support for big-endian machines needs to * Big-endian machines are not currently supported. ACPI tables must /* int Index2; int Index1; ACPI_STATUS Status;{ char **argv) int argc,main (int ACPI_SYSTEM_XFACE ******************************************************************************/ * * options and begin the compile for each file on the command line * DESCRIPTION: C main routine for the Asl Compiler. Handle command line * * RETURN: Program termination code * * PARAMETERS: Standard argc/argv * * FUNCTION: main */*******************************************************************************} Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR"; Gbl_Files[ASL_FILE_STDERR].Handle = stderr; Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT"; Gbl_Files[ASL_FILE_STDOUT].Handle = stdout; } Gbl_Files[i].Filename = NULL; Gbl_Files[i].Handle = NULL; { for (i = 0; i < ASL_NUM_FILES; i++) UINT32 i;{ void)AslInitialize (static void
\ No newline at end of file