1.1 --- a/pkg/devices/util/include/dma.h Fri Feb 16 23:11:25 2024 +0100
1.2 +++ b/pkg/devices/util/include/dma.h Sat Feb 17 23:04:12 2024 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * DMA-related memory allocation utility functions.
1.6 *
1.7 - * Copyright (C) 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -24,9 +24,17 @@
1.13 #include <l4/re/c/dma_space.h>
1.14 #include <l4/sys/types.h>
1.15
1.16 +struct dma_region
1.17 +{
1.18 + unsigned int size;
1.19 + unsigned int align;
1.20 + l4_addr_t vaddr;
1.21 + l4re_dma_space_dma_addr_t paddr;
1.22 + l4_cap_idx_t mem;
1.23 +};
1.24 +
1.25 EXTERN_C_BEGIN
1.26
1.27 -long get_dma_region(unsigned long size, int align, l4_addr_t *vaddr,
1.28 - l4re_dma_space_dma_addr_t *paddr, l4_cap_idx_t *mem);
1.29 +long get_dma_region(unsigned long size, int align, struct dma_region *region);
1.30
1.31 EXTERN_C_END