First page
Back
Continue
Last page
Overview
Graphics
Mapping I/O memory in virtual memory
Load/store instructions work with virtual addresses
To access I/O memory, drivers need to have a virtual address that the processor can handle, because I/O memory is not mapped by default in virtual memory.
The
ioremap
functions satisfy this need:
#include <
asm/io.h
>; void *
ioremap
(unsigned long phys_addr, unsigned long size); void
iounmap
(void *address);
Caution: check that
ioremap
doesn't return a
NULL
address!