[dma] Use virtual addresses for dma_map()

Cache management operations must generally be performed on virtual
addresses rather than physical addresses.

Change the address parameter in dma_map() to be a virtual address, and
make dma() the API-level primitive instead of dma_phys().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-07-08 12:38:05 +01:00
parent 06083d2676
commit 22de0c4edf
5 changed files with 29 additions and 45 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ int intelxl_msix_enable ( struct intelxl_nic *intelxl,
/* Map dummy target location */
if ( ( rc = dma_map ( intelxl->dma, &intelxl->msix.map,
virt_to_phys ( &intelxl->msix.msg ),
sizeof ( intelxl->msix.msg ), DMA_RX ) ) != 0 ) {
&intelxl->msix.msg, sizeof ( intelxl->msix.msg ),
DMA_RX ) ) != 0 ) {
DBGC ( intelxl, "INTELXL %p could not map MSI-X target: %s\n",
intelxl, strerror ( rc ) );
goto err_map;