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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to Create, restore, and delete snapshots of virtual machine images in RedHat Virtualization
  2. CentOS / RHEL 6,7 : How to disable or delete virbr0 interface
  3. initctl Command Examples in Linux
  4. How to Mount Guest Qcow2 Virtual disk Image containing LVM on KVM Host Machine
  5. CentOS/RHEL7 – Tuned Profiles Oracle
  6. How to extend ASM disk from OS level in CentOS/RHEL
  7. Apache HTTP server – most commonly used containers (special configuration directives)
  8. CentOS / RHEL : Configure yum automatic updates with yum-cron service
  9. fdisk: Unable to write /dev/sdg: Bad file descriptor – error while formatting USB disk
  10. Understanding DNS zone files

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright