diff options
Diffstat (limited to 'source/components')
-rw-r--r-- | source/components/debugger/dbcmds.c | 4 | ||||
-rw-r--r-- | source/components/debugger/dbdisply.c | 4 | ||||
-rw-r--r-- | source/components/debugger/dbinput.c | 10 | ||||
-rw-r--r-- | source/components/debugger/dbnames.c | 4 | ||||
-rw-r--r-- | source/components/disassembler/dmbuffer.c | 6 | ||||
-rw-r--r-- | source/components/disassembler/dmopcode.c | 2 | ||||
-rw-r--r-- | source/components/disassembler/dmresrcl.c | 2 | ||||
-rw-r--r-- | source/components/disassembler/dmresrcl2.c | 8 | ||||
-rw-r--r-- | source/components/events/evgpeinit.c | 11 | ||||
-rw-r--r-- | source/components/executer/exdump.c | 5 | ||||
-rw-r--r-- | source/components/namespace/nsdump.c | 2 | ||||
-rw-r--r-- | source/components/namespace/nsrepair2.c | 28 | ||||
-rw-r--r-- | source/components/namespace/nsxfname.c | 11 | ||||
-rw-r--r-- | source/components/resources/rsdump.c | 2 | ||||
-rw-r--r-- | source/components/resources/rsutils.c | 2 | ||||
-rw-r--r-- | source/components/tables/tbxfroot.c | 7 | ||||
-rw-r--r-- | source/components/utilities/uteval.c | 8 | ||||
-rw-r--r-- | source/components/utilities/utstring.c | 5 |
18 files changed, 63 insertions, 58 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 5700441..307644b 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -105,13 +105,15 @@ AcpiDbConvertToNode ( char *InString) { ACPI_NAMESPACE_NODE *Node; + ACPI_SIZE Address; if ((*InString >= 0x30) && (*InString <= 0x39)) { /* Numeric argument, convert */ - Node = ACPI_TO_POINTER (ACPI_STRTOUL (InString, NULL, 16)); + Address = ACPI_STRTOUL (InString, NULL, 16); + Node = ACPI_TO_POINTER (Address); if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE))) { AcpiOsPrintf ("Address %p is invalid in this address space\n", diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index c453d57..046bbc3 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -139,9 +139,11 @@ AcpiDbGetPointer ( void *Target) { void *ObjPtr; + ACPI_SIZE Address; - ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16)); + Address = ACPI_STRTOUL (Target, NULL, 16); + ObjPtr = ACPI_TO_POINTER (Address); return (ObjPtr); } diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 1e3ebff..e7d88bc 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -829,7 +829,7 @@ AcpiDbCommandDispatch ( break; case CMD_EVENT: - + AcpiOsPrintf ("Event command not implemented\n"); break; @@ -888,7 +888,7 @@ AcpiDbCommandDispatch ( return (Status); case CMD_HISTORY_LAST: /* !! command */ - + CommandLine = AcpiDbGetFromHistory (NULL); if (!CommandLine) { @@ -899,12 +899,12 @@ AcpiDbCommandDispatch ( return (Status); case CMD_INFORMATION: - + AcpiDbDisplayMethodInfo (Op); break; case CMD_INTEGRITY: - + AcpiDbCheckIntegrity (); break; @@ -998,7 +998,7 @@ AcpiDbCommandDispatch ( break; case CMD_OWNER: - + AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]); break; diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index b414a40..1e1543c 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -783,11 +783,13 @@ AcpiDbFindReferences ( char *ObjectArg) { ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_SIZE Address; /* Convert string to object pointer */ - ObjDesc = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16)); + Address = ACPI_STRTOUL (ObjectArg, NULL, 16); + ObjDesc = ACPI_TO_POINTER (Address); /* Search all nodes in namespace */ diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index d0f57ce..a9496a9 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -177,7 +177,7 @@ AcpiDmByteList ( case ACPI_DASM_STRING: AcpiDmIndent (Info->Level); - AcpiUtPrintString ((char *) ByteData, ACPI_UINT8_MAX); + AcpiUtPrintString ((char *) ByteData, ACPI_UINT16_MAX); AcpiOsPrintf ("\n"); break; @@ -523,11 +523,9 @@ AcpiDmUnicode ( WordData = ACPI_CAST_PTR (UINT16, Op->Named.Data); WordCount = ACPI_DIV_2 (((UINT32) Op->Common.Value.Integer)); - - AcpiOsPrintf ("\""); - /* Write every other byte as an ASCII character */ + AcpiOsPrintf ("\""); for (i = 0; i < (WordCount - 1); i++) { AcpiOsPrintf ("%c", (int) WordData[i]); diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index 490fa8c..bbe5af3 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -633,7 +633,7 @@ AcpiDmDisassembleOneOp ( case AML_STRING_OP: - AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT8_MAX); + AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT16_MAX); break; case AML_BUFFER_OP: diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index e35b1b4..0e53672 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -565,7 +565,7 @@ AcpiDmResourceSource ( if (TotalLength > (MinimumTotalLength + 1)) { AcpiOsPrintf (" "); - AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX); + AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT16_MAX); } AcpiOsPrintf (", "); diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index 1e26f61..a81f9f8 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -195,7 +195,7 @@ AcpiDmGpioCommon ( { AcpiUtPrintString ( ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset), - ACPI_UINT8_MAX); + ACPI_UINT16_MAX); } AcpiOsPrintf (", "); @@ -498,7 +498,7 @@ AcpiDmI2cSerialBusDescriptor ( AcpiUtPrintString ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), - ACPI_UINT8_MAX); + ACPI_UINT16_MAX); /* ResourceSourceIndex, ResourceUsage */ @@ -573,7 +573,7 @@ AcpiDmSpiSerialBusDescriptor ( AcpiUtPrintString ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), - ACPI_UINT8_MAX); + ACPI_UINT16_MAX); /* ResourceSourceIndex, ResourceUsage */ @@ -651,7 +651,7 @@ AcpiDmUartSerialBusDescriptor ( AcpiUtPrintString ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), - ACPI_UINT8_MAX); + ACPI_UINT16_MAX); /* ResourceSourceIndex, ResourceUsage */ diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index 44a1378..dae7dc1 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -134,7 +134,6 @@ AcpiEvGpeInitialize ( /* GPE block 0 exists (has both length and address > 0) */ RegisterCount0 = (UINT16) (AcpiGbl_FADT.Gpe0BlockLength / 2); - GpeNumberMax = (RegisterCount0 * ACPI_GPE_REGISTER_WIDTH) - 1; /* Install GPE Block 0 */ @@ -209,16 +208,6 @@ AcpiEvGpeInitialize ( goto Cleanup; } - /* Check for Max GPE number out-of-range */ - - if (GpeNumberMax > ACPI_GPE_MAX) - { - ACPI_ERROR ((AE_INFO, - "Maximum GPE number from FADT is too large: 0x%X", - GpeNumberMax)); - Status = AE_BAD_VALUE; - goto Cleanup; - } Cleanup: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index 333168ec..197eda8 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -357,6 +357,7 @@ AcpiExDumpObject ( { UINT8 *Target; char *Name; + const char *ReferenceName; UINT8 Count; @@ -441,8 +442,8 @@ AcpiExDumpObject ( case ACPI_EXD_REFERENCE: - AcpiExOutString ("Class Name", - ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc))); + ReferenceName = AcpiUtGetReferenceName (ObjDesc); + AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName)); AcpiExDumpReferenceObj (ObjDesc); break; diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index be780f2..82e6602 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -618,7 +618,7 @@ AcpiNsDumpOneObject ( break; case ACPI_TYPE_LOCAL_INDEX_FIELD: - + ObjDesc = (void *) ObjDesc->IndexField.IndexObj; break; diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index 0dcfaad..0cf604b 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -501,19 +501,7 @@ AcpiNsRepair_CST ( /* - * Entries (subpackages) in the _CST Package must be sorted by the - * C-state type, in ascending order. - */ - Status = AcpiNsCheckSortedList (Info, ReturnObject, 1, 4, 1, - ACPI_SORT_ASCENDING, "C-State Type"); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - /* - * We now know the list is correctly sorted by C-state type. Check if - * the C-state type values are proportional. + * Check if the C-state type values are proportional. */ OuterElementCount = ReturnObject->Package.Count - 1; i = 0; @@ -527,6 +515,7 @@ AcpiNsRepair_CST ( ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags, "SubPackage[%u] - removing entry due to zero count", i)); Removing = TRUE; + goto RemoveElement; } ObjDesc = (*OuterElements)->Package.Elements[1]; /* Index1 = Type */ @@ -537,6 +526,7 @@ AcpiNsRepair_CST ( Removing = TRUE; } +RemoveElement: if (Removing) { AcpiNsRemoveElement (ReturnObject, i + 1); @@ -552,6 +542,18 @@ AcpiNsRepair_CST ( ObjDesc = ReturnObject->Package.Elements[0]; ObjDesc->Integer.Value = OuterElementCount; + + /* + * Entries (subpackages) in the _CST Package must be sorted by the + * C-state type, in ascending order. + */ + Status = AcpiNsCheckSortedList (Info, ReturnObject, 1, 4, 1, + ACPI_SORT_ASCENDING, "C-State Type"); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + return (AE_OK); } diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 619cec3..289ecd8 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -177,6 +177,7 @@ AcpiGetName ( { ACPI_STATUS Status; ACPI_NAMESPACE_NODE *Node; + char *NodeName; /* Parameter validation */ @@ -227,7 +228,8 @@ AcpiGetName ( /* Just copy the ACPI name from the Node and zero terminate it */ - ACPI_MOVE_NAME (Buffer->Pointer, AcpiUtGetNodeName (Node)); + NodeName = AcpiUtGetNodeName (Node); + ACPI_MOVE_NAME (Buffer->Pointer, NodeName); ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; Status = AE_OK; @@ -423,9 +425,14 @@ AcpiGetObjectInfo ( * Get extra info for ACPI Device/Processor objects only: * Run the _STA, _ADR and, SxW, and _SxD methods. * - * Note: none of these methods are required, so they may or may + * Notes: none of these methods are required, so they may or may * not be present for this device. The Info->Valid bitfield is used * to indicate which methods were found and run successfully. + * + * For _STA, if the method does not exist, then (as per the ACPI + * specification), the returned CurrentStatus flags will indicate + * that the device is present/functional/enabled. Otherwise, the + * CurrentStatus flags reflect the value returned from _STA. */ /* Execute the Device._STA method */ diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index 4f72cdf..35d9a4a 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -203,7 +203,7 @@ AcpiRsDumpDescriptor ( break; case ACPI_RSD_UINT64: - + AcpiRsOutInteger64 (Name, ACPI_GET64 (Target)); break; diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c index a453efe..04591d9 100644 --- a/source/components/resources/rsutils.c +++ b/source/components/resources/rsutils.c @@ -193,7 +193,7 @@ AcpiRsMoveData ( break; case ACPI_RSC_MOVE32: - + ACPI_MOVE_32_TO_32 (&ACPI_CAST_PTR (UINT32, Destination)[i], &ACPI_CAST_PTR (UINT32, Source)[i]); break; diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index 7e4d545..20cc0fa 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -53,11 +53,6 @@ /* Local prototypes */ -static UINT8 * -AcpiTbScanMemoryForRsdp ( - UINT8 *StartAddress, - UINT32 Length); - static ACPI_STATUS AcpiTbValidateRsdp ( ACPI_TABLE_RSDP *Rsdp); @@ -252,7 +247,7 @@ ACPI_EXPORT_SYMBOL (AcpiFindRootPointer) * ******************************************************************************/ -static UINT8 * +UINT8 * AcpiTbScanMemoryForRsdp ( UINT8 *StartAddress, UINT32 Length) diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index e24f2a2..472bd30 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -260,7 +260,8 @@ AcpiUtEvaluateNumericObject ( * RETURN: Status * * DESCRIPTION: Executes _STA for selected device and stores results in - * *Flags. + * *Flags. If _STA does not exist, then the device is assumed + * to be present/functional/enabled (as per the ACPI spec). * * NOTE: Internal function, no parameter validation * @@ -284,6 +285,11 @@ AcpiUtExecute_STA ( { if (AE_NOT_FOUND == Status) { + /* + * if _STA does not exist, then (as per the ACPI specification), + * the returned flags will indicate that the device is present, + * functional, and enabled. + */ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "_STA on %4.4s was not found, assuming device is present\n", AcpiUtGetNodeName (DeviceNode))); diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 9e58908..9798700 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -395,7 +395,8 @@ ErrorExit: * FUNCTION: AcpiUtPrintString * * PARAMETERS: String - Null terminated ASCII string - * MaxLength - Maximum output length + * MaxLength - Maximum output length. Used to constrain the + * length of strings during debug output only. * * RETURN: None * @@ -407,7 +408,7 @@ ErrorExit: void AcpiUtPrintString ( char *String, - UINT8 MaxLength) + UINT16 MaxLength) { UINT32 i; |