Lines Matching +full:width +full:- +full:mm

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() local
54 /* Validate and translate the bit width */ in acpi_ex_system_memory_space_handler()
79 ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %u", in acpi_ex_system_memory_space_handler()
86 * Hardware does not support non-aligned data transfers, we must verify in acpi_ex_system_memory_space_handler()
100 if (!mm || (address < mm->physical_address) || in acpi_ex_system_memory_space_handler()
101 ((u64) address + length > (u64) mm->physical_address + mm->length)) { in acpi_ex_system_memory_space_handler()
109 for (mm = mem_info->first_mm; mm; mm = mm->next_mm) { in acpi_ex_system_memory_space_handler()
110 if (mm == mem_info->cur_mm) in acpi_ex_system_memory_space_handler()
113 if (address < mm->physical_address) in acpi_ex_system_memory_space_handler()
117 (u64) mm->physical_address + mm->length) in acpi_ex_system_memory_space_handler()
120 mem_info->cur_mm = mm; in acpi_ex_system_memory_space_handler()
125 mm = ACPI_ALLOCATE_ZEROED(sizeof(*mm)); in acpi_ex_system_memory_space_handler()
126 if (!mm) { in acpi_ex_system_memory_space_handler()
139 ((mem_info->address + mem_info->length) - address); in acpi_ex_system_memory_space_handler()
153 (ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address); in acpi_ex_system_memory_space_handler()
170 ACPI_FREE(mm); in acpi_ex_system_memory_space_handler()
176 mm->logical_address = logical_addr_ptr; in acpi_ex_system_memory_space_handler()
177 mm->physical_address = address; in acpi_ex_system_memory_space_handler()
178 mm->length = map_length; in acpi_ex_system_memory_space_handler()
184 mm->next_mm = mem_info->first_mm; in acpi_ex_system_memory_space_handler()
185 mem_info->first_mm = mm; in acpi_ex_system_memory_space_handler()
187 mem_info->cur_mm = mm; in acpi_ex_system_memory_space_handler()
195 logical_addr_ptr = mm->logical_address + in acpi_ex_system_memory_space_handler()
196 ((u64) address - (u64) mm->physical_address); in acpi_ex_system_memory_space_handler()
199 "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n", in acpi_ex_system_memory_space_handler()
205 * Note: For machines that do not support non-aligned transfers, the target in acpi_ex_system_memory_space_handler()
207 * transfer up into smaller (byte-size) chunks because the AML specifically in acpi_ex_system_memory_space_handler()
208 * asked for a transfer width that the hardware may require. in acpi_ex_system_memory_space_handler()
287 * PARAMETERS: function - Read or Write operation
288 * address - Where in the space to read or write
289 * bit_width - Field width in bits (8, 16, or 32)
290 * value - Pointer to in or out value
291 * handler_context - Pointer to Handler's context
292 * region_context - Pointer to context specific to the
314 "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n", in acpi_ex_system_io_space_handler()
347 * PARAMETERS: function - Read or Write operation
348 * address - Where in the space to read or write
349 * bit_width - Field width in bits (8, 16, or 32)
350 * value - Pointer to in or out value
351 * handler_context - Pointer to Handler's context
352 * region_context - Pointer to context specific to the
377 * pci_segment is the PCI bus segment range 0-31 in acpi_ex_pci_config_space_handler()
378 * pci_bus is the PCI bus number range 0-255 in acpi_ex_pci_config_space_handler()
379 * pci_device is the PCI device number range 0-31 in acpi_ex_pci_config_space_handler()
381 * pci_register is the Config space register range 0-255 bytes in acpi_ex_pci_config_space_handler()
383 * value - input value for write, output address for read in acpi_ex_pci_config_space_handler()
390 "Pci-Config %u (%u) Seg(%04x) Bus(%04x) " in acpi_ex_pci_config_space_handler()
392 function, bit_width, pci_id->segment, pci_id->bus, in acpi_ex_pci_config_space_handler()
393 pci_id->device, pci_id->function, pci_register)); in acpi_ex_pci_config_space_handler()
425 * PARAMETERS: function - Read or Write operation
426 * address - Where in the space to read or write
427 * bit_width - Field width in bits (8, 16, or 32)
428 * value - Pointer to in or out value
429 * handler_context - Pointer to Handler's context
430 * region_context - Pointer to context specific to the
458 * PARAMETERS: function - Read or Write operation
459 * address - Where in the space to read or write
460 * bit_width - Field width in bits (8, 16, or 32)
461 * value - Pointer to in or out value
462 * handler_context - Pointer to Handler's context
463 * region_context - Pointer to context specific to the
491 * PARAMETERS: function - Read or Write operation
492 * address - Where in the space to read or write
493 * bit_width - Field width in bits (8, 16, or 32)
494 * value - Pointer to in or out value
495 * handler_context - Pointer to Handler's context
496 * region_context - Pointer to context specific to the
518 pointer = ACPI_CAST_PTR(char, mapping->pointer) + in acpi_ex_data_table_space_handler()
519 (address - ACPI_PTR_TO_PHYSADDR(mapping->pointer)); in acpi_ex_data_table_space_handler()