diff --git a/sys/arch/playstation2/playstation2/kloader.c b/sys/arch/playstation2/playstation2/kloader.c index 5d7f457161a9..90ef01b7da0e 100644 --- a/sys/arch/playstation2/playstation2/kloader.c +++ b/sys/arch/playstation2/playstation2/kloader.c @@ -1,4 +1,4 @@ -/* $NetBSD: kloader.c,v 1.1 2001/10/16 15:38:55 uch Exp $ */ +/* $NetBSD: kloader.c,v 1.2 2001/11/23 16:09:11 uch Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ #include +#include #include #ifdef DEBUG @@ -90,7 +91,6 @@ STATIC struct { int setuped; } kloader; -extern void r5900_FlushCache(void); extern paddr_t avail_start, avail_end; extern char kloader_boot_start[], kloader_boot_end[]; @@ -120,7 +120,6 @@ kloader_reboot_setup(const char *filename) if (kloader_load() != 0) goto end; - r5900_FlushCache(); kloader.setuped = 1; #ifdef KLOADER_DEBUG kloader_dump(kloader.entry, kloader.tagstart); @@ -136,7 +135,7 @@ kloader_reboot() if (!kloader.setuped) return; - r5900_FlushCache(); + mips_icache_sync_all(); (*kloader.loader)(kloader.entry, kloader.tagstart); /* NOTREACHED */ } diff --git a/sys/arch/playstation2/playstation2/locore_machdep.S b/sys/arch/playstation2/playstation2/locore_machdep.S index 40ce54cb44c6..ebef70693ea3 100644 --- a/sys/arch/playstation2/playstation2/locore_machdep.S +++ b/sys/arch/playstation2/playstation2/locore_machdep.S @@ -1,4 +1,4 @@ -/* $NetBSD: locore_machdep.S,v 1.2 2001/11/14 18:15:33 thorpej Exp $ */ +/* $NetBSD: locore_machdep.S,v 1.3 2001/11/23 16:09:11 uch Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,10 +32,11 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ - -#include "opt_builtin_kernel_loader.h" + +#include "opt_kloader_kernel_path.h" #include +#include #include #define D_STAT_REG 0xb000e010 @@ -120,7 +121,7 @@ NESTED_NOPROFILE(spllowersofthigh, CALLFRAME_SIZ, ra) addu sp, sp, CALLFRAME_SIZ END(spllowersofthigh) -#ifdef BUILTIN_KERNEL_LOADER +#ifdef KLOADER_KERNEL_PATH /* * kloader_boot(vaddr_t entry_addr, struct kloader_page_tag *p) * must be PIC. @@ -155,8 +156,8 @@ LEAF_NOPROFILE(kloader_boot) /* * 2. Cache flush */ - li t1, R5900_C_SIZE_I - li t2, R5900_C_SIZE_D + li t1, CACHE_R5900_SIZE_I + li t2, CACHE_R5900_SIZE_D /* * Flush the data cache. @@ -168,17 +169,17 @@ LEAF_NOPROFILE(kloader_boot) sync.p 1: # line +0 - cache R5900_C_IWBINV_D, 0(t0);sync.l;sync.p # way 0 - cache R5900_C_IWBINV_D, 1(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IWBINV_D, 0(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IWBINV_D, 1(t0);sync.l;sync.p # way 1 # line +1 - cache R5900_C_IWBINV_D, 64(t0);sync.l;sync.p # way 0 - cache R5900_C_IWBINV_D, 65(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IWBINV_D, 64(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IWBINV_D, 65(t0);sync.l;sync.p # way 1 # line +2 - cache R5900_C_IWBINV_D,128(t0);sync.l;sync.p # way 0 - cache R5900_C_IWBINV_D,129(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IWBINV_D,128(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IWBINV_D,129(t0);sync.l;sync.p # way 1 # line +3 - cache R5900_C_IWBINV_D,192(t0);sync.l;sync.p # way 0 - cache R5900_C_IWBINV_D,193(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IWBINV_D,192(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IWBINV_D,193(t0);sync.l;sync.p # way 1 addu t0, t0, 256 bne t0, t1, 1b nop @@ -195,17 +196,17 @@ LEAF_NOPROFILE(kloader_boot) # [12:6] ... line # [0] ... way # line +0 - cache R5900_C_IINV_I, 0(t0);sync.l;sync.p # way 0 - cache R5900_C_IINV_I, 1(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IINV_I, 0(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IINV_I, 1(t0);sync.l;sync.p # way 1 # line +1 - cache R5900_C_IINV_I, 64(t0);sync.l;sync.p # way 0 - cache R5900_C_IINV_I, 65(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IINV_I, 64(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IINV_I, 65(t0);sync.l;sync.p # way 1 # line +2 - cache R5900_C_IINV_I,128(t0);sync.l;sync.p # way 0 - cache R5900_C_IINV_I,129(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IINV_I,128(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IINV_I,129(t0);sync.l;sync.p # way 1 # line +3 - cache R5900_C_IINV_I,192(t0);sync.l;sync.p # way 0 - cache R5900_C_IINV_I,193(t0);sync.l;sync.p # way 1 + cache CACHEOP_R5900_IINV_I,192(t0);sync.l;sync.p # way 0 + cache CACHEOP_R5900_IINV_I,193(t0);sync.l;sync.p # way 1 addu t0, t0, 256 bne t0, t1, 1b nop @@ -219,7 +220,7 @@ LEAF_NOPROFILE(kloader_boot) END(kloader_boot) EXPORT(kloader_boot_end) -#endif /* BUILTIN_KERNEL_LOADER */ +#endif /* KLOADER_KERNEL_PATH */ /* * Unused. but for vmstat(8)