diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-05-18 23:17:05 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-05-18 23:17:05 +0000 |
commit | 615eb2945402758f050f1cb469181d3d22a22aa3 (patch) | |
tree | 0f95f8242a48aa24d8a795f626766746819b5227 /source/components | |
parent | 2a91972d59fb9df39eae760a853d6f5bc4065cf0 (diff) |
Notes
Diffstat (limited to 'source/components')
-rw-r--r-- | source/components/debugger/dbfileio.c | 18 | ||||
-rw-r--r-- | source/components/debugger/dbinput.c | 2 | ||||
-rw-r--r-- | source/components/dispatcher/dsmethod.c | 6 | ||||
-rw-r--r-- | source/components/hardware/hwpci.c | 9 | ||||
-rw-r--r-- | source/components/namespace/nsprepkg.c | 13 | ||||
-rw-r--r-- | source/components/namespace/nsrepair.c | 2 | ||||
-rw-r--r-- | source/components/parser/psopinfo.c | 3 | ||||
-rw-r--r-- | source/components/utilities/utfileio.c | 9 | ||||
-rw-r--r-- | source/components/utilities/uthex.c | 4 | ||||
-rw-r--r-- | source/components/utilities/utxferror.c | 12 |
10 files changed, 51 insertions, 27 deletions
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 0cda7ab3b0de..f9d7635ecd0c 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -216,7 +216,8 @@ AeLocalLoadTable ( ACPI_STATUS AcpiDbGetTableFromFile ( char *Filename, - ACPI_TABLE_HEADER **ReturnTable) + ACPI_TABLE_HEADER **ReturnTable, + BOOLEAN MustBeAmlFile) { #ifdef ACPI_APPLICATION ACPI_STATUS Status; @@ -230,9 +231,18 @@ AcpiDbGetTableFromFile ( return (Status); } -#ifdef ACPI_DATA_TABLE_DISASSEMBLY - IsAmlTable = AcpiUtIsAmlTable (Table); -#endif + if (MustBeAmlFile) + { + IsAmlTable = AcpiUtIsAmlTable (Table); + if (!IsAmlTable) + { + ACPI_EXCEPTION ((AE_INFO, AE_OK, + "Input for -e is not an AML table: " + "\"%4.4s\" (must be DSDT/SSDT)", + Table->Signature)); + return (AE_TYPE); + } + } if (IsAmlTable) { diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 2441bc8da92b..80fd3e602b78 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -969,7 +969,7 @@ AcpiDbCommandDispatch ( case CMD_LOAD: - Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL); + Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE); break; case CMD_LOCKS: diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 54a5c8232774..f1c3be8b1953 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -123,6 +123,7 @@ AcpiDsAutoSerializeMethod ( WalkState = AcpiDsCreateWalkState (Node->OwnerId, NULL, NULL, NULL); if (!WalkState) { + AcpiPsFreeOp (Op); return_ACPI_STATUS (AE_NO_MEMORY); } @@ -131,6 +132,7 @@ AcpiDsAutoSerializeMethod ( if (ACPI_FAILURE (Status)) { AcpiDsDeleteWalkState (WalkState); + AcpiPsFreeOp (Op); return_ACPI_STATUS (Status); } @@ -139,10 +141,6 @@ AcpiDsAutoSerializeMethod ( /* Parse the method, scan for creation of named objects */ Status = AcpiPsParseAml (WalkState); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } AcpiPsDeleteParseTree (Op); return_ACPI_STATUS (Status); diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index 617d5adbdbca..21cc667fa3f6 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -140,7 +140,7 @@ AcpiHwDerivePciId ( ACPI_HANDLE PciRegion) { ACPI_STATUS Status; - ACPI_PCI_DEVICE *ListHead = NULL; + ACPI_PCI_DEVICE *ListHead; ACPI_FUNCTION_TRACE (HwDerivePciId); @@ -198,7 +198,6 @@ AcpiHwBuildPciList ( ACPI_HANDLE ParentDevice; ACPI_STATUS Status; ACPI_PCI_DEVICE *ListElement; - ACPI_PCI_DEVICE *ListHead = NULL; /* @@ -206,6 +205,7 @@ AcpiHwBuildPciList ( * a list of device nodes. Loop will exit when either the PCI device is * found, or the root of the namespace is reached. */ + *ReturnListHead = NULL; CurrentDevice = PciRegion; while (1) { @@ -222,7 +222,6 @@ AcpiHwBuildPciList ( if (ParentDevice == RootPciDevice) { - *ReturnListHead = ListHead; return (AE_OK); } @@ -237,9 +236,9 @@ AcpiHwBuildPciList ( /* Put new element at the head of the list */ - ListElement->Next = ListHead; + ListElement->Next = *ReturnListHead; ListElement->Device = ParentDevice; - ListHead = ListElement; + *ReturnListHead = ListElement; CurrentDevice = ParentDevice; } diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c index c6527cc5d995..599af7e6a563 100644 --- a/source/components/namespace/nsprepkg.c +++ b/source/components/namespace/nsprepkg.c @@ -321,6 +321,13 @@ AcpiNsCheckPackage ( Status = AcpiNsCheckPackageList (Info, Package, Elements, Count); break; + case ACPI_PTYPE2_VAR_VAR: + /* + * Returns a variable list of packages, each with a variable list + * of objects. + */ + break; + case ACPI_PTYPE2_UUID_PAIR: /* The package must contain pairs of (UUID + type) */ @@ -490,6 +497,12 @@ AcpiNsCheckPackageList ( } break; + case ACPI_PTYPE2_VAR_VAR: + /* + * Each subpackage has a fixed or variable number of elements + */ + break; + case ACPI_PTYPE2_FIXED: /* Each subpackage has a fixed length */ diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index df0e1e4c5599..160d84308561 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -523,10 +523,10 @@ AcpiNsRemoveNullElements ( case ACPI_PTYPE2_MIN: case ACPI_PTYPE2_REV_FIXED: case ACPI_PTYPE2_FIX_VAR: - break; default: + case ACPI_PTYPE2_VAR_VAR: case ACPI_PTYPE1_FIXED: case ACPI_PTYPE1_OPTION: return; diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index e3cd31f2e04e..90940c828856 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -52,9 +52,6 @@ ACPI_MODULE_NAME ("psopinfo") -extern const UINT8 AcpiGbl_ShortOpIndex[]; -extern const UINT8 AcpiGbl_LongOpIndex[]; - static const UINT8 AcpiGbl_ArgumentCount[] = {0,1,1,1,1,2,2,2,2,3,3,6}; diff --git a/source/components/utilities/utfileio.c b/source/components/utilities/utfileio.c index 39ef3e62179c..1e524fb0fcaa 100644 --- a/source/components/utilities/utfileio.c +++ b/source/components/utilities/utfileio.c @@ -228,11 +228,8 @@ AcpiUtReadTable ( TableHeader.Length, FileSize); #ifdef ACPI_ASL_COMPILER - Status = FlCheckForAscii (fp, NULL, FALSE); - if (ACPI_SUCCESS (Status)) - { - AcpiOsPrintf ("File appears to be ASCII only, must be binary\n"); - } + AcpiOsPrintf ("File is corrupt or is ASCII text -- " + "it must be a binary file\n"); #endif return (AE_BAD_HEADER); } @@ -344,7 +341,7 @@ AcpiUtReadTableFromFile ( /* Get the entire file */ - fprintf (stderr, "Loading Acpi table from file %10s - Length %.8u (%06X)\n", + fprintf (stderr, "Reading ACPI table from file %10s - Length %.8u (0x%06X)\n", Filename, FileSize, FileSize); Status = AcpiUtReadTable (File, Table, &TableLength); diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c index 4dcf1cfaaf6d..abbf5f4874f1 100644 --- a/source/components/utilities/uthex.c +++ b/source/components/utilities/uthex.c @@ -82,9 +82,9 @@ AcpiUtHexToAsciiChar ( /******************************************************************************* * - * FUNCTION: AcpiUtHexCharToValue + * FUNCTION: AcpiUtAsciiCharToHex * - * PARAMETERS: AsciiChar - Hex character in Ascii + * PARAMETERS: HexChar - Hex character in Ascii * * RETURN: The binary value of the ascii/hex character * diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 05b765249d9d..a6a6818b6888 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -123,8 +123,18 @@ AcpiException ( ACPI_MSG_REDIRECT_BEGIN; - AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ", AcpiFormatException (Status)); + /* For AE_OK, just print the message */ + + if (ACPI_SUCCESS (Status)) + { + AcpiOsPrintf (ACPI_MSG_EXCEPTION); + + } + else + { + AcpiOsPrintf (ACPI_MSG_EXCEPTION "%s, ", AcpiFormatException (Status)); + } va_start (ArgList, Format); AcpiOsVprintf (Format, ArgList); ACPI_MSG_SUFFIX; |