diff options
-rw-r--r-- | sys/arch/vax/vsa/smg.c | 52 | ||||
-rw-r--r-- | sys/dev/wsfont/wsfont.c | 22 |
2 files changed, 37 insertions, 37 deletions
diff --git a/sys/arch/vax/vsa/smg.c b/sys/arch/vax/vsa/smg.c index 418f69cc371..540bb86c632 100644 --- a/sys/arch/vax/vsa/smg.c +++ b/sys/arch/vax/vsa/smg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smg.c,v 1.13 2006/07/29 15:11:57 miod Exp $ */ +/* $OpenBSD: smg.c,v 1.14 2006/08/02 20:10:19 miod Exp $ */ /* $NetBSD: smg.c,v 1.21 2000/03/23 06:46:44 thorpej Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -66,6 +66,7 @@ #include <machine/sid.h> #include <machine/cpu.h> #include <machine/ka420.h> +#include <machine/scb.h> #include <uvm/uvm_extern.h> @@ -168,6 +169,8 @@ smg_match(struct device *parent, void *vcf, void *aux) volatile short *curcmd; volatile short *cfgtst; short tmp, tmp2; + extern struct consdev wsdisplay_cons; + extern int oldvsbus; switch (vax_boardtype) { default: @@ -193,24 +196,33 @@ smg_match(struct device *parent, void *vcf, void *aux) break; } - /* - * Try to find the cursor chip by testing the flip-flop. - * If nonexistent, no glass tty. - */ - curcmd = (short *)va->va_addr; - cfgtst = (short *)vax_map_physmem(VS_CFGTST, 1); - curcmd[0] = PCCCMD_HSHI | PCCCMD_FOPB; - DELAY(300000); - tmp = cfgtst[0]; - curcmd[0] = PCCCMD_TEST | PCCCMD_HSHI; - DELAY(300000); - tmp2 = cfgtst[0]; - vax_unmap_physmem((vaddr_t)cfgtst, 1); - - if (tmp2 != tmp) - return (20); /* Using periodic interrupt */ - else - return (0); + if ((vax_confdata & KA420_CFG_L3CON) == 0 && + cn_tab == &wsdisplay_cons) { + /* when already running as console, always fake things */ + struct vsbus_softc *sc = (void *)parent; + sc->sc_mask = 0x08; + scb_fake(0x44, oldvsbus ? 0x14 : 0x15); + return (20); + } else { + /* + * Try to find the cursor chip by testing the flip-flop. + * If nonexistent, no glass tty. + */ + curcmd = (short *)va->va_addr; + cfgtst = (short *)vax_map_physmem(VS_CFGTST, 1); + curcmd[0] = PCCCMD_HSHI | PCCCMD_FOPB; + DELAY(300000); + tmp = cfgtst[0]; + curcmd[0] = PCCCMD_TEST | PCCCMD_HSHI; + DELAY(300000); + tmp2 = cfgtst[0]; + vax_unmap_physmem((vaddr_t)cfgtst, 1); + + if (tmp2 != tmp) + return (20); /* Using periodic interrupt */ + else + return (0); + } } void @@ -298,7 +310,7 @@ smg_setup_screen(struct smg_screen *ss) * a font with right-to-left bit order on this frame buffer. */ wsfont_init(); - if ((ri->ri_wsfcookie = wsfont_find(NULL, 8, 15, 0)) <= 0) + if ((ri->ri_wsfcookie = wsfont_find(NULL, 8, 0, 0)) <= 0) return (-1); if (wsfont_lock(ri->ri_wsfcookie, &ri->ri_font, WSDISPLAY_FONTORDER_R2L, WSDISPLAY_FONTORDER_L2R) <= 0) diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c index b95db4f4a8f..b57399f9d56 100644 --- a/sys/dev/wsfont/wsfont.c +++ b/sys/dev/wsfont/wsfont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsfont.c,v 1.17 2006/07/31 18:41:17 miod Exp $ */ +/* $OpenBSD: wsfont.c,v 1.18 2006/08/02 20:10:21 miod Exp $ */ /* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */ /*- @@ -101,25 +101,17 @@ /* * Make sure we always have at least one font. - * Sparc, sparc64 and vax always provide a specific set of fonts. - * Other platforms provide a 8x16 font and a larger 12x22 fonts, which is - * omitted if option SMALL_KERNEL. + * Sparc, sparc64 always provide a 8x16 font and a larger 12x22 font. + * Other platforms also provide both, but the 12x22 font is omitted if + * option SMALL_KERNEL. */ #ifndef HAVE_FONT #define HAVE_FONT 1 -#if defined(__sparc__) || defined(__sparc64__) #define FONT_BOLD8x16_ISO1 -#define FONT_GALLANT12x22 -#elif defined(__vax__) -#define FONT_QVSS8x15 -#define FONT_GALLANT12x22 -#else -#define FONT_BOLD8x16_ISO1 -#if !defined(SMALL_KERNEL) +#if defined(__sparc__) || defined(__sparc64__) || !defined(SMALL_KERNEL) #define FONT_GALLANT12x22 #endif -#endif #endif /* HAVE_FONT */ @@ -131,10 +123,6 @@ #include <dev/wsfont/gallant12x22.h> #endif -#ifdef FONT_QVSS8x15 -#include <dev/wsfont/qvss8x15.h> -#endif - /* Placeholder struct used for linked list */ struct font { struct font *next; |