• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

What is ioremap()

by admin

ioremap() function is used to map the physical addres of an I/O device to the kernel virtual address. Kernel creates a page table i.e mapping of virtual address to the physical address requested.When we do iounmap() this mapping is destroyed.

The ioremap function takes two parameters:

  • start of the memory region
  • size of the memory region
void *ioremap(unsigned long phys_addr, unsigned long size);

void iounmap(void * addr)

phys_addr is required only if physical memory areas described by a physical address are mapped with ioremap. This information is held in phys_addr.

On many systems, I/O memory is not directly accessible in this way at all. So a mapping must be set up first. This is the role of the ioremap function. The function is designed specifically to assign virtual addresses to I/O memory regions.

Filed Under: Linux

Some more articles you might also be interested in …

  1. Honeypot Tutorials – Modes and Working of Honeypot
  2. runcon: command not found
  3. Understanding OpenSSH Configuration Files
  4. aireplay-ng – Inject packets into a wireless network (Command Examples)
  5. calibre-server: A server application that can be used to distribute e-books over a network
  6. gcov: command not found
  7. RedHat / CentOS : How to change currently active slave interface of bonding online
  8. How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  9. repquota Command Examples in Linux
  10. cargo add: Add dependencies to a Rust project’s Cargo.toml file

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright