I am attempting do some bare metal programming on the raspberry pi 5, and the lack of cohesive documentation has made it difficult.
Currently, as a "Hello World" of sorts, I am attempting to program UART0 on the board. I'm using the following documentation:
RP1 Peripherals
PL011 Documentation
The "RP1 Peripherals" document gives me the following table:
![Image]()
Am I correct in reading that the 40 bit System Addr column is for anything with direct bus access, and the Proc Addr is for the two Cortex M CPUs in the chip?
If so, what is the address space mapping for the BCM2712? For example, the UARTS have the following table:
![Image]()
Let's say I wanted to access UART0. I'm assuming the address given is a relative address.
So, assuming I haven't set up any page tables yet, my actual address will be:
UART_ACTUAL_ADDRESS = SOME_BASE_ADDRESS + 0x40030000
But what is the value of SOME_BASE_ADDRESS? I tried the 0x3F000000 used by the pi 4, and I'm not getting the expected post-reset values.
The first table indicates that 0xC000000000 might be correct for a full 64-bit address, but 0xC000000000 + 0x40030000 seems to give me dead memory.
I would appreciate some pointers here. I'm using the Debug probe + OpenOCD to load the images onto the board and debug, so I can step through the program and see exact values.
Currently, as a "Hello World" of sorts, I am attempting to program UART0 on the board. I'm using the following documentation:
RP1 Peripherals
PL011 Documentation
The "RP1 Peripherals" document gives me the following table:
Am I correct in reading that the 40 bit System Addr column is for anything with direct bus access, and the Proc Addr is for the two Cortex M CPUs in the chip?
If so, what is the address space mapping for the BCM2712? For example, the UARTS have the following table:
Let's say I wanted to access UART0. I'm assuming the address given is a relative address.
So, assuming I haven't set up any page tables yet, my actual address will be:
UART_ACTUAL_ADDRESS = SOME_BASE_ADDRESS + 0x40030000
But what is the value of SOME_BASE_ADDRESS? I tried the 0x3F000000 used by the pi 4, and I'm not getting the expected post-reset values.
The first table indicates that 0xC000000000 might be correct for a full 64-bit address, but 0xC000000000 + 0x40030000 seems to give me dead memory.
I would appreciate some pointers here. I'm using the Debug probe + OpenOCD to load the images onto the board and debug, so I can step through the program and see exact values.
Statistics: Posted by tfinnegan937 — Tue Apr 02, 2024 12:12 am — Replies 7 — Views 76