Ubuntu 18.04
5.4.10 Linux Kernel
-
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
gcc v2p.c -o v2p
./v2p