Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 9821

Bare metal, Assembly language • rpi2 gicd base address pointer?

$
0
0
I know I'm late to the rpi2 bare metal party but I've been digging for way too long now into conflicting blogposts/documentation/examples and fighting AI.

The official armv7 stub provided as reference at https://github.com/raspberrypi/tools/bl ... armstub7.S has a portion about the GICD/GICC.
It defines the GICD base at 0x40041000. (not ARM's 0x40001000)
Same for the Circle framework at https://github.com/rsta2/circle/blob/ma ... armstub7.S

I decoded the bootram at 0x00 - 0xFF and the GICD portion of the armv7 stub is not included. (version > bookworm)
So, I guess the "#ifdef gic" flag is not set while building the stub embedded in the start.elf.

However when I read GICD_TYPER (0x04)/GICD_IIDR (0x08), I only get a response from 0x40001000 (ARM); 0x40041000 (BCM) nothing.

1. Do I use 0x40001000 as base for the GICD/GICC or 0x40041000? (MMU disabled, linux not in the picture, aarch32 at 0x8000 in unsecure HYP)
2. Is the 40041000 reference a relic or should it still be used and if so, what am I missing?
2. Does the gpu firmware route IRQs to unsecure hyp pre-stub as intended by the GICD snippet if it's not in runtime bootram?
I suppose it does, otherwise I don't understand how linux can catch IRQS without supplying a custom stub (which I don't see on the bootpartition)

Why? Learning bare metal while repurposing rpi2 as a "fast arduino" without the glorious provided frameworks of Circle/ultibo/RTOs.
Not looking for "just buy another cheap xyz... " or "Move on dude, it's been 10 years..."

Much appreciated if anyone can give a pointer in the right direction.

Statistics: Posted by dirk.vermeer.42 — Thu Jan 15, 2026 2:33 am



Viewing all articles
Browse latest Browse all 9821

Trending Articles