2 * balo_supp.S: BAget Loader supplement
4 * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
8 #include <asm/regdef.h>
9 #include <asm/stackframe.h>
10 #include <asm/mipsregs.h>
11 #include <asm/addrspace.h>
16 /* General exception vector. */
17 NESTED(except_vec3_generic, 0, sp)
19 la k0, except_vec3_generic_code
21 END(except_vec3_generic)
23 NESTED(except_vec3_generic_code, 0, sp)
44 END(except_vec3_generic_code)
47 NESTED(flush_cache_low, PT_SIZE, sp)
55 mfc0 t3, CP0_STATUS # Save the status register.
56 mtc0 zero, CP0_STATUS # Disable interrupts.
58 or v0, KSEG1 # Run uncached.
62 * Flush the instruction cache.
65 li v0, ST0_DE | ST0_CE
66 mtc0 v0, CP0_STATUS # Isolate and swap caches.
70 la v0, 1f # Run cached
98 * Flush the data cache.
102 mtc0 v0, CP0_STATUS # Isolate and swap back caches
106 j v0 # Back to cached mode
128 nop # Insure isolated stores
132 mtc0 t3, CP0_STATUS # Restore status reg.
133 nop # Insure cache unisolated.
141 /* To satisfy macros only */