Search code examples
raspberry-piarm

Raspberry Pi 4/BCM2711 Peripheral Base Address differs in documentation from hardware


In the bcm2711-peripherals.pdf, it states on page 6:

When running in 32-bit mode, the ARM uses LPAE mode to enable it to access the full 32GB address space. Physical addresses range from 0x4_7C00_0000 to 0x4_7FFF_FFFF for Main peripherals, and from 0x4_C000_0000 to 0x4_FFFF_FFFF for ARM Local peripherals.

I understand that the address of 0x4_7C00_0000 (ie main peripheral base address) would be translated to 0x0_FC00_0000 when translating to low peripheral mode, but everywhere I read has the peripheral base address as 0x0_FE00_0000. Why is the 0x0_FE00_0000 value correct instead of 0x0_FC00_0000?


Solution

  • The address range 0xfc00_0000 - 0xffff_ffff (in low peripheral mode) is indeed reserved for peripherals. But it just so happens that the "interesting" ones (timers, serial, GPIO, DMA) are located between 0xfe00_0000 - 0xfeff_ffff. For each of the various peripherals, the manual specifies the addresses where its I/O registers are located, and skimming the manual, they all seem to be in the 0xfe* range.

    Thus 0xfe00_0000 is effectively the base address for the peripherals that are relevant to "bit banging" type applications, which is what Raspberry Pi programmers often are most interested in.

    I am not sure what, if anything, is located between 0xfc00_0000 - 0xfdff_ffff. It could be registers for some of the Pi's other I/O hardware (ethernet, USB, video, etc) or it could simply be reserved address space that is not used by this chip.