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

Bare metal, Assembly language • Re: Using the GIC-400 of the raspberry pi 5 (bcm2712)

$
0
0
Okay yeah, I hadn't configured the `cnthctl_el2` register appropriately, hence the issue. Rest of my EL2 register configs are pretty much the same.
Also, I had not initialised the GIC registers properly while following along with your code, some places had size as u8 which I had overlooked, fixed that now.
So to test things out and play around a bit, I just removed the `wfi` instruction following the spurious interrupt, and things are starting to come in place. The text `Dispatch Triggered!` is coming up on the UART console in loop, until the generic timer fires an interrupt. As soon as the interrupt is fired, the UART console just hangs. I understand that the interrupt is continuously fired by the timer, hence the execution is blocked (please correct me if I'm wrong). So I put the `wfi` instruction back in place, and also added an instruction in the `if(interrupt_id == 30)` block to reset the timer, but the console still hangs despite that. Am I missing something? What I am missing is probably the lack of understanding of how the interrupt is trapped by the processor, and what happens thereafter...

Thanks for all the guidance and help!

Statistics: Posted by kvp_933 — Tue Jun 11, 2024 3:27 am



Viewing all articles
Browse latest Browse all 3552

Trending Articles