|
|
4496ab |
Patch carried over from the prior iasl package and updated. This allows
|
|
|
4496ab |
for builds on systems requiring aligned memory access. Please see
|
|
|
4496ab |
http://lists.acpica.org/pipermail/devel/2010-July/000159.html. Resolves
|
|
|
4496ab |
BZ#865013 and BZ#856856.
|
|
|
4496ab |
--
|
|
|
4496ab |
|
|
|
4496ab |
Add more platforms to the list of the ones requiring aligned memory access.
|
|
|
4496ab |
Also fix callsites where wrong assumptions where made in terms of aligment.
|
|
|
4496ab |
|
|
|
4496ab |
Signed-off-by: Mattia Dongili <malattia@linux.it>
|
|
|
4496ab |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
4496ab |
---
|
|
|
4496ab |
source/components/executer/exoparg2.c | 12 +++++++++---
|
|
|
4496ab |
source/include/actypes.h | 26 +++++++++++++-------------
|
|
|
4496ab |
3 files changed, 32 insertions(+), 21 deletions(-)
|
|
|
4496ab |
|
|
|
4496ab |
Index: acpica-unix2-20170728/source/components/executer/exoparg2.c
|
|
|
4496ab |
===================================================================
|
|
|
4496ab |
--- acpica-unix2-20170728.orig/source/components/executer/exoparg2.c
|
|
|
4496ab |
+++ acpica-unix2-20170728/source/components/executer/exoparg2.c
|
|
|
4496ab |
@@ -172,6 +172,8 @@ AcpiExOpcode_2A_2T_1R (
|
|
|
4496ab |
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
|
|
|
4496ab |
ACPI_OPERAND_OBJECT *ReturnDesc1 = NULL;
|
|
|
4496ab |
ACPI_OPERAND_OBJECT *ReturnDesc2 = NULL;
|
|
|
4496ab |
+ UINT64 ReturnValue1 = 0;
|
|
|
4496ab |
+ UINT64 ReturnValue2 = 0;
|
|
|
4496ab |
ACPI_STATUS Status;
|
|
|
4496ab |
|
|
|
4496ab |
|
|
|
4496ab |
@@ -206,8 +208,10 @@ AcpiExOpcode_2A_2T_1R (
|
|
|
4496ab |
Status = AcpiUtDivide (
|
|
|
4496ab |
Operand[0]->Integer.Value,
|
|
|
4496ab |
Operand[1]->Integer.Value,
|
|
|
4496ab |
- &ReturnDesc1->Integer.Value,
|
|
|
4496ab |
- &ReturnDesc2->Integer.Value);
|
|
|
4496ab |
+ &ReturnValue1, &ReturnValue2);
|
|
|
4496ab |
+ ReturnDesc1->Integer.Value = ReturnValue1;
|
|
|
4496ab |
+ ReturnDesc2->Integer.Value = ReturnValue2;
|
|
|
4496ab |
+
|
|
|
4496ab |
if (ACPI_FAILURE (Status))
|
|
|
4496ab |
{
|
|
|
4496ab |
goto Cleanup;
|
|
|
4496ab |
@@ -282,6 +286,7 @@ AcpiExOpcode_2A_1T_1R (
|
|
|
4496ab |
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
|
|
|
4496ab |
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
|
|
|
4496ab |
UINT64 Index;
|
|
|
4496ab |
+ UINT64 ReturnValue = 0;
|
|
|
4496ab |
ACPI_STATUS Status = AE_OK;
|
|
|
4496ab |
ACPI_SIZE Length = 0;
|
|
|
4496ab |
|
|
|
4496ab |
@@ -327,7 +332,8 @@ AcpiExOpcode_2A_1T_1R (
|
|
|
4496ab |
Operand[0]->Integer.Value,
|
|
|
4496ab |
Operand[1]->Integer.Value,
|
|
|
4496ab |
NULL,
|
|
|
4496ab |
- &ReturnDesc->Integer.Value);
|
|
|
4496ab |
+ &ReturnValue);
|
|
|
4496ab |
+ ReturnDesc->Integer.Value = ReturnValue;
|
|
|
4496ab |
break;
|
|
|
4496ab |
|
|
|
4496ab |
case AML_CONCATENATE_OP: /* Concatenate (Data1, Data2, Result) */
|
|
|
4496ab |
Index: acpica-unix2-20170728/source/include/actypes.h
|
|
|
4496ab |
===================================================================
|
|
|
4496ab |
--- acpica-unix2-20170728.orig/source/include/actypes.h
|
|
|
4496ab |
+++ acpica-unix2-20170728/source/include/actypes.h
|
|
|
4496ab |
@@ -143,6 +143,19 @@ typedef COMPILER_DEPENDENT_INT64
|
|
|
4496ab |
*/
|
|
|
4496ab |
#define ACPI_THREAD_ID UINT64
|
|
|
4496ab |
|
|
|
4496ab |
+/*
|
|
|
4496ab |
+ * In the case of the Itanium Processor Family (IPF), the hardware does not
|
|
|
4496ab |
+ * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag
|
|
|
4496ab |
+ * to indicate that special precautions must be taken to avoid alignment faults.
|
|
|
4496ab |
+ * (IA64 or ia64 is currently used by existing compilers to indicate IPF.)
|
|
|
4496ab |
+ *
|
|
|
4496ab |
+ * Note: EM64T and other X86-64 processors support misaligned transfers,
|
|
|
4496ab |
+ * so there is no need to define this flag.
|
|
|
4496ab |
+ */
|
|
|
4496ab |
+#if defined (__IA64__) || defined (__ia64__) || defined(__alpha__) || defined(__sparc__) || defined(__hppa__) || defined(__arm__)
|
|
|
4496ab |
+#define ACPI_MISALIGNMENT_NOT_SUPPORTED
|
|
|
4496ab |
+#endif
|
|
|
4496ab |
+
|
|
|
4496ab |
|
|
|
4496ab |
/*******************************************************************************
|
|
|
4496ab |
*
|
|
|
4496ab |
@@ -170,20 +183,6 @@ typedef UINT64
|
|
|
4496ab |
#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
|
|
|
4496ab |
#define ACPI_USE_NATIVE_MATH64 /* Has native 64-bit integer support */
|
|
|
4496ab |
|
|
|
4496ab |
-/*
|
|
|
4496ab |
- * In the case of the Itanium Processor Family (IPF), the hardware does not
|
|
|
4496ab |
- * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED
|
|
|
4496ab |
- * flag to indicate that special precautions must be taken to avoid alignment
|
|
|
4496ab |
- * faults. (IA64 or ia64 is currently used by existing compilers to indicate
|
|
|
4496ab |
- * IPF.)
|
|
|
4496ab |
- *
|
|
|
4496ab |
- * Note: EM64T and other X86-64 processors support misaligned transfers,
|
|
|
4496ab |
- * so there is no need to define this flag.
|
|
|
4496ab |
- */
|
|
|
4496ab |
-#if defined (__IA64__) || defined (__ia64__)
|
|
|
4496ab |
-#define ACPI_MISALIGNMENT_NOT_SUPPORTED
|
|
|
4496ab |
-#endif
|
|
|
4496ab |
-
|
|
|
4496ab |
|
|
|
4496ab |
/*******************************************************************************
|
|
|
4496ab |
*
|