1.1 --- a/stage2/handlers.S Sat Apr 23 23:01:28 2016 +0200
1.2 +++ b/stage2/handlers.S Sat Apr 23 23:25:58 2016 +0200
1.3 @@ -100,7 +100,7 @@
1.4 mfhi $k0
1.5 sw $k0, 124($k1)
1.6
1.7 - j $ra
1.8 + jr $ra
1.9 nop
1.10
1.11 load_and_return:
2.1 --- a/stage2/head2.S Sat Apr 23 23:01:28 2016 +0200
2.2 +++ b/stage2/head2.S Sat Apr 23 23:25:58 2016 +0200
2.3 @@ -116,7 +116,7 @@
2.4 sw $t3, 0($t1)
2.5 bne $t0, $t2, _copy
2.6 addiu $t1, $t1, 4 /* executed in delay slot before branch */
2.7 - j $ra
2.8 + jr $ra
2.9 nop
2.10
2.11 _copy_adjust:
2.12 @@ -128,7 +128,7 @@
2.13 sw $t4, 0($t1)
2.14 bne $t0, $t2, _copy_adjust
2.15 addiu $t1, $t1, 4 /* executed in delay slot before branch */
2.16 - j $ra
2.17 + jr $ra
2.18 nop
2.19
2.20 .set reorder
3.1 --- a/stage2/tasks.c Sat Apr 23 23:01:28 2016 +0200
3.2 +++ b/stage2/tasks.c Sat Apr 23 23:25:58 2016 +0200
3.3 @@ -19,10 +19,10 @@
3.4
3.5 #include "cpu.h"
3.6 #include "paging.h"
3.7 +#include "tasks.h"
3.8
3.9 /* Task tables and data. */
3.10
3.11 -enum { max_tasks = 3 };
3.12 static u32 stack_pointers[max_tasks];
3.13 static u32 registers[max_tasks][32];
3.14
3.15 @@ -36,7 +36,7 @@
3.16 const u32 stack_size = 0x00002000;
3.17 const u32 pagesize = 4 * 1024;
3.18
3.19 -/* The unrelocated symbol table location. */
3.20 +/* A reference to the unrelocated symbol table location. */
3.21
3.22 extern u32 _got_copy_start;
3.23
3.24 @@ -49,7 +49,7 @@
3.25 current_registers = registers[current_task];
3.26 }
3.27
3.28 -void start_task(unsigned short task, void (*function)(), u32 args[], unsigned short nargs)
3.29 +void start_task(unsigned short task, void (*function)(), u32 args[], u8 nargs)
3.30 {
3.31 u32 virtual, physical;
3.32
4.1 --- a/stage2/tasks.h Sat Apr 23 23:01:28 2016 +0200
4.2 +++ b/stage2/tasks.h Sat Apr 23 23:25:58 2016 +0200
4.3 @@ -3,6 +3,8 @@
4.4
4.5 #include "xburst_types.h"
4.6
4.7 +enum { max_tasks = 3 };
4.8 +
4.9 /* Task management functions. */
4.10
4.11 void init_tasks(void);