I/O Peripheral starts at 0x2000 0000 at real physical address
at 0x7E00 0000 at CPU Bus address
at 0xF200 0000 at ARM Virtual address.
On a C code
Code: Select all
gpio = (uint32_t *)mmap(mapaddr, BCM2835_BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, fd, BCM2835_GPIO_BASE)#define BCM2835_PERI_BASE 0x20000000
so, there's MMU translating physical to ARM Virtual Address in the C Program.
My question when do you use CPU Bus address like it listed in the Datasheet?