// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: exregion - ACPI default op_region (address space) handlers * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acinterp.h" #define _COMPONENT … ACPI_MODULE_NAME("exregion") /******************************************************************************* * * FUNCTION: acpi_ex_system_memory_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the System Memory address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_system_memory_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … } /******************************************************************************* * * FUNCTION: acpi_ex_system_io_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the System IO address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_system_io_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … } #ifdef ACPI_PCI_CONFIGURED /******************************************************************************* * * FUNCTION: acpi_ex_pci_config_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the PCI Config address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_pci_config_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … } #endif /******************************************************************************* * * FUNCTION: acpi_ex_cmos_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the CMOS address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_cmos_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … } #ifdef ACPI_PCI_CONFIGURED /******************************************************************************* * * FUNCTION: acpi_ex_pci_bar_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the PCI bar_target address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_pci_bar_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … } #endif /******************************************************************************* * * FUNCTION: acpi_ex_data_table_space_handler * * PARAMETERS: function - Read or Write operation * address - Where in the space to read or write * bit_width - Field width in bits (8, 16, or 32) * value - Pointer to in or out value * handler_context - Pointer to Handler's context * region_context - Pointer to context specific to the * accessed region * * RETURN: Status * * DESCRIPTION: Handler for the Data Table address space (Op Region) * ******************************************************************************/ acpi_status acpi_ex_data_table_space_handler(u32 function, acpi_physical_address address, u32 bit_width, u64 *value, void *handler_context, void *region_context) { … }