Rename boot.c to tlb.s and disassemble tlb functions
This commit is contained in:
parent
ee8afafc31
commit
f616ee8307
|
|
@ -1,5 +1,5 @@
|
|||
#define LIBFILES(section) \
|
||||
build/ROMID/lib/boot.o (section); \
|
||||
build/ROMID/lib/tlb.o (section); \
|
||||
build/ROMID/lib/segments.o (section); \
|
||||
build/ROMID/lib/init.o (section); \
|
||||
build/ROMID/lib/sched.o (section); \
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#define LIBFILES(section) \
|
||||
build/ROMID/lib/boot.o (section); \
|
||||
build/ROMID/lib/tlb.o (section); \
|
||||
build/ROMID/lib/segments.o (section); \
|
||||
build/ROMID/lib/init.o (section); \
|
||||
build/ROMID/lib/sched.o (section); \
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#define LIBFILES(section) \
|
||||
build/ROMID/lib/boot.o (section); \
|
||||
build/ROMID/lib/tlb.o (section); \
|
||||
build/ROMID/lib/segments.o (section); \
|
||||
build/ROMID/lib/init.o (section); \
|
||||
build/ROMID/lib/sched.o (section); \
|
||||
|
|
|
|||
8
ld/pd.ld
8
ld/pd.ld
|
|
@ -205,11 +205,11 @@ SECTIONS
|
|||
END_SEG(preamble)
|
||||
|
||||
/**
|
||||
/* boot()'s address is 0x70001050, but preamble calls it by 0x80001050 due
|
||||
* to it not being TLB mapped yet. So we set up this variable to allow this
|
||||
* to happen.
|
||||
/* tlbInit()'s address is 0x70001050, but preamble calls it by 0x80001050
|
||||
* due to it not being TLB mapped yet. So we set up this variable to allow
|
||||
* this to happen.
|
||||
*/
|
||||
bootFromPreamble = boot + 0x10000000;
|
||||
tlbInitFromPreamble = tlbInit + 0x10000000;
|
||||
|
||||
/***************************************************************************
|
||||
* lib
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#ifndef _IN_LIB_BOOT_H
|
||||
#define _IN_LIB_BOOT_H
|
||||
#include <ultra64.h>
|
||||
|
||||
void boot(void);
|
||||
s32 boot000010a4(void);
|
||||
s32 boot0000113c(void);
|
||||
s32 boot00001180(void);
|
||||
void bootUnmapTLBRange(s32 first, s32 last);
|
||||
|
||||
#endif
|
||||
|
|
@ -7,6 +7,6 @@ void *segGetDatazipRomStart(void);
|
|||
void *segGetInflateRomStart(void);
|
||||
void *segGetInflateRomStart2(void);
|
||||
void *segGetGamezipsRomStart(void);
|
||||
u32 bootInflate();
|
||||
u32 segInflate();
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef _IN_LIB_BOOT_H
|
||||
#define _IN_LIB_BOOT_H
|
||||
#include <ultra64.h>
|
||||
|
||||
void tlbInit(void);
|
||||
s32 tlb000010a4(void);
|
||||
s32 tlb0000113c(void);
|
||||
s32 tlbHandleMiss(void);
|
||||
void tlbUnmapRange(s32 first, s32 last);
|
||||
|
||||
#endif
|
||||
1183
src/lib/boot.c
1183
src/lib/boot.c
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include "lib/boot.h"
|
||||
#include "lib/tlb.h"
|
||||
#include "lib/init.h"
|
||||
#include "lib/reset.h"
|
||||
#include "lib/segments.h"
|
||||
|
|
@ -274,7 +274,7 @@ glabel init
|
|||
/* 1744: 010e1821 */ addu $v1,$t0,$t6
|
||||
/* 1748: 2462ffff */ addiu $v0,$v1,-1
|
||||
/* 174c: 0440000b */ bltz $v0,.L0000177c
|
||||
/* 1750: 3c057000 */ lui $a1,%hi(boot)
|
||||
/* 1750: 3c057000 */ lui $a1,%hi(tlbInit)
|
||||
/* 1754: 3c017000 */ lui $at,0x7000
|
||||
/* 1758: 3c0f7020 */ lui $t7,0x7020
|
||||
/* 175c: 01e88023 */ subu $s0,$t7,$t0
|
||||
|
|
@ -287,7 +287,7 @@ glabel init
|
|||
/* 1774: 0441fffb */ bgez $v0,.L00001764
|
||||
/* 1778: a1390000 */ sb $t9,0x0($t1)
|
||||
.L0000177c:
|
||||
/* 177c: 24a51050 */ addiu $a1,$a1,%lo(boot)
|
||||
/* 177c: 24a51050 */ addiu $a1,$a1,%lo(tlbInit)
|
||||
/* 1780: 3c07702c */ lui $a3,0x702c
|
||||
/* 1784: 3c0a7020 */ lui $t2,0x7020
|
||||
/* 1788: 01488023 */ subu $s0,$t2,$t0
|
||||
|
|
@ -304,12 +304,12 @@ glabel init
|
|||
/* 17b0: 1420fffa */ bnez $at,.L0000179c
|
||||
/* 17b4: ac6cfffc */ sw $t4,-0x4($v1)
|
||||
/* 17b8: 3c047028 */ lui $a0,0x7028
|
||||
/* 17bc: 0c0005ab */ jal bootInflate
|
||||
/* 17bc: 0c0005ab */ jal segInflate
|
||||
/* 17c0: 3c068030 */ lui $a2,0x8030
|
||||
/* 17c4: 3c058006 */ lui $a1,%hi(_dataSegmentStart)
|
||||
/* 17c8: 24a59fe0 */ addiu $a1,$a1,%lo(_dataSegmentStart)
|
||||
/* 17cc: 02002025 */ or $a0,$s0,$zero
|
||||
/* 17d0: 0c0005ab */ jal bootInflate
|
||||
/* 17d0: 0c0005ab */ jal segInflate
|
||||
/* 17d4: 3c068030 */ lui $a2,0x8030
|
||||
/* 17d8: 3c0da000 */ lui $t5,0xa000
|
||||
/* 17dc: 8dae02e8 */ lw $t6,0x2e8($t5)
|
||||
|
|
@ -321,7 +321,7 @@ glabel init
|
|||
/* 17f0: 1000ffff */ b .L000017f0
|
||||
/* 17f4: 00000000 */ nop
|
||||
.L000017f8:
|
||||
/* 17f8: 0c00058d */ jal bootUnmapTLBRange
|
||||
/* 17f8: 0c00058d */ jal tlbUnmapRange
|
||||
/* 17fc: 2405001f */ addiu $a1,$zero,0x1f
|
||||
/* 1800: 3c048006 */ lui $a0,%hi(g_StackStartAddrs)
|
||||
/* 1804: 3c038006 */ lui $v1,%hi(g_StackEndAddrs)
|
||||
|
|
@ -417,15 +417,15 @@ glabel init
|
|||
/* 17c0: 1420fffa */ bnez $at,.L000017ac
|
||||
/* 17c4: ac6ffffc */ sw $t7,-0x4($v1)
|
||||
/* 17c8: 3c047028 */ lui $a0,0x7028
|
||||
/* 17cc: 0c0005c3 */ jal bootInflate
|
||||
/* 17cc: 0c0005c3 */ jal segInflate
|
||||
/* 17d0: 3c068030 */ lui $a2,0x8030
|
||||
/* 17d4: 3c058006 */ lui $a1,0x8006
|
||||
/* 17d8: 24a5b760 */ addiu $a1,$a1,-18592
|
||||
/* 17dc: 02002025 */ move $a0,$s0
|
||||
/* 17e0: 0c0005c3 */ jal bootInflate
|
||||
/* 17e0: 0c0005c3 */ jal segInflate
|
||||
/* 17e4: 3c068030 */ lui $a2,0x8030
|
||||
/* 17e8: 24040001 */ li $a0,0x1
|
||||
/* 17ec: 0c00059c */ jal bootUnmapTLBRange
|
||||
/* 17ec: 0c00059c */ jal tlbUnmapRange
|
||||
/* 17f0: 2405001f */ li $a1,0x1f
|
||||
/* 17f4: 3c048006 */ lui $a0,0x8006
|
||||
/* 17f8: 3c038006 */ lui $v1,0x8006
|
||||
|
|
@ -539,10 +539,10 @@ glabel init
|
|||
// }
|
||||
//
|
||||
// // Inflate lib
|
||||
// bootInflate(dst, src, 0x80300000);
|
||||
// segInflate(dst, src, 0x80300000);
|
||||
//
|
||||
// // Inflate .data
|
||||
// bootInflate(0x70200000 - datacomplen, &_dataSegmentStart, 0x80300000);
|
||||
// segInflate(0x70200000 - datacomplen, &_dataSegmentStart, 0x80300000);
|
||||
//
|
||||
//#if VERSION >= VERSION_NTSC_1_0
|
||||
//#if PIRACYCHECKS
|
||||
|
|
@ -552,7 +552,7 @@ glabel init
|
|||
//#endif
|
||||
//#endif
|
||||
//
|
||||
// bootUnmapTLBRange(1, 31);
|
||||
// tlbUnmapRange(1, 31);
|
||||
//
|
||||
// // Clear the stack allocation pointers
|
||||
// for (i = 0; i < ARRAYCOUNT(g_StackStartAddrs); i++) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include "lib/boot.h"
|
||||
#include "lib/tlb.h"
|
||||
#include "constants.h"
|
||||
#include "bss.h"
|
||||
#include "lib/rzip.h"
|
||||
|
|
@ -148,7 +148,7 @@ glabel func000070d0
|
|||
/* 729c: 3c018009 */ lui $at,%hi(var8008ae20)
|
||||
/* 72a0: ac33ae20 */ sw $s3,%lo(var8008ae20)($at)
|
||||
/* 72a4: 3c018009 */ lui $at,%hi(var80090b00)
|
||||
/* 72a8: 0c000429 */ jal boot000010a4
|
||||
/* 72a8: 0c000429 */ jal tlb000010a4
|
||||
/* 72ac: ac330b00 */ sw $s3,%lo(var80090b00)($at)
|
||||
/* 72b0: 8ee30000 */ lw $v1,0x0($s7)
|
||||
/* 72b4: 3c048009 */ lui $a0,%hi(var8008ae24)
|
||||
|
|
@ -164,7 +164,7 @@ glabel func000070d0
|
|||
/* 72d8: 1623fffd */ bne $s1,$v1,.L000072d0
|
||||
/* 72dc: ac40fffc */ sw $zero,-0x4($v0)
|
||||
.L000072e0:
|
||||
/* 72e0: 0c00044f */ jal boot0000113c
|
||||
/* 72e0: 0c00044f */ jal tlb0000113c
|
||||
/* 72e4: 00000000 */ nop
|
||||
/* 72e8: 1000006a */ b .L00007494
|
||||
/* 72ec: 00000000 */ nop
|
||||
|
|
@ -430,7 +430,7 @@ glabel func000070d0
|
|||
/* 737c: 3c018009 */ lui $at,0x8009
|
||||
/* 7380: ac35d450 */ sw $s5,-0x2bb0($at)
|
||||
/* 7384: 3c018009 */ lui $at,0x8009
|
||||
/* 7388: 0c000429 */ jal boot000010a4
|
||||
/* 7388: 0c000429 */ jal tlb000010a4
|
||||
/* 738c: ac3530f0 */ sw $s5,0x30f0($at)
|
||||
/* 7390: 8ee30000 */ lw $v1,0x0($s7)
|
||||
/* 7394: 3c048009 */ lui $a0,0x8009
|
||||
|
|
@ -446,7 +446,7 @@ glabel func000070d0
|
|||
/* 73b8: 1623fffd */ bne $s1,$v1,.NB000073b0
|
||||
/* 73bc: ac40fffc */ sw $zero,-0x4($v0)
|
||||
.NB000073c0:
|
||||
/* 73c0: 0c00044f */ jal boot0000113c
|
||||
/* 73c0: 0c00044f */ jal tlb0000113c
|
||||
/* 73c4: 00000000 */ sll $zero,$zero,0x0
|
||||
/* 73c8: 1000009b */ beqz $zero,.NB00007638
|
||||
/* 73cc: 00000000 */ sll $zero,$zero,0x0
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include "constants.h"
|
||||
#include "bss.h"
|
||||
#include "lib/boot.h"
|
||||
#include "lib/tlb.h"
|
||||
#include "lib/lib_09660.h"
|
||||
#include "lib/lib_0c000.h"
|
||||
#include "lib/lib_2fa00.h"
|
||||
|
|
@ -294,7 +294,7 @@ u32 crashGetParentStackFrame(u32 *origptr, u32 *minaddr, u32 origsp, u32 *regs)
|
|||
bool crashIsReturnAddress(u32 *instruction)
|
||||
{
|
||||
if (((u32)instruction % 4) == 0
|
||||
&& (u32)instruction >= (u32)boot
|
||||
&& (u32)instruction >= (u32)tlbInit
|
||||
&& (u32)instruction <= (u32)&_libSegmentEnd) {
|
||||
// This condition can never pass because 9 is masked out
|
||||
if ((instruction[-2] & 0xfc00003c) == 9) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ glabel segGetGamezipsRomStart
|
|||
jr $ra
|
||||
addiu $v0, $v0, %lo(_gamezipSegmentRomStart)
|
||||
|
||||
glabel bootInflate
|
||||
glabel segInflate
|
||||
lui $a3, %hi(inflate1173)
|
||||
addiu $a3, $a3, %lo(inflate1173)
|
||||
jr $a3
|
||||
|
|
|
|||
|
|
@ -0,0 +1,495 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
||||
.bss
|
||||
|
||||
glabel var8008ae20
|
||||
.space 4
|
||||
|
||||
glabel var8008ae24;
|
||||
.space 4
|
||||
|
||||
glabel var8008ae28;
|
||||
.space 4
|
||||
|
||||
glabel var8008ae2c;
|
||||
.space 4
|
||||
|
||||
glabel var8008ae30;
|
||||
.space 8
|
||||
|
||||
glabel var8008ae38
|
||||
.space 0x1000
|
||||
|
||||
glabel var8008be38
|
||||
.space 0x1400
|
||||
|
||||
glabel var8008d238
|
||||
.space 0x20
|
||||
|
||||
glabel var8008d258
|
||||
.space 4
|
||||
|
||||
glabel var8008d25c
|
||||
.space 4
|
||||
|
||||
glabel var8008d260
|
||||
.space 4
|
||||
|
||||
glabel var8008d264
|
||||
.space 4
|
||||
|
||||
glabel var8008d268
|
||||
.space 4
|
||||
|
||||
.text
|
||||
|
||||
/**
|
||||
* Sets up TLB index 0 (0x70000000), then calls init.
|
||||
*/
|
||||
glabel tlbInit
|
||||
lui $t0, 0x7f
|
||||
ori $t0, $t0, 0xe000
|
||||
mtc0 $t0, C0_PAGEMASK
|
||||
lui $t0, 0x7000
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
addiu $t0, $zero, 0x1f
|
||||
mtc0 $t0, C0_ENTRYLO0
|
||||
lui $t0, 0x1
|
||||
ori $t0, $t0, 0x1f
|
||||
mtc0 $t0, C0_ENTRYLO1
|
||||
addiu $t0, $zero, 0x0
|
||||
mtc0 $t0, C0_INX
|
||||
nop
|
||||
tlbwi
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
lui $t0, %hi(init)
|
||||
addiu $t0, $t0, %lo(init)
|
||||
jr $t0
|
||||
nop
|
||||
|
||||
glabel tlb000010a4
|
||||
addiu $sp, $sp, -8
|
||||
sw $ra, 0x0($sp)
|
||||
mtc0 $zero, C0_CONTEXT
|
||||
addiu $t0, $zero, 0x2
|
||||
mtc0 $t0, C0_WIRED
|
||||
addiu $t1, $zero, 0x1ff
|
||||
lui $at, %hi(var8008d264+0x2)
|
||||
sh $t1, %lo(var8008d264+0x2)($at)
|
||||
addiu $a0, $zero, 0x10c
|
||||
lui $at, %hi(var8008ae28+0x2)
|
||||
sh $a0, %lo(var8008ae28+0x2)($at)
|
||||
lui $at, %hi(var8008d258+0x2)
|
||||
sh $a0, %lo(var8008d258+0x2)($at)
|
||||
sll $a0, $a0, 0xc
|
||||
lui $v0, %hi(var8008ae20)
|
||||
lw $v0, %lo(var8008ae20)($v0)
|
||||
lui $t1, %hi(_gameSegmentEnd)
|
||||
addiu $t1, $t1, %lo(_gameSegmentEnd)
|
||||
lui $t2, %hi(func0f000000)
|
||||
addiu $t2, $t2, %lo(func0f000000)
|
||||
subu $t1, $t1, $t2
|
||||
lui $t0, 0xfff
|
||||
ori $t0, $t0, 0xffff
|
||||
and $v0, $v0, $t0
|
||||
lui $at, %hi(var8008d268)
|
||||
sw $v0, %lo(var8008d268)($at)
|
||||
lui $v0, %hi(var8008d238)
|
||||
addiu $v0, $v0, %lo(var8008d238)
|
||||
addiu $a0, $zero, 0x21
|
||||
lui $at, %hi(var8008d25c)
|
||||
sw $v0, %lo(var8008d25c)($at)
|
||||
addu $v1, $v0, $a0
|
||||
lui $at, %hi(var8008d260)
|
||||
sw $v1, %lo(var8008d260)($at)
|
||||
lw $ra, 0x0($sp)
|
||||
addiu $sp, $sp, 0x8
|
||||
jr $ra
|
||||
nop
|
||||
|
||||
glabel tlb0000113c
|
||||
addiu $t0, $zero, 0xff
|
||||
lui $v0, %hi(var8008d25c)
|
||||
lw $v0, %lo(var8008d25c)($v0)
|
||||
lui $v1, %hi(var8008d260)
|
||||
lw $v1, %lo(var8008d260)($v1)
|
||||
.L00001150:
|
||||
sb $t0, 0x0($v0)
|
||||
bne $v0, $v1, .L00001150
|
||||
addiu $v0, $v0, 0x1
|
||||
addiu $a0, $zero, 0x4
|
||||
beqz $a0, .L00001178
|
||||
addiu $a0, $a0, -1
|
||||
addiu $t0, $zero, 0x2
|
||||
sllv $t0, $t0, $a0
|
||||
addiu $t0, $t0, -1
|
||||
sb $t0, 0x0($v1)
|
||||
.L00001178:
|
||||
jr $ra
|
||||
nop
|
||||
|
||||
glabel tlbHandleMiss
|
||||
mfc0 $t0, C0_CONTEXT
|
||||
sll $s5, $t0, 0x9
|
||||
lui $t1, 0x7f00
|
||||
sub $t0, $s5, $t1
|
||||
srl $t0, $t0, 0xc
|
||||
sll $t0, $t0, 0x3
|
||||
lui $t1, %hi(var8008ae24)
|
||||
lw $t1, %lo(var8008ae24)($t1)
|
||||
addu $s0, $t0, $t1
|
||||
lui $s8, 0x7f00
|
||||
slt $at, $s5, $s8
|
||||
bnez $at, .L0000162c
|
||||
nop
|
||||
lui $t1, %hi(var80090b04)
|
||||
lw $t1, %lo(var80090b04)($t1)
|
||||
slt $at, $s5, $t1
|
||||
beqz $at, .L0000162c
|
||||
nop
|
||||
mfc0 $t9, C0_BADVADDR
|
||||
srl $t9, $t9, 0xc
|
||||
andi $t9, $t9, 0x1
|
||||
beqzl $t9, .L000011e0
|
||||
lw $s1, 0x0($s0)
|
||||
lw $s1, 0x8($s0)
|
||||
.L000011e0:
|
||||
bnezl $s1, .L000014c4
|
||||
addiu $t5, $zero, 0x1
|
||||
addiu $t5, $zero, 0x0
|
||||
lui $t1, %hi(var8008d25c)
|
||||
lw $t1, %lo(var8008d25c)($t1)
|
||||
lui $t2, %hi(var8008d260)
|
||||
lw $t2, %lo(var8008d260)($t2)
|
||||
.L000011fc:
|
||||
lbu $t0, 0x0($t1)
|
||||
beqz $t0, .L0000122c
|
||||
nop
|
||||
addiu $t6, $zero, 0x0
|
||||
addiu $t7, $zero, 0x1
|
||||
.L00001210:
|
||||
and $t8, $t0, $t7
|
||||
bnez $t8, .L0000123c
|
||||
nop
|
||||
addiu $t6, $t6, 0x1
|
||||
addiu $at, $zero, 0x8
|
||||
bne $t6, $at, .L00001210
|
||||
sll $t7, $t7, 0x1
|
||||
.L0000122c:
|
||||
bne $t1, $t2, .L000011fc
|
||||
addiu $t1, $t1, 0x1
|
||||
j .L00001570
|
||||
nop
|
||||
.L0000123c:
|
||||
xor $t0, $t0, $t7
|
||||
sb $t0, 0x0($t1)
|
||||
lui $t2, %hi(var8008d25c)
|
||||
lw $t2, %lo(var8008d25c)($t2)
|
||||
lui $s1, %hi(var8008d268)
|
||||
lw $s1, %lo(var8008d268)($s1)
|
||||
subu $t1, $t1, $t2
|
||||
sll $t1, $t1, 0x3
|
||||
addu $t0, $t6, $t1
|
||||
sll $t0, $t0, 0xc
|
||||
addu $s1, $s1, $t0
|
||||
.L00001268:
|
||||
mfc0 $t2, C0_BADVADDR
|
||||
lui $t0, 0xff
|
||||
ori $t0, $t0, 0xf000
|
||||
and $t2, $t2, $t0
|
||||
srl $t2, $t2, 0xa
|
||||
lui $t0, %hi(var8008ae30)
|
||||
lw $t0, %lo(var8008ae30)($t0)
|
||||
addu $t0, $t0, $t2
|
||||
lw $t2, 0x0($t0)
|
||||
lw $t0, 0x4($t0)
|
||||
subu $t0, $t0, $t2
|
||||
addiu $t1, $zero, -16
|
||||
addiu $t0, $t0, 0xf
|
||||
and $t6, $t0, $t1
|
||||
lui $t0, 0xa460
|
||||
ori $t0, $t0, 0x10
|
||||
.L000012a8:
|
||||
lw $t1, 0x0($t0)
|
||||
andi $t1, $t1, 0x3
|
||||
bnez $t1, .L000012a8
|
||||
nop
|
||||
lui $s6, 0xa430
|
||||
lw $s6, 0x8($s6)
|
||||
andi $s6, $s6, 0x10
|
||||
lui $t0, 0xa460
|
||||
lui $t1, %hi(var8008ae2c)
|
||||
lw $t1, %lo(var8008ae2c)($t1)
|
||||
lui $t7, 0xfff
|
||||
ori $t7, $t7, 0xffff
|
||||
and $t1, $t1, $t7
|
||||
sw $t1, 0x0($t0)
|
||||
lui $t0, 0xa460
|
||||
ori $t0, $t0, 0x4
|
||||
lui $t1, 0x8000
|
||||
lw $t1, 0x308($t1)
|
||||
or $t1, $t1, $t2
|
||||
lui $t2, 0x1fff
|
||||
ori $t2, $t2, 0xffff
|
||||
and $t1, $t1, $t2
|
||||
sw $t1, 0x0($t0)
|
||||
lui $t0, 0xa460
|
||||
ori $t0, $t0, 0xc
|
||||
addiu $t6, $t6, -1
|
||||
sw $t6, 0x0($t0)
|
||||
beqzl $t9, .L00001324
|
||||
nop
|
||||
beqzl $zero, .L00001328
|
||||
sw $s1, 0x8($s0)
|
||||
.L00001324:
|
||||
sw $s1, 0x0($s0)
|
||||
.L00001328:
|
||||
lui $t0, 0xa460
|
||||
ori $t0, $t0, 0x10
|
||||
.L00001330:
|
||||
lw $t1, 0x0($t0)
|
||||
andi $t1, $t1, 0x3
|
||||
bnez $t1, .L00001330
|
||||
nop
|
||||
lui $t0, %hi(var8008ae2c)
|
||||
lw $t0, %lo(var8008ae2c)($t0)
|
||||
addiu $t1, $t0, 0x1000
|
||||
.L0000134c:
|
||||
cache 0x15, 0x0($t0)
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .L0000134c
|
||||
addiu $t0, $t0, 16
|
||||
bnez $s6, .L00001370
|
||||
nop
|
||||
addiu $t0, $zero, 0x2
|
||||
lui $at, 0xa460
|
||||
sw $t0, 0x10($at)
|
||||
.L00001370:
|
||||
lui $a0, %hi(var8008ae38)
|
||||
addiu $a0, $a0, %lo(var8008ae38)
|
||||
addiu $a0, $a0, 0xff8
|
||||
sw $sp, 0x0($a0)
|
||||
addiu $sp, $a0, 0x0
|
||||
lui $a0, %hi(var8008ae2c)
|
||||
lw $a0, %lo(var8008ae2c)($a0)
|
||||
addiu $a0, $a0, 0x2
|
||||
lui $t0, 0x8000
|
||||
or $a1, $s1, $t0
|
||||
lui $a2, %hi(var8008be38)
|
||||
addiu $a2, $a2, %lo(var8008be38)
|
||||
addiu $sp, $sp, -128
|
||||
sw $ra, 0x0($sp)
|
||||
sw $at, 0x4($sp)
|
||||
sw $v0, 0x8($sp)
|
||||
sw $v1, 0xc($sp)
|
||||
sw $a0, 0x10($sp)
|
||||
sw $a1, 0x14($sp)
|
||||
sw $a2, 0x18($sp)
|
||||
sw $a3, 0x1c($sp)
|
||||
sw $t0, 0x20($sp)
|
||||
sw $t1, 0x24($sp)
|
||||
sw $t2, 0x28($sp)
|
||||
sw $t3, 0x2c($sp)
|
||||
sw $t4, 0x30($sp)
|
||||
sw $t5, 0x34($sp)
|
||||
sw $t6, 0x38($sp)
|
||||
sw $t7, 0x3c($sp)
|
||||
sw $s0, 0x40($sp)
|
||||
sw $s1, 0x44($sp)
|
||||
sw $s2, 0x48($sp)
|
||||
sw $s3, 0x4c($sp)
|
||||
sw $s4, 0x50($sp)
|
||||
sw $s5, 0x54($sp)
|
||||
sw $s6, 0x58($sp)
|
||||
sw $s7, 0x5c($sp)
|
||||
sw $t8, 0x60($sp)
|
||||
sw $t9, 0x64($sp)
|
||||
sw $gp, 0x70($sp)
|
||||
sw $sp, 0x74($sp)
|
||||
sw $s8, 0x78($sp)
|
||||
jal rzipInflate
|
||||
nop
|
||||
lw $ra, 0x0($sp)
|
||||
lw $at, 0x4($sp)
|
||||
lw $v0, 0x8($sp)
|
||||
lw $v1, 0xc($sp)
|
||||
lw $a0, 0x10($sp)
|
||||
lw $a1, 0x14($sp)
|
||||
lw $a2, 0x18($sp)
|
||||
lw $a3, 0x1c($sp)
|
||||
lw $t0, 0x20($sp)
|
||||
lw $t1, 0x24($sp)
|
||||
lw $t2, 0x28($sp)
|
||||
lw $t3, 0x2c($sp)
|
||||
lw $t4, 0x30($sp)
|
||||
lw $t5, 0x34($sp)
|
||||
lw $t6, 0x38($sp)
|
||||
lw $t7, 0x3c($sp)
|
||||
lw $s0, 0x40($sp)
|
||||
lw $s1, 0x44($sp)
|
||||
lw $s2, 0x48($sp)
|
||||
lw $s3, 0x4c($sp)
|
||||
lw $s4, 0x50($sp)
|
||||
lw $s5, 0x54($sp)
|
||||
lw $s6, 0x58($sp)
|
||||
lw $s7, 0x5c($sp)
|
||||
lw $t8, 0x60($sp)
|
||||
lw $t9, 0x64($sp)
|
||||
lw $gp, 0x70($sp)
|
||||
lw $sp, 0x74($sp)
|
||||
lw $s8, 0x78($sp)
|
||||
addiu $sp, $sp, 0x80
|
||||
lui $a0, %hi(var8008ae38)
|
||||
addiu $a0, $a0, %lo(var8008ae38)
|
||||
addiu $a0, $a0, 4088
|
||||
lw $sp, 0x0($a0)
|
||||
lui $t0, 0x8000
|
||||
or $t0, $s1, $t0
|
||||
addiu $t1, $t0, 0xff0
|
||||
.L000014b4:
|
||||
cache 0x19, 0x0($t0)
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .L000014b4
|
||||
addiu $t0, $t0, 0x10
|
||||
.L000014c4:
|
||||
addiu $t0, $zero, 0x0
|
||||
mtc0 $t0, C0_PAGEMASK
|
||||
mtc0 $s5, C0_ENTRYHI
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
tlbp
|
||||
nop
|
||||
nop
|
||||
mfc0 $t1, C0_INX
|
||||
mtc0 $t0, C0_PAGEMASK
|
||||
mtc0 $s5, C0_ENTRYHI
|
||||
lw $t0, 0x0($s0)
|
||||
srl $t0, $t0, 0xc
|
||||
sll $t0, $t0, 0x6
|
||||
bnezl $t0, .L00001508
|
||||
ori $t0, $t0, 0x1e
|
||||
.L00001508:
|
||||
mtc0 $t0, C0_ENTRYLO0
|
||||
lw $t0, 0x8($s0)
|
||||
srl $t0, $t0, 0xc
|
||||
sll $t0, $t0, 0x6
|
||||
bnezl $t0, .L00001520
|
||||
ori $t0, $t0, 0x1e
|
||||
.L00001520:
|
||||
mtc0 $t0, C0_ENTRYLO1
|
||||
bltzl $t1, .L00001534
|
||||
nop
|
||||
b .L00001538
|
||||
tlbwi
|
||||
.L00001534:
|
||||
tlbwr
|
||||
.L00001538:
|
||||
bnez $t5, .L00001568
|
||||
nop
|
||||
or $t0, $s5, $zero
|
||||
bnezl $t9, .L0000154c
|
||||
addiu $t0, $t0, 0x1000
|
||||
.L0000154c:
|
||||
addiu $t1, $t0, 0xfe0
|
||||
andi $t2, $t0, 0x1f
|
||||
subu $t0, $t0, $t2
|
||||
.L00001558:
|
||||
cache 0x10, 0x0($t0)
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .L00001558
|
||||
addiu $t0, $t0, 0x20
|
||||
.L00001568:
|
||||
jr $ra
|
||||
nop
|
||||
.L00001570:
|
||||
lui $s4, %hi(var8008ae24)
|
||||
lw $s4, %lo(var8008ae24)($s4)
|
||||
lui $gp, %hi(var80090b08)
|
||||
lw $gp, %lo(var80090b08)($gp)
|
||||
mfc0 $t0, C0_COUNT
|
||||
lui $t1, %hi(var8008d264+0x2)
|
||||
lhu $t1, %lo(var8008d264+0x2)($t1)
|
||||
lui $t2, %hi(var8005cf84)
|
||||
lw $t2, %lo(var8005cf84)($t2)
|
||||
and $t0, $t0, $t1
|
||||
slt $at, $t0, $t2
|
||||
beqzl $at, .L000015a4
|
||||
subu $t0, $t0, $t2
|
||||
.L000015a4:
|
||||
sll $t1, $t0, 0x3
|
||||
addu $t1, $t1, $s4
|
||||
.L000015ac:
|
||||
lw $s1, 0x0($t1)
|
||||
bnez $s1, .L000015cc
|
||||
nop
|
||||
addiu $t1, $t1, 8
|
||||
bne $t1, $gp, .L000015ac
|
||||
nop
|
||||
j .L000015ac
|
||||
or $t1, $s4, $zero
|
||||
.L000015cc:
|
||||
subu $t0, $t1, $s4
|
||||
srl $t0, $t0, 0x3
|
||||
sll $t0, $t0, 0xc
|
||||
addu $t0, $t0, $s8
|
||||
addiu $t2, $zero, -4096
|
||||
and $t0, $t0, $t2
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
addiu $t0, $zero, 0x0
|
||||
mtc0 $t0, C0_PAGEMASK
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
tlbp
|
||||
nop
|
||||
nop
|
||||
mfc0 $t2, C0_INX
|
||||
mfc0 $t0, C0_ENTRYHI
|
||||
bltz $t2, .L00001620
|
||||
nop
|
||||
j .L00001570
|
||||
nop
|
||||
.L00001620:
|
||||
sw $zero, 0x0($t1)
|
||||
j .L00001268
|
||||
nop
|
||||
.L0000162c:
|
||||
j L00003a88
|
||||
nop
|
||||
|
||||
glabel tlbUnmapRange
|
||||
mfc0 $t0, C0_ENTRYHI
|
||||
lui $t2, 0x8000
|
||||
mtc0 $t2, C0_ENTRYHI
|
||||
mtc0 $zero, C0_ENTRYLO0
|
||||
mtc0 $zero, C0_ENTRYLO1
|
||||
.L00001648:
|
||||
mtc0 $a1, C0_INX
|
||||
nop
|
||||
tlbwi
|
||||
nop
|
||||
nop
|
||||
bne $a1, $a0, .L00001648
|
||||
addi $a1, $a1, -1
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
jr $ra
|
||||
nop
|
||||
|
||||
#if VERSION < VERSION_NTSC_1_0
|
||||
glabel tlb000016acnb
|
||||
lui $t0, 0x8000
|
||||
addiu $t1, $t0, 0x1ff0
|
||||
.L000016b4:
|
||||
cache 0x1, 0x0($t0)
|
||||
sltu $at, $t0, $t1
|
||||
bnez $at, .L000016b4
|
||||
addiu $t0, $t0, 0x10
|
||||
jr $ra
|
||||
nop
|
||||
#endif
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -76,16 +77,16 @@ glabel __osException
|
|||
lui $k0, %hi(__osThreadSave)
|
||||
addiu $k0, $k0, %lo(__osThreadSave)
|
||||
sd $at, 0x20($k0)
|
||||
mfc0 $k1, $12
|
||||
mfc0 $k1, C0_SR
|
||||
sw $k1, 0x118($k0)
|
||||
addiu $at, $zero, -4
|
||||
and $k1, $k1, $at
|
||||
mtc0 $k1, $12
|
||||
mtc0 $k1, C0_SR
|
||||
sd $t0, 0x58($k0)
|
||||
sd $t1, 0x60($k0)
|
||||
sd $t2, 0x68($k0)
|
||||
sw $zero, 0x18($k0)
|
||||
mfc0 $t0, $13
|
||||
mfc0 $t0, C0_CAUSE
|
||||
move $t0, $k0
|
||||
lui $k0, %hi(__osRunningThread)
|
||||
lw $k0, %lo(__osRunningThread)($k0)
|
||||
|
|
@ -164,7 +165,7 @@ glabel __osException
|
|||
or $t1, $t1, $t0
|
||||
sw $t1, 0x128($k0)
|
||||
.L00003664:
|
||||
mfc0 $t0, $14
|
||||
mfc0 $t0, C0_EPC
|
||||
sw $t0, 0x11c($k0)
|
||||
lw $t0, 0x18($k0)
|
||||
beqz $t0, .L00003704
|
||||
|
|
@ -205,7 +206,7 @@ glabel __osException
|
|||
sdc1 $f30, 0x220($k0)
|
||||
sdc1 $f31, 0x228($k0)
|
||||
.L00003704:
|
||||
mfc0 $t0, $13
|
||||
mfc0 $t0, C0_CAUSE
|
||||
sw $t0, 0x120($k0)
|
||||
addiu $t1, $zero, 0x2
|
||||
sh $t1, 0x10($k0)
|
||||
|
|
@ -223,7 +224,7 @@ glabel __osException
|
|||
beq $t1, $t2, .L00003b6c
|
||||
nop
|
||||
addiu $t2, $zero, 0x0
|
||||
bne $t1, $t2, .L00003a88
|
||||
bne $t1, $t2, L00003a88
|
||||
nop
|
||||
and $s0, $k1, $t0
|
||||
.L00003758:
|
||||
|
|
@ -252,8 +253,8 @@ glabel __osException
|
|||
b .L00003758
|
||||
and $s0, $s0, $at
|
||||
.L000037a8:
|
||||
mfc0 $t1, $11
|
||||
mtc0 $t1, $11
|
||||
mfc0 $t1, C0_COMPARE
|
||||
mtc0 $t1, C0_COMPARE
|
||||
jal send_mesg
|
||||
addiu $a0, $zero, 0x18
|
||||
lui $at, 0xffff
|
||||
|
|
@ -395,7 +396,7 @@ glabel __osException
|
|||
.L000039a8:
|
||||
addiu $at, $zero, -513
|
||||
and $t0, $t0, $at
|
||||
mtc0 $t0, $13
|
||||
mtc0 $t0, C0_CAUSE
|
||||
jal send_mesg
|
||||
addiu $a0, $zero, 0x8
|
||||
addiu $at, $zero, -513
|
||||
|
|
@ -404,19 +405,19 @@ glabel __osException
|
|||
.L000039c8:
|
||||
addiu $at, $zero, -257
|
||||
and $t0, $t0, $at
|
||||
mtc0 $t0, $13
|
||||
mtc0 $t0, C0_CAUSE
|
||||
jal send_mesg
|
||||
addiu $a0, $zero, 0x0
|
||||
addiu $at, $zero, -257
|
||||
b .L00003758
|
||||
and $s0, $s0, $at
|
||||
.L000039e8:
|
||||
jal boot00001180
|
||||
jal tlbHandleMiss
|
||||
nop
|
||||
b .L00003a3c
|
||||
nop
|
||||
.L000039f8:
|
||||
j .L00003a88
|
||||
j L00003a88
|
||||
nop
|
||||
addiu $t1, $zero, 0x1
|
||||
.L00003a04:
|
||||
|
|
@ -426,9 +427,9 @@ glabel __osException
|
|||
lw $t1, 0x0($t1)
|
||||
srl $t1, $t1, 0x10
|
||||
andi $t1, $t1, 0xff
|
||||
beq $t1, $at, .L00003a88
|
||||
beq $t1, $at, L00003a88
|
||||
addiu $at, $zero, 0x7
|
||||
beq $t1, $at, .L00003a88
|
||||
beq $t1, $at, L00003a88
|
||||
nop
|
||||
jal send_mesg
|
||||
addiu $a0, $zero, 0x50
|
||||
|
|
@ -455,14 +456,15 @@ glabel __osException
|
|||
sw $t2, 0x0($k0)
|
||||
j .L00003d10
|
||||
sw $k0, 0x0($t1)
|
||||
.L00003a88:
|
||||
|
||||
glabel L00003a88
|
||||
lui $at, %hi(__osFaultedThread)
|
||||
sw $k0, %lo(__osFaultedThread)($at)
|
||||
addiu $t1, $zero, 0x1
|
||||
sh $t1, 0x10($k0)
|
||||
addiu $t1, $zero, 0x2
|
||||
sh $t1, 0x12($k0)
|
||||
mfc0 $t2, $8
|
||||
mfc0 $t2, C0_BADVADDR
|
||||
sw $t2, 0x124($k0)
|
||||
jal send_mesg
|
||||
addiu $a0, $zero, 0x60
|
||||
|
|
@ -523,7 +525,7 @@ glabel send_mesg
|
|||
and $t1, $t0, $at
|
||||
srl $t1, $t1, 0x1c
|
||||
addiu $t2, $zero, 0x1
|
||||
bne $t1, $t2, .L00003a88
|
||||
bne $t1, $t2, L00003a88
|
||||
nop
|
||||
lw $k1, 0x118($k0)
|
||||
lui $at, 0x2000
|
||||
|
|
@ -536,7 +538,7 @@ glabel send_mesg
|
|||
glabel __osEnqueueAndYield
|
||||
lui $a1, %hi(__osRunningThread)
|
||||
lw $a1, %lo(__osRunningThread)($a1)
|
||||
mfc0 $t0, $12
|
||||
mfc0 $t0, C0_SR
|
||||
lw $k1, 0x18($a1)
|
||||
ori $t0, $t0, 0x2
|
||||
sw $t0, 0x118($a1)
|
||||
|
|
@ -658,7 +660,7 @@ glabel __osDispatchThread
|
|||
and $t1, $t1, $t0
|
||||
and $k1, $k1, $at
|
||||
or $k1, $k1, $t1
|
||||
mtc0 $k1, $12
|
||||
mtc0 $k1, C0_SR
|
||||
ld $k1, 0x108($k0)
|
||||
ld $at, 0x20($k0)
|
||||
ld $v0, 0x28($k0)
|
||||
|
|
@ -693,7 +695,7 @@ glabel __osDispatchThread
|
|||
ld $s8, 0xf8($k0)
|
||||
ld $ra, 0x100($k0)
|
||||
lw $k1, 0x11c($k0)
|
||||
mtc0 $k1, $14
|
||||
mtc0 $k1, C0_EPC
|
||||
lw $k1, 0x18($k0)
|
||||
beqz $k1, .L00003e80
|
||||
nop
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -5,9 +6,9 @@
|
|||
.section .text
|
||||
|
||||
glabel osMapTLB
|
||||
mfc0 $t0, $10
|
||||
mtc0 $a0, $0
|
||||
mtc0 $a1, $5
|
||||
mfc0 $t0, C0_ENTRYHI
|
||||
mtc0 $a0, C0_INX
|
||||
mtc0 $a1, C0_PAGEMASK
|
||||
lw $t1, 0x14($sp)
|
||||
addiu $at, $zero, -1
|
||||
beq $t1, $at, .L0004e1d8
|
||||
|
|
@ -18,17 +19,17 @@ glabel osMapTLB
|
|||
.L0004e1d8:
|
||||
addiu $t2, $zero, 0x1f
|
||||
.L0004e1dc:
|
||||
mtc0 $a2, $10
|
||||
mtc0 $a2, C0_ENTRYHI
|
||||
addiu $at, $zero, -1
|
||||
beq $a3, $at, .L0004e200
|
||||
nop
|
||||
srl $t3, $a3, 0x6
|
||||
or $t3, $t3, $t2
|
||||
mtc0 $t3, $2
|
||||
mtc0 $t3, C0_ENTRYLO0
|
||||
b .L0004e204
|
||||
nop
|
||||
.L0004e200:
|
||||
mtc0 $t4, $2
|
||||
mtc0 $t4, C0_ENTRYLO0
|
||||
.L0004e204:
|
||||
lw $t3, 0x10($sp)
|
||||
addiu $at, $zero, -1
|
||||
|
|
@ -36,16 +37,16 @@ glabel osMapTLB
|
|||
nop
|
||||
srl $t3, $t3, 0x6
|
||||
or $t3, $t3, $t2
|
||||
mtc0 $t3, $3
|
||||
mtc0 $t3, C0_ENTRYLO1
|
||||
b .L0004e240
|
||||
nop
|
||||
.L0004e228:
|
||||
mtc0 $t4, $3
|
||||
mtc0 $t4, C0_ENTRYLO1
|
||||
addiu $at, $zero, -1
|
||||
bne $a3, $at, .L0004e240
|
||||
nop
|
||||
lui $t3, 0x8000
|
||||
mtc0 $t3, $10
|
||||
mtc0 $t3, C0_ENTRYHI
|
||||
.L0004e240:
|
||||
nop
|
||||
tlbwi
|
||||
|
|
@ -53,6 +54,6 @@ glabel osMapTLB
|
|||
nop
|
||||
nop
|
||||
nop
|
||||
mtc0 $t0, $10
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
jr $ra
|
||||
nop
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -5,19 +6,19 @@
|
|||
.section .text
|
||||
|
||||
glabel __osProbeTLB
|
||||
mfc0 $t0, $10
|
||||
mfc0 $t0, C0_ENTRYHI
|
||||
andi $t1, $t0, 0xff
|
||||
addiu $at, $zero, -8192
|
||||
and $t2, $a0, $at
|
||||
or $t1, $t1, $t2
|
||||
mtc0 $t1, $10
|
||||
mtc0 $t1, C0_ENTRYHI
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
tlbp
|
||||
nop
|
||||
nop
|
||||
mfc0 $t3, $0
|
||||
mfc0 $t3, C0_INX
|
||||
lui $at, 0x8000
|
||||
and $t3, $t3, $at
|
||||
bnez $t3, .L00051d38
|
||||
|
|
@ -26,17 +27,17 @@ glabel __osProbeTLB
|
|||
nop
|
||||
nop
|
||||
nop
|
||||
mfc0 $t3, $5
|
||||
mfc0 $t3, C0_PAGEMASK
|
||||
addi $t3, $t3, 0x2000
|
||||
srl $t3, $t3, 0x1
|
||||
and $t4, $t3, $a0
|
||||
bnez $t4, .L00051d08
|
||||
addi $t3, $t3, -1
|
||||
mfc0 $v0, $2
|
||||
mfc0 $v0, C0_ENTRYLO0
|
||||
b .L00051d0c
|
||||
nop
|
||||
.L00051d08:
|
||||
mfc0 $v0, $3
|
||||
mfc0 $v0, C0_ENTRYLO1
|
||||
.L00051d0c:
|
||||
andi $t5, $v0, 0x2
|
||||
beqz $t5, .L00051d38
|
||||
|
|
@ -52,6 +53,6 @@ glabel __osProbeTLB
|
|||
.L00051d38:
|
||||
addiu $v0, $zero, -1
|
||||
.L00051d3c:
|
||||
mtc0 $t0, $10
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
jr $ra
|
||||
nop
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -5,7 +6,7 @@
|
|||
.section .text
|
||||
|
||||
glabel osSetIntMask
|
||||
mfc0 $t4, $12
|
||||
mfc0 $t4, C0_SR
|
||||
andi $v0, $t4, 0xff01
|
||||
lui $t0, %hi(__osGlobalIntMask)
|
||||
addiu $t0, $t0, %lo(__osGlobalIntMask)
|
||||
|
|
@ -41,7 +42,7 @@ glabel osSetIntMask
|
|||
ori $at, $at, 0xff
|
||||
and $t4, $t4, $at
|
||||
or $t4, $t4, $t0
|
||||
mtc0 $t4, $12
|
||||
mtc0 $t4, C0_SR
|
||||
nop
|
||||
nop
|
||||
jr $ra
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#include "asm_helper.h"
|
||||
#include "macros.inc"
|
||||
.set noat
|
||||
.set noreorder
|
||||
|
|
@ -5,14 +6,14 @@
|
|||
.section .text
|
||||
|
||||
glabel osUnmapTLBAll
|
||||
mfc0 $t0, $10
|
||||
li $t1, 0x1e
|
||||
mfc0 $t0, C0_ENTRYHI
|
||||
li $t1, 30
|
||||
lui $t2, 0x8000
|
||||
mtc0 $t2, $10
|
||||
mtc0 $zero, $2
|
||||
mtc0 $zero, $3
|
||||
mtc0 $t2, C0_ENTRYHI
|
||||
mtc0 $zero, C0_ENTRYLO0
|
||||
mtc0 $zero, C0_ENTRYLO1
|
||||
.PF00052098:
|
||||
mtc0 $t1, $0
|
||||
mtc0 $t1, C0_INX
|
||||
nop
|
||||
tlbwi
|
||||
nop
|
||||
|
|
@ -20,6 +21,6 @@ glabel osUnmapTLBAll
|
|||
addi $t1, $t1, -1
|
||||
bgez $t1, .PF00052098
|
||||
nop
|
||||
mtc0 $t0, $10
|
||||
mtc0 $t0, C0_ENTRYHI
|
||||
jr $ra
|
||||
nop
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ glabel preamble
|
|||
sw $zero, 4($t0)
|
||||
bnez $t1, .L00001010
|
||||
addi $t0, $t0, 8
|
||||
lui $t2, %hi(bootFromPreamble)
|
||||
lui $t2, %hi(tlbInitFromPreamble)
|
||||
lui $sp, 0x8000
|
||||
addiu $t2, $t2, %lo(bootFromPreamble)
|
||||
addiu $t2, $t2, %lo(tlbInitFromPreamble)
|
||||
jr $t2
|
||||
addiu $sp, $sp, 0xf10
|
||||
|
|
|
|||
Loading…
Reference in New Issue