summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-07-05 12:10:10 +0000
committerdfr <dfr@FreeBSD.org>1998-07-05 12:10:10 +0000
commitfe6b4cc2d313a1bd76c7d1d8daf89bc7ced6812b (patch)
tree4118e983696d19070180e0d448730ac3aec2d9d3 /sys
parent4853eea2010bf5d7fe2bd8d765a78ff0eae34b51 (diff)
downloadFreeBSD-src-fe6b4cc2d313a1bd76c7d1d8daf89bc7ced6812b.zip
FreeBSD-src-fe6b4cc2d313a1bd76c7d1d8daf89bc7ced6812b.tar.gz
First steps at supporting EB164 (AlphaPC 164, 164LX, 164SX).
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/autoconf.c12
-rw-r--r--sys/alpha/alpha/dec_eb164.c126
2 files changed, 135 insertions, 3 deletions
diff --git a/sys/alpha/alpha/autoconf.c b/sys/alpha/alpha/autoconf.c
index cf4f581..c9fa13e 100644
--- a/sys/alpha/alpha/autoconf.c
+++ b/sys/alpha/alpha/autoconf.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: autoconf.c,v 1.1 1998/06/10 10:52:10 dfr Exp $
+ * $Id: autoconf.c,v 1.2 1998/06/14 13:44:37 dfr Exp $
*/
#include <sys/param.h>
@@ -80,6 +80,12 @@ configure(void *dummy)
configure_start();
device_add_child(root_bus, platform.iobus, 0, 0);
+
+ /* XXX hack until I implement ISA */
+ if (!strcmp(platform.iobus, "cia"))
+ device_add_child(root_bus, "mcclock", 0, 0);
+ /* XXX end hack */
+
root_bus_configure();
pci_configure();
@@ -101,8 +107,8 @@ void
cpu_rootconf()
{
mountrootfsname = "ufs";
- rootdevs[0] = makedev(4, dkmakeminor(0, COMPATIBILITY_SLICE, 0));
- rootdevnames[0] = "sd0c";
+ rootdevs[0] = makedev(4, dkmakeminor(1, COMPATIBILITY_SLICE, 0));
+ rootdevnames[0] = "sd1a";
}
void
diff --git a/sys/alpha/alpha/dec_eb164.c b/sys/alpha/alpha/dec_eb164.c
new file mode 100644
index 0000000..67a9eab
--- /dev/null
+++ b/sys/alpha/alpha/dec_eb164.c
@@ -0,0 +1,126 @@
+/* $Id$ */
+/* $NetBSD: dec_eb164.c,v 1.26 1998/04/17 02:45:19 mjacob Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/device.h>
+#include <sys/termios.h>
+
+#include <machine/rpb.h>
+#include <machine/cpuconf.h>
+
+#ifndef CONSPEED
+#define CONSPEED TTYDEF_SPEED
+#endif
+static int comcnrate = CONSPEED;
+
+void dec_eb164_init __P((void));
+static void dec_eb164_cons_init __P((void));
+
+void
+dec_eb164_init()
+{
+ platform.family = "EB164";
+
+ if ((platform.model = alpha_dsr_sysname()) == NULL) {
+ /* XXX Don't know the system variations, yet. */
+ platform.model = alpha_unknown_sysname();
+ }
+
+ platform.iobus = "cia";
+ platform.cons_init = dec_eb164_cons_init;
+}
+
+static void
+dec_eb164_cons_init()
+{
+ cia_init();
+#ifdef DDB
+ siocnattach(0x3f8, 57600);
+#endif
+#if 0
+ struct ctb *ctb;
+ struct cia_config *ccp;
+ extern struct cia_config cia_configuration;
+
+ ccp = &cia_configuration;
+ cia_init(ccp, 0);
+
+ ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off);
+
+ switch (ctb->ctb_term_type) {
+ case 2:
+ /* serial console ... */
+ /* XXX */
+ {
+ /*
+ * Delay to allow PROM putchars to complete.
+ * FIFO depth * character time,
+ * character time = (1000000 / (defaultrate / 10))
+ */
+ DELAY(160000000 / comcnrate);
+
+ if(comcnattach(&ccp->cc_iot, 0x3f8, comcnrate,
+ COM_FREQ,
+ (TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8))
+ panic("can't init serial console");
+
+ break;
+ }
+
+ case 3:
+#if NPCKBD > 0
+ /* display console ... */
+ /* XXX */
+ (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT);
+
+ if ((ctb->ctb_turboslot & 0xffff) == 0)
+ isa_display_console(&ccp->cc_iot, &ccp->cc_memt);
+ else
+ 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:
+ printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type);
+ printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot);
+
+ panic("consinit: unknown console type %d\n",
+ ctb->ctb_term_type);
+ }
+#endif
+}
OpenPOWER on IntegriCloud