I know this sort of things gets asked ad nauseam (at least, when a new processor comes out), but ancient posts seem to lose relevance with time :-/
Do I just need to:
* change peripherals base from 0x3f000000 to 0xfe000000
* add enable_gic=0 arm_peri_high=0 arm_64bit=1 to config.txt
I'm hoping mailboxes, MMU, SD/eMMC, DMA etc. haven't changed?
There's some code (like openocd ?) that just uses NOP loops (for very short delays). I guess these need to be modified?
PS. how does CPU throttling work? Is it automatic and only due to overheating? Or does Linux throttle down when it's idling?
Re: Late to the party. Porting aarch64 RPi3B+ to aarch64 RPi4B
Hmmm. Well GPIO pull-up/down configuration seems to have changed...
Code: Select all
.equiv GPIO_GPPUD, 0x00000094 // RPi 1-3
.equiv GPIO_GPPUDCLK0, 0x00000098
.equiv GPIO_GPPUDCLK1, 0x0000009C
.equiv GPIO_Test, 0x000000B0
.equiv GPIO_PUP_PDN_CNTRL_REG0, 0xe4 // *** RPi4 changed! ***
.equiv GPIO_PUP_PDN_CNTRL_REG1, 0xe8
.equiv GPIO_PUP_PDN_CNTRL_REG2, 0xec
.equiv GPIO_PUP_PDN_CNTRL_REG3, 0xf0
Re: Late to the party. Porting aarch64 RPi3B+ to aarch64 RPi4B
That's a good start, but the hardware random number generator (rng) has changed, and usb now has a standard xhci controller over pcie (although the old usb interface is still present, and can be enabled in the config.txt, iirc). I believe the ARM is driven by a 54MHz crystal instead of a 19.2MHz now too.
There may be other things too, but those are the ones that I needed to update in my project.
If it helps, this is how I interface with both RNGs of rpi3b and rpi4: https://github.com/spectrum4/spectrum4/ ... rnel/rng.s
To determine at runtime if you are on a rpi3b or a rpi4b, read ARM register midr_el1 then AND with 0xfff0. 0xd030 => raspberry pi 3b.
Example: https://github.com/spectrum4/spectrum4/ ... #L465-L538
There may be other things too, but those are the ones that I needed to update in my project.
If it helps, this is how I interface with both RNGs of rpi3b and rpi4: https://github.com/spectrum4/spectrum4/ ... rnel/rng.s
To determine at runtime if you are on a rpi3b or a rpi4b, read ARM register midr_el1 then AND with 0xfff0. 0xd030 => raspberry pi 3b.
Example: https://github.com/spectrum4/spectrum4/ ... #L465-L538
Re: Late to the party. Porting aarch64 RPi3B+ to aarch64 RPi4B
Yes. You can actually read the current pull state on the BCM2711. Previous chips were write-only.
Unreadable squiggle
Re: Late to the party. Porting aarch64 RPi3B+ to aarch64 RPi4B
Ah, I was just wondering why raspi-gpio didn't say anything about the pull state on the RPi 3...