diff options
Diffstat (limited to 'src/sys/kernel.S')
-rw-r--r-- | src/sys/kernel.S | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/sys/kernel.S b/src/sys/kernel.S index d9819a2..b76df62 100644 --- a/src/sys/kernel.S +++ b/src/sys/kernel.S @@ -3,24 +3,22 @@ .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 + // ///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 + // // This will fail in user mode + // mrc p15, 3, r0, c15, c0, 0 + // // Supervisor Call #1 - Does nothing special + // svc #1 + // mrs r0, cpsr + // bl uart_hexn cps #0x10 - // Intentional undefined instruction - //.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 - bl uart_hexn - // Supervisor Call #1 - Returns in supervisor mode - svc #0 - mrs r0, cpsr - bl uart_hexn + svc #2 // Start scheduling! 1: wfe b 1b |