Files
Deshab-OS/CODE/UTSM/include/utsm/dma.h
T
xyou f1a2a110d7 Record networking and DMA development progress
Add the current OS source tree, build scripts, system image layout, and development notes covering DMA page allocation, e1000 bring-up, net API dispatch, and DHCP work in progress.
2026-07-02 16:17:09 +08:00

21 lines
448 B
C

#ifndef UTSM_DMA_H
#define UTSM_DMA_H
#include <utsm/types.h>
typedef struct dkm_dma_buffer {
void *virt;
u64 phys;
u64 size;
} dkm_dma_buffer;
typedef struct dkm_dma_api {
int (*alloc_pages)(u64 page_count, u64 alignment, u64 max_phys, dkm_dma_buffer *out);
} dkm_dma_api;
void dma_init(void);
int dma_alloc_pages(u64 page_count, u64 alignment, u64 max_phys, dkm_dma_buffer *out);
const dkm_dma_api *dma_get_api(void);
#endif