First steps at supporting EB164 (AlphaPC 164, 164LX, 164SX).

This commit is contained in:
Doug Rabson 1998-07-05 12:10:10 +00:00
parent 5aade7d9d3
commit b3cfa43c24
2 changed files with 135 additions and 3 deletions

View File

@ -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

126
sys/alpha/alpha/dec_eb164.c Normal file
View File

@ -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
}