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

Bare metal, Assembly language • Re: Unable to initialise translation tables for the MMU appropriately on the raspberry pi 5

$
0
0
1. I placed the breakpoints at all the exceptions, and it turns out that it is not a nested exception, the processor raises an EL1H_SYNC exception directly. I have also verified this by executing the code step-in, each instruction.
2. There doesn't seem to be a problem with the stack pointer, it is assigned to the top of the stack, the stack grows downwards. Also, to see if this was an issue related to the stack pointer itself, I executed the `stp` instruction just before branching to kernel_main, and that write is successful, also reflected in the respective memory addresses. I also checked the alignment of the stack pointer, seems to be fine too.
The instruction, when executed just before jumping to kernel_main, executes without any issues, but the same instruction when executed as the prologue of kernel_main, raises an exception of unknown class. This, to me, seems to be more of a branch issue rather than a memory write issue, although I see in step-by-step execution that the control reaches the `kernel_main()` function, as seen from both the `pc` and the ESR_EL1 registers. Not sure what's going on under the hood...

Also, I would like to ask you to verify if the memory ranges mentioned in the original post are correct, and suggest changes if required. I found them in another thread of this forum, and the incorrect ranges maybe another potential culprit in this exception...

Thanks!

Statistics: Posted by kvp_933 — Fri Jun 21, 2024 1:21 pm



Viewing all articles
Browse latest Browse all 5853

Trending Articles