Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/stand Bug fix for the bug fix. Be sure to pro...
details: https://anonhg.NetBSD.org/src/rev/e5831bfab6d0
branches: trunk
changeset: 467695:e5831bfab6d0
user: ross <ross%NetBSD.org@localhost>
date: Sat Mar 27 09:01:27 1999 +0000
description:
Bug fix for the bug fix. Be sure to prom_close() in bootxx and boot, but not
in netboot, and not in diskclose(), but after trying all kernelnames[].
diffstat:
sys/arch/alpha/stand/boot/disk.c | 10 ++++++++--
sys/arch/alpha/stand/bootxx/bootxx.c | 3 ++-
sys/arch/alpha/stand/common/boot.c | 3 ++-
sys/arch/alpha/stand/common/common.h | 3 ++-
sys/arch/alpha/stand/netboot/if_prom.c | 9 ++++++++-
5 files changed, 22 insertions(+), 6 deletions(-)
diffs (93 lines):
diff -r 3c9fdeae866c -r e5831bfab6d0 sys/arch/alpha/stand/boot/disk.c
--- a/sys/arch/alpha/stand/boot/disk.c Sat Mar 27 08:15:29 1999 +0000
+++ b/sys/arch/alpha/stand/boot/disk.c Sat Mar 27 09:01:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disk.c,v 1.10 1999/03/26 20:53:12 ross Exp $ */
+/* $NetBSD: disk.c,v 1.11 1999/03/27 09:01:27 ross Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -156,9 +156,15 @@
struct disk_softc *sc;
sc = f->f_devdata;
- (void)prom_close(sc->sc_fd);
free(sc, sizeof(struct disk_softc));
f->f_devdata = NULL;
return (0);
}
+
+void
+close_primary_device(fd)
+ int fd;
+{
+ prom_close(fd);
+}
diff -r 3c9fdeae866c -r e5831bfab6d0 sys/arch/alpha/stand/bootxx/bootxx.c
--- a/sys/arch/alpha/stand/bootxx/bootxx.c Sat Mar 27 08:15:29 1999 +0000
+++ b/sys/arch/alpha/stand/bootxx/bootxx.c Sat Mar 27 09:01:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootxx.c,v 1.6 1998/10/15 00:55:48 ross Exp $ */
+/* $NetBSD: bootxx.c,v 1.7 1999/03/27 09:01:27 ross Exp $ */
/*
* Copyright (C) 1998 by Ross Harvey
@@ -201,5 +201,6 @@
puts("Jumping to entry point...\n");
entry = (void (*)(int))loadaddr;
(*entry)(fd);
+ prom_close(fd);
puts("SECONDARY BOOT RETURNED!\n");
}
diff -r 3c9fdeae866c -r e5831bfab6d0 sys/arch/alpha/stand/common/boot.c
--- a/sys/arch/alpha/stand/common/boot.c Sat Mar 27 08:15:29 1999 +0000
+++ b/sys/arch/alpha/stand/common/boot.c Sat Mar 27 09:01:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.11 1998/10/15 01:00:07 ross Exp $ */
+/* $NetBSD: boot.c,v 1.12 1999/03/27 09:01:28 ross Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -121,6 +121,7 @@
namep++)
win = (loadfile(name = *namep, &entry) == 0);
+ close_primary_device(fd);
printf("\n");
if (win) {
/*
diff -r 3c9fdeae866c -r e5831bfab6d0 sys/arch/alpha/stand/common/common.h
--- a/sys/arch/alpha/stand/common/common.h Sat Mar 27 08:15:29 1999 +0000
+++ b/sys/arch/alpha/stand/common/common.h Sat Mar 27 09:01:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.3 1998/10/15 01:00:56 ross Exp $ */
+/* $NetBSD: common.h,v 1.4 1999/03/27 09:01:28 ross Exp $ */
void init_prom_calls __P((void));
void OSFpal __P((void));
@@ -6,3 +6,4 @@
u_int64_t prom_dispatch __P((int, ...));
int cpu_number __P((void));
void switch_palcode __P((void));
+void close_primary_device __P((int));
diff -r 3c9fdeae866c -r e5831bfab6d0 sys/arch/alpha/stand/netboot/if_prom.c
--- a/sys/arch/alpha/stand/netboot/if_prom.c Sat Mar 27 08:15:29 1999 +0000
+++ b/sys/arch/alpha/stand/netboot/if_prom.c Sat Mar 27 09:01:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_prom.c,v 1.10 1997/09/06 14:08:33 drochner Exp $ */
+/* $NetBSD: if_prom.c,v 1.11 1999/03/27 09:01:28 ross Exp $ */
/*
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
@@ -257,3 +257,10 @@
prom_close(netfd);
}
+
+void
+close_primary_device(fd)
+ int fd;
+{
+ /* do nothing, there is no primary boot stage for us */
+}
Home |
Main Index |
Thread Index |
Old Index