diff options
author | 2006-10-11 23:06:46 +0000 | |
---|---|---|
committer | 2006-10-11 23:06:46 +0000 | |
commit | 05b97bec246bf814b481a0d1c5ef9660c2e6fe19 (patch) | |
tree | 9e31bb2ccb1bd5d91ece993c05a2ed441f2d0e22 | |
parent | Remove unused variable and simplify m_copym0(). Diff from bret.lambert at gmail.com. (diff) | |
download | wireguard-openbsd-05b97bec246bf814b481a0d1c5ef9660c2e6fe19.tar.xz wireguard-openbsd-05b97bec246bf814b481a0d1c5ef9660c2e6fe19.zip |
flush the cache before jumping into the just loaded kernel.
Now it succesfully gets into the kernel 100%
-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 |