Arm neon crash

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
joshbashed
Posts: 2
Joined: Wed Oct 01, 2025 11:07 pm

Arm neon crash

Post by joshbashed »

I’m building a basic arm64 OS for an assignment. UART works; now trying to get ramfb working. One issue i'm facing is Data Abort on a vector load.

I stepped through it in GDB and this seems to be the issue:

Code: Select all

ldur q31, [x19, #0x8]
Here is the panic

Code: Select all

--- KERNEL PANIC ---
ESR: Data Abort, same EL
ELR: 0x0000000040002AC4
FAR: 0x00000000401E8BF8
SPSR: 0x00000000600003C5
Source: Lower EL
What I tried:
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
joshbashed
Posts: 2
Joined: Wed Oct 01, 2025 11:07 pm

Re: Arm neon crash

Post by joshbashed »

solution was

Code: Select all

-mstrict-align
Post Reply