2016-02-24 | Paul Boddie | raw files shortlog changelog graph | Fixed the operation of the enter_user_mode function. | |
stage2/cpu.c (file) |
1.1 --- a/stage2/cpu.c Wed Feb 24 16:13:46 2016 +0100 1.2 +++ b/stage2/cpu.c Wed Feb 24 16:14:52 2016 +0100 1.3 @@ -116,8 +116,8 @@ 1.4 { 1.5 asm volatile( 1.6 "mfc0 $t3, $12\n" /* CP0_STATUS */ 1.7 - "li $t4, 0xffffffef\n" /* KSU = 2 (UM = 1) */ 1.8 - "and $t3, $t3, $t4\n" 1.9 + "li $t4, 0x00000010\n" /* KSU = 2 (UM = 1) */ 1.10 + "or $t3, $t3, $t4\n" 1.11 "mtc0 $t3, $12\n" 1.12 "nop\n"); 1.13 }