mirror of
https://github.com/ipxe/ipxe
synced 2026-05-04 03:03:43 +03:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user