diff options
author | vetch <vetch97@gmail.com> | 2019-12-17 16:28:35 +0100 |
---|---|---|
committer | vetch <vetch97@gmail.com> | 2019-12-17 16:28:35 +0100 |
commit | 15c7742381d7c63d8fb9d664eab56f3fed96f824 (patch) | |
tree | ba37af28a2d65b9216ed0d81fa74ad6c5794365b /kernel.c | |
parent | 0929e37e54cb7c52d8d3696a24aac5e421fb0660 (diff) | |
download | rpi-MMU-example-15c7742381d7c63d8fb9d664eab56f3fed96f824.tar.gz rpi-MMU-example-15c7742381d7c63d8fb9d664eab56f3fed96f824.zip |
small update, try to fix interrupt
Diffstat (limited to 'kernel.c')
-rw-r--r-- | kernel.c | 26 |
1 files changed, 20 insertions, 6 deletions
@@ -19,26 +19,40 @@ void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags) uart_puts("Hello, kernel World!\r\n"); - enable_interrupt(); // prints some info demo_paging_support(); + + // prints some info and switches to system mode demo_mode_to_system(); // prints some info and sets upp translation table, turns on MMU setup_flat_map(); - demo_setup_libkernel(); +// demo_setup_libkernel(); - demo_setup_PL0(); +// demo_setup_PL0(); + enable_timer(); + // enable interrupts demo_setup_interrupts(); - - // prints some info and sets up a section for PL0 code, loads a blob + + *(int *)(0x3000B210) = 1; + *(int *)(0x3000B204) = 1; + + + asm("LDR r0, =0x3F00B200\n\r" + "MOV r1, #2\n\r" + "STR r1, [r0, #0x04]\n\r"); + + *(int *)(0xE000ED0C) = 1; + + + // prints some info and sets up a section for PL0 code, loads a blob // there and jumps to it... never, ever, ever returns demo_go_unprivileged(); - + while(1); while (1) |