void bwtwo_burner(void *v, u_int on, u_int flags) { struct bwtwo_softc *sc = v; int s; #if defined(SUN4) if (CPU_ISSUN4 && (sc->sc_bustype == BUS_OBIO)) { if (ISSET(sc->sc_sunfb.sf_flags, FB_PFOUR)) { fb_pfour_burner(v, on, flags); return; } if (on) stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_VIDEO); else stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) & ~SYSEN_VIDEO); return; } #endif s = splhigh(); if (on) sc->sc_reg->fbc_ctrl |= FBC_VENAB | FBC_TIMING; else { sc->sc_reg->fbc_ctrl &= ~FBC_VENAB; if (flags & WSDISPLAY_BURN_VBLANK) sc->sc_reg->fbc_ctrl &= ~FBC_TIMING; } splx(s); }
/* * Enable the cache. * We need to clear out the valid bits first. */ void sun4_cache_enable() { register u_int i, lim, ls, ts; cache_alias_bits = CPU_ISSUN4 ? CACHE_ALIAS_BITS_SUN4 : CACHE_ALIAS_BITS_SUN4C; cache_alias_dist = CPU_ISSUN4 ? CACHE_ALIAS_DIST_SUN4 : CACHE_ALIAS_DIST_SUN4C; ls = CACHEINFO.c_linesize; ts = CACHEINFO.c_totalsize; for (i = AC_CACHETAGS, lim = i + ts; i < lim; i += ls) sta(i, ASI_CONTROL, 0); stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_CACHE); CACHEINFO.c_enabled = 1; printf("cache enabled\n"); #ifdef notyet if (cpuinfo.flags & SUN4_IOCACHE) { stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_IOCACHE); printf("iocache enabled\n"); } #endif }
static void bwtwo_set_video_sun4(struct bwtwo_softc *sc, int enable) { if (sc->sc_fb.fb_flags & FB_PFOUR) { /* * This handles the overlay plane case, too. */ fb_pfour_set_video(&sc->sc_fb, enable); return; } if (enable) stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_VIDEO); else stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) & ~SYSEN_VIDEO); return; }
/* * Enable the cache. * We need to clear out the valid bits first. */ void cache_enable() { register u_int i, lim, ls, ts; ls = cacheinfo.c_linesize; ts = cacheinfo.c_totalsize; for (i = AC_CACHETAGS, lim = i + ts; i < lim; i += ls) sta(i, ASI_CONTROL, 0); stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_CACHE); cacheinfo.c_enabled = 1; printf("%d byte (%d/line) write-through %cw flush cache enabled\n", ts, ls, cacheinfo.c_hwflush ? 'h' : 's'); }