Skip to content

C code to map virtual address to physical address

Notifications You must be signed in to change notification settings

code-locker/VA2PA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

System Configuration

Ubuntu 18.04
5.4.10 Linux Kernel

Virtual address to physical address conversion code

  • In this code I am creating a array using malloc()

  • Starting address of array i.e. Virtual address will be passed to virt_to_phys()

  • virt_to_phys() will return the physical address

  • We can read the data stored in physical address using devmem command

Command to compile and run the code

gcc v2p.c -o v2p

./v2p

About

C code to map virtual address to physical address

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages