2 * balo_supp.S: BAget Loader supplement
4 * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
7 #include <asm/regdef.h>
8 #include <asm/stackframe.h>
9 #include <asm/mipsregs.h>
10 #include <asm/addrspace.h>
15 /* General exception vector. */
16 NESTED(except_vec3_generic, 0, sp)
18 la k0, except_vec3_generic_code
20 END(except_vec3_generic)
22 NESTED(except_vec3_generic_code, 0, sp)
43 END(except_vec3_generic_code)
46 NESTED(flush_cache_low, PT_SIZE, sp)
54 mfc0 t3, CP0_STATUS # Save the status register.
55 mtc0 zero, CP0_STATUS # Disable interrupts.
57 or v0, KSEG1 # Run uncached.
61 * Flush the instruction cache.
64 li v0, ST0_DE | ST0_CE
65 mtc0 v0, CP0_STATUS # Isolate and swap caches.
69 la v0, 1f # Run cached
97 * Flush the data cache.
101 mtc0 v0, CP0_STATUS # Isolate and swap back caches
105 j v0 # Back to cached mode
127 nop # Insure isolated stores
131 mtc0 t3, CP0_STATUS # Restore status reg.
132 nop # Insure cache unisolated.
140 /* To satisfy macros only */