aboutsummaryrefslogtreecommitdiff
path: root/src/sys/kernel.S
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-20 14:57:57 -0700
committerChristian Cunningham <cc@localhost>2022-01-20 14:57:57 -0700
commita9171b3f7499dfff1f40bf3503fdf13a20487b68 (patch)
tree1be5d31f8d2a2c0b787ebdd64b2f600f0fae1bbe /src/sys/kernel.S
parent7e501bd9e881b9d3b9dadc483218dd877b0bb25d (diff)
Read Paging Register
Diffstat (limited to 'src/sys/kernel.S')
-rw-r--r--src/sys/kernel.S10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sys/kernel.S b/src/sys/kernel.S
index 4a3c096..356cedd 100644
--- a/src/sys/kernel.S
+++ b/src/sys/kernel.S
@@ -3,9 +3,16 @@
.globl kernel_main
kernel_main:
bl sysinit
+ ///https://wiki.osdev.org/ARM_Paging
+ // Query the ID_MMFR0 register
+ mrc p15, 0, r0, c0, c1, 4
+ bl uart_hexn
+ // Switch to user mode
cps #0x10
// Intentional undefined instruction
- .word 0xf7f0a000
+ //.word 0xf7f0a000
+ // This will fail in user mode
+ mrc p15, 3, r0, c15, c0, 0
// Supervisor Call #1 - Does nothing special
svc #1
mrs r0, cpsr
@@ -15,7 +22,6 @@ kernel_main:
mrs r0, cpsr
bl uart_hexn
1:
- //bl schedule
wfe
b 1b