/******************************************************************************* * * FUNCTION: acpi_ut_add_address_range * * PARAMETERS: space_id - Address space ID * address - op_region start address * length - op_region length * region_node - op_region namespace node * * RETURN: Status * * DESCRIPTION: Add the Operation Region address range to the global list. * The only supported Space IDs are Memory and I/O. Called when * the op_region address/length operands are fully evaluated. * * MUTEX: Locks the namespace * * NOTE: Because this interface is only called when an op_region argument * list is evaluated, there cannot be any duplicate region_nodes. * Duplicate Address/Length values are allowed, however, so that multiple * address conflicts can be detected. *
******************************************************************************/
acpi_status
acpi_ut_add_address_range(acpi_adr_space_type space_id,
acpi_physical_address address,
u32 length, struct acpi_namespace_node *region_node)
{ struct acpi_address_range *range_info;
/******************************************************************************* * * FUNCTION: acpi_ut_remove_address_range * * PARAMETERS: space_id - Address space ID * region_node - op_region namespace node * * RETURN: None * * DESCRIPTION: Remove the Operation Region from the global list. The only * supported Space IDs are Memory and I/O. Called when an * op_region is deleted. * * MUTEX: Assumes the namespace is locked *
******************************************************************************/
/* Get the appropriate list head and check the list */
range_info = prev = acpi_gbl_address_range_list[space_id]; while (range_info) { if (range_info->region_node == region_node) { if (range_info == prev) { /* Found at list head */
acpi_gbl_address_range_list[space_id] =
range_info->next;
} else {
prev->next = range_info->next;
}
/******************************************************************************* * * FUNCTION: acpi_ut_check_address_range * * PARAMETERS: space_id - Address space ID * address - Start address * length - Length of address range * warn - TRUE if warning on overlap desired * * RETURN: Count of the number of conflicts detected. Zero is always * returned for Space IDs other than Memory or I/O. * * DESCRIPTION: Check if the input address range overlaps any of the * ASL operation region address ranges. The only supported * Space IDs are Memory and I/O. * * MUTEX: Assumes the namespace is locked. *
******************************************************************************/
/* Check entire list for all possible conflicts */
while (range_info) { /* * Check if the requested address/length overlaps this * address range. There are four cases to consider: * * 1) Input address/length is contained completely in the * address range * 2) Input address/length overlaps range at the range start * 3) Input address/length overlaps range at the range end * 4) Input address/length completely encompasses the range
*/ if ((address <= range_info->end_address) &&
(end_address >= range_info->start_address)) {
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.