summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_pci.c
diff options
context:
space:
mode:
authorMichael Brown2025-04-23 13:47:53 +0200
committerMichael Brown2025-04-23 15:43:04 +0200
commit839540cb95a310ebf96d6302afecc3ac97ccf746 (patch)
tree67c13ca2d9a48e3d63b5e739492646ee69c9e6cb /src/interface/efi/efi_pci.c
parent[smbios] Remove userptr_t from SMBIOS structure parsing (diff)
downloadipxe-839540cb95a310ebf96d6302afecc3ac97ccf746.tar.gz
ipxe-839540cb95a310ebf96d6302afecc3ac97ccf746.tar.xz
ipxe-839540cb95a310ebf96d6302afecc3ac97ccf746.zip
[umalloc] Remove userptr_t from user memory allocations
Use standard void pointers for umalloc(), urealloc(), and ufree(), with the "u" prefix retained to indicate that these allocations are made from external ("user") memory rather than from the internal heap. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_pci.c')
-rw-r--r--src/interface/efi/efi_pci.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c
index 01351df51..b8c7df38d 100644
--- a/src/interface/efi/efi_pci.c
+++ b/src/interface/efi/efi_pci.c
@@ -641,38 +641,6 @@ static void efipci_dma_free ( struct dma_device *dma, struct dma_mapping *map,
}
/**
- * Allocate and map DMA-coherent buffer from external (user) memory
- *
- * @v dma DMA device
- * @v map DMA mapping to fill in
- * @v len Length of buffer
- * @v align Physical alignment
- * @ret addr Buffer address, or NULL on error
- */
-static userptr_t efipci_dma_umalloc ( struct dma_device *dma,
- struct dma_mapping *map,
- size_t len, size_t align ) {
- void *addr;
-
- addr = efipci_dma_alloc ( dma, map, len, align );
- return virt_to_user ( addr );
-}
-
-/**
- * Unmap and free DMA-coherent buffer from external (user) memory
- *
- * @v dma DMA device
- * @v map DMA mapping
- * @v addr Buffer address
- * @v len Length of buffer
- */
-static void efipci_dma_ufree ( struct dma_device *dma, struct dma_mapping *map,
- userptr_t addr, size_t len ) {
-
- efipci_dma_free ( dma, map, addr, len );
-}
-
-/**
* Set addressable space mask
*
* @v dma DMA device
@@ -710,8 +678,8 @@ static struct dma_operations efipci_dma_operations = {
.unmap = efipci_dma_unmap,
.alloc = efipci_dma_alloc,
.free = efipci_dma_free,
- .umalloc = efipci_dma_umalloc,
- .ufree = efipci_dma_ufree,
+ .umalloc = efipci_dma_alloc,
+ .ufree = efipci_dma_free,
.set_mask = efipci_dma_set_mask,
};