summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsxfname.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-11-25 21:04:42 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-11-25 21:04:42 +0000
commitb9098066cd6284319bca922f13e59517f774a103 (patch)
treef01fd6c9053cb01ed84c00cb42ee789adafceaf5 /source/components/namespace/nsxfname.c
parent1e24cf365bc9c8df179b145c90d52852724e54ee (diff)
Notes
Diffstat (limited to 'source/components/namespace/nsxfname.c')
-rw-r--r--source/components/namespace/nsxfname.c56
1 files changed, 21 insertions, 35 deletions
diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 311431b2de842..757e6bc7675a7 100644
--- a/source/components/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
@@ -177,7 +177,7 @@ AcpiGetName (
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
- char *NodeName;
+ const char *NodeName;
/* Parameter validation */
@@ -199,7 +199,7 @@ AcpiGetName (
/* Get the full pathname (From the namespace root) */
Status = AcpiNsHandleToPathname (Handle, Buffer,
- NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE);
+ NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE);
return (Status);
}
@@ -265,7 +265,6 @@ AcpiNsCopyDeviceId (
ACPI_PNP_DEVICE_ID *Source,
char *StringArea)
{
-
/* Create the destination PNP_DEVICE_ID */
Dest->String = StringArea;
@@ -291,11 +290,18 @@ AcpiNsCopyDeviceId (
* namespace node and possibly by running several standard
* control methods (Such as in the case of a device.)
*
- * For Device and Processor objects, run the Device _HID, _UID, _CID, _SUB,
- * _CLS, _STA, _ADR, _SxW, and _SxD methods.
+ * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA,
+ * _CLS, _ADR, _SxW, and _SxD methods.
*
* Note: Allocates the return buffer, must be freed by the caller.
*
+ * Note: This interface is intended to be used during the initial device
+ * discovery namespace traversal. Therefore, no complex methods can be
+ * executed, especially those that access operation regions. Therefore, do
+ * not add any additional methods that could cause problems in this area.
+ * this was the fate of the _SUB method which was found to cause such
+ * problems and was removed (11/2015).
+ *
******************************************************************************/
ACPI_STATUS
@@ -308,7 +314,6 @@ AcpiGetObjectInfo (
ACPI_PNP_DEVICE_ID_LIST *CidList = NULL;
ACPI_PNP_DEVICE_ID *Hid = NULL;
ACPI_PNP_DEVICE_ID *Uid = NULL;
- ACPI_PNP_DEVICE_ID *Sub = NULL;
ACPI_PNP_DEVICE_ID *Cls = NULL;
char *NextIdString;
ACPI_OBJECT_TYPE Type;
@@ -362,7 +367,7 @@ AcpiGetObjectInfo (
{
/*
* Get extra info for ACPI Device/Processor objects only:
- * Run the Device _HID, _UID, _SUB, _CID, and _CLS methods.
+ * Run the Device _HID, _UID, _CLS, and _CID methods.
*
* Note: none of these methods are required, so they may or may
* not be present for this device. The Info->Valid bitfield is used
@@ -387,15 +392,6 @@ AcpiGetObjectInfo (
Valid |= ACPI_VALID_UID;
}
- /* Execute the Device._SUB method */
-
- Status = AcpiUtExecute_SUB (Node, &Sub);
- if (ACPI_SUCCESS (Status))
- {
- InfoSize += Sub->Length;
- Valid |= ACPI_VALID_SUB;
- }
-
/* Execute the Device._CID method */
Status = AcpiUtExecute_CID (Node, &CidList);
@@ -458,7 +454,7 @@ AcpiGetObjectInfo (
/* Execute the Device._ADR method */
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, Node,
- &Info->Address);
+ &Info->Address);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_ADR;
@@ -467,8 +463,8 @@ AcpiGetObjectInfo (
/* Execute the Device._SxW methods */
Status = AcpiUtExecutePowerMethods (Node,
- AcpiGbl_LowestDstateNames, ACPI_NUM_SxW_METHODS,
- Info->LowestDstates);
+ AcpiGbl_LowestDstateNames, ACPI_NUM_SxW_METHODS,
+ Info->LowestDstates);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_SXWS;
@@ -477,8 +473,8 @@ AcpiGetObjectInfo (
/* Execute the Device._SxD methods */
Status = AcpiUtExecutePowerMethods (Node,
- AcpiGbl_HighestDstateNames, ACPI_NUM_SxD_METHODS,
- Info->HighestDstates);
+ AcpiGbl_HighestDstateNames, ACPI_NUM_SxD_METHODS,
+ Info->HighestDstates);
if (ACPI_SUCCESS (Status))
{
Valid |= ACPI_VALID_SXDS;
@@ -498,9 +494,8 @@ AcpiGetObjectInfo (
}
/*
- * Copy the HID, UID, SUB, and CIDs to the return buffer.
- * The variable-length strings are copied to the reserved area
- * at the end of the buffer.
+ * Copy the HID, UID, and CIDs to the return buffer. The variable-length
+ * strings are copied to the reserved area at the end of the buffer.
*
* For HID and CID, check if the ID is a PCI Root Bridge.
*/
@@ -521,12 +516,6 @@ AcpiGetObjectInfo (
Uid, NextIdString);
}
- if (Sub)
- {
- NextIdString = AcpiNsCopyDeviceId (&Info->SubsystemId,
- Sub, NextIdString);
- }
-
if (CidList)
{
Info->CompatibleIdList.Count = CidList->Count;
@@ -573,10 +562,6 @@ Cleanup:
{
ACPI_FREE (Uid);
}
- if (Sub)
- {
- ACPI_FREE (Sub);
- }
if (CidList)
{
ACPI_FREE (CidList);
@@ -652,6 +637,7 @@ AcpiInstallMethod (
ParserState.Aml += AcpiPsGetOpcodeSize (Opcode);
ParserState.PkgEnd = AcpiPsGetNextPackageEnd (&ParserState);
Path = AcpiPsGetNextNamestring (&ParserState);
+
MethodFlags = *ParserState.Aml++;
AmlStart = ParserState.Aml;
AmlLength = ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
@@ -684,7 +670,7 @@ AcpiInstallMethod (
/* The lookup either returns an existing node or creates a new one */
Status = AcpiNsLookup (NULL, Path, ACPI_TYPE_METHOD, ACPI_IMODE_LOAD_PASS1,
- ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, NULL, &Node);
+ ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, NULL, &Node);
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);