From 93bf62580a68533dc8252b9a2a055c02f34ecb67 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 24 Mar 2022 09:38:08 -0700 Subject: Modularized --- kernel/exceptions/data.S | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 kernel/exceptions/data.S (limited to 'kernel/exceptions/data.S') diff --git a/kernel/exceptions/data.S b/kernel/exceptions/data.S new file mode 100644 index 0000000..fe33215 --- /dev/null +++ b/kernel/exceptions/data.S @@ -0,0 +1,29 @@ +.section ".text.exceptions" +.globl data +data: + cpsid aif + stmfd sp!, {r0-r12,lr} + ldr r4, [lr, #-4] + // Output return address + mov r0, #80 + mov r1, #0 + mov r2, r4 + sub r2, #8 + bl draw_hex32 + // Output the data at the address + mov r0, #80 + mov r1, #1 + ldr r2, [r4, #-8] + bl draw_hex32 + // Output the Program Status + mov r0, #80 + mov r1, #2 + mrs r2, spsr + bl draw_hex32 + // Output the data-fault register + mov r0, #80 + mov r1, #3 + mrc p15, 0, r2, c5, c0, 0 //// https://developer.arm.com/documentation/ddi0464/d/System-Control/Register-descriptions/Data-Fault-Status-Register?lang=en + bl draw_hex32 + ldmfd sp!, {r0-r12,lr} + subs pc, lr, #4 // Should be 8 once I can actually handle the abort -- cgit v1.2.1