Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Add the support to boot an ide slave dr...
details: https://anonhg.NetBSD.org/src/rev/6e220a0c1a1d
branches: trunk
changeset: 481783:6e220a0c1a1d
user: veego <veego%NetBSD.org@localhost>
date: Sat Feb 05 22:14:42 2000 +0000
description:
Add the support to boot an ide slave drive and to boot from the secondary
ide channel.
Michael Hitch gave me the final hint how to do that and Havard Eidnes
tested it with his slave drive.
This will also fix pr#8808 on the DS10 when I commit the changes to
dec_6600.c.
diffstat:
sys/arch/alpha/alpha/dec_eb164.c | 55 ++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 27 deletions(-)
diffs (137 lines):
diff -r 5174d60e77b2 -r 6e220a0c1a1d sys/arch/alpha/alpha/dec_eb164.c
--- a/sys/arch/alpha/alpha/dec_eb164.c Sat Feb 05 22:14:20 2000 +0000
+++ b/sys/arch/alpha/alpha/dec_eb164.c Sat Feb 05 22:14:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_eb164.c,v 1.31 1999/12/03 22:48:22 thorpej Exp $ */
+/* $NetBSD: dec_eb164.c,v 1.32 2000/02/05 22:14:42 veego Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.31 1999/12/03 22:48:22 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.32 2000/02/05 22:14:42 veego Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,6 +60,7 @@
#include <dev/scsipi/scsi_all.h>
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
+#include <dev/ata/atavar.h>
#include "pckbd.h"
@@ -68,6 +69,8 @@
#endif
static int comcnrate = CONSPEED;
+#define DR_VERBOSE(f) while (0)
+
void dec_eb164_init __P((void));
static void dec_eb164_cons_init __P((void));
static void dec_eb164_device_register __P((struct device *, void *));
@@ -171,11 +174,9 @@
* older SRM firmware use the protocol identifier SCSI.
*/
ideboot = (strcmp(b->protocol, "IDE") == 0);
-#if 0
- printf("scsiboot = %d, ideboot = %d, netboot = %d\n", scsiboot,
- ideboot, netboot);
-#endif
- initted =1;
+ DR_VERBOSE(printf("scsiboot = %d, ideboot = %d, netboot = %d\n",
+ scsiboot, ideboot, netboot));
+ initted = 1;
}
if (pcidev == NULL) {
@@ -188,14 +189,13 @@
return;
pcidev = dev;
-#if 0
- printf("\npcidev = %s\n", pcidev->dv_xname);
-#endif
+ DR_VERBOSE(printf("\npcidev = %s\n",
+ pcidev->dv_xname));
return;
}
}
- if ( (ideboot || scsiboot) && (scsipidev == NULL) ) {
+ if ((ideboot || scsiboot) && (scsipidev == NULL)) {
if (parent != pcidev)
return;
else {
@@ -207,9 +207,8 @@
return;
scsipidev = dev;
-#if 0
- printf("\nscsipidev = %s\n", scsipidev->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nscsipidev = %s\n",
+ scsipidev->dv_xname));
return;
}
}
@@ -244,31 +243,34 @@
/* we've found it! */
booted_device = dev;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nbooted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
}
/*
* Support to boot from IDE drives.
- * Should work with all SRM firmware versions, but is at the
- * moment limited to hard disks. (No support for booting from an
- * IDE cdrom).
*/
- if ( (ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
+ if ((ideboot || scsiboot) && !strcmp(cd->cd_name, "wd")) {
+ struct ata_atapi_attach *aa_link = aux;
if ((strncmp("pciide", parent->dv_xname, 6) != 0)) {
return;
} else {
if (parent != scsipidev)
return;
}
+ DR_VERBOSE(printf("\nAtapi info: drive: %d, channel %d\n",
+ aa_link->aa_drv_data->drive, aa_link->aa_channel));
+ DR_VERBOSE(printf("Bootdev info: unit: %d, channel: %d\n",
+ b->unit, b->channel));
+ if (b->unit != aa_link->aa_drv_data->drive ||
+ b->channel != aa_link->aa_channel)
+ return;
/* we've found it! */
booted_device = dev;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("booted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
}
@@ -284,9 +286,8 @@
/* XXX function? */
booted_device = dev;
-#if 0
- printf("\nbooted_device = %s\n", booted_device->dv_xname);
-#endif
+ DR_VERBOSE(printf("\nbooted_device = %s\n",
+ booted_device->dv_xname));
found = 1;
return;
}
Home |
Main Index |
Thread Index |
Old Index