ioremap()
Jump to turn (12)
- 1ioremap()
- 2what about the other memory space other than IO memory in main memory? do they h
- 3doese it mean that io memory is not mapped through mmu?
- 4since it does not involve MMU, why IO memory still have to be mapped to virtual
- 5are you sure that the io memory mapping does not involve MMU?
- 6are you sure that it is through MMU? i need a clear answer
- 7then how does ioremap() do the job? by IOMMU?
- 8what is the difference of MMU and IOMMU, i need details
- 9is there difference about mapping machanism between them?
- 10is sounds that their machanism is similar
- 11sometimes i see code like ((volatile uint32 )((uintptrt)(regaddress)) to access
- 12given that it is under rtos
- User
ioremap()
- Assistant
ioremap() is a Linux kernel function that is used for memory mapping a physical device memory address to a virtual kernel address.
Typically, physical devices such as I/O devices (e.g., graphics card, network card) have their own memory address space separate from the system's main memory. The ioremap() function allows the kernel to access and manage these device memory regions as if they were normal memory.
The ioremap() function takes the physical address of the device memory and the size of the desired memory region and returns a virtual kernel address that can be used to read from or write to that memory region. By mapping the physical memory to a virtual kernel address, the kernel can use standard memory-access operations for accessing the device memory.