diff options
Diffstat (limited to 'source/components')
| -rw-r--r-- | source/components/debugger/dbcmds.c | 27 | ||||
| -rw-r--r-- | source/components/debugger/dbinput.c | 4 | ||||
| -rw-r--r-- | source/components/events/evgpe.c | 12 | ||||
| -rw-r--r-- | source/components/events/evgpeblk.c | 28 | ||||
| -rw-r--r-- | source/components/events/evgpeinit.c | 8 | ||||
| -rw-r--r-- | source/components/events/evxfgpe.c | 3 | ||||
| -rw-r--r-- | source/components/hardware/hwpci.c | 13 | ||||
| -rw-r--r-- | source/components/resources/rscreate.c | 12 | ||||
| -rw-r--r-- | source/components/tables/tbfadt.c | 50 | ||||
| -rw-r--r-- | source/components/tables/tbutils.c | 123 | ||||
| -rw-r--r-- | source/components/utilities/utglobal.c | 30 | ||||
| -rw-r--r-- | source/components/utilities/utobject.c | 2 | ||||
| -rw-r--r-- | source/components/utilities/utxferror.c | 4 | 
13 files changed, 118 insertions, 198 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index e9774cdebe67b..d9aa2e7aa1c36 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -339,7 +339,7 @@ AcpiDbDisplayTableInfo (      /* Header */ -    AcpiOsPrintf ("Idx ID Status    Type            Sig  Address  Len   Header\n"); +    AcpiOsPrintf ("Idx ID    Status Type              TableHeader (Sig, Address, Length)\n");      /* Walk the entire root table list */ @@ -366,22 +366,22 @@ AcpiDbDisplayTableInfo (          {          case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL: -            AcpiOsPrintf ("External virtual  "); +            AcpiOsPrintf ("External/virtual  ");              break;          case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL: -            AcpiOsPrintf ("Internal physical "); +            AcpiOsPrintf ("Internal/physical ");              break;          case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL: -            AcpiOsPrintf ("Internal virtual  "); +            AcpiOsPrintf ("Internal/virtual  ");              break;          default: -            AcpiOsPrintf ("INVALID   "); +            AcpiOsPrintf ("INVALID TYPE      ");              break;          } @@ -1187,14 +1187,25 @@ AcpiDbGenerateGpe (      char                    *GpeArg,      char                    *BlockArg)  { -    UINT32                  BlockNumber; +    UINT32                  BlockNumber = 0;      UINT32                  GpeNumber;      ACPI_GPE_EVENT_INFO     *GpeEventInfo; -    GpeNumber   = ACPI_STRTOUL (GpeArg, NULL, 0); -    BlockNumber = ACPI_STRTOUL (BlockArg, NULL, 0); +    GpeNumber = ACPI_STRTOUL (GpeArg, NULL, 0); +    /* +     * If no block arg, or block arg == 0 or 1, use the FADT-defined +     * GPE blocks. +     */ +    if (BlockArg) +    { +        BlockNumber = ACPI_STRTOUL (BlockArg, NULL, 0); +        if (BlockNumber == 1) +        { +            BlockNumber = 0; +        } +    }      GpeEventInfo = AcpiEvGetGpeEventInfo (ACPI_TO_POINTER (BlockNumber),          GpeNumber); diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index a6c79f644daad..88fbb9475246e 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -181,7 +181,7 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =      {"EXIT",         0},      {"FIND",         1},      {"GO",           0}, -    {"GPE",          2}, +    {"GPE",          1},      {"GPES",         0},      {"HANDLERS",     0},      {"HELP",         0}, @@ -305,7 +305,7 @@ static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =      {0, "\nHardware Related Commands:",         "\n"},      {1, "  Event <F|G> <Value>",               "Generate AcpiEvent (Fixed/GPE)\n"}, -    {1, "  Gpe <GpeNum> <GpeBlock>",           "Simulate a GPE\n"}, +    {1, "  Gpe <GpeNum> [GpeBlockDevice]",     "Simulate a GPE\n"},      {1, "  Gpes",                              "Display info on all GPEs\n"},      {1, "  Sci",                               "Generate an SCI\n"},      {1, "  Sleep [SleepState]",                "Simulate sleep/wake sequence(s) (0-5)\n"}, diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index 75e37049eb716..c31f0b385197b 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -432,7 +432,7 @@ AcpiEvGpeDetect (                    GpeRegisterInfo->EnableForWake))              {                  ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, -                    "Ignore disabled registers for GPE%02X-GPE%02X: " +                    "Ignore disabled registers for GPE %02X-%02X: "                      "RunEnable=%02X, WakeEnable=%02X\n",                      GpeRegisterInfo->BaseGpeNumber,                      GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), @@ -458,7 +458,7 @@ AcpiEvGpeDetect (              }              ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS, -                "Read registers for GPE%02X-GPE%02X: Status=%02X, Enable=%02X, " +                "Read registers for GPE %02X-%02X: Status=%02X, Enable=%02X, "                  "RunEnable=%02X, WakeEnable=%02X\n",                  GpeRegisterInfo->BaseGpeNumber,                  GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1), @@ -771,7 +771,7 @@ AcpiEvGpeDispatch (          if (ACPI_FAILURE (Status))          {              ACPI_EXCEPTION ((AE_INFO, Status, -                "Unable to clear GPE%02X", GpeNumber)); +                "Unable to clear GPE %02X", GpeNumber));              return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);          }      } @@ -789,7 +789,7 @@ AcpiEvGpeDispatch (      if (ACPI_FAILURE (Status))      {          ACPI_EXCEPTION ((AE_INFO, Status, -            "Unable to disable GPE%02X", GpeNumber)); +            "Unable to disable GPE %02X", GpeNumber));          return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);      } @@ -829,7 +829,7 @@ AcpiEvGpeDispatch (          if (ACPI_FAILURE (Status))          {              ACPI_EXCEPTION ((AE_INFO, Status, -                "Unable to queue handler for GPE%02X - event disabled", +                "Unable to queue handler for GPE %02X - event disabled",                  GpeNumber));          }          break; @@ -841,7 +841,7 @@ AcpiEvGpeDispatch (           * a GPE to be enabled if it has no handler or method.           */          ACPI_ERROR ((AE_INFO, -            "No handler or method for GPE%02X, disabling event", +            "No handler or method for GPE %02X, disabling event",              GpeNumber));          break;      } diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c index a5122f9503dba..f0db7eed8ba35 100644 --- a/source/components/events/evgpeblk.c +++ b/source/components/events/evgpeblk.c @@ -282,17 +282,17 @@ AcpiEvCreateGpeInfoBlocks (      {          /* Init the RegisterInfo for this GPE register (8 GPEs) */ -        ThisRegister->BaseGpeNumber = (UINT8) (GpeBlock->BlockBaseNumber + -                                             (i * ACPI_GPE_REGISTER_WIDTH)); +        ThisRegister->BaseGpeNumber = (UINT16) +            (GpeBlock->BlockBaseNumber + (i * ACPI_GPE_REGISTER_WIDTH));          ThisRegister->StatusAddress.Address = -            GpeBlock->BlockAddress.Address + i; +            GpeBlock->Address + i;          ThisRegister->EnableAddress.Address = -            GpeBlock->BlockAddress.Address + i + GpeBlock->RegisterCount; +            GpeBlock->Address + i + GpeBlock->RegisterCount; -        ThisRegister->StatusAddress.SpaceId   = GpeBlock->BlockAddress.SpaceId; -        ThisRegister->EnableAddress.SpaceId   = GpeBlock->BlockAddress.SpaceId; +        ThisRegister->StatusAddress.SpaceId   = GpeBlock->SpaceId; +        ThisRegister->EnableAddress.SpaceId   = GpeBlock->SpaceId;          ThisRegister->StatusAddress.BitWidth  = ACPI_GPE_REGISTER_WIDTH;          ThisRegister->EnableAddress.BitWidth  = ACPI_GPE_REGISTER_WIDTH;          ThisRegister->StatusAddress.BitOffset = 0; @@ -365,9 +365,10 @@ ErrorExit:  ACPI_STATUS  AcpiEvCreateGpeBlock (      ACPI_NAMESPACE_NODE     *GpeDevice, -    ACPI_GENERIC_ADDRESS    *GpeBlockAddress, +    UINT64                  Address, +    UINT8                   SpaceId,      UINT32                  RegisterCount, -    UINT8                   GpeBlockBaseNumber, +    UINT16                  GpeBlockBaseNumber,      UINT32                  InterruptNumber,      ACPI_GPE_BLOCK_INFO     **ReturnGpeBlock)  { @@ -394,15 +395,14 @@ AcpiEvCreateGpeBlock (      /* Initialize the new GPE block */ +    GpeBlock->Address = Address; +    GpeBlock->SpaceId = SpaceId;      GpeBlock->Node = GpeDevice;      GpeBlock->GpeCount = (UINT16) (RegisterCount * ACPI_GPE_REGISTER_WIDTH);      GpeBlock->Initialized = FALSE;      GpeBlock->RegisterCount = RegisterCount;      GpeBlock->BlockBaseNumber = GpeBlockBaseNumber; -    ACPI_MEMCPY (&GpeBlock->BlockAddress, GpeBlockAddress, -        sizeof (ACPI_GENERIC_ADDRESS)); -      /*       * Create the RegisterInfo and EventInfo sub-structures       * Note: disables and clears all GPEs in the block @@ -445,11 +445,11 @@ AcpiEvCreateGpeBlock (      }      ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, -        "    Initialized GPE %02X to %02X [%4.4s] %u regs on interrupt 0x%X\n", +        "    Initialized GPE %02X to %02X [%4.4s] %u regs on interrupt 0x%X%s\n",          (UINT32) GpeBlock->BlockBaseNumber,          (UINT32) (GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1)), -        GpeDevice->Name.Ascii, GpeBlock->RegisterCount, -        InterruptNumber)); +        GpeDevice->Name.Ascii, GpeBlock->RegisterCount, InterruptNumber, +        InterruptNumber == AcpiGbl_FADT.SciInterrupt ? " (SCI)" : ""));      /* Update global count of currently available GPEs */ diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index 622c13d427c85..6251b36f4d7a8 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -139,7 +139,9 @@ AcpiEvGpeInitialize (          /* Install GPE Block 0 */          Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice, -                    &AcpiGbl_FADT.XGpe0Block, RegisterCount0, 0, +                    AcpiGbl_FADT.XGpe0Block.Address, +                    AcpiGbl_FADT.XGpe0Block.SpaceId, +                    RegisterCount0, 0,                      AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[0]);          if (ACPI_FAILURE (Status)) @@ -177,7 +179,9 @@ AcpiEvGpeInitialize (              /* Install GPE Block 1 */              Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice, -                        &AcpiGbl_FADT.XGpe1Block, RegisterCount1, +                        AcpiGbl_FADT.XGpe1Block.Address, +                        AcpiGbl_FADT.XGpe1Block.SpaceId, +                        RegisterCount1,                          AcpiGbl_FADT.Gpe1Base,                          AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[1]); diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index 1ef191604f61a..73164e1d04b1b 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -809,7 +809,8 @@ AcpiInstallGpeBlock (       * For user-installed GPE Block Devices, the GpeBlockBaseNumber       * is always zero       */ -    Status = AcpiEvCreateGpeBlock (Node, GpeBlockAddress, RegisterCount, +    Status = AcpiEvCreateGpeBlock (Node, GpeBlockAddress->Address, +                GpeBlockAddress->SpaceId, RegisterCount,                  0, InterruptNumber, &GpeBlock);      if (ACPI_FAILURE (Status))      { diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index 08e5ecc189037..86017ed4d47ac 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -161,11 +161,12 @@ AcpiHwDerivePciId (          /* Walk the list, updating the PCI device/function/bus numbers */          Status = AcpiHwProcessPciList (PciId, ListHead); -    } -    /* Always delete the list */ +        /* Delete the list */ + +        AcpiHwDeletePciList (ListHead); +    } -    AcpiHwDeletePciList (ListHead);      return_ACPI_STATUS (Status);  } @@ -213,6 +214,9 @@ AcpiHwBuildPciList (          Status = AcpiGetParent (CurrentDevice, &ParentDevice);          if (ACPI_FAILURE (Status))          { +            /* Must delete the list before exit */ + +            AcpiHwDeletePciList (*ReturnListHead);              return (Status);          } @@ -227,6 +231,9 @@ AcpiHwBuildPciList (          ListElement = ACPI_ALLOCATE (sizeof (ACPI_PCI_DEVICE));          if (!ListElement)          { +            /* Must delete the list before exit */ + +            AcpiHwDeletePciList (*ReturnListHead);              return (AE_NO_MEMORY);          } diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c index c72dbc3584f53..bac2f88f57f4e 100644 --- a/source/components/resources/rscreate.c +++ b/source/components/resources/rscreate.c @@ -77,6 +77,10 @@ AcpiBufferToResource (      void                    *Resource;      void                    *CurrentResourcePtr; + +    ACPI_FUNCTION_TRACE (AcpiBufferToResource); + +      /*       * Note: we allow AE_AML_NO_RESOURCE_END_TAG, since an end tag       * is not required here. @@ -92,7 +96,7 @@ AcpiBufferToResource (      }      if (ACPI_FAILURE (Status))      { -        return (Status); +        return_ACPI_STATUS (Status);      }      /* Allocate a buffer for the converted resource */ @@ -101,7 +105,7 @@ AcpiBufferToResource (      CurrentResourcePtr = Resource;      if (!Resource)      { -        return (AE_NO_MEMORY); +        return_ACPI_STATUS (AE_NO_MEMORY);      }      /* Perform the AML-to-Resource conversion */ @@ -121,9 +125,11 @@ AcpiBufferToResource (          *ResourcePtr = Resource;      } -    return (Status); +    return_ACPI_STATUS (Status);  } +ACPI_EXPORT_SYMBOL (AcpiBufferToResource) +  /*******************************************************************************   * diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 789161dfc765b..22c09d22bd9ab 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -58,7 +58,8 @@ AcpiTbInitGenericAddress (      UINT8                   SpaceId,      UINT8                   ByteWidth,      UINT64                  Address, -    char                    *RegisterName); +    char                    *RegisterName, +    UINT8                   Flags);  static void  AcpiTbConvertFadt ( @@ -84,13 +85,14 @@ typedef struct acpi_fadt_info      UINT16                  Address32;      UINT16                  Length;      UINT8                   DefaultLength; -    UINT8                   Type; +    UINT8                   Flags;  } ACPI_FADT_INFO;  #define ACPI_FADT_OPTIONAL          0  #define ACPI_FADT_REQUIRED          1  #define ACPI_FADT_SEPARATE_LENGTH   2 +#define ACPI_FADT_GPE_REGISTER      4  static ACPI_FADT_INFO     FadtInfoTable[] =  { @@ -141,14 +143,14 @@ static ACPI_FADT_INFO     FadtInfoTable[] =          ACPI_FADT_OFFSET (Gpe0Block),          ACPI_FADT_OFFSET (Gpe0BlockLength),          0, -        ACPI_FADT_SEPARATE_LENGTH}, +        ACPI_FADT_SEPARATE_LENGTH | ACPI_FADT_GPE_REGISTER},      {"Gpe1Block",          ACPI_FADT_OFFSET (XGpe1Block),          ACPI_FADT_OFFSET (Gpe1Block),          ACPI_FADT_OFFSET (Gpe1BlockLength),          0, -        ACPI_FADT_SEPARATE_LENGTH} +        ACPI_FADT_SEPARATE_LENGTH | ACPI_FADT_GPE_REGISTER}  };  #define ACPI_FADT_INFO_ENTRIES \ @@ -212,21 +214,31 @@ AcpiTbInitGenericAddress (      UINT8                   SpaceId,      UINT8                   ByteWidth,      UINT64                  Address, -    char                    *RegisterName) +    char                    *RegisterName, +    UINT8                   Flags)  {      UINT8                   BitWidth; -    /* Bit width field in the GAS is only one byte long, 255 max */ - +    /* +     * Bit width field in the GAS is only one byte long, 255 max. +     * Check for BitWidth overflow in GAS. +     */      BitWidth = (UINT8) (ByteWidth * 8); - -    if (ByteWidth > 31) /* (31*8)=248 */ +    if (ByteWidth > 31)     /* (31*8)=248, (32*8)=256 */      { -        ACPI_ERROR ((AE_INFO, -            "%s - 32-bit FADT register is too long (%u bytes, %u bits) " -            "to convert to GAS struct - 255 bits max, truncating", -            RegisterName, ByteWidth, (ByteWidth * 8))); +        /* +         * No error for GPE blocks, because we do not use the BitWidth +         * for GPEs, the legacy length (ByteWidth) is used instead to +         * allow for a large number of GPEs. +         */ +        if (!(Flags & ACPI_FADT_GPE_REGISTER)) +        { +            ACPI_ERROR ((AE_INFO, +                "%s - 32-bit FADT register is too long (%u bytes, %u bits) " +                "to convert to GAS struct - 255 bits max, truncating", +                RegisterName, ByteWidth, (ByteWidth * 8))); +        }          BitWidth = 255;      } @@ -492,6 +504,7 @@ AcpiTbConvertFadt (      ACPI_GENERIC_ADDRESS    *Address64;      UINT32                  Address32;      UINT8                   Length; +    UINT8                   Flags;      UINT32                  i; @@ -556,6 +569,7 @@ AcpiTbConvertFadt (              &AcpiGbl_FADT, FadtInfoTable[i].Length);          Name = FadtInfoTable[i].Name; +        Flags = FadtInfoTable[i].Flags;          /*           * Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X" @@ -592,7 +606,7 @@ AcpiTbConvertFadt (                      ACPI_ADR_SPACE_SYSTEM_IO,                      *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT,                          FadtInfoTable[i].Length), -                    (UINT64) Address32, Name); +                    (UINT64) Address32, Name, Flags);              }              else if (Address64->Address != (UINT64) Address32)              { @@ -613,7 +627,7 @@ AcpiTbConvertFadt (                          ACPI_ADR_SPACE_SYSTEM_IO,                          *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT,                              FadtInfoTable[i].Length), -                        (UINT64) Address32, Name); +                        (UINT64) Address32, Name, Flags);                  }              }          } @@ -634,7 +648,7 @@ AcpiTbConvertFadt (                  Name, ACPI_MUL_8 (Length), Address64->BitWidth));          } -        if (FadtInfoTable[i].Type & ACPI_FADT_REQUIRED) +        if (FadtInfoTable[i].Flags & ACPI_FADT_REQUIRED)          {              /*               * Field is required (PM1aEvent, PM1aControl). @@ -648,7 +662,7 @@ AcpiTbConvertFadt (                      Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));              }          } -        else if (FadtInfoTable[i].Type & ACPI_FADT_SEPARATE_LENGTH) +        else if (FadtInfoTable[i].Flags & ACPI_FADT_SEPARATE_LENGTH)          {              /*               * Field is optional (PM2Control, GPE0, GPE1) AND has its own @@ -755,7 +769,7 @@ AcpiTbSetupFadtRegisters (                  Source64->SpaceId, Pm1RegisterByteWidth,                  Source64->Address +                      (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth), -                "PmRegisters"); +                "PmRegisters", 0);          }      }  } diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index fc580f6b0e1fc..4b207d9369cee 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -53,10 +53,6 @@  /* Local prototypes */ -static ACPI_STATUS -AcpiTbValidateXsdt ( -    ACPI_PHYSICAL_ADDRESS   Address); -  static ACPI_PHYSICAL_ADDRESS  AcpiTbGetRootTableEntry (      UINT8                   *TableEntry, @@ -276,92 +272,6 @@ AcpiTbGetRootTableEntry (  /*******************************************************************************   * - * FUNCTION:    AcpiTbValidateXsdt - * - * PARAMETERS:  Address             - Physical address of the XSDT (from RSDP) - * - * RETURN:      Status. AE_OK if the table appears to be valid. - * - * DESCRIPTION: Validate an XSDT to ensure that it is of minimum size and does - *              not contain any NULL entries. A problem that is seen in the - *              field is that the XSDT exists, but is actually useless because - *              of one or more (or all) NULL entries. - * - ******************************************************************************/ - -static ACPI_STATUS -AcpiTbValidateXsdt ( -    ACPI_PHYSICAL_ADDRESS   XsdtAddress) -{ -    ACPI_TABLE_HEADER       *Table; -    UINT8                   *NextEntry; -    ACPI_PHYSICAL_ADDRESS   Address; -    UINT32                  Length; -    UINT32                  EntryCount; -    ACPI_STATUS             Status; -    UINT32                  i; - - -    /* Get the XSDT length */ - -    Table = AcpiOsMapMemory (XsdtAddress, sizeof (ACPI_TABLE_HEADER)); -    if (!Table) -    { -        return (AE_NO_MEMORY); -    } - -    Length = Table->Length; -    AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER)); - -    /* -     * Minimum XSDT length is the size of the standard ACPI header -     * plus one physical address entry -     */ -    if (Length < (sizeof (ACPI_TABLE_HEADER) + ACPI_XSDT_ENTRY_SIZE)) -    { -        return (AE_INVALID_TABLE_LENGTH); -    } - -    /* Map the entire XSDT */ - -    Table = AcpiOsMapMemory (XsdtAddress, Length); -    if (!Table) -    { -        return (AE_NO_MEMORY); -    } - -    /* Get the number of entries and pointer to first entry */ - -    Status = AE_OK; -    NextEntry = ACPI_ADD_PTR (UINT8, Table, sizeof (ACPI_TABLE_HEADER)); -    EntryCount = (UINT32) ((Table->Length - sizeof (ACPI_TABLE_HEADER)) / -        ACPI_XSDT_ENTRY_SIZE); - -    /* Validate each entry (physical address) within the XSDT */ - -    for (i = 0; i < EntryCount; i++) -    { -        Address = AcpiTbGetRootTableEntry (NextEntry, ACPI_XSDT_ENTRY_SIZE); -        if (!Address) -        { -            /* Detected a NULL entry, XSDT is invalid */ - -            Status = AE_NULL_ENTRY; -            break; -        } - -        NextEntry += ACPI_XSDT_ENTRY_SIZE; -    } - -    /* Unmap table */ - -    AcpiOsUnmapMemory (Table, Length); -    return (Status); -} - - -/******************************************************************************* - *   * FUNCTION:    AcpiTbParseRootTable   *   * PARAMETERS:  Rsdp                    - Pointer to the RSDP @@ -435,25 +345,6 @@ AcpiTbParseRootTable (       */      AcpiOsUnmapMemory (Rsdp, sizeof (ACPI_TABLE_RSDP)); -    /* -     * If it is present and used, validate the XSDT for access/size -     * and ensure that all table entries are at least non-NULL -     */ -    if (TableEntrySize == ACPI_XSDT_ENTRY_SIZE) -    { -        Status = AcpiTbValidateXsdt (Address); -        if (ACPI_FAILURE (Status)) -        { -            ACPI_BIOS_WARNING ((AE_INFO, "XSDT is invalid (%s), using RSDT", -                AcpiFormatException (Status))); - -            /* Fall back to the RSDT */ - -            Address = (ACPI_PHYSICAL_ADDRESS) Rsdp->RsdtPhysicalAddress; -            TableEntrySize = ACPI_RSDT_ENTRY_SIZE; -        } -    } -      /* Map the RSDT/XSDT table header to get the full table length */      Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER)); @@ -512,8 +403,16 @@ AcpiTbParseRootTable (      {          /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */ -        Status = AcpiTbInstallStandardTable ( -            AcpiTbGetRootTableEntry (TableEntry, TableEntrySize), +        Address = AcpiTbGetRootTableEntry (TableEntry, TableEntrySize); + +        /* Skip NULL entries in RSDT/XSDT */ + +        if (!Address) +        { +            goto NextTable; +        } + +        Status = AcpiTbInstallStandardTable (Address,              ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex);          if (ACPI_SUCCESS (Status) && @@ -523,6 +422,8 @@ AcpiTbParseRootTable (              AcpiTbParseFadt (TableIndex);          } +NextTable: +          TableEntry += TableEntrySize;      } diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 0b029c8825a17..c89d414fa5d84 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -58,31 +58,6 @@   *   ******************************************************************************/ -/* Debug output control masks */ - -#ifdef ACPI_DEBUG_OUTPUT -UINT32                      AcpiDbgLevel = ACPI_DEBUG_DEFAULT; -#else -UINT32                      AcpiDbgLevel = ACPI_NORMAL_DEFAULT; -#endif - -UINT32                      AcpiDbgLayer = ACPI_COMPONENT_DEFAULT; - -/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */ - -ACPI_TABLE_FADT             AcpiGbl_FADT; -UINT32                      AcpiGbl_TraceFlags; -ACPI_NAME                   AcpiGbl_TraceMethodName; -BOOLEAN                     AcpiGbl_SystemAwakeAndRunning; -UINT32                      AcpiCurrentGpeCount; - -/* - * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning - * that the ACPI hardware is no longer required. A flag in the FADT indicates - * a reduced HW machine, and that flag is duplicated here for convenience. - */ -BOOLEAN                     AcpiGbl_ReducedHardware; -  /* Various state name strings */  const char                  *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] = @@ -310,7 +285,6 @@ AcpiUtInitGlobals (      AcpiGbl_AcpiHardwarePresent         = TRUE;      AcpiGbl_LastOwnerIdIndex            = 0;      AcpiGbl_NextOwnerIdOffset           = 0; -    AcpiGbl_TraceMethodName             = 0;      AcpiGbl_TraceDbgLevel               = 0;      AcpiGbl_TraceDbgLayer               = 0;      AcpiGbl_DebuggerConfiguration       = DEBUGGER_THREADING; @@ -351,9 +325,7 @@ AcpiUtInitGlobals (      AcpiGbl_DisableMemTracking          = FALSE;  #endif -#ifdef ACPI_DEBUGGER -    AcpiGbl_DbTerminateThreads          = FALSE; -#endif +    ACPI_DEBUGGER_EXEC (AcpiGbl_DbTerminateThreads = FALSE);      return_ACPI_STATUS (AE_OK);  } diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 7990ef19b41fe..263ba59caf89b 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -400,7 +400,7 @@ AcpiUtValidInternalObject (      default:          ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, -                "%p is not not an ACPI operand obj [%s]\n", +                "%p is not an ACPI operand obj [%s]\n",                  Object, AcpiUtGetDescriptorName (Object)));          break;      } diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 4a065370356a7..48dd79c2c58cd 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -56,6 +56,8 @@   * tools/applications.   */ +#ifndef ACPI_NO_ERROR_MESSAGES /* Entire module */ +  /*******************************************************************************   *   * FUNCTION:    AcpiError @@ -290,3 +292,5 @@ AcpiBiosWarning (  }  ACPI_EXPORT_SYMBOL (AcpiBiosWarning) + +#endif /* ACPI_NO_ERROR_MESSAGES */  | 
