| /linux/drivers/fpga/ |
| H A D | dfl-afu-dma-region.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for FPGA Accelerated Function Unit (AFU) DMA Region Management 5 * Copyright (C) 2017-2018 Intel Corporation, Inc. 12 #include <linux/dma-mapping.h> 17 #include "dfl-afu.h" 23 afu->dma_regions = RB_ROOT; in afu_dma_region_init() 27 * afu_dma_pin_pages - pin pages of given dma memory region 29 * @region: dma memory region to be pinned 35 struct dfl_afu_dma_region *region) in afu_dma_pin_pages() argument 37 int npages = region->length >> PAGE_SHIFT; in afu_dma_pin_pages() [all …]
|
| /linux/drivers/hv/ |
| H A D | mshv_regions.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Memory region management for mshv_root module. 23 * mshv_chunk_stride - Compute stride for mapping guest memory 28 * Determines the appropriate stride (in pages) for mapping guest memory. 32 * Return: Stride in pages, or -EINVAL if page order is unsupported. 42 * page, and both gfn and page_count must be huge-page aligned. in mshv_chunk_stride() 52 return -EINVAL; in mshv_chunk_stride() 58 * mshv_region_process_chunk - Processes a contiguous chunk of memory pages 59 * in a region. 60 * @region : Pointer to the memory region structure. [all …]
|
| /linux/tools/testing/memblock/tests/ |
| H A D | basic_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 17 ASSERT_NE(memblock.memory.regions, NULL); in memblock_initialization_check() 18 ASSERT_EQ(memblock.memory.cnt, 0); in memblock_initialization_check() 19 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 20 ASSERT_EQ(strcmp(memblock.memory.name, "memory"), 0); in memblock_initialization_check() 24 ASSERT_EQ(memblock.memory.max, EXPECTED_MEMBLOCK_REGIONS); in memblock_initialization_check() 36 * A simple test that adds a memory block of a specified base address 37 * and size to the collection of available memory regions (memblock.memory). 38 * Expect to create a new entry. The region counter and total memory get 45 rgn = &memblock.memory.regions[0]; in memblock_add_simple_check() [all …]
|
| H A D | alloc_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 * A simple test that tries to allocate a small memory region. 22 * Expect to allocate an aligned region near the end of the available memory. 34 expected_start = memblock_end_of_DRAM() - SMP_CACHE_BYTES; in alloc_top_down_simple_check() 41 ASSERT_EQ(rgn->size, size); in alloc_top_down_simple_check() 42 ASSERT_EQ(rgn->base, expected_start); in alloc_top_down_simple_check() 53 * A test that tries to allocate memory next to a reserved region that starts at 58 * | +--------+ +--------| 60 * +------------+--------+---------+--------+ 65 * The allocation direction is top-down and region arrays are sorted from lower [all …]
|
| H A D | alloc_nid_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 51 * A simple test that tries to allocate a memory region within min_addr and 55 * | + +-----------+ | 57 * +----+-------+-----------+------+ 62 * Expect to allocate a region that ends at max_addr. 82 rgn_end = rgn->base + rgn->size; in alloc_nid_top_down_simple_check() 87 ASSERT_EQ(rgn->size, size); in alloc_nid_top_down_simple_check() 88 ASSERT_EQ(rgn->base, max_addr - size); in alloc_nid_top_down_simple_check() 100 * A simple test that tries to allocate a memory region within min_addr and 104 * | + +---------+ + | [all …]
|
| H A D | alloc_exact_nid_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 * A test that tries to allocate a memory region in a specific NUMA node that 24 * has enough memory to allocate a region of the requested size. 25 * Expect to allocate an aligned region at the end of the requested node. 31 struct memblock_region *req_node = &memblock.memory.regions[nid_req]; in alloc_exact_nid_top_down_numa_simple_check() 40 ASSERT_LE(SZ_4, req_node->size); in alloc_exact_nid_top_down_numa_simple_check() 41 size = req_node->size / SZ_4; in alloc_exact_nid_top_down_numa_simple_check() 52 ASSERT_EQ(new_rgn->size, size); in alloc_exact_nid_top_down_numa_simple_check() 53 ASSERT_EQ(new_rgn->base, region_end(req_node) - size); in alloc_exact_nid_top_down_numa_simple_check() 54 ASSERT_LE(req_node->base, new_rgn->base); in alloc_exact_nid_top_down_numa_simple_check() [all …]
|
| H A D | alloc_helpers_api.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * A simple test that tries to allocate a memory region above a specified, 9 * | +-----------+ | 11 * +----------+-----------+---------+ 16 * Expect to allocate a cleared region at the minimal memory address. 28 min_addr = memblock_end_of_DRAM() - SMP_CACHE_BYTES; in alloc_from_simple_generic_check() 35 ASSERT_EQ(rgn->size, size); in alloc_from_simple_generic_check() 36 ASSERT_EQ(rgn->base, min_addr); in alloc_from_simple_generic_check() 47 * A test that tries to allocate a memory region above a certain address. 51 * | + +---------+ | [all …]
|
| /linux/Documentation/driver-api/cxl/linux/ |
| H A D | cxl-driver.rst | 1 .. SPDX-License-Identifier: GPL-2.0 12 The :code:`cxl-cli` library, maintained as part of the NDTCL project, may 19 * cxl_core - fundamental init interface and core object creation 20 * cxl_port - initializes root and provides port enumeration interface. 21 * cxl_acpi - initializes root decoders and interacts with ACPI data. 22 * cxl_p/mem - initializes memory devices 23 * cxl_pci - uses cxl_port to enumerate the actual fabric hierarchy. 27 Here is an example from a single-socket system with 4 host bridges. Two host 28 bridges have a single memory device attached, and the devices are interleaved 29 into a single memory region. The memory region has been converted to dax. :: [all …]
|
| /linux/include/uapi/linux/ |
| H A D | nitro_enclaves.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 3 * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 16 * NE_CREATE_VM - The command is used to create a slot that is associated with 20 * setting any resources, such as memory and vCPUs, for an 21 * enclave. Memory and vCPUs are set for the slot mapped to an enclave. 25 * Its format is the detailed in the cpu-lists section: 26 * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html 34 * * Enclave file descriptor - Enclave file descriptor used with 35 * ioctl calls to set vCPUs and memory 37 * * -1 - There was a failure in the ioctl logic. [all …]
|
| H A D | aspeed-p2a-ctrl.h | 1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 11 * the host to read and write to various regions of the BMC's memory. 24 * This driver provides a mechanism for enabling or disabling the read-write 25 * property of specific windows into the ASPEED BMC's memory. 27 * A user can map a region of the BMC's memory as read-only or read-write, with 28 * the caveat that once any region is mapped, all regions are unlocked for 33 * Unlock a region of BMC physical memory for access from the host. 35 * Also used to read back the optional memory-region configuration for the 47 * This IOCTL is meant to configure a region or regions of memory given a 49 * readable-writeable. [all …]
|
| /linux/arch/x86/boot/compressed/ |
| H A D | kaslr.c | 1 // SPDX-License-Identifier: GPL-2.0 8 * handles walking the physical memory maps (and tracking memory regions 9 * to avoid) in order to select a physical memory location that can 37 /* Simplified build-specific string for starting entropy. */ 49 hash = (hash << ((sizeof(hash) * 8) - 7)) | (hash >> 7); in rotate_xor() 78 * Store memory limit: MAXMEM on 64-bit and KERNEL_IMAGE_SIZE on 32-bit. 83 /* Number of immovable memory regions */ 92 MEM_AVOID_MEMMAP_END = MEM_AVOID_MEMMAP_BEGIN + MAX_MEMMAP_REGIONS - 1, 101 if (one->start + one->size <= two->start) in mem_overlaps() 104 if (one->start >= two->start + two->size) in mem_overlaps() [all …]
|
| /linux/drivers/acpi/ |
| H A D | nvs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * nvs.c - Routines for saving and restoring ACPI NVS memory region 5 * Copyright (C) 2008-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 40 struct nvs_region *region; in acpi_nvs_register() local 42 region = kmalloc_obj(*region); in acpi_nvs_register() 43 if (!region) in acpi_nvs_register() 44 return -ENOMEM; in acpi_nvs_register() 45 region->phys_start = start; in acpi_nvs_register() 46 region->size = size; in acpi_nvs_register() 47 list_add_tail(®ion->node, &nvs_region_list); in acpi_nvs_register() [all …]
|
| /linux/tools/testing/selftests/kvm/lib/ |
| H A D | kvm_util.c | 1 // SPDX-License-Identifier: GPL-2.0-only 41 ksft_exit_skip("- Cannot open '%s': %s. %s\n", in __open_path_or_exit() 56 * flags - The flags to pass when opening KVM_DEV_PATH. 101 * 16 bytes to hold a 64-bit value (1 byte per char), 1 byte for the in kvm_get_module_param_integer() 111 TEST_ASSERT(value[r - 1] == '\n', in kvm_get_module_param_integer() 112 "Expected trailing newline, got char '%c'", value[r - 1]); in kvm_get_module_param_integer() 116 * trailing non-NU in kvm_get_module_param_integer() 563 struct userspace_mem_region *region; kvm_vm_restart() local 690 struct userspace_mem_region *region = userspace_mem_region_find() local 773 __vm_mem_region_delete(struct kvm_vm * vm,struct userspace_mem_region * region) __vm_mem_region_delete() argument 800 struct userspace_mem_region *region; kvm_vm_free() local 837 vm_userspace_mem_region_gpa_insert(struct rb_root * gpa_tree,struct userspace_mem_region * region) vm_userspace_mem_region_gpa_insert() argument 863 vm_userspace_mem_region_hva_insert(struct rb_root * hva_tree,struct userspace_mem_region * region) vm_userspace_mem_region_hva_insert() argument 891 struct kvm_userspace_memory_region region = { __vm_set_user_memory_region() local 919 struct kvm_userspace_memory_region2 region = { __vm_set_user_memory_region2() local 952 struct userspace_mem_region *region; vm_mem_add() local 1142 struct userspace_mem_region *region; memslot2region() local 1174 struct userspace_mem_region *region; vm_mem_region_set_flags() local 1189 struct userspace_mem_region *region = memslot2region(vm, slot); vm_mem_region_reload() local 1213 struct userspace_mem_region *region; vm_mem_region_move() local 1242 struct userspace_mem_region *region = memslot2region(vm, slot); vm_mem_region_delete() local 1254 struct userspace_mem_region *region; vm_guest_mem_fallocate() local 1590 struct userspace_mem_region *region; addr_gpa2hva() local 1626 struct userspace_mem_region *region = addr_hva2gpa() local 1666 struct userspace_mem_region *region; addr_gpa2alias() local 1936 struct userspace_mem_region *region; vm_dump() local 2072 struct userspace_mem_region *region; __vm_phy_pages_alloc() local 2337 struct userspace_mem_region *region; vm_is_gpa_protected() local [all...] |
| /linux/drivers/net/ipa/ |
| H A D | ipa_mem.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2019-2024 Linaro Ltd. 17 * DOC: IPA Local Memory 19 * The IPA has a block of shared memory, divided into regions used for 23 * the "ipa-shared" memory range) and size found in the IPA_SHARED_MEM_SIZE 26 * Each region is optionally preceded by one or more 32-bit "canary" values. 27 * These are meant to detect out-of-range writes (if they become corrupted). 28 * A given region (such as a filter or routing table) has the same number 32 * The set of memory regions is defined in configuration data. They are [all …]
|
| /linux/Documentation/PCI/endpoint/ |
| H A D | pci-ntb-function.rst | 1 .. SPDX-License-Identifier: GPL-2.0 9 PCI Non-Transparent Bridges (NTB) allow two host systems to communicate 12 machine, expose memory ranges as BARs, and perform DMA. They also support 13 scratchpads, which are areas of memory within the NTB that are accessible 26 .. code-block:: text 28 +-------------+ +-------------+ 32 +------^------+ +------^------+ 35 +---------|-------------------------------------------------|---------+ 36 | +------v------+ +------v------+ | 40 | | <-----------------------------------> | | [all …]
|
| /linux/drivers/vfio/pci/nvgrace-gpu/ |
| H A D | main.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/pci-p2pdma.h> 12 #include <linux/memory-failure.h> 15 * The device memory usable to the workloads running in the VM is cached 16 * and showcased as a 64b device BAR (comprising of BAR4 and BAR5 region) 18 * Moreover, the VM GPU device driver needs a non-cacheable region to 19 * support the MIG feature. This region is also exposed as a 64b BAR 20 * (comprising of BAR2 and BAR3 region) and represented as resmem. 41 * The state of the two device memory region - resmem and usemem - is 45 phys_addr_t memphys; /* Base physical address of the region */ [all …]
|
| /linux/Documentation/devicetree/bindings/remoteproc/ |
| H A D | ti,k3-dsp-rproc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/remoteproc/ti,k3-dsp-rproc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Suman Anna <s-anna@ti.com> 13 The TI K3 family of SoCs usually have one or more TI DSP Core sub-systems 14 that are used to offload some of the processor-intensive tasks or algorithms, 17 These processor sub-systems usually contain additional sub-modules like 18 L1 and/or L2 caches/SRAMs, an Interrupt Controller, an external memory 23 Each DSP Core sub-system is represented as a single DT node. Each node has a [all …]
|
| /linux/Documentation/devicetree/bindings/arm/mediatek/ |
| H A D | mediatek,mt7622-wed.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt7622-wed.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lorenzo Bianconi <lorenzo@kernel.org> 11 - Felix Fietkau <nbd@nbd.name> 21 - enum: 22 - mediatek,mt7622-wed 23 - mediatek,mt7981-wed 24 - mediatek,mt7986-wed [all …]
|
| /linux/drivers/virt/acrn/ |
| H A D | mm.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ACRN: Memory mapping management 19 static int modify_region(struct acrn_vm *vm, struct vm_memory_region_op *region) in modify_region() argument 26 return -ENOMEM; in modify_region() 28 regions->vmid = vm->vmid; in modify_region() 29 regions->regions_num = 1; in modify_region() 30 regions->regions_gpa = virt_to_phys(region); in modify_region() 35 "Failed to set memory region for VM[%u]!\n", vm->vmid); in modify_region() 42 * acrn_mm_region_add() - Set up the EPT mapping of a memory region. 46 * @size: Size of the region. [all …]
|
| /linux/arch/x86/mm/ |
| H A D | kaslr.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * This file implements KASLR memory randomization for x86_64. It randomizes 4 * the virtual address space of kernel memory regions (physical memory 11 * The physical memory mapping code was adapted to support P4D/PUD level 13 * 30,000 possible virtual addresses in average for each memory region. 14 * An additional low memory page is used to ensure each CPU can start with 17 * The order of each memory region is not changed. The feature looks at 20 * physical memory mapping is the available physical memory. 44 * Memory regions randomized by KASLR (except modules that use a separate logic 67 * kernel. This starts out at (1<<MAX_PHYSMEM_BITS) - 1), but KASLR may reduce [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-edac-scrub | 1 What: /sys/bus/edac/devices/<dev-name>/scrubX 4 Contact: linux-edac@vger.kernel.org 6 The sysfs EDAC bus devices /<dev-name>/scrubX subdirectory 7 belongs to an instance of memory scrub control feature, 8 where <dev-name> directory corresponds to a device/memory 9 region registered with the EDAC device driver for the 17 What: /sys/bus/edac/devices/<dev-name>/scrubX/addr 20 Contact: linux-edac@vger.kernel.org 22 (RW) The base address of the memory region to be scrubbed 23 for on-demand scrubbing. Setting address starts scrubbing. [all …]
|
| /linux/samples/nitro_enclaves/ |
| H A D | ne_ioctl_sample.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 11 * ----- 19 * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html#cpu-lists 26 * echo <cpu-list> > /sys/module/nitro_enclaves/parameters/ne_cpus 43 * Setup hugetlbfs huge pages. The memory needs to be from the same NUMA node as 46 * https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html 52 * /sys/devices/system/node/node<X>/hugepages/hugepages-2048kB/nr_hugepages 53 * /sys/devices/system/node/node<X>/hugepages/hugepages-1048576kB/nr_hugepages 58 * /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages [all …]
|
| /linux/Documentation/devicetree/bindings/memory-controllers/ |
| H A D | st,stm32mp25-omm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/memory-controllers/st,stm32mp25-omm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: STM32 Octo Memory Manager (OMM) 10 - Patrice Chotard <patrice.chotard@foss.st.com> 13 The STM32 Octo Memory Manager is a low-level interface that enables an 17 - Two single/dual/quad/octal SPI interfaces 18 - Two ports for pin assignment 22 const: st,stm32mp25-omm [all …]
|
| /linux/include/linux/ |
| H A D | pruss_driver.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * PRU-ICSS sub-system specific definitions 5 * Copyright (C) 2014-2020 Texas Instruments Incorporated - http://www.ti.com/ 6 * Suman Anna <s-anna@ti.com> 18 * enum pruss_gp_mux_sel - PRUSS GPI/O Mux modes for the 23 * values are interchanged. Also, this bit-field does not exist on 36 * enum pruss_gpi_mode - PRUSS GPI configuration modes, used 48 * enum pru_type - PRU core type identifier 50 * @PRU_TYPE_PRU: Programmable Real-time Unit 51 * @PRU_TYPE_RTU: Auxiliary Programmable Real-Time Unit [all …]
|
| /linux/arch/arm/mm/ |
| H A D | pmsa-v7.c | 19 struct region { struct 25 static struct region __initdata mem[MPU_MAX_REGIONS]; argument 27 static struct region __initdata xip[MPU_MAX_REGIONS]; 46 /* Region number */ 52 /* Data-side / unified region attributes */ 54 /* Region access control register */ 60 /* Region size register */ 66 /* Region base address register */ 76 /* Optional instruction-side region attributes */ 78 /* I-side Region access control register */ [all …]
|