diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-10-11 23:06:47 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-10-11 23:06:47 +0000 |
commit | a6451255438d964985e23d3625516f6c8189bd93 (patch) | |
tree | 9068911c51cfa6638670a763d83cbdbcbc21911f /sys/arch | |
parent | 7af7459b2834d8ea9f90bb04df8f589b8bbce55b (diff) |
flush the cache before jumping into the just loaded kernel.
Now it succesfully gets into the kernel 100%
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/landisk/stand/boot/devs.c | 3 | ||||
-rw-r--r-- | sys/arch/landisk/stand/boot/libsa.h | 3 | ||||
-rw-r--r-- | sys/arch/landisk/stand/boot/srt0.S | 13 |
3 files changed, 16 insertions, 3 deletions
diff --git a/sys/arch/landisk/stand/boot/devs.c b/sys/arch/landisk/stand/boot/devs.c index 919c41e1d15..52a74c07030 100644 --- a/sys/arch/landisk/stand/boot/devs.c +++ b/sys/arch/landisk/stand/boot/devs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: devs.c,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ +/* $OpenBSD: devs.c,v 1.2 2006/10/11 23:06:46 drahn Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -75,6 +75,7 @@ run_loadfile(u_long *marks, int howto) u_long entry; entry = marks[MARK_ENTRY]; + cache_flush(); printf("entry point at 0x%x\n", (int)entry); (*(void (*)(int,int,int))entry)(howto, marks[MARK_END], 0); diff --git a/sys/arch/landisk/stand/boot/libsa.h b/sys/arch/landisk/stand/boot/libsa.h index 5b24d33fd0a..8f961db3ba0 100644 --- a/sys/arch/landisk/stand/boot/libsa.h +++ b/sys/arch/landisk/stand/boot/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ +/* $OpenBSD: libsa.h,v 1.2 2006/10/11 23:06:46 drahn Exp $ */ /* * Copyright (c) 2006 Michael Shalayeff @@ -32,3 +32,4 @@ int blkdevstrategy(void *, int, daddr_t, size_t, void *, size_t *); void scif_init(unsigned int); int scif_getc(void); void scif_putc(int); +void cache_flush(void); diff --git a/sys/arch/landisk/stand/boot/srt0.S b/sys/arch/landisk/stand/boot/srt0.S index 3e46a2a2e33..a1b8d2166c6 100644 --- a/sys/arch/landisk/stand/boot/srt0.S +++ b/sys/arch/landisk/stand/boot/srt0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: srt0.S,v 1.1 2006/10/06 21:48:50 mickey Exp $ */ +/* $OpenBSD: srt0.S,v 1.2 2006/10/11 23:06:46 drahn Exp $ */ /* $NetBSD: boot.S,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -129,6 +129,17 @@ ENTRY(readsects) rts nop +/* + * void cache_flush(void); + */ +ENTRY(cache_flush) + /* flush cache */ + mov #0, r4 + mov #6, r0 + trapa #0x3f + rts + nop + .align 2 .L.boot_magic1: .long 0x20031125 |