Lines Matching +full:memcpy +full:- +full:bus +full:- +full:width

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: exregion - ACPI default op_region (address space) handlers
6 * Copyright (C) 2000 - 2023, Intel Corp.
21 * PARAMETERS: function - Read or Write operation
22 * address - Where in the space to read or write
23 * bit_width - Field width in bits (8, 16, or 32)
24 * value - Pointer to in or out value
25 * handler_context - Pointer to Handler's context
26 * region_context - Pointer to context specific to the
44 struct acpi_mem_mapping *mm = mem_info->cur_mm; in acpi_ex_system_memory_space_handler()
53 /* Validate and translate the bit width */ in acpi_ex_system_memory_space_handler()
78 ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u", in acpi_ex_system_memory_space_handler()
85 * Hardware does not support non-aligned data transfers, we must verify in acpi_ex_system_memory_space_handler()
99 if (!mm || (address < mm->physical_address) || in acpi_ex_system_memory_space_handler()
100 ((u64) address + length > (u64) mm->physical_address + mm->length)) { in acpi_ex_system_memory_space_handler()
108 for (mm = mem_info->first_mm; mm; mm = mm->next_mm) { in acpi_ex_system_memory_space_handler()
109 if (mm == mem_info->cur_mm) in acpi_ex_system_memory_space_handler()
112 if (address < mm->physical_address) in acpi_ex_system_memory_space_handler()
116 (u64) mm->physical_address + mm->length) in acpi_ex_system_memory_space_handler()
119 mem_info->cur_mm = mm; in acpi_ex_system_memory_space_handler()
138 ((mem_info->address + mem_info->length) - address); in acpi_ex_system_memory_space_handler()
157 mm->logical_address = logical_addr_ptr; in acpi_ex_system_memory_space_handler()
158 mm->physical_address = address; in acpi_ex_system_memory_space_handler()
159 mm->length = map_length; in acpi_ex_system_memory_space_handler()
165 mm->next_mm = mem_info->first_mm; in acpi_ex_system_memory_space_handler()
166 mem_info->first_mm = mm; in acpi_ex_system_memory_space_handler()
168 mem_info->cur_mm = mm; in acpi_ex_system_memory_space_handler()
176 logical_addr_ptr = mm->logical_address + in acpi_ex_system_memory_space_handler()
177 ((u64) address - (u64) mm->physical_address); in acpi_ex_system_memory_space_handler()
180 "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", in acpi_ex_system_memory_space_handler()
186 * Note: For machines that do not support non-aligned transfers, the target in acpi_ex_system_memory_space_handler()
188 * transfer up into smaller (byte-size) chunks because the AML specifically in acpi_ex_system_memory_space_handler()
189 * asked for a transfer width that the hardware may require. in acpi_ex_system_memory_space_handler()
268 * PARAMETERS: function - Read or Write operation
269 * address - Where in the space to read or write
270 * bit_width - Field width in bits (8, 16, or 32)
271 * value - Pointer to in or out value
272 * handler_context - Pointer to Handler's context
273 * region_context - Pointer to context specific to the
295 "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", in acpi_ex_system_io_space_handler()
328 * PARAMETERS: function - Read or Write operation
329 * address - Where in the space to read or write
330 * bit_width - Field width in bits (8, 16, or 32)
331 * value - Pointer to in or out value
332 * handler_context - Pointer to Handler's context
333 * region_context - Pointer to context specific to the
358 * pci_segment is the PCI bus segment range 0-31 in acpi_ex_pci_config_space_handler()
359 * pci_bus is the PCI bus number range 0-255 in acpi_ex_pci_config_space_handler()
360 * pci_device is the PCI device number range 0-31 in acpi_ex_pci_config_space_handler()
362 * pci_register is the Config space register range 0-255 bytes in acpi_ex_pci_config_space_handler()
364 * value - input value for write, output address for read in acpi_ex_pci_config_space_handler()
371 "Pci-Config %u (%u) Seg(%04x) Bus(%04x) " in acpi_ex_pci_config_space_handler()
373 function, bit_width, pci_id->segment, pci_id->bus, in acpi_ex_pci_config_space_handler()
374 pci_id->device, pci_id->function, pci_register)); in acpi_ex_pci_config_space_handler()
406 * PARAMETERS: function - Read or Write operation
407 * address - Where in the space to read or write
408 * bit_width - Field width in bits (8, 16, or 32)
409 * value - Pointer to in or out value
410 * handler_context - Pointer to Handler's context
411 * region_context - Pointer to context specific to the
439 * PARAMETERS: function - Read or Write operation
440 * address - Where in the space to read or write
441 * bit_width - Field width in bits (8, 16, or 32)
442 * value - Pointer to in or out value
443 * handler_context - Pointer to Handler's context
444 * region_context - Pointer to context specific to the
472 * PARAMETERS: function - Read or Write operation
473 * address - Where in the space to read or write
474 * bit_width - Field width in bits (8, 16, or 32)
475 * value - Pointer to in or out value
476 * handler_context - Pointer to Handler's context
477 * region_context - Pointer to context specific to the
499 pointer = ACPI_CAST_PTR(char, mapping->pointer) + in acpi_ex_data_table_space_handler()
500 (address - ACPI_PTR_TO_PHYSADDR(mapping->pointer)); in acpi_ex_data_table_space_handler()
509 memcpy(ACPI_CAST_PTR(char, value), pointer, in acpi_ex_data_table_space_handler()
515 memcpy(pointer, ACPI_CAST_PTR(char, value), in acpi_ex_data_table_space_handler()