// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: utaddress - op_region address range check * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" #define _COMPONENT … ACPI_MODULE_NAME("utaddress") /******************************************************************************* * * 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) { … } /******************************************************************************* * * 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 * ******************************************************************************/ void acpi_ut_remove_address_range(acpi_adr_space_type space_id, struct acpi_namespace_node *region_node) { … } /******************************************************************************* * * 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. * ******************************************************************************/ u32 acpi_ut_check_address_range(acpi_adr_space_type space_id, acpi_physical_address address, u32 length, u8 warn) { … } /******************************************************************************* * * FUNCTION: acpi_ut_delete_address_lists * * PARAMETERS: None * * RETURN: None * * DESCRIPTION: Delete all global address range lists (called during * subsystem shutdown). * ******************************************************************************/ void acpi_ut_delete_address_lists(void) { … }