ARM Virtual address versus CPU Bus Address
Posted: Thu Dec 19, 2013 6:11 pm
On Broadcom datasheet page 5 there's a block diagram of translating real physical address from/to ARM Virtual address and CPU Bus address. There's a MMU(memory management Unit) between physical address and ARM Virtual address. Also between physical address and CPU Bus address.
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
BCM2835_GPIO_BASE is expressed in physical address
#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?
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?