STRUCT UIO_MEM(9)
β¨ struct uio_mem (9) β¨
okay so this page lives in the Kernel API Manual and it's literally all about struct uio_mem β the lil' description of a UIO memory region π bestie, if you're touching UIO drivers, this is your girl.
πΈ SYNOPSIS πΈ
here's the whole struct, every field, no skips, copy it exactly pls:
struct uio_mem {
const char *name;
phys_addr_t addr;
dma_addr_t dma_addr;
unsigned long offs;
resource_size_t size;
int memtype;
void __iomem *internal_addr;
struct device *dma_device;
struct uio_map *map;
};
π Members π
nameβ the name of the memory region, for identification. like a name tag but for memory π·οΈaddrβ the address of the device's memory, rounded to page size. and note the vibe check here:phys_addris used sinceaddrcan be logical, virtual, or physical &phys_addr_tshould always be large enough to handle any of the address types. highkey sensible πdma_addrβ the DMA handle set bydma_alloc_coherent, used withUIO_MEM_DMA_COHERENTonly (andaddrshould be thevoid *returned from the samedma_alloc_coherentcall β same call, okay, not a different one, they're a package deal π«Ά)offsβ offset of device memory within the page. tiny but mighty β¨sizeβ size of IO (multiple of page size). periodt.memtypeβ the type of memory thataddrpoints to π₯internal_addrβ theioremap-ped version ofaddr, for driver internal use. like, driver's-only, no guests πdma_deviceβ the device struct that was passed todma_alloc_coherent, used withUIO_MEM_DMA_COHERENTonly. again: only with that one, bestie πmapβ for use by the UIO core only. not you. not me. the core. π
ngl the map field is giving "do not touch" energy β leave it to the UIO core and nobody gets hurt π
π¦ SEE ALSO π¦
go read these next, they're all connected iykyk:
- Kernel file
./include/linux/uio_driver.h struct uio_port(9)struct uio_info(9)uio_register_device(9)devm_uio_register_device(9)
okay that's the whole thing, no cap π this page comes from ./include/linux and it's dated October 2026 β so yeah, mark your calendars, the Kernel API Manual said what it said, slay π
β¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms