to get virtual address from physical address
hi i am new to device driver so plz help me,,we have ported linux to arm and no i want to do some
i/o operation so i need to get the virtual address of portb on my board
i mapped the physical address of port b through
but while makeing outb operation to 0x4c00000c,it is showing error segmentation fault
i googled about this problem
and came to know that i need virtual address and that can be done by
but how can i use that function ?
void* iormeap(unsigned long offset, unsigned long size);
first argument: if i want to access portb register on my arm board whose address is
0x4c00000c(from datasheet) ,so unsigned long offset=0x4c00000c
second argument : here i am confused what should i give is the size means page size
unkowingly i gave unsigned long size=4096;
and is the return value is virtual address ?
plz suggest me something