1.1 --- a/stage2/cpu_op.S Wed May 04 23:59:04 2016 +0200
1.2 +++ b/stage2/cpu_op.S Thu May 05 12:19:24 2016 +0200
1.3 @@ -35,6 +35,7 @@
1.4 .globl enable_interrupts
1.5 .globl init_interrupts
1.6 .globl invoke_task
1.7 +.globl enter_task
1.8 .globl configure_tlb
1.9 .globl map_page_set_index
1.10 .globl map_page_index_op
1.11 @@ -126,8 +127,10 @@
1.12 lw $t9, 100($t3)
1.13 lw $gp, 104($t3)
1.14 mtc0 $t9, CP0_EPC
1.15 +
1.16 +enter_task:
1.17 mfc0 $t3, CP0_STATUS
1.18 - ori $t3, $t3, STATUS_EXL
1.19 + ori $t3, $t3, STATUS_EXL | STATUS_UM
1.20 mtc0 $t3, CP0_STATUS
1.21 eret
1.22 nop
2.1 --- a/stage2/example.c Wed May 04 23:59:04 2016 +0200
2.2 +++ b/stage2/example.c Thu May 05 12:19:24 2016 +0200
2.3 @@ -55,10 +55,12 @@
2.4
2.5 void plot_pattern(unsigned short pixel_type, unsigned short x, unsigned short y)
2.6 {
2.7 + int i;
2.8 +
2.9 while (1) {
2.10 test_pixel(x, y, pixel_type);
2.11 next_pixel(&x, &y);
2.12 - udelay(100);
2.13 + for (i = 0; i < 10000; i++);
2.14 }
2.15 }
2.16
3.1 --- a/stage2/handlers.S Wed May 04 23:59:04 2016 +0200
3.2 +++ b/stage2/handlers.S Thu May 05 12:19:24 2016 +0200
3.3 @@ -25,8 +25,8 @@
3.4 .extern current_registers
3.5 .extern current_stack_pointer
3.6 .extern current_task
3.7 +.extern enter_task
3.8 .globl interrupt_handler
3.9 -.globl enter_task
3.10 .set noreorder
3.11 .set noat
3.12
3.13 @@ -150,8 +150,7 @@
3.14 lw $k0, 124($k1)
3.15 mthi $k0
3.16
3.17 -enter_task:
3.18 - eret
3.19 + j enter_task
3.20 nop
3.21
3.22 .set reorder