Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/boot/boot Fix booting from BI-based disks.
details: https://anonhg.NetBSD.org/src/rev/bb1583ea694c
branches: trunk
changeset: 487684:bb1583ea694c
user: ragge <ragge%NetBSD.org@localhost>
date: Sun Jun 11 10:39:26 2000 +0000
description:
Fix booting from BI-based disks.
diffstat:
sys/arch/vax/boot/boot/devopen.c | 10 +++++++---
sys/arch/vax/boot/boot/ra.c | 14 ++++++++++++--
2 files changed, 19 insertions(+), 5 deletions(-)
diffs (73 lines):
diff -r 04b22a2b876c -r bb1583ea694c sys/arch/vax/boot/boot/devopen.c
--- a/sys/arch/vax/boot/boot/devopen.c Sun Jun 11 10:08:03 2000 +0000
+++ b/sys/arch/vax/boot/boot/devopen.c Sun Jun 11 10:39:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: devopen.c,v 1.4 2000/05/21 09:45:34 ragge Exp $ */
+/* $NetBSD: devopen.c,v 1.5 2000/06/11 10:39:26 ragge Exp $ */
/*
* Copyright (c) 1997 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -69,6 +69,9 @@
unit = bootrpb.unit;
adapt = ctlr = -1;
+ if (dev == BDEV_KDB)
+ dev = BDEV_UDA; /* use the same driver */
+
for (i = 0, dp = 0; i < ndevs; i++)
if (cnvtab[i] == dev)
dp = devsw + i;
@@ -145,12 +148,13 @@
case VAX_8800:
case VAX_TYP_8PS:
csrbase = 0; /* _may_ be a KDB */
+ nexaddr = bootrpb.csrphy;
if (ctlr < 0)
break;
if (adapt < 0)
- nexaddr = (bootrpb.adpphy & 0xff000000) + BI_NODE(ctlr);
+ nexaddr = (nexaddr & 0xff000000) + BI_NODE(ctlr);
else
- nexaddr = BI_BASE(ctlr, adapt);
+ nexaddr = BI_BASE(adapt, ctlr);
break;
#ifdef notyet
case VAX_6200:
diff -r 04b22a2b876c -r bb1583ea694c sys/arch/vax/boot/boot/ra.c
--- a/sys/arch/vax/boot/boot/ra.c Sun Jun 11 10:08:03 2000 +0000
+++ b/sys/arch/vax/boot/boot/ra.c Sun Jun 11 10:39:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ra.c,v 1.6 2000/05/21 09:45:54 ragge Exp $ */
+/* $NetBSD: ra.c,v 1.7 2000/06/11 10:39:26 ragge Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -85,6 +85,7 @@
#ifdef DEV_DEBUG
printf("raopen: adapter %d ctlr %d unit %d part %d\n",
adapt, ctlr, unit, part);
+ printf("raopen: csrbase %x nexaddr %x\n", csrbase, nexaddr);
#endif
bzero(&ralabel, sizeof(struct disklabel));
bzero((void *)&uda, sizeof(struct uda));
@@ -118,10 +119,19 @@
*ra_ip = 0; /* Start init */
bootrpb.csrphy = csrbase;
} else {
- paddr_t kdaddr = (paddr_t)nexaddr;
+ paddr_t kdaddr;
volatile int *w;
volatile int i = 10000;
+ if (askname == 0) {
+ nexaddr = bootrpb.csrphy;
+ dunit = bootrpb.unit;
+ } else {
+ nexaddr = (bootrpb.csrphy & ~(NODESIZE - 1)) + KDB_IP;
+ bootrpb.csrphy = nexaddr;
+ }
+
+ kdaddr = nexaddr & ~(NODESIZE - 1);
ra_ip = (short *)(kdaddr + KDB_IP);
ra_sa = (short *)(kdaddr + KDB_SA);
ra_sw = (short *)(kdaddr + KDB_SW);
Home |
Main Index |
Thread Index |
Old Index