/******************************************************************************* * * FUNCTION: acpi_ut_execute_HID * * PARAMETERS: device_node - Node for the device * return_id - Where the string HID is returned * * RETURN: Status * * DESCRIPTION: Executes the _HID control method that returns the hardware * ID of the device. The HID is either an 32-bit encoded EISAID * Integer or a String. A string is always returned. An EISAID * is converted to a string. * * NOTE: Internal function, no parameter validation *
******************************************************************************/
acpi_status
acpi_ut_execute_HID(struct acpi_namespace_node *device_node, struct acpi_pnp_device_id **return_id)
{ union acpi_operand_object *obj_desc; struct acpi_pnp_device_id *hid;
u32 length;
acpi_status status;
ACPI_FUNCTION_TRACE(ut_execute_HID);
status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID,
ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING,
&obj_desc); if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/* Get the size of the String to be returned, includes null terminator */
/******************************************************************************* * * FUNCTION: acpi_ut_execute_UID * * PARAMETERS: device_node - Node for the device * return_id - Where the string UID is returned * * RETURN: Status * * DESCRIPTION: Executes the _UID control method that returns the unique * ID of the device. The UID is either a 64-bit Integer (NOT an * EISAID) or a string. Always returns a string. A 64-bit integer * is converted to a decimal string. * * NOTE: Internal function, no parameter validation *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_ut_execute_CID * * PARAMETERS: device_node - Node for the device * return_cid_list - Where the CID list is returned * * RETURN: Status, list of CID strings * * DESCRIPTION: Executes the _CID control method that returns one or more * compatible hardware IDs for the device. * * NOTE: Internal function, no parameter validation * * A _CID method can return either a single compatible ID or a package of * compatible IDs. Each compatible ID can be one of the following: * 1) Integer (32 bit compressed EISA ID) or * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") * * The Integer CIDs are converted to string format by this function. *
******************************************************************************/
status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID,
ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING
| ACPI_BTYPE_PACKAGE, &obj_desc); if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/* * Get the count and size of the returned _CIDs. _CID can return either * a Package of Integers/Strings or a single Integer or String. * Note: This section also validates that all CID elements are of the * correct type (Integer or String).
*/ if (obj_desc->common.type == ACPI_TYPE_PACKAGE) {
count = obj_desc->package.count;
cid_objects = obj_desc->package.elements;
} else { /* Single Integer or String CID */
count = 1;
cid_objects = &obj_desc;
}
string_area_size = 0; for (i = 0; i < count; i++) {
/* String lengths include null terminator */
switch (cid_objects[i]->common.type) { case ACPI_TYPE_INTEGER:
/* * Now that we know the length of the CIDs, allocate return buffer: * 1) Size of the base structure + * 2) Size of the CID PNP_DEVICE_ID array + * 3) Size of the actual CID strings
*/
cid_list_size = sizeof(struct acpi_pnp_device_id_list) +
(count * sizeof(struct acpi_pnp_device_id)) + string_area_size;
cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size); if (!cid_list) {
status = AE_NO_MEMORY; goto cleanup;
}
/* Area for CID strings starts after the CID PNP_DEVICE_ID array */
/******************************************************************************* * * FUNCTION: acpi_ut_execute_CLS * * PARAMETERS: device_node - Node for the device * return_id - Where the _CLS is returned * * RETURN: Status * * DESCRIPTION: Executes the _CLS control method that returns PCI-defined * class code of the device. The _CLS value is always a package * containing PCI class information as a list of integers. * The returned string has format "BBSSPP", where: * BB = Base-class code * SS = Sub-class code * PP = Programming Interface code *
******************************************************************************/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.