From e77859a6124a4694eac5876a8b6a2fb5a0120890 Mon Sep 17 00:00:00 2001 From: mjacob Date: Fri, 17 Apr 1998 02:45:19 +0000 Subject: [PATCH] Hmmm... handle the case where there is no keyboard configured (panic if the console selection is asking for it). Also add the stuff that was missing from dec_kn300. --- sys/arch/alpha/alpha/dec_2100_a50.c | 10 ++++++++-- sys/arch/alpha/alpha/dec_axppci_33.c | 10 ++++++++-- sys/arch/alpha/alpha/dec_eb164.c | 10 ++++++++-- sys/arch/alpha/alpha/dec_eb64plus.c | 10 ++++++++-- sys/arch/alpha/alpha/dec_kn20aa.c | 10 ++++++++-- sys/arch/alpha/alpha/dec_kn300.c | 14 ++++++++++++-- 6 files changed, 52 insertions(+), 12 deletions(-) diff --git a/sys/arch/alpha/alpha/dec_2100_a50.c b/sys/arch/alpha/alpha/dec_2100_a50.c index f17d5d1af47b..e50cdcbf5835 100644 --- a/sys/arch/alpha/alpha/dec_2100_a50.c +++ b/sys/arch/alpha/alpha/dec_2100_a50.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_2100_a50.c,v 1.38 1998/04/15 21:06:46 drochner Exp $ */ +/* $NetBSD: dec_2100_a50.c,v 1.39 1998/04/17 02:45:19 mjacob Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.38 1998/04/15 21:06:46 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.39 1998/04/17 02:45:19 mjacob Exp $"); #include #include @@ -59,6 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.38 1998/04/15 21:06:46 drochner E #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -134,6 +136,7 @@ dec_2100_a50_cons_init() } case 3: +#if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&acp->ac_iot, PCKBC_KBD_SLOT); @@ -144,6 +147,9 @@ dec_2100_a50_cons_init() pci_display_console(&acp->ac_iot, &acp->ac_memt, &acp->ac_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard console"); +#endif break; default: diff --git a/sys/arch/alpha/alpha/dec_axppci_33.c b/sys/arch/alpha/alpha/dec_axppci_33.c index c907134d96d0..3d8804370f23 100644 --- a/sys/arch/alpha/alpha/dec_axppci_33.c +++ b/sys/arch/alpha/alpha/dec_axppci_33.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_axppci_33.c,v 1.36 1998/04/15 21:06:46 drochner Exp $ */ +/* $NetBSD: dec_axppci_33.c,v 1.37 1998/04/17 02:45:19 mjacob Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.36 1998/04/15 21:06:46 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.37 1998/04/17 02:45:19 mjacob Exp $"); #include #include @@ -59,6 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.36 1998/04/15 21:06:46 drochner #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -125,6 +127,7 @@ dec_axppci_33_cons_init() } case 3: +#if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&lcp->lc_iot, PCKBC_KBD_SLOT); @@ -135,6 +138,9 @@ dec_axppci_33_cons_init() pci_display_console(&lcp->lc_iot, &lcp->lc_memt, &lcp->lc_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard console"); +#endif break; default: diff --git a/sys/arch/alpha/alpha/dec_eb164.c b/sys/arch/alpha/alpha/dec_eb164.c index 23f8ee76714f..bdd0747e024f 100644 --- a/sys/arch/alpha/alpha/dec_eb164.c +++ b/sys/arch/alpha/alpha/dec_eb164.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_eb164.c,v 1.25 1998/04/15 21:06:46 drochner Exp $ */ +/* $NetBSD: dec_eb164.c,v 1.26 1998/04/17 02:45:19 mjacob Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.25 1998/04/15 21:06:46 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.26 1998/04/17 02:45:19 mjacob Exp $"); #include #include @@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.25 1998/04/15 21:06:46 drochner Exp #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -118,6 +120,7 @@ dec_eb164_cons_init() } case 3: +#if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT); @@ -128,6 +131,9 @@ dec_eb164_cons_init() pci_display_console(&ccp->cc_iot, &ccp->cc_memt, &ccp->cc_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard console"); +#endif break; default: diff --git a/sys/arch/alpha/alpha/dec_eb64plus.c b/sys/arch/alpha/alpha/dec_eb64plus.c index 6e3ee708ac70..a099647af1bb 100644 --- a/sys/arch/alpha/alpha/dec_eb64plus.c +++ b/sys/arch/alpha/alpha/dec_eb64plus.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_eb64plus.c,v 1.13 1998/04/15 21:06:47 drochner Exp $ */ +/* $NetBSD: dec_eb64plus.c,v 1.14 1998/04/17 02:45:19 mjacob Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.13 1998/04/15 21:06:47 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.14 1998/04/17 02:45:19 mjacob Exp $"); #include #include @@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.13 1998/04/15 21:06:47 drochner E #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -126,6 +128,7 @@ dec_eb64plus_cons_init() } case 3: +#if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&acp->ac_iot, PCKBC_KBD_SLOT); @@ -136,6 +139,9 @@ dec_eb64plus_cons_init() pci_display_console(&acp->ac_iot, &acp->ac_memt, &acp->ac_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard console"); +#endif break; default: diff --git a/sys/arch/alpha/alpha/dec_kn20aa.c b/sys/arch/alpha/alpha/dec_kn20aa.c index 6b61d9eaddeb..2c67eb43dda3 100644 --- a/sys/arch/alpha/alpha/dec_kn20aa.c +++ b/sys/arch/alpha/alpha/dec_kn20aa.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_kn20aa.c,v 1.37 1998/04/15 21:06:47 drochner Exp $ */ +/* $NetBSD: dec_kn20aa.c,v 1.38 1998/04/17 02:45:19 mjacob Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.37 1998/04/15 21:06:47 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.38 1998/04/17 02:45:19 mjacob Exp $"); #include #include @@ -60,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.37 1998/04/15 21:06:47 drochner Exp #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -126,6 +128,7 @@ dec_kn20aa_cons_init() } case 3: +#if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT); @@ -136,6 +139,9 @@ dec_kn20aa_cons_init() pci_display_console(&ccp->cc_iot, &ccp->cc_memt, &ccp->cc_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard console"); +#endif break; default: diff --git a/sys/arch/alpha/alpha/dec_kn300.c b/sys/arch/alpha/alpha/dec_kn300.c index 97cefbd17a7a..0adea7b47d64 100644 --- a/sys/arch/alpha/alpha/dec_kn300.c +++ b/sys/arch/alpha/alpha/dec_kn300.c @@ -1,4 +1,4 @@ -/* $NetBSD: dec_kn300.c,v 1.2 1998/04/15 21:29:03 mjacob Exp $ */ +/* $NetBSD: dec_kn300.c,v 1.3 1998/04/17 02:45:20 mjacob Exp $ */ /* * Copyright (c) 1998 by Matthew Jacob @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.2 1998/04/15 21:29:03 mjacob Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.3 1998/04/17 02:45:20 mjacob Exp $"); #include #include @@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.2 1998/04/15 21:29:03 mjacob Exp $") #include #include +#include #include #include @@ -59,6 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn300.c,v 1.2 1998/04/15 21:29:03 mjacob Exp $") #include #include +#include "pckbd.h" + #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED #endif @@ -135,8 +138,11 @@ dec_kn300_cons_init() * *second* mcpcia. */ if (mcp && mcp->mcpcia_next) { +#if NPCKBD > 0 ccp = &mcp->mcpcia_next->mcpcia_cc; + (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT); + if ((ctb->ctb_turboslot & 0xffff) == 0) isa_display_console(&ccp->cc_iot, &ccp->cc_memt); @@ -145,6 +151,10 @@ dec_kn300_cons_init() &ccp->cc_pc, (ctb->ctb_turboslot >> 8) & 0xff, ctb->ctb_turboslot & 0xff, 0); +#else + panic("not configured to use display && keyboard " + "console"); +#endif } else { printf("CANNOT DETERMINE CONSOLE'S PCI BUS\n"); }