static void api_up1000_cons_init() { struct ctb *ctb; struct irongate_config *icp; extern struct irongate_config irongate_configuration; icp = &irongate_configuration; irongate_init(icp, 0); ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case CTB_PRINTERPORT: /* serial console ... */ /* XXX */ { /* * Delay to allow PROM putchars to complete. * FIFO depth * character time, * character time = (1000000 / (defaultrate / 10)) */ DELAY(160000000 / comcnrate); if (comcnattach(&icp->ic_iot, 0x3f8, comcnrate, COM_FREQ, (TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8)) panic("can't init serial console"); break; } case CTB_GRAPHICS: #if NPCKBD > 0 /* display console ... */ /* XXX */ (void) pckbc_cnattach(&icp->ic_iot, IO_KBD, KBCMDP, 0); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) isa_display_console(&icp->ic_iot, &icp->ic_memt); else pci_display_console(&icp->ic_iot, &icp->ic_memt, &icp->ic_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot), CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 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 %ld", ctb->ctb_term_type); } }
void irongate_attach(struct device *parent, struct device *self, void *aux) { struct irongate_softc *sc = (void *) self; struct irongate_config *icp; struct pcibus_attach_args pba; /* Note that we've attached the chipset; can't have 2 Irongates. */ irongate_found = 1; /* * Set up the chipset's info; done once at console init time * (maybe), but we must do it here as well to take care of things * that need to use memory allocation. */ icp = sc->sc_icp = &irongate_configuration; irongate_init(icp, 1); printf(": AMD 751 Core Logic + AGP Chipset, rev. %d\n", icp->ic_rev); irongate_dma_init(icp); /* * Do PCI memory initialization that needs to be deferred until * malloc is safe. */ irongate_bus_mem_init2(icp->ic_memt, icp); switch (cputype) { #ifdef API_UP1000 case ST_API_NAUTILUS: pci_up1000_pickintr(icp); break; #endif default: panic("irongate_attach: shouldn't be here, really..."); } pba.pba_busname = "pci"; pba.pba_iot = icp->ic_iot; pba.pba_memt = icp->ic_memt; pba.pba_dmat = alphabus_dma_get_tag(&icp->ic_dmat_pci, ALPHA_BUS_PCI); pba.pba_pc = &icp->ic_pc; pba.pba_bus = 0; #ifdef notyet pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED | PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY; #endif (void) config_found(self, &pba, irongate_print); }
static void api_up1000_cons_init() { struct ctb *ctb; irongate_init(); #ifdef DDB siogdbattach(0x2f8, 57600); #endif 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); comconsole = 0; if (siocnattach(0x3f8, comcnrate)) panic("can't init serial console"); boothowto |= RB_SERIAL; break; } case 3: /* display console ... */ /* XXX */ #ifdef DEV_SC sccnattach(); #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 %ld\n", ctb->ctb_term_type); } }