I stepped through it in GDB and this seems to be the issue:
Code: Select all
ldur q31, [x19, #0x8]Code: Select all
--- KERNEL PANIC ---
ESR: Data Abort, same EL
ELR: 0x0000000040002AC4
FAR: 0x00000000401E8BF8
SPSR: 0x00000000600003C5
Source: Lower EL
1. I did check in my ASM and GDB that these instructions are enabled / not trapped. I'm not an expert in ASM so i'm not fully sure that the problem isn't here.
2. I tried removing the packed attribute.
3. Searching for people facing the same issue. (nothing came up).
4. Replacing the ASM and linker.ld with one I found from GitHub.
I asked ChatGPT and it told me that it was because the vector wasn't 16 bit aligned. I don't understand however, why the compiler would emit code that is invalid from valid [looking] c-code. It also suggested it was a compiler problem but blaming the compiler seems far fetched for me.
My main question is: what am I doing that's not correct?
https://github.com/JoshBashed/expOS/blo ... ay_ramfb.c