diff options
-rw-r--r-- | documents/changes.txt | 33 | ||||
-rw-r--r-- | source/common/ahtable.c | 1 | ||||
-rw-r--r-- | source/common/dmtable.c | 7 | ||||
-rw-r--r-- | source/common/dmtbinfo.c | 13 | ||||
-rw-r--r-- | source/compiler/asloptions.c | 6 | ||||
-rw-r--r-- | source/compiler/dtcompiler.h | 1 | ||||
-rw-r--r-- | source/compiler/dttemplate.h | 10 | ||||
-rw-r--r-- | source/compiler/dtutils.c | 6 | ||||
-rw-r--r-- | source/components/disassembler/dmopcode.c | 11 | ||||
-rw-r--r-- | source/components/disassembler/dmwalk.c | 29 | ||||
-rw-r--r-- | source/components/executer/exfldio.c | 15 | ||||
-rw-r--r-- | source/components/hardware/hwregs.c | 289 | ||||
-rw-r--r-- | source/components/utilities/utinit.c | 2 | ||||
-rw-r--r-- | source/include/acconfig.h | 4 | ||||
-rw-r--r-- | source/include/acdisasm.h | 2 | ||||
-rw-r--r-- | source/include/acglobal.h | 1 | ||||
-rw-r--r-- | source/include/acmacros.h | 17 | ||||
-rw-r--r-- | source/include/acpixf.h | 2 |
18 files changed, 158 insertions, 291 deletions
diff --git a/documents/changes.txt b/documents/changes.txt index 19f5c0d62..ff863a7c3 100644 --- a/documents/changes.txt +++ b/documents/changes.txt @@ -1,4 +1,37 @@ ---------------------------------------- +27 May 2016. Summary of changes for version 20160527: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Temporarily reverted the new arbitrary bit length/alignment support in +AcpiHwRead/AcpiHwWrite for the Generic Address Structure. There have been +a number of regressions with the new code that need to be fully resolved +and tested before this support can be finally integrated into ACPICA. +Apologies for any inconveniences these issues may have caused. + +The ACPI message macros are not configurable (ACPI_MSG_ERROR, +ACPI_MSG_EXCEPTION, ACPI_MSG_WARNING, ACPI_MSG_INFO, ACPI_MSG_BIOS_ERROR, +and ACPI_MSG_BIOS_WARNING). Lv Zheng. + +Fixed a couple of GCC warnings associated with the use of the -Wcast-qual +option. Adds a new return macro, return_STR. Junk-uk Kim. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 136.8K Code, 51.6K Data, 188.4K Total + Debug Version: 201.5K Code, 82.2K Data, 283.7K Total + Previous Release: + Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total + Debug Version: 200.9K Code, 82.2K Data, 283.1K Total + +---------------------------------------- 22 April 2016. Summary of changes for version 20160422: 1) ACPICA kernel-resident subsystem: diff --git a/source/common/ahtable.c b/source/common/ahtable.c index 021ae3388..59ddc836e 100644 --- a/source/common/ahtable.c +++ b/source/common/ahtable.c @@ -196,6 +196,7 @@ const AH_TABLE AcpiSupportedTables[] = {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, + {ACPI_SIG_RASF, "RAS Features Table"}, {ACPI_RSDP_NAME,"Root System Description Pointer"}, {ACPI_SIG_RSDT, "Root System Description Table"}, {ACPI_SIG_S3PT, "S3 Performance Table"}, diff --git a/source/common/dmtable.c b/source/common/dmtable.c index 51d91f87b..ff0603d0c 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -430,6 +430,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit}, {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, + {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt}, {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst}, @@ -916,6 +917,11 @@ AcpiDmDumpTable ( ByteLength = 10; break; + case ACPI_DMT_BUF12: + + ByteLength = 12; + break; + case ACPI_DMT_BUF16: case ACPI_DMT_UUID: @@ -1078,6 +1084,7 @@ AcpiDmDumpTable ( case ACPI_DMT_BUF7: case ACPI_DMT_BUF10: + case ACPI_DMT_BUF12: case ACPI_DMT_BUF16: case ACPI_DMT_BUF128: /* diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c index 5520da20e..522ed00e4 100644 --- a/source/common/dmtbinfo.c +++ b/source/common/dmtbinfo.c @@ -178,6 +178,7 @@ #define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f) #define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f) #define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f) +#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f) #define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f) #define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f) #define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f) @@ -2512,6 +2513,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[] = /******************************************************************************* * + * RASF - RAS Feature table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[] = +{ + {ACPI_DMT_BUF12, ACPI_RASF_OFFSET (ChannelId[0]), "Channel ID", 0}, + ACPI_DMT_TERMINATOR +}; + +/******************************************************************************* + * * S3PT - S3 Performance Table * ******************************************************************************/ diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c index b84610697..651cd9d6e 100644 --- a/source/compiler/asloptions.c +++ b/source/compiler/asloptions.c @@ -613,9 +613,13 @@ AslDoOptions ( case 'e': - /* Disable External opcode generation */ + /* iASL: Disable External opcode generation */ Gbl_DoExternals = FALSE; + + /* Disassembler: Emit embedded external operators */ + + AcpiGbl_DmEmitExternalOpcodes = TRUE; break; case 'f': diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h index eb85ddcaa..1072f5291 100644 --- a/source/compiler/dtcompiler.h +++ b/source/compiler/dtcompiler.h @@ -681,6 +681,7 @@ extern const unsigned char TemplateMtmr[]; extern const unsigned char TemplateNfit[]; extern const unsigned char TemplatePcct[]; extern const unsigned char TemplatePmtt[]; +extern const unsigned char TemplateRasf[]; extern const unsigned char TemplateRsdt[]; extern const unsigned char TemplateS3pt[]; extern const unsigned char TemplateSbst[]; diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h index e420ec450..8bf873bba 100644 --- a/source/compiler/dttemplate.h +++ b/source/compiler/dttemplate.h @@ -978,6 +978,16 @@ const unsigned char TemplatePmtt[] = 0x00,0x00,0x00,0x00 /* 000000B0 "...." */ }; +const unsigned char TemplateRasf[] = +{ + 0x52,0x41,0x53,0x46,0x30,0x00,0x00,0x00, /* 00000000 "RASF0..." */ + 0x01,0x31,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".1INTEL " */ + 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x27,0x05,0x16,0x20,0x00,0x00,0x00,0x00, /* 00000020 "'.. ...." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */ +}; + const unsigned char TemplateRsdp[] = { 0x52,0x53,0x44,0x20,0x50,0x54,0x52,0x20, /* 00000000 "RSD PTR " */ diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c index 6ca418caf..fa12b51ce 100644 --- a/source/compiler/dtutils.c +++ b/source/compiler/dtutils.c @@ -439,6 +439,7 @@ DtGetFieldType ( case ACPI_DMT_RAW_BUFFER: case ACPI_DMT_BUF7: case ACPI_DMT_BUF10: + case ACPI_DMT_BUF12: case ACPI_DMT_BUF16: case ACPI_DMT_BUF128: case ACPI_DMT_PCI_PATH: @@ -688,6 +689,11 @@ DtGetFieldLength ( ByteLength = 10; break; + case ACPI_DMT_BUF12: + + ByteLength = 12; + break; + case ACPI_DMT_BUF16: case ACPI_DMT_UUID: diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index f0204de82..683fd0add 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -1043,7 +1043,16 @@ AcpiDmDisassembleOneOp ( case AML_EXTERNAL_OP: - break; + if (AcpiGbl_DmEmitExternalOpcodes) + { + AcpiOsPrintf ("/* Opcode 0x15 */ "); + + /* Fallthrough */ + } + else + { + break; + } default: diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 7c18065ff..34ab04019 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -534,21 +534,26 @@ AcpiDmDescendingOp ( { NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST; - /* - * A Zero predicate indicates the possibility of one or more - * External() opcodes within the If() block. - */ - if (NextOp->Common.AmlOpcode == AML_ZERO_OP) - { - NextOp2 = NextOp->Common.Next; + /* Don't emit the actual embedded externals unless asked */ - if (NextOp2 && - (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP)) + if (!AcpiGbl_DmEmitExternalOpcodes) + { + /* + * A Zero predicate indicates the possibility of one or more + * External() opcodes within the If() block. + */ + if (NextOp->Common.AmlOpcode == AML_ZERO_OP) { - /* Ignore the If 0 block and all children */ + NextOp2 = NextOp->Common.Next; + + if (NextOp2 && + (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP)) + { + /* Ignore the If 0 block and all children */ - Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; - return (AE_CTRL_DEPTH); + Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + return (AE_CTRL_DEPTH); + } } } } diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index 578ba48e0..b7e86fdb0 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -1018,9 +1018,20 @@ AcpiExInsertIntoField ( AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth); - /* Create the bitmasks used for bit insertion */ + /* + * Create the bitmasks used for bit insertion. + * Note: This if/else is used to bypass compiler differences with the + * shift operator + */ + if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE) + { + WidthMask = ACPI_UINT64_MAX; + } + else + { + WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth); + } - WidthMask = ACPI_MASK_BITS_ABOVE_64 (AccessBitWidth); Mask = WidthMask & ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset); diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index fd2518b7f..ffad33fcf 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -126,11 +126,6 @@ /* Local Prototypes */ -static UINT8 -AcpiHwGetAccessBitWidth ( - ACPI_GENERIC_ADDRESS *Reg, - UINT8 MaxBitWidth); - static ACPI_STATUS AcpiHwReadMultiple ( UINT32 *Value, @@ -148,61 +143,6 @@ AcpiHwWriteMultiple ( /****************************************************************************** * - * FUNCTION: AcpiHwGetAccessBitWidth - * - * PARAMETERS: Reg - GAS register structure - * MaxBitWidth - Max BitWidth supported (32 or 64) - * - * RETURN: Status - * - * DESCRIPTION: Obtain optimal access bit width - * - ******************************************************************************/ - -static UINT8 -AcpiHwGetAccessBitWidth ( - ACPI_GENERIC_ADDRESS *Reg, - UINT8 MaxBitWidth) -{ - UINT64 Address; - - - if (!Reg->AccessWidth) - { - /* - * Detect old register descriptors where only the BitWidth field - * makes senses. The target address is copied to handle possible - * alignment issues. - */ - ACPI_MOVE_64_TO_64 (&Address, &Reg->Address); - if (!Reg->BitOffset && Reg->BitWidth && - ACPI_IS_POWER_OF_TWO (Reg->BitWidth) && - ACPI_IS_ALIGNED (Reg->BitWidth, 8) && - ACPI_IS_ALIGNED (Address, Reg->BitWidth)) - { - return (Reg->BitWidth); - } - else - { - if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_IO) - { - return (32); - } - else - { - return (MaxBitWidth); - } - } - } - else - { - return (1 << (Reg->AccessWidth + 2)); - } -} - - -/****************************************************************************** - * * FUNCTION: AcpiHwValidateRegister * * PARAMETERS: Reg - GAS register structure @@ -223,9 +163,6 @@ AcpiHwValidateRegister ( UINT8 MaxBitWidth, UINT64 *Address) { - UINT8 BitWidth; - UINT8 AccessWidth; - /* Must have a valid pointer to a GAS structure */ @@ -255,25 +192,24 @@ AcpiHwValidateRegister ( return (AE_SUPPORT); } - /* Validate the AccessWidth */ + /* Validate the BitWidth */ - if (Reg->AccessWidth > 4) + if ((Reg->BitWidth != 8) && + (Reg->BitWidth != 16) && + (Reg->BitWidth != 32) && + (Reg->BitWidth != MaxBitWidth)) { ACPI_ERROR ((AE_INFO, - "Unsupported register access width: 0x%X", Reg->AccessWidth)); + "Unsupported register bit width: 0x%X", Reg->BitWidth)); return (AE_SUPPORT); } - /* Validate the BitWidth, convert AccessWidth into number of bits */ + /* Validate the BitOffset. Just a warning for now. */ - AccessWidth = AcpiHwGetAccessBitWidth (Reg, MaxBitWidth); - BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth); - if (MaxBitWidth < BitWidth) + if (Reg->BitOffset != 0) { ACPI_WARNING ((AE_INFO, - "Requested bit width 0x%X is smaller than register bit width 0x%X", - MaxBitWidth, BitWidth)); - return (AE_SUPPORT); + "Unsupported register bit offset: 0x%X", Reg->BitOffset)); } return (AE_OK); @@ -294,7 +230,10 @@ AcpiHwValidateRegister ( * 64-bit values is not needed. * * LIMITATIONS: <These limitations also apply to AcpiHwWrite> + * BitWidth must be exactly 8, 16, or 32. * SpaceID must be SystemMemory or SystemIO. + * BitOffset and AccessWidth are currently ignored, as there has + * not been a need to implement these. * ******************************************************************************/ @@ -304,12 +243,7 @@ AcpiHwRead ( ACPI_GENERIC_ADDRESS *Reg) { UINT64 Address; - UINT8 AccessWidth; - UINT32 BitWidth; - UINT8 BitOffset; UINT64 Value64; - UINT32 Value32; - UINT8 Index; ACPI_STATUS Status; @@ -324,74 +258,30 @@ AcpiHwRead ( return (Status); } - /* - * Initialize entire 32-bit return value to zero, convert AccessWidth - * into number of bits based - */ + /* Initialize entire 32-bit return value to zero */ + *Value = 0; - AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32); - BitWidth = Reg->BitOffset + Reg->BitWidth; - BitOffset = Reg->BitOffset; /* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ - Index = 0; - while (BitWidth) + if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) { - if (BitOffset >= AccessWidth) - { - Value32 = 0; - BitOffset -= AccessWidth; - } - else - { - if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) - { - Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - &Value64, AccessWidth); - Value32 = (UINT32) Value64; - } - else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ - { - Status = AcpiHwReadPort ((ACPI_IO_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - &Value32, AccessWidth); - } - - /* - * Use offset style bit masks because: - * BitOffset < AccessWidth/BitWidth < AccessWidth, and - * AccessWidth is ensured to be less than 32-bits by - * AcpiHwValidateRegister(). - */ - if (BitOffset) - { - Value32 &= ACPI_MASK_BITS_BELOW (BitOffset); - BitOffset = 0; - } - if (BitWidth < AccessWidth) - { - Value32 &= ACPI_MASK_BITS_ABOVE (BitWidth); - } - } + Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS) + Address, &Value64, Reg->BitWidth); - /* - * Use offset style bit writes because "Index * AccessWidth" is - * ensured to be less than 32-bits by AcpiHwValidateRegister(). - */ - ACPI_SET_BITS (Value, Index * AccessWidth, - ACPI_MASK_BITS_ABOVE_32 (AccessWidth), Value32); - - BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth; - Index++; + *Value = (UINT32) Value64; + } + else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + { + Status = AcpiHwReadPort ((ACPI_IO_ADDRESS) + Address, Value, Reg->BitWidth); } ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n", - *Value, AccessWidth, ACPI_FORMAT_UINT64 (Address), + *Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address), AcpiUtGetRegionName (Reg->SpaceId))); return (Status); @@ -419,12 +309,6 @@ AcpiHwWrite ( ACPI_GENERIC_ADDRESS *Reg) { UINT64 Address; - UINT8 AccessWidth; - UINT32 BitWidth; - UINT8 BitOffset; - UINT64 Value64; - UINT32 NewValue32, OldValue32; - UINT8 Index; ACPI_STATUS Status; @@ -439,131 +323,24 @@ AcpiHwWrite ( return (Status); } - /* Convert AccessWidth into number of bits based */ - - AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32); - BitWidth = Reg->BitOffset + Reg->BitWidth; - BitOffset = Reg->BitOffset; - /* * Two address spaces supported: Memory or IO. PCI_Config is * not supported here because the GAS structure is insufficient */ - Index = 0; - while (BitWidth) + if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) { - /* - * Use offset style bit reads because "Index * AccessWidth" is - * ensured to be less than 32-bits by AcpiHwValidateRegister(). - */ - NewValue32 = ACPI_GET_BITS (&Value, Index * AccessWidth, - ACPI_MASK_BITS_ABOVE_32 (AccessWidth)); - - if (BitOffset >= AccessWidth) - { - BitOffset -= AccessWidth; - } - else - { - /* - * Use offset style bit masks because AccessWidth is ensured - * to be less than 32-bits by AcpiHwValidateRegister() and - * BitOffset/BitWidth is less than AccessWidth here. - */ - if (BitOffset) - { - NewValue32 &= ACPI_MASK_BITS_BELOW (BitOffset); - } - if (BitWidth < AccessWidth) - { - NewValue32 &= ACPI_MASK_BITS_ABOVE (BitWidth); - } - - if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) - { - if (BitOffset || BitWidth < AccessWidth) - { - /* - * Read old values in order not to modify the bits that - * are beyond the register BitWidth/BitOffset setting. - */ - Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - &Value64, AccessWidth); - OldValue32 = (UINT32) Value64; - - /* - * Use offset style bit masks because AccessWidth is - * ensured to be less than 32-bits by - * AcpiHwValidateRegister() and BitOffset/BitWidth is - * less than AccessWidth here. - */ - if (BitOffset) - { - OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset); - BitOffset = 0; - } - if (BitWidth < AccessWidth) - { - OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth); - } - - NewValue32 |= OldValue32; - } - - Value64 = (UINT64) NewValue32; - Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - Value64, AccessWidth); - } - else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ - { - if (BitOffset || BitWidth < AccessWidth) - { - /* - * Read old values in order not to modify the bits that - * are beyond the register BitWidth/BitOffset setting. - */ - Status = AcpiHwReadPort ((ACPI_IO_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - &OldValue32, AccessWidth); - - /* - * Use offset style bit masks because AccessWidth is - * ensured to be less than 32-bits by - * AcpiHwValidateRegister() and BitOffset/BitWidth is - * less than AccessWidth here. - */ - if (BitOffset) - { - OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset); - BitOffset = 0; - } - if (BitWidth < AccessWidth) - { - OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth); - } - - NewValue32 |= OldValue32; - } - - Status = AcpiHwWritePort ((ACPI_IO_ADDRESS) - Address + Index * ACPI_DIV_8 (AccessWidth), - NewValue32, AccessWidth); - } - } - - /* - * Index * AccessWidth is ensured to be less than 32-bits by - * AcpiHwValidateRegister(). - */ - BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth; - Index++; + Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS) + Address, (UINT64) Value, Reg->BitWidth); + } + else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */ + { + Status = AcpiHwWritePort ((ACPI_IO_ADDRESS) + Address, Value, Reg->BitWidth); } ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n", - Value, AccessWidth, ACPI_FORMAT_UINT64 (Address), + Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address), AcpiUtGetRegionName (Reg->SpaceId))); return (Status); diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index 7a80f43a5..ba42ad2dc 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -298,7 +298,7 @@ AcpiUtInitGlobals ( AcpiGbl_NextOwnerIdOffset = 0; AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING; AcpiGbl_OsiMutex = NULL; - AcpiGbl_MaxLoopIterations = 0xFFFF; + AcpiGbl_MaxLoopIterations = ACPI_MAX_LOOP_COUNT; /* Hardware oriented */ diff --git a/source/include/acconfig.h b/source/include/acconfig.h index 96da50c14..23cf1c287 100644 --- a/source/include/acconfig.h +++ b/source/include/acconfig.h @@ -218,6 +218,10 @@ #define ACPI_ADDRESS_RANGE_MAX 2 +/* Maximum number of While() loops before abort */ + +#define ACPI_MAX_LOOP_COUNT 0xFFFF + /****************************************************************************** * diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index ba8f2746f..9c01d88bd 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -181,6 +181,7 @@ typedef enum ACPI_DMT_UINT64, ACPI_DMT_BUF7, ACPI_DMT_BUF10, + ACPI_DMT_BUF12, ACPI_DMT_BUF16, ACPI_DMT_BUF128, ACPI_DMT_SIG, @@ -458,6 +459,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[]; diff --git a/source/include/acglobal.h b/source/include/acglobal.h index 67a167216..23763127c 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -393,6 +393,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing); diff --git a/source/include/acmacros.h b/source/include/acmacros.h index d1304fe5b..a805a32ce 100644 --- a/source/include/acmacros.h +++ b/source/include/acmacros.h @@ -336,31 +336,14 @@ #define ACPI_IS_MISALIGNED(value) (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1)) -/* Generic (power-of-two) rounding */ - -#define ACPI_IS_ALIGNED(a, s) (((a) & ((s) - 1)) == 0) -#define ACPI_IS_POWER_OF_TWO(a) ACPI_IS_ALIGNED(a, a) - /* * Bitmask creation * Bit positions start at zero. * MASK_BITS_ABOVE creates a mask starting AT the position and above * MASK_BITS_BELOW creates a mask starting one bit BELOW the position - * MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask - * MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask - * Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler - * differences with the shift operator */ #define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_UINT64_MAX) << ((UINT32) (position)))) #define ACPI_MASK_BITS_BELOW(position) ((ACPI_UINT64_MAX) << ((UINT32) (position))) -#define ACPI_MASK_BITS_ABOVE_32(width) ((UINT32) ACPI_MASK_BITS_ABOVE(width)) -#define ACPI_MASK_BITS_BELOW_32(width) ((UINT32) ACPI_MASK_BITS_BELOW(width)) -#define ACPI_MASK_BITS_ABOVE_64(width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ - ACPI_UINT64_MAX : \ - ACPI_MASK_BITS_ABOVE(width)) -#define ACPI_MASK_BITS_BELOW_64(width) ((width) == ACPI_INTEGER_BIT_SIZE ? \ - (UINT64) 0 : \ - ACPI_MASK_BITS_BELOW(width)) /* Bitfields within ACPI registers */ diff --git a/source/include/acpixf.h b/source/include/acpixf.h index 6ced00db7..2f939b1f5 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -118,7 +118,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20160422 +#define ACPI_CA_VERSION 0x20160527 #include "acconfig.h" #include "actypes.h" |