예제 #1
0
int
legsscnprobe()
{
    extern vaddr_t virtual_avail;
    int depth;

    if (vax_boardtype != VAX_BTYP_60)
        return 0;	/* move along, nothing there */

    /* no working graphics hardware, or forced serial console? */
    if ((vax_confdata & 0x60) == 0)
        return 0;

    /*
     * Check for a recognized color depth.
     */

    ioaccess(virtual_avail, LEGSS_BASE + LEGSS_VRAM_OFFSET, 1);
    depth = legss_probe_depth(virtual_avail);
    iounaccess(virtual_avail, 1);

    if (depth == 0)
        return 0;	/* unsupported, default to serial */

    return 1;
}
예제 #2
0
ka820_init()
{
	register int csr;

	/* map in the various devices */
	*(int *)&Ka820map[0] = PG_V|PG_KW|btop(KA820_PORTADDR);
	*(int *)&RX50map[0] = PG_V|PG_KW|btop(KA820_RX50ADDR);
	*(int *)&Clockmap[0] = PG_V|PG_KW|btop(KA820_CLOCKADDR);
#ifdef notyet
	ioaccess(bootram, BRAMmap, KA820_BRPAGES * NBPG);
	ioaccess(eeprom, EEPROMmap, KA820_EEPAGES * NBPG);
#else
	mtpr(TBIA, 0);
#endif

	/* reset the console and enable the RX50 */
	csr = ka820port.csr;
	csr &= ~KA820PORT_RSTHALT;	/* ??? */
	csr |= KA820PORT_CONSCLR | KA820PORT_CRDCLR | KA820PORT_CONSEN |
		KA820PORT_RXIE;
	ka820port.csr = csr;
}
예제 #3
0
/*
 * Called very early to setup the glass tty as console.
 * Because it's called before the VM system is initialized, virtual memory
 * for the framebuffer can be stolen directly without disturbing anything.
 */
int
legsscninit()
{
    struct legss_screen *ss = &legss_consscr;
    extern vaddr_t virtual_avail;
    vaddr_t ova;
    long defattr;
    struct rasops_info *ri;

    ova = virtual_avail;

    ioaccess(virtual_avail, LEGSS_BASE + LEGSS_VRAM_OFFSET, 1);
    ss->ss_depth = legss_probe_depth(virtual_avail);
    iounaccess(virtual_avail, 1);
    if (ss->ss_depth == 0)
        return 1;

    ioaccess(virtual_avail, LEGSS_BASE + LEGSS_VRAM_OFFSET,
             (LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY) / VAX_NBPG);
    ss->ss_vram = virtual_avail;
    virtual_avail += (LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY);
    virtual_avail = round_page(virtual_avail);

    /* this had better not fail */
    if (legss_setup_screen(ss) != 0) {
        iounaccess(ss->ss_vram,
                   (LEGSS_VISHEIGHT * LEGSS_WIDTH * 32 / NBBY) / VAX_NBPG);
        virtual_avail = ova;
        return 1;
    }

    ri = &ss->ss_ri;
    ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr);
    wsdisplay_cnattach(&legss_stdscreen, ri, 0, 0, defattr);

    return 0;
}