CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: mrg Date: Mon Apr 26 17:07:17 UTC 2021 Modified Files: src/sys/arch/sgimips/dev: crime.c Log Message: if ddb is enabled set cpu_reset_address to crime_reboot. 'mach reset' works from ddb now. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sgimips/dev/crime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.38 src/sys/arch/sgimips/dev/crime.c:1.39 --- src/sys/arch/sgimips/dev/crime.c:1.38 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/dev/crime.c Mon Apr 26 17:07:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: crime.c,v 1.39 2021/04/26 17:07:17 mrg Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.39 2021/04/26 17:07:17 mrg Exp $"); + +#include "opt_ddb.h" #include #include @@ -57,6 +59,10 @@ __KERNEL_RCSID(0, "$NetBSD: crime.c,v 1. #include #include +#if defined(DDB) +#include +#endif + #include "locators.h" #define DISABLE_CRIME_WATCHDOG @@ -107,6 +113,10 @@ crime_attach(device_t parent, device_t s uint64_t baseline, endline; uint32_t startctr, endctr, cps; +#if defined(DDB) + cpu_reset_address = crime_reboot; +#endif + sc->sc_dev = self; crm_iot = normal_memt;
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: thorpej Date: Sat Nov 21 17:18:31 UTC 2020 Modified Files: src/sys/arch/sgimips/dev: int.c zs_kbd.c src/sys/arch/sgimips/gio: grtwo.c light.c newport.c src/sys/arch/sgimips/hpc: pckbc_hpc.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/dev/int.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/dev/zs_kbd.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/gio/grtwo.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/gio/light.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/gio/newport.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/hpc/pckbc_hpc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/int.c diff -u src/sys/arch/sgimips/dev/int.c:1.31 src/sys/arch/sgimips/dev/int.c:1.32 --- src/sys/arch/sgimips/dev/int.c:1.31 Fri May 29 12:30:40 2020 +++ src/sys/arch/sgimips/dev/int.c Sat Nov 21 17:18:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: int.c,v 1.31 2020/05/29 12:30:40 rin Exp $ */ +/* $NetBSD: int.c,v 1.32 2020/11/21 17:18:31 thorpej Exp $ */ /* * Copyright (c) 2009 Stephen M. Rumble @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.31 2020/05/29 12:30:40 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.32 2020/11/21 17:18:31 thorpej Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -44,7 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: int.c,v 1.31 #include #include #include -#include +#include #include #include @@ -368,7 +368,7 @@ int1_intr_establish(int level, int ipl, } else { struct sgimips_intrhand *n, *ih; - ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof *ih, KM_SLEEP); ih->ih_fun = handler; ih->ih_arg = arg; ih->ih_next = NULL; @@ -407,7 +407,7 @@ int2_intr_establish(int level, int ipl, } else { struct sgimips_intrhand *n, *ih; - ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof *ih, KM_SLEEP); ih->ih_fun = handler; ih->ih_arg = arg; ih->ih_next = NULL; Index: src/sys/arch/sgimips/dev/zs_kbd.c diff -u src/sys/arch/sgimips/dev/zs_kbd.c:1.10 src/sys/arch/sgimips/dev/zs_kbd.c:1.11 --- src/sys/arch/sgimips/dev/zs_kbd.c:1.10 Mon Oct 29 12:51:38 2012 +++ src/sys/arch/sgimips/dev/zs_kbd.c Sat Nov 21 17:18:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: zs_kbd.c,v 1.10 2012/10/29 12:51:38 chs Exp $ */ +/* $NetBSD: zs_kbd.c,v 1.11 2020/11/21 17:18:31 thorpej Exp $ */ /* * Copyright (c) 2004 Steve Rumble @@ -33,10 +33,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.10 2012/10/29 12:51:38 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.11 2020/11/21 17:18:31 thorpej Exp $"); #include -#include +#include #include #include #include @@ -213,10 +213,8 @@ zskbd_attach(device_t parent, device_t s } else { wskaa.console = 0; - sc->sc_dc = malloc(sizeof(struct zskbd_devconfig), M_DEVBUF, - M_WAITOK); - if (sc->sc_dc == NULL) - panic("zskbd out of memory"); + sc->sc_dc = kmem_alloc(sizeof(struct zskbd_devconfig), + KM_SLEEP); sc->sc_dc->enabled = 0; } Index: src/sys/arch/sgimips/gio/grtwo.c diff -u src/sys/arch/sgimips/gio/grtwo.c:1.15 src/sys/arch/sgimips/gio/grtwo.c:1.16 --- src/sys/arch/sgimips/gio/grtwo.c:1.15 Mon Sep 3 16:29:27 2018 +++ src/sys/arch/sgimips/gio/grtwo.c Sat Nov 21 17:18:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: grtwo.c,v 1.15 2018/09/03 16:29:27 riastradh Exp $ */ +/* $NetBSD: grtwo.c,v 1.16 2020/11/21 17:18:31 thorpej Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -35,12 +35,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.15 2018/09/03 16:29:27 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.16 2020/11/21 17:18:31 thorpej Exp $"); #include #include #include -#include +#include #include @@ -507,10 +507,8 @@ grtwo_attach(device_t parent, device_t s sc->sc_dc = &grtwo_console_dc; } else { wa.console = 0; - sc->sc_dc = malloc(sizeof(struct grtwo_devconfig), - M_DEVBUF, M_WAITOK | M_ZERO); - if (sc->sc_dc == NULL) - panic("grtwo_attach: out of memory"); + sc->sc_dc = kmem_zalloc(sizeof(struct grtwo_devconfig), + KM_SLEEP); grtwo_attach_common(sc->sc_dc, ga); } Index: src/sys/arch/sgimips/gio/light.c diff -u src/sys/arch/sgimips/gio/light.c:1.7 src/sys/arch/sgimips/gio/light.c:1.8 --- src/sys/arch/sgimips/gio/light.c:1.7 Sat Oct 27 17:18:09 2012 +++ src/sys/arch/sgimips/gio/light.c Sat Nov 21 17:18:31 2020 @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.7 2012/10/27 17:18:09 chs Exp $ */ +/* $Id: light.c,v 1.8 2020/11/21 17:18:31 thorpej Exp $ */ /* * Copyright (c) 2006 Stephen M. Rumble @@ -43,12 +43,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.7 2012/10/27 17:18:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.8 2020/11/21 17:18:31 thorpej Exp $"); #incl
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: tsutsui Date: Mon Jun 15 13:18:48 UTC 2020 Modified Files: src/sys/arch/sgimips/conf: INSTALL32_IP2x Log Message: Follow ipfilter -> npf changes. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/conf/INSTALL32_IP2x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/INSTALL32_IP2x diff -u src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.11 src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.12 --- src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.11 Thu Feb 7 04:33:58 2019 +++ src/sys/arch/sgimips/conf/INSTALL32_IP2x Mon Jun 15 13:18:47 2020 @@ -63,7 +63,7 @@ no lpt* no pseudo-device ccd no pseudo-device fss -no pseudo-device ipfilter +no pseudo-device npf no pseudo-device bridge no pseudo-device accf_data no pseudo-device accf_http
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: martin Date: Thu Jan 30 06:25:46 UTC 2020 Modified Files: src/sys/arch/sgimips/hpc: if_sq.c Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/sgimips/hpc/if_sq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/if_sq.c diff -u src/sys/arch/sgimips/hpc/if_sq.c:1.53 src/sys/arch/sgimips/hpc/if_sq.c:1.54 --- src/sys/arch/sgimips/hpc/if_sq.c:1.53 Wed Jan 29 05:37:08 2020 +++ src/sys/arch/sgimips/hpc/if_sq.c Thu Jan 30 06:25:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sq.c,v 1.53 2020/01/29 05:37:08 thorpej Exp $ */ +/* $NetBSD: if_sq.c,v 1.54 2020/01/30 06:25:46 martin Exp $ */ /* * Copyright (c) 2001 Rafal K. Boni @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.53 2020/01/29 05:37:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.54 2020/01/30 06:25:46 martin Exp $"); #include @@ -1074,7 +1074,7 @@ sq_txintr(struct sq_softc *sc) SQ_TRACE(SQ_TXINTR_ENTER, sc, sc->sc_prevtx, status); - net_stats_ref_t nsr = IF_STAT_GETREF(ifp); + net_stat_ref_t nsr = IF_STAT_GETREF(ifp); tmp = (sc->hpc_regs->enetx_ctl_active >> shift) | TXSTAT_GOOD; if ((status & tmp) == 0) { if (status & TXSTAT_COLL)
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: thorpej Date: Wed Jan 29 05:37:08 UTC 2020 Modified Files: src/sys/arch/sgimips/hpc: if_sq.c src/sys/arch/sgimips/mace: if_mec.c Log Message: Adopt . To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sgimips/hpc/if_sq.c cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sgimips/mace/if_mec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/if_sq.c diff -u src/sys/arch/sgimips/hpc/if_sq.c:1.52 src/sys/arch/sgimips/hpc/if_sq.c:1.53 --- src/sys/arch/sgimips/hpc/if_sq.c:1.52 Thu May 23 13:10:51 2019 +++ src/sys/arch/sgimips/hpc/if_sq.c Wed Jan 29 05:37:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sq.c,v 1.52 2019/05/23 13:10:51 msaitoh Exp $ */ +/* $NetBSD: if_sq.c,v 1.53 2020/01/29 05:37:08 thorpej Exp $ */ /* * Copyright (c) 2001 Rafal K. Boni @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.52 2019/05/23 13:10:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sq.c,v 1.53 2020/01/29 05:37:08 thorpej Exp $"); #include @@ -860,7 +860,7 @@ sq_watchdog(struct ifnet *ifp) memset(&sc->sq_trace, 0, sizeof(sc->sq_trace)); sc->sq_trace_idx = 0; - ++ifp->if_oerrors; + if_statinc(ifp, if_oerrors); sq_init(ifp); } @@ -988,7 +988,7 @@ sq_rxintr(struct sq_softc *sc) pktstat = *((uint8_t *)m->m_data + framelen + 2); if ((pktstat & RXSTAT_GOOD) == 0) { - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); if (pktstat & RXSTAT_OFLOW) printf("%s: receive FIFO overflow\n", @@ -1003,7 +1003,7 @@ sq_rxintr(struct sq_softc *sc) } if (sq_add_rxbuf(sc, i) != 0) { - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); bus_dmamap_sync(sc->sc_dmat, sc->sc_rxmap[i], 0, sc->sc_rxmap[i]->dm_mapsize, BUS_DMASYNC_PREREAD); SQ_INIT_RXDESC(sc, i); @@ -1074,24 +1074,26 @@ sq_txintr(struct sq_softc *sc) SQ_TRACE(SQ_TXINTR_ENTER, sc, sc->sc_prevtx, status); + net_stats_ref_t nsr = IF_STAT_GETREF(ifp); tmp = (sc->hpc_regs->enetx_ctl_active >> shift) | TXSTAT_GOOD; if ((status & tmp) == 0) { if (status & TXSTAT_COLL) - ifp->if_collisions++; + if_statinc_ref(nsr, if_collisions); if (status & TXSTAT_UFLOW) { printf("%s: transmit underflow\n", device_xname(sc->sc_dev)); - ifp->if_oerrors++; + if_statinc_ref(nsr, if_oerrors); } if (status & TXSTAT_16COLL) { printf("%s: max collisions reached\n", device_xname(sc->sc_dev)); - ifp->if_oerrors++; - ifp->if_collisions += 16; + if_statinc_ref(nsr, if_oerrors); + if_statadd_ref(nsr, if_collisions, 16); } } + IF_STAT_PUTREF(ifp); /* prevtx now points to next xmit packet not yet finished */ if (sc->hpc_regs->revision == 3) @@ -1161,7 +1163,7 @@ sq_txring_hpc1(struct sq_softc *sc) m_freem(sc->sc_txmbuf[i]); sc->sc_txmbuf[i] = NULL; - ifp->if_opackets++; + if_statinc(ifp, if_opackets); sc->sc_nfreetx++; SQ_TRACE(SQ_DONE_DMA, sc, i, status); @@ -1249,7 +1251,7 @@ sq_txring_hpc3(struct sq_softc *sc) m_freem(sc->sc_txmbuf[i]); sc->sc_txmbuf[i] = NULL; - ifp->if_opackets++; + if_statinc(ifp, if_opackets); sc->sc_nfreetx++; SQ_TRACE(SQ_DONE_DMA, sc, i, status); Index: src/sys/arch/sgimips/mace/if_mec.c diff -u src/sys/arch/sgimips/mace/if_mec.c:1.62 src/sys/arch/sgimips/mace/if_mec.c:1.63 --- src/sys/arch/sgimips/mace/if_mec.c:1.62 Thu Dec 26 04:53:11 2019 +++ src/sys/arch/sgimips/mace/if_mec.c Wed Jan 29 05:37:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mec.c,v 1.62 2019/12/26 04:53:11 msaitoh Exp $ */ +/* $NetBSD: if_mec.c,v 1.63 2020/01/29 05:37:08 thorpej Exp $ */ /*- * Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.62 2019/12/26 04:53:11 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.63 2020/01/29 05:37:08 thorpej Exp $"); #include "opt_ddb.h" @@ -1470,7 +1470,7 @@ mec_watchdog(struct ifnet *ifp) struct mec_softc *sc = ifp->if_softc; printf("%s: device timeout\n", device_xname(sc->sc_dev)); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); mec_init(ifp); } @@ -1665,7 +1665,7 @@ mec_rxintr(struct mec_softc *sc) DPRINTF(MEC_DEBUG_RXINTR, ("%s: wrong packet\n", __func__)); dropit: - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); rxd->rxd_stat = 0; MEC_RXSTATSYNC(sc, i, BUS_DMASYNC_PREREAD); bus_space_write_8(st, sh, MEC_MCL_RX_FIFO, @@ -1880,14 +1880,15 @@ mec_txintr(struct mec_softc *sc, uint32_ } col = (txstat & MEC_TXSTAT_COLCNT) >> MEC_TXSTAT_COLCNT_SHIFT; - ifp->if_collisions += col; + if (col) + if_statadd(ifp, if_collisions, col); if ((txstat & MEC_TXSTAT_SUCCESS) == 0) { printf("%s: TX error: txstat = 0x%016"PRIx64"\n", device_xname(sc->sc_dev), txstat); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); } else - ifp->if_
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: thorpej Date: Thu Jan 2 23:51:48 UTC 2020 Modified Files: src/sys/arch/sgimips/dev: dpclock.c Log Message: Use todr_gettime_ymdhms / todr_settime_ymdhms. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/dev/dpclock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/dpclock.c diff -u src/sys/arch/sgimips/dev/dpclock.c:1.6 src/sys/arch/sgimips/dev/dpclock.c:1.7 --- src/sys/arch/sgimips/dev/dpclock.c:1.6 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/dev/dpclock.c Thu Jan 2 23:51:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dpclock.c,v 1.6 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: dpclock.c,v 1.7 2020/01/02 23:51:48 thorpej Exp $ */ /* * Copyright (c) 2001 Erik Reid @@ -60,8 +60,10 @@ struct dpclock_softc { static int dpclock_match(device_t, cfdata_t, void *); static void dpclock_attach(device_t, device_t, void *); -static int dpclock_gettime(struct todr_chip_handle *, struct timeval *); -static int dpclock_settime(struct todr_chip_handle *, struct timeval *); +static int dpclock_gettime_ymdhms(struct todr_chip_handle *, + struct clock_ymdhms *); +static int dpclock_settime_ymdhms(struct todr_chip_handle *, + struct clock_ymdhms *); CFATTACH_DECL_NEW(dpclock, sizeof(struct dpclock_softc), dpclock_match, dpclock_attach, NULL, NULL); @@ -127,8 +129,10 @@ dpclock_attach(device_t parent, device_t } sc->sc_todrch.cookie = sc; - sc->sc_todrch.todr_gettime = dpclock_gettime; - sc->sc_todrch.todr_settime = dpclock_settime; + sc->sc_todrch.todr_gettime = NULL; + sc->sc_todrch.todr_settime = NULL; + sc->sc_todrch.todr_gettime_ymdhms = dpclock_gettime_ymdhms; + sc->sc_todrch.todr_settime_ymdhms = dpclock_settime_ymdhms; sc->sc_todrch.todr_setwen = NULL; todr_attach(&sc->sc_todrch); @@ -138,10 +142,9 @@ dpclock_attach(device_t parent, device_t * Get the time of day, based on the clock's value and/or the base value. */ static int -dpclock_gettime(struct todr_chip_handle *todrch, struct timeval *tv) +dpclock_gettime_ymdhms(struct todr_chip_handle *todrch, struct clock_ymdhms *dt) { struct dpclock_softc *sc = (struct dpclock_softc *)todrch->cookie; - struct clock_ymdhms dt; int s; u_int8_t i, j; u_int8_t regs[32]; @@ -156,11 +159,11 @@ dpclock_gettime(struct todr_chip_handle for (i = 0; i < 32; i++) regs[i] = readreg(sc, i); - dt.dt_sec = bcdtobin(regs[DP8573A_SAVE_SEC]); - dt.dt_min = bcdtobin(regs[DP8573A_SAVE_MIN]); + dt->dt_sec = bcdtobin(regs[DP8573A_SAVE_SEC]); + dt->dt_min = bcdtobin(regs[DP8573A_SAVE_MIN]); if (regs[DP8573A_RT_MODE] & DP8573A_RT_MODE_1224) { - dt.dt_hour = bcdtobin(regs[DP8573A_SAVE_HOUR] & + dt->dt_hour = bcdtobin(regs[DP8573A_SAVE_HOUR] & DP8573A_HOUR_12HR_MASK) + ((regs[DP8573A_SAVE_HOUR] & DP8573A_RT_MODE_1224) ? 0 : 12); @@ -170,27 +173,17 @@ dpclock_gettime(struct todr_chip_handle * 24 to hour 0. */ - if (dt.dt_hour == 24) - dt.dt_hour = 0; + if (dt->dt_hour == 24) + dt->dt_hour = 0; } else { - dt.dt_hour = bcdtobin(regs[DP8573A_SAVE_HOUR] & + dt->dt_hour = bcdtobin(regs[DP8573A_SAVE_HOUR] & DP8573A_HOUR_24HR_MASK); } - dt.dt_wday = bcdtobin(regs[DP8573A_DOW]);/* Not from time saved */ - dt.dt_day = bcdtobin(regs[DP8573A_SAVE_DOM]); - dt.dt_mon = bcdtobin(regs[DP8573A_SAVE_MONTH]); - dt.dt_year = FROM_IRIX_YEAR(bcdtobin(regs[DP8573A_YEAR])); - - /* simple sanity checks */ - if (dt.dt_mon > 12 || dt.dt_day > 31 || - dt.dt_hour >= 24 || dt.dt_min >= 60 || dt.dt_sec >= 60) - return (EIO); - - tv->tv_sec = (long)clock_ymdhms_to_secs(&dt); - if (tv->tv_sec == -1) - return (ERANGE); - tv->tv_usec = 0; + dt->dt_wday = bcdtobin(regs[DP8573A_DOW]);/* Not from time saved */ + dt->dt_day = bcdtobin(regs[DP8573A_SAVE_DOM]); + dt->dt_mon = bcdtobin(regs[DP8573A_SAVE_MONTH]); + dt->dt_year = FROM_IRIX_YEAR(bcdtobin(regs[DP8573A_YEAR])); return (0); } @@ -199,16 +192,13 @@ dpclock_gettime(struct todr_chip_handle * Reset the TODR based on the time value. */ static int -dpclock_settime(struct todr_chip_handle *todrch, struct timeval *tv) +dpclock_settime_ymdhms(struct todr_chip_handle *todrch, struct clock_ymdhms *dt) { struct dpclock_softc *sc = (struct dpclock_softc *)todrch->cookie; - struct clock_ymdhms dt; int s; u_int8_t i, j; u_int8_t regs[32]; - clock_secs_to_ymdhms((time_t)(tv->tv_sec + (tv->tv_usec > 50)),&dt); - s = splhigh(); i = readreg(sc, DP8573A_TIMESAVE_CTL); j = i | DP8573A_TIMESAVE_CTL_EN; @@ -220,13 +210,13 @@ dpclock_settime(struct todr_chip_handle regs[i] = readreg(sc, i); regs[DP8573A_SUBSECOND] = 0; - regs[DP8573A_SECOND] = bintobcd(dt.dt_sec); - regs[DP8573A_MINUTE] = bintobcd(dt.dt_min); - regs[DP8573A_HOUR] = bintobcd(dt.dt_hour) & DP8573A_HOUR_24HR_MASK; - regs[DP8573A_DOW] = bintobcd(dt.dt_wday); -
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Sat May 4 00:45:18 UTC 2019 Modified Files: src/sys/arch/sgimips/gio: newportreg.h Log Message: moar registers to the right branch this time (hopefully) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/gio/newportreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/newportreg.h diff -u src/sys/arch/sgimips/gio/newportreg.h:1.6 src/sys/arch/sgimips/gio/newportreg.h:1.7 --- src/sys/arch/sgimips/gio/newportreg.h:1.6 Wed Jan 11 21:23:07 2012 +++ src/sys/arch/sgimips/gio/newportreg.h Sat May 4 00:45:18 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: newportreg.h,v 1.6 2012/01/11 21:23:07 macallan Exp $ */ +/* $NetBSD: newportreg.h,v 1.7 2019/05/04 00:45:18 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -143,6 +143,7 @@ #define REX3_REG_ZPATTERN 0x0014 #define REX3_REG_COLORBACK 0x0018 +#define REX3_REG_COLORVRAM 0x001c #define REX3_REG_XSTART 0x0100 @@ -191,6 +192,17 @@ #define REX3_REG_TOPSCAN 0x1320 #define REX3_REG_XYWIN 0x1324 +#define REX3_REG_CLIPMODE 0x1328 +#define REX3_CLIPMODE_SMASK0 0x0001 +#define REX3_CLIPMODE_SMASK1 0x0002 +#define REX3_CLIPMODE_SMASK2 0x0004 +#define REX3_CLIPMODE_SMASK3 0x0008 +#define REX3_CLIPMODE_SMASK4 0x0010 +#define REX3_CLIPMODE_CIDMATCH0 0x0100 +#define REX3_CLIPMODE_CIDMATCH1 0x0200 +#define REX3_CLIPMODE_CIDMATCH2 0x0400 +#define REX3_CLIPMODE_CIDMATCH3 0x0800 + #define REX3_REG_STATUS 0x1338 #define REX3_STATUS_GFXBUSY 0x0008 @@ -261,6 +273,10 @@ #define XMAP9_DCBCRS_PUP_CMAP 4 #define XMAP9_DCBCRS_MODE_SETUP 5 #define XMAP9_MODE_GAMMA_BYPASS 0x04 +#define XMAP9_MODE_PIXMODE_CI 0x00 +#define XMAP9_MODE_PIXMODE_RGB0 0x000100 +#define XMAP9_MODE_PIXMODE_RGB1 0x000200 +#define XMAP9_MODE_PIXMODE_RGB2 0x000300 #define XMAP9_MODE_PIXSIZE_8BPP 0x000400 #define XMAP9_MODE_PIXSIZE_24BPP 0x000c00 #define XMAP9_DCBCRS_MODE_SELECT 7
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: sevan Date: Sat Apr 27 12:12:26 UTC 2019 Modified Files: src/sys/arch/sgimips/conf: INSTALL32_IP3x Log Message: Skip CARP & Veriexec support to reduce size To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/conf/INSTALL32_IP3x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/INSTALL32_IP3x diff -u src/sys/arch/sgimips/conf/INSTALL32_IP3x:1.6 src/sys/arch/sgimips/conf/INSTALL32_IP3x:1.7 --- src/sys/arch/sgimips/conf/INSTALL32_IP3x:1.6 Fri Feb 6 18:50:28 2009 +++ src/sys/arch/sgimips/conf/INSTALL32_IP3x Sat Apr 27 12:12:25 2019 @@ -11,3 +11,6 @@ options MEMORY_DISK_IS_ROOT options MEMORY_DISK_SERVER=0# no userspace memory disk support options MEMORY_DISK_ROOT_SIZE=8192 # size of memory disk in blocks (4MB) options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode + +no pseudo-device carp +no pseudo-device veriexec
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Fri Apr 26 21:02:42 UTC 2019 Modified Files: src/sys/arch/sgimips/dev: imc.c Log Message: fix misleading error message To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sgimips/dev/imc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/imc.c diff -u src/sys/arch/sgimips/dev/imc.c:1.34 src/sys/arch/sgimips/dev/imc.c:1.35 --- src/sys/arch/sgimips/dev/imc.c:1.34 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/dev/imc.c Fri Apr 26 21:02:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: imc.c,v 1.35 2019/04/26 21:02:42 macallan Exp $ */ /* * Copyright (c) 2001 Rafal K. Boni @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.35 2019/04/26 21:02:42 macallan Exp $"); #include #include @@ -106,7 +106,7 @@ imc_attach(device_t parent, device_t sel isc.iot = normal_memt; if (bus_space_map(isc.iot, ma->ma_addr, 0x100, BUS_SPACE_MAP_LINEAR, &isc.ioh)) - panic("imc_attach: could not allocate memory\n"); + panic("imc_attach: could not map registers\n"); platform.bus_reset = imc_bus_reset; platform.watchdog_reset = imc_watchdog_reset;
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: sevan Date: Sat Mar 23 17:44:49 UTC 2019 Modified Files: src/sys/arch/sgimips/conf: GENERIC32_IP3x files.sgimips Log Message: Enable Bluetooth support. usbdevices.config includes support for USB Bluetooth. Tested on an o2 with a PCI USB adapter and Broadcom BCM20702A0 dongle. To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/arch/sgimips/conf/GENERIC32_IP3x cvs rdiff -u -r1.53 -r1.54 src/sys/arch/sgimips/conf/files.sgimips Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC32_IP3x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.123 src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.124 --- src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.123 Sat Mar 23 17:38:29 2019 +++ src/sys/arch/sgimips/conf/GENERIC32_IP3x Sat Mar 23 17:44:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP3x,v 1.123 2019/03/23 17:38:29 sevan Exp $ +# $NetBSD: GENERIC32_IP3x,v 1.124 2019/03/23 17:44:49 sevan Exp $ # # GENERIC32_IP3x machine description file # @@ -28,7 +28,7 @@ makeoptions TEXTADDR="0x80069000" # entr options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32_IP3x-$Revision: 1.123 $" +#ident "GENERIC32_IP3x-$Revision: 1.124 $" maxusers 32 @@ -305,6 +305,8 @@ spkr* at audio? # PC speaker (synthesi # MIDI support midi* at midibus? +include "dev/bluetooth/bluetoothdevices.config" + # Pseudo-Devices pseudo-device crypto # /dev/crypto device Index: src/sys/arch/sgimips/conf/files.sgimips diff -u src/sys/arch/sgimips/conf/files.sgimips:1.53 src/sys/arch/sgimips/conf/files.sgimips:1.54 --- src/sys/arch/sgimips/conf/files.sgimips:1.53 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/conf/files.sgimips Sat Mar 23 17:44:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.sgimips,v 1.53 2015/02/18 16:47:58 macallan Exp $ +# $NetBSD: files.sgimips,v 1.54 2019/03/23 17:44:49 sevan Exp $ maxpartitions 16 @@ -63,6 +63,7 @@ include "arch/sgimips/gio/files.gio" # # Machine-independent IEEE 1394 device support # +include "dev/bluetooth/files.bluetooth" include "dev/ieee1394/files.ieee1394" include "arch/sgimips/conf/majors.sgimips"
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: sevan Date: Sat Mar 23 17:38:29 UTC 2019 Modified Files: src/sys/arch/sgimips/conf: GENERIC32_IP3x Log Message: Reduce duplication by switching to using dev/usb/usbdevices.config To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/sys/arch/sgimips/conf/GENERIC32_IP3x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC32_IP3x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.122 src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.123 --- src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.122 Wed Feb 6 11:58:32 2019 +++ src/sys/arch/sgimips/conf/GENERIC32_IP3x Sat Mar 23 17:38:29 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP3x,v 1.122 2019/02/06 11:58:32 rin Exp $ +# $NetBSD: GENERIC32_IP3x,v 1.123 2019/03/23 17:38:29 sevan Exp $ # # GENERIC32_IP3x machine description file # @@ -28,7 +28,7 @@ makeoptions TEXTADDR="0x80069000" # entr options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32_IP3x-$Revision: 1.122 $" +#ident "GENERIC32_IP3x-$Revision: 1.123 $" maxusers 32 @@ -288,110 +288,7 @@ usb* at ehci? usb*at ohci? usb*at uhci? -# USB Hubs -uhub* at usb? -uhub* at uhub? port ? - -# USB HID device -uhidev* at uhub? port ? configuration ? interface ? - -# USB Mice -ums*at uhidev? reportid ? -wsmouse* at ums? mux 0 - -# USB Keyboards -ukbd* at uhidev? reportid ? -wskbd* at ukbd? console ? mux 1 - -# USB serial adapter -ucycom* at uhidev? reportid ? - -# USB Generic HID devices -uhid* at uhidev? reportid ? - -# USB Printer -ulpt* at uhub? port ? configuration ? interface ? - -# USB Modem -umodem* at uhub? port ? configuration ? -ucom* at umodem? - -# Option N.V. Wireless WAN modems -uhso* at uhub? port ? configuration ? - -# USB Mass Storage -umass* at uhub? port ? configuration ? interface ? - -# USB audio -uaudio* at uhub? port ? configuration ? - -# USB MIDI -umidi* at uhub? port ? configuration ? - -# USB IrDA -# USB-IrDA bridge spec -uirda* at uhub? port ? configuration ? interface ? -irframe* at uirda? - -# SigmaTel STIr4200 USB/IrDA Bridge -ustir* at uhub? port ? -irframe* at ustir? - -# USB Ethernet adapters -aue*at uhub? port ? # ADMtek AN986 Pegasus based adapters -axe*at uhub? port ? # ASIX AX88172 based adapters -cue*at uhub? port ? # CATC USB-EL1201A based adapters -kue*at uhub? port ? # Kawasaki LSI KL5KUSB101B based adapters -mue* at uhub? port ? # Microchip LAN75xx/LAN78xx based adapters -udav* at uhub? port ? # Davicom DM9601 based adapters -ure*at uhub? port ? # Realtek RTL8152/RTL8153 based adapters -url*at uhub? port ? # Realtek RTL8150L based adapters - -# Prolific PL2301/PL2302 host-to-host adapter -upl*at uhub? port ? - -# Serial adapters -ubsa* at uhub? port ? # Belkin serial adapter -ucom* at ubsa? portno ? - -uftdi* at uhub? port ? # FTDI FT8U100AX serial adapter -ucom* at uftdi? portno ? - -umct* at uhub? port ? # MCT USB-RS232 serial adapter -ucom* at umct? portno ? - -uplcom* at uhub? port ? # I/O DATA USB-RSAQ2 serial adapter -ucom* at uplcom? portno ? - -uvscom* at uhub? port ? # SUNTAC Slipper U VS-10U serial adapter -ucom* at uvscom? portno ? - -# Diamond Multimedia Rio 500 -urio* at uhub? port ? - -# USB Handspring Visor -uvisor* at uhub? port ? -ucom* at uvisor? - -# Kyocera AIR-EDGE PHONE -ukyopon* at uhub? port ? -ucom* at ukyopon? portno ? - -# USB scanners -#uscanner* at uhub? port ? - -# USB scanners that use SCSI emulation, e.g., HP5300 -usscanner* at uhub? port ? - -# Y@P firmware loader -uyap* at uhub? port ? - -# D-Link DSB-R100 USB radio -udsbr* at uhub? port ? -radio* at udsbr? - -# USB Generic driver -ugen* at uhub? port ? +include "dev/usb/usbdevices.config" # PCI IEEE1394 controllers fwohci* at pci? dev ? function ? # IEEE1394 Open Host Controller
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: tsutsui Date: Sat Jan 12 16:44:48 UTC 2019 Modified Files: src/sys/arch/sgimips: README.IPn TODO src/sys/arch/sgimips/stand: Makefile Makefile.booters Added Files: src/sys/arch/sgimips/stand/bootiris: Makefile version src/sys/arch/sgimips/stand/common: iris_autoconf.c iris_boot.c iris_conf.c iris_cons.c iris_cons.h iris_devopen.c iris_disk.c iris_machdep.h iris_parse.c iris_prf.c iris_scsi.c iris_scsicmd.h iris_scsictl.c iris_scsireg.h iris_scsivar.h iris_start.S iris_zs.c iris_zs.h Log Message: Import irisboot, yet another bootloader for pre-ARC sgimips machines. This bootloader adds support for Personal IRIS 4D/25 (IP6), Personal IRIS 4D/35 (IP12), and Indigo R3000 (IP12) etc. and optionally supports R4000 Indy and Indigo R4000 (ARCS machine) using standalone WD33C93 SCSI driver. Submitted by Naruaki Etomi via PR port-sgimips/53539, and reviewed by tsutsui@. See also port-sgimips@ ML thread: https://mail-index.netbsd.org/port-sgimips/2018/09/16/msg000778.html To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/README.IPn cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/TODO cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/stand/Makefile cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sgimips/stand/Makefile.booters cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/stand/bootiris/Makefile \ src/sys/arch/sgimips/stand/bootiris/version cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/stand/common/iris_autoconf.c \ src/sys/arch/sgimips/stand/common/iris_boot.c \ src/sys/arch/sgimips/stand/common/iris_conf.c \ src/sys/arch/sgimips/stand/common/iris_cons.c \ src/sys/arch/sgimips/stand/common/iris_cons.h \ src/sys/arch/sgimips/stand/common/iris_devopen.c \ src/sys/arch/sgimips/stand/common/iris_disk.c \ src/sys/arch/sgimips/stand/common/iris_machdep.h \ src/sys/arch/sgimips/stand/common/iris_parse.c \ src/sys/arch/sgimips/stand/common/iris_prf.c \ src/sys/arch/sgimips/stand/common/iris_scsi.c \ src/sys/arch/sgimips/stand/common/iris_scsicmd.h \ src/sys/arch/sgimips/stand/common/iris_scsictl.c \ src/sys/arch/sgimips/stand/common/iris_scsireg.h \ src/sys/arch/sgimips/stand/common/iris_scsivar.h \ src/sys/arch/sgimips/stand/common/iris_start.S \ src/sys/arch/sgimips/stand/common/iris_zs.c \ src/sys/arch/sgimips/stand/common/iris_zs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/README.IPn diff -u src/sys/arch/sgimips/README.IPn:1.10 src/sys/arch/sgimips/README.IPn:1.11 --- src/sys/arch/sgimips/README.IPn:1.10 Tue Feb 10 06:12:27 2009 +++ src/sys/arch/sgimips/README.IPn Sat Jan 12 16:44:47 2019 @@ -1,4 +1,4 @@ -$NetBSD: README.IPn,v 1.10 2009/02/10 06:12:27 rumble Exp $ +$NetBSD: README.IPn,v 1.11 2019/01/12 16:44:47 tsutsui Exp $ Arch (kernel) ModelsCodename - -- @@ -30,6 +30,7 @@ IP35 SN1 (?) Architecture ABI Bootstrap Load Address Kernel Load Address --- -- --- +IP12 32 0x80368000 0x80002000 IP19 IP21 IP25 32 0x80004000 0x8010 IP19 IP21 IP25 64 0xa8004000 0xa818 IP20 IP22 IP24 32 0x88002000 0x88069000 Index: src/sys/arch/sgimips/TODO diff -u src/sys/arch/sgimips/TODO:1.6 src/sys/arch/sgimips/TODO:1.7 --- src/sys/arch/sgimips/TODO:1.6 Sun Mar 25 00:49:31 2007 +++ src/sys/arch/sgimips/TODO Sat Jan 12 16:44:47 2019 @@ -6,7 +6,6 @@ Things to be done: (sekiya) * grtwo needs cursor and hardware color fill support -* ip12 needs ROM-based bootloader * hpc devices need real probe routines * port newport driver to x.org Index: src/sys/arch/sgimips/stand/Makefile diff -u src/sys/arch/sgimips/stand/Makefile:1.5 src/sys/arch/sgimips/stand/Makefile:1.6 --- src/sys/arch/sgimips/stand/Makefile:1.5 Sun Dec 11 12:18:58 2005 +++ src/sys/arch/sgimips/stand/Makefile Sat Jan 12 16:44:47 2019 @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.5 2005/12/11 12:18:58 christos Exp $ +# $NetBSD: Makefile,v 1.6 2019/01/12 16:44:47 tsutsui Exp $ -SUBDIR= boot boot64 sgivol +SUBDIR= boot boot64 bootiris sgivol .include Index: src/sys/arch/sgimips/stand/Makefile.booters diff -u src/sys/arch/sgimips/stand/Makefile.booters:1.24 src/sys/arch/sgimips/stand/Makefile.booters:1.25 --- src/sys/arch/sgimips/stand/Makefile.booters:1.24 Sat Apr 8 19:53:22 2017 +++ src/sys/arch/sgimips/stand/Makefile.booters Sat Jan 12 16:44:47 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.24 2017/04/08 19:53:22 christos Exp $ +# $NetBSD: Makefile.booters,v 1.25 2019/01/12 16:44:47 tsutsui Exp $ # PROG set by parent. NOMAN= # defined @@ -22,7 +22,9 @@ LIBCRTEND= realall: ${PROG} .PATH: ${.CURDIR}/../common +.if !defined(PRE_ARCS) .PATH.S: ${S}/dev/arcbios +.endif AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls C
CVS commit: src/sys/arch/sgimips/stand
Module Name:src Committed By: tsutsui Date: Wed Jan 2 03:04:27 UTC 2019 Modified Files: src/sys/arch/sgimips/stand: Makefile.inc Log Message: Allow build in boot64 without installed DESTDIR. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/stand/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/Makefile.inc diff -u src/sys/arch/sgimips/stand/Makefile.inc:1.2 src/sys/arch/sgimips/stand/Makefile.inc:1.3 --- src/sys/arch/sgimips/stand/Makefile.inc:1.2 Thu Sep 8 14:43:48 2016 +++ src/sys/arch/sgimips/stand/Makefile.inc Wed Jan 2 03:04:26 2019 @@ -1,5 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.2 2016/09/08 14:43:48 christos Exp $ +# $NetBSD: Makefile.inc,v 1.3 2019/01/02 03:04:26 tsutsui Exp $ NOPIE= # defined BINDIR?= /usr/mdec + +# XXX SHOULD NOT NEED TO DEFINE THESE! +LIBCRT0= +LIBCRTI= +LIBC= +LIBCRTBEGIN= +LIBCRTEND=
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: macallan Date: Thu Sep 27 17:34:28 UTC 2018 Modified Files: src/sys/arch/sgimips/dev: int.c src/sys/arch/sgimips/include: intr.h Log Message: add event counters for int0 at mainbus To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sgimips/dev/int.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sgimips/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/int.c diff -u src/sys/arch/sgimips/dev/int.c:1.28 src/sys/arch/sgimips/dev/int.c:1.29 --- src/sys/arch/sgimips/dev/int.c:1.28 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/dev/int.c Thu Sep 27 17:34:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: int.c,v 1.28 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: int.c,v 1.29 2018/09/27 17:34:28 macallan Exp $ */ /* * Copyright (c) 2009 Stephen M. Rumble @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.28 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.29 2018/09/27 17:34:28 macallan Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -114,6 +114,12 @@ static void int_attach(device_t parent, device_t self, void *aux) { uint32_t address; + int i; + + for (i = 0; i < NINTR; i++) { + intrtab[i].ih_fun = NULL; + snprintf(intrtab[i].ih_evname, 7, "%d", i); + } switch (mach_type) { case MACH_SGI_IP6 | MACH_SGI_IP10: @@ -220,9 +226,17 @@ int_attach(device_t parent, device_t sel /* Wire interrupts 7, 11 to mappable interrupt 0,1 handlers */ intrtab[7].ih_fun = int2_mappable_intr; intrtab[7].ih_arg = (void*) 0; + snprintf(intrtab[7].ih_evname, 7, "map0"); intrtab[11].ih_fun = int2_mappable_intr; intrtab[11].ih_arg = (void*) 1; + snprintf(intrtab[11].ih_evname, 7, "map1"); + } + + for (i = 0; i < NINTR; i++) { + evcnt_attach_dynamic(&intrtab[i].ih_evcnt, + EVCNT_TYPE_INTR, NULL, + "int", intrtab[i].ih_evname); } } @@ -246,6 +260,7 @@ int2_mappable_intr(void *arg) for (i = 0; i < 8; i++) { intnum = i + 16 + (which << 3); if (mstat & (1 << i)) { + intrtab[intnum].ih_evcnt.ev_count++; for (ih = &intrtab[intnum]; ih != NULL; ih = ih->ih_next) { if (ih->ih_fun != NULL) @@ -276,6 +291,7 @@ int1_local_intr(vaddr_t pc, uint32_t sta for (i = 0; stat != 0; i++, stat >>= 1) { if (stat & 1) { + intrtab[i].ih_evcnt.ev_count++; for (ih = &intrtab[i]; ih != NULL; ih = ih->ih_next) { if (ih->ih_fun != NULL) (ih->ih_fun)(ih->ih_arg); @@ -302,6 +318,7 @@ int2_local0_intr(vaddr_t pc, uint32_t st for (i = 0; i < 8; i++) { if (l0stat & (1 << i)) { + intrtab[i].ih_evcnt.ev_count++; for (ih = &intrtab[i]; ih != NULL; ih = ih->ih_next) { if (ih->ih_fun != NULL) (ih->ih_fun)(ih->ih_arg); @@ -328,6 +345,7 @@ int2_local1_intr(vaddr_t pc, uint32_t st for (i = 0; i < 8; i++) { if (l1stat & (1 << i)) { + intrtab[i].ih_evcnt.ev_count++; for (ih = &intrtab[8+i]; ih != NULL; ih = ih->ih_next) { if (ih->ih_fun != NULL) (ih->ih_fun)(ih->ih_arg); Index: src/sys/arch/sgimips/include/intr.h diff -u src/sys/arch/sgimips/include/intr.h:1.28 src/sys/arch/sgimips/include/intr.h:1.29 --- src/sys/arch/sgimips/include/intr.h:1.28 Fri Jun 26 22:55:06 2015 +++ src/sys/arch/sgimips/include/intr.h Thu Sep 27 17:34:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.28 2015/06/26 22:55:06 matt Exp $ */ +/* $NetBSD: intr.h,v 1.29 2018/09/27 17:34:28 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -53,11 +53,12 @@ struct sgimips_intrhand { struct sgimips_intr *ih_intrhead; struct sgimips_intrhand *ih_next; int ih_pending; + struct evcnt ih_evcnt; + char ih_evname[8]; }; struct sgimips_intr { LIST_HEAD(,sgimips_intrhand) intr_q; - struct evcnt ih_evcnt; unsigned long intr_ipl; };
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: macallan Date: Sat Sep 15 01:05:07 UTC 2018 Modified Files: src/sys/arch/sgimips/hpc: hpc.c Log Message: remove long unused power button handler To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/sgimips/hpc/hpc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/hpc.c diff -u src/sys/arch/sgimips/hpc/hpc.c:1.70 src/sys/arch/sgimips/hpc/hpc.c:1.71 --- src/sys/arch/sgimips/hpc/hpc.c:1.70 Sat Sep 15 00:37:53 2018 +++ src/sys/arch/sgimips/hpc/hpc.c Sat Sep 15 01:05:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $ */ +/* $NetBSD: hpc.c,v 1.71 2018/09/15 01:05:06 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.71 2018/09/15 01:05:06 macallan Exp $"); #include #include @@ -347,9 +347,6 @@ static struct hpc_values hpc3_values = { .scsi_dmactl_reset = HPC3_SCSI_DMACTL_RESET }; - -static int powerintr_established; - static int hpc_match(device_t, cfdata_t, void *); static void hpc_attach(device_t, device_t, void *); static int hpc_print(void *, const char *); @@ -547,19 +544,6 @@ hpc_attach(device_t parent, device_t sel } } - /* - * XXX: Only attach the powerfail interrupt once, since the - * interrupt code doesn't let you share interrupt just yet. - * - * Since the powerfail interrupt is hardcoded to read from - * a specific register anyway (XXX#2!), we don't care when - * it gets attached, as long as it only happens once. - */ - if (mach_type == MACH_SGI_IP22 && !powerintr_established) { -// cpu_intr_establish(9, IPL_NONE, hpc_power_intr, sc); - powerintr_established++; - } - #if defined(BLINK) if (mach_type == MACH_SGI_IP12 || mach_type == MACH_SGI_IP20) hpc_blink(sc); @@ -672,24 +656,6 @@ hpc_print(void *aux, const char *pnp) return (UNCONF); } -#if 0 -static int -hpc_power_intr(void *arg) -{ - uint32_t pwr_reg; - - pwr_reg = *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1(0x1fbd9850)); - *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1(0x1fbd9850)) = pwr_reg; - - printf("hpc_power_intr: panel reg = %08x\n", pwr_reg); - - if (pwr_reg & 2) - cpu_reboot(RB_HALT, NULL); - - return 1; -} -#endif - #if defined(BLINK) static void hpc_blink(void *arg)
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: macallan Date: Sat Sep 15 00:37:53 UTC 2018 Modified Files: src/sys/arch/sgimips/hpc: hpc.c Log Message: one more s/panel/button, now this actually works again. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sgimips/hpc/hpc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/hpc.c diff -u src/sys/arch/sgimips/hpc/hpc.c:1.69 src/sys/arch/sgimips/hpc/hpc.c:1.70 --- src/sys/arch/sgimips/hpc/hpc.c:1.69 Sun Jul 24 16:47:49 2016 +++ src/sys/arch/sgimips/hpc/hpc.c Sat Sep 15 00:37:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $ */ +/* $NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.70 2018/09/15 00:37:53 macallan Exp $"); #include #include @@ -201,7 +201,7 @@ static const struct hpc_device hpc3_devi -1, HPCDEV_IP22 | HPCDEV_IP24 }, - { "panel", /* Indy front panel */ + { "button", /* Indy front panel */ HPC_BASE_ADDRESS_0, HPC3_PBUS_CH6_DEVREGS + IOC_PANEL, 0, 9,
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: tsutsui Date: Sat Sep 8 02:33:34 UTC 2018 Modified Files: src/sys/arch/sgimips/sgimips: machdep.c Log Message: Initialize ci_divisor_delay by temporary cpufreq for early delay(9) calls. This is actually required for Indigo R3k. Reported by Naruaki Etomi in PR port-sgimips/53520. To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.146 src/sys/arch/sgimips/sgimips/machdep.c:1.147 --- src/sys/arch/sgimips/sgimips/machdep.c:1.146 Sun Sep 2 09:57:33 2018 +++ src/sys/arch/sgimips/sgimips/machdep.c Sat Sep 8 02:33:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.147 2018/09/08 02:33:33 tsutsui Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.147 2018/09/08 02:33:33 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -334,6 +334,25 @@ mach_init(int argc, int32_t argv32[], ui curcpu()->ci_cpu_freq = strtoul(cpufreq, NULL, 10) * 100; /* + * Also initialize ci members for delay and clock by the temporary + * ci_cpu_freq value for early use of delay(9). + * These values will be calibrated later in MD code: + * - int_attach() in dev/int.c for IP6/10/12/20/22 + * - crime_attach() in dev/crime.c for IP32 + * + * XXX: ci_divisor_delay is for mips3_delay() in mips/mips3_clock.c + * but sgimips abuse it as "instructions per microsecond" + * for traditional delay(9) implementation derived from + * 4.4BSD/mips (also used in pmax and news3400). + * (see sys/arch/mips/mips/mips_mcclock.c etc.) + * + * Note ci_cycles_per_hz is for mips3_clockintr.c for MIPS3 so + * there is no early use, but initialize it as a sane default. + */ + curcpu()->ci_cycles_per_hz = curcpu()->ci_cpu_freq / (2 * hz); + curcpu()->ci_divisor_delay = curcpu()->ci_cpu_freq / (2 * 100); + + /* * Check machine (IPn) type. * * Note even on IP12 (which doesn't have ARCBIOS),
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: tsutsui Date: Sun Sep 2 16:18:50 UTC 2018 Modified Files: src/sys/arch/sgimips/hpc: wdsc.c Log Message: Fix wdsc(4) probe failure on HPC1.5 machines (Indigo R3k/R4k, IP6/IP10/IP12). The alignment adjustment code was removed in rev 1.36 for common mips bus_space changes, but the code was not bus_space related but used for uint32_t register acccess during probe. Reported and tested by Naruaki Etomi in PR port-sgimips/53522. Should be pulled up to netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sgimips/hpc/wdsc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/wdsc.c diff -u src/sys/arch/sgimips/hpc/wdsc.c:1.34 src/sys/arch/sgimips/hpc/wdsc.c:1.35 --- src/sys/arch/sgimips/hpc/wdsc.c:1.34 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/hpc/wdsc.c Sun Sep 2 16:18:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: wdsc.c,v 1.35 2018/09/02 16:18:50 tsutsui Exp $ */ /* * Copyright (c) 2001 Wayne Knowles @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.34 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.35 2018/09/02 16:18:50 tsutsui Exp $"); #include #include @@ -105,6 +105,9 @@ wdsc_match(device_t parent, cfdata_t cf, haa->hpc_regs->scsi0_ctl); asr = MIPS_PHYS_TO_KSEG1(haa->ha_sh + haa->ha_devoff); + /* XXX: hpc1 offset due to SGIMIPS_BUS_SPACE_HPC brain damage */ + asr = (asr + 3) & ~0x3; + if (platform.badaddr((void *)reset, sizeof(reset))) return 0;
CVS commit: src/sys/arch/sgimips/stand/boot
Module Name:src Committed By: tsutsui Date: Sun Sep 2 12:06:17 UTC 2018 Modified Files: src/sys/arch/sgimips/stand/boot: Makefile Log Message: Use elf2ecoff(1) rather than objcopy(1) to generat ecoff for old machines. objcopy(1) was used instead of elf2ecoff(1) since Makefile rev 1.9: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sgimips/stand/boot/Makefile#rev1.9 but it looks ELF binaries generated by recent binutils are too complicated to convert them to ecoff for old machines by objcopy(1). Reported by Naruaki Etomi in PR port-sgimips/53519. Should be pulled up to at least netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/stand/boot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/boot/Makefile diff -u src/sys/arch/sgimips/stand/boot/Makefile:1.19 src/sys/arch/sgimips/stand/boot/Makefile:1.20 --- src/sys/arch/sgimips/stand/boot/Makefile:1.19 Sat Feb 26 16:26:58 2011 +++ src/sys/arch/sgimips/stand/boot/Makefile Sun Sep 2 12:06:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2011/02/26 16:26:58 matt Exp $ +# $NetBSD: Makefile,v 1.20 2018/09/02 12:06:16 tsutsui Exp $ # Don't strip the ECOFF'ed version on install -- strip gets confused by that, @@ -12,10 +12,7 @@ SRCS= start.S boot.c bootinfo.c conf.c d PROG= aoutboot ${PROG}: ip2xboot ip3xboot .if ${MACHINE_ARCH} == "mipseb" - ${OBJCOPY} --impure -O ecoff-bigmips \ - -R .pdr -R .mdebug.nabi32 -R .mdebug.abi32 \ - -R .comment -R .ident \ - ip2xboot ${.TARGET} + ${ELF2ECOFF} ip2xboot ${.TARGET} .else touch ${.TARGET} .endif
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: tsutsui Date: Sun Sep 2 09:57:33 UTC 2018 Modified Files: src/sys/arch/sgimips/sgimips: machdep.c Log Message: Fix build failure without options DDB and with pseudo-device ksyms. There is a typo for ksyms (NKSYMS vs NKSYM). Also use consistent "#if NKSYMS" rather than "#if NKSYMS > 0" etc. and add comments after corresponding #endif for readability. Fixes PR port-sgimips/53521 from Naruaki Etomi. Should be pulled up to (at least) netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.145 src/sys/arch/sgimips/sgimips/machdep.c:1.146 --- src/sys/arch/sgimips/sgimips/machdep.c:1.145 Mon Nov 6 03:47:48 2017 +++ src/sys/arch/sgimips/sgimips/machdep.c Sun Sep 2 09:57:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.145 2017/11/06 03:47:48 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.145 2017/11/06 03:47:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.146 2018/09/02 09:57:33 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -244,12 +244,12 @@ mach_init(int argc, int32_t argv32[], ui vaddr_t kernend; u_int i; int rv; -#if NKSYMS > 0 || defined(DDB) || defined(MODULAR) +#if NKSYMS || defined(DDB) || defined(MODULAR) int nsym = 0; char *ssym = NULL; char *esym = NULL; struct btinfo_symtab *bi_syms; -#endif +#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ #ifdef _LP64 char *argv[20]; @@ -307,7 +307,7 @@ mach_init(int argc, int32_t argv32[], ui } else bootinfo_msg = "no bootinfo found. (old bootblocks?)\n"; -#if NKSYM > 0 || defined(DDB) || defined(MODULAR) +#if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* check whether there is valid bootinfo symtab info */ @@ -317,7 +317,7 @@ mach_init(int argc, int32_t argv32[], ui esym = (char *)bi_syms->esym; kernend = mips_round_page(esym); } else -#endif +#endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ { kernend = mips_round_page(end); }
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: tsutsui Date: Sun Sep 2 08:51:54 UTC 2018 Modified Files: src/sys/arch/sgimips/conf: INSTALL32_IP2x Log Message: Disable misc options to shrink an INSTALL kernel for IP2x. The ARC BIOS on Indy seems to have ~8MB limit. Fixes PR port-sgimips/53378 from Naruaki Etomi. Should be pulled up to netbsd-7 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/conf/INSTALL32_IP2x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/INSTALL32_IP2x diff -u src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.10 --- src/sys/arch/sgimips/conf/INSTALL32_IP2x:1.9 Sat Feb 4 22:27:26 2012 +++ src/sys/arch/sgimips/conf/INSTALL32_IP2x Sun Sep 2 08:51:53 2018 @@ -5,7 +5,7 @@ # Pull in standard `install' config include "arch/sgimips/conf/GENERIC32_IP2x" -makeoptions COPTS="-Os" +makeoptions COPTS="-Os -mmemcpy" # Enable the hooks used for initializing the root memory-disk. options MEMORY_DISK_HOOKS @@ -13,3 +13,60 @@ options MEMORY_DISK_IS_ROOT options MEMORY_DISK_SERVER=0# no userspace memory disk support options MEMORY_DISK_ROOT_SIZE=6400 # size of memory disk in blocks (3200k) options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode + +# shrink kernel since ARC BIOS seems to have 8MB limit +options FFS_NO_SNAPSHOT + +no options KTRACE +no options SYSVMSG +no options SYSVSEM +no options SYSVSHM +no options SYSCTL_INCLUDE_DESCR +no options COMPAT_15 +no options COMPAT_16 +no options COMPAT_20 +no options COMPAT_30 +no options COMPAT_40 +no options COMPAT_LINUX + +no file-system EXT2FS +no file-system LFS +no file-system NTFS +no file-system FDESC +no file-system KERNFS +no file-system NULLFS +no file-system OVERLAY +no file-system PUFFS +no file-system PROCFS +no file-system UMAPFS +no file-system UNION +no file-system CODA +no file-system TMPFS + +no options QUOTA +no options QUOTA2 +no options NFSSERVER + +no options NETATALK +no options PPP_FILTER + +no options MIIVERBOSE +no options SCSIVERBOSE + +no ch* at scsibus? +no ss* at scsibus? +no ses* at scsibus? +no uk* at scsibus? + +no ppbus* +no lpt* + +no pseudo-device ccd +no pseudo-device fss +no pseudo-device ipfilter +no pseudo-device bridge +no pseudo-device accf_data +no pseudo-device accf_http +no pseudo-device sequencer +no pseudo-device putter +no pseudo-device vcoda
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: christos Date: Mon Apr 9 20:07:22 UTC 2018 Modified Files: src/sys/arch/sgimips/hpc: files.hpc Added Files: src/sys/arch/sgimips/hpc: button.c Removed Files: src/sys/arch/sgimips/hpc: panel.c Log Message: rename panel to button. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/hpc/button.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/hpc/files.hpc cvs rdiff -u -r1.3 -r0 src/sys/arch/sgimips/hpc/panel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/files.hpc diff -u src/sys/arch/sgimips/hpc/files.hpc:1.15 src/sys/arch/sgimips/hpc/files.hpc:1.16 --- src/sys/arch/sgimips/hpc/files.hpc:1.15 Mon Apr 9 15:11:38 2018 +++ src/sys/arch/sgimips/hpc/files.hpc Mon Apr 9 16:07:22 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.hpc,v 1.15 2018/04/09 19:11:38 christos Exp $ +# $NetBSD: files.hpc,v 1.16 2018/04/09 20:07:22 christos Exp $ device sq: arp, ether, ifnet attach sq at hpc @@ -27,4 +27,4 @@ file arch/sgimips/hpc/pi1ppc.c pi1ppc device button : sysmon_power, sysmon_taskq attach button at hpc -file arch/sgimips/hpc/panel.c button +file arch/sgimips/hpc/button.c button Added files: Index: src/sys/arch/sgimips/hpc/button.c diff -u /dev/null src/sys/arch/sgimips/hpc/button.c:1.1 --- /dev/null Mon Apr 9 16:07:22 2018 +++ src/sys/arch/sgimips/hpc/button.c Mon Apr 9 16:07:22 2018 @@ -0,0 +1,154 @@ +/* $NetBSD: button.c,v 1.1 2018/04/09 20:07:22 christos Exp $ */ + +/*- + * Copyright (c) 2009 Michael Lorenz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: button.c,v 1.1 2018/04/09 20:07:22 christos Exp $"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include +#include +#include + +struct button_softc { + device_t sc_dev; + struct sysmon_pswitch sc_pbutton; + bus_space_tag_t sc_tag; + bus_space_handle_t sc_hreg; + int sc_last, sc_fired; +}; + +static int button_match(device_t, cfdata_t, void *); +static void button_attach(device_t, device_t, void *); + +static int button_intr(void *); +static void button_powerbutton(void *); + +CFATTACH_DECL_NEW(button, sizeof(struct button_softc), +button_match, +button_attach, +NULL, +NULL); + +static int +button_match(device_t parent, cfdata_t match, void *aux) +{ + struct hpc_attach_args *ha = aux; + + if (strcmp(ha->ha_name, match->cf_name) != 0) + return 0; + + if (mach_type == MACH_SGI_IP22) + return 1; + + return 0; +} + +static void +button_attach(device_t parent, device_t self, void *aux) +{ + struct button_softc *sc; + struct hpc_attach_args *haa; + + sc = device_private(self); + sc->sc_dev = self; + haa = aux; + sc->sc_tag = haa->ha_st; + sc->sc_fired = 0; + + aprint_normal("\n"); + if (bus_space_subregion(haa->ha_st, haa->ha_sh, haa->ha_devoff, + 0x4, /* just a single register */ + &sc->sc_hreg)) { + aprint_error(": unable to map button register\n"); + return; + } + + if ((cpu_intr_establish(haa->ha_irq, IPL_BIO, + button_intr, sc)) == NULL) { + printf(": unable to establish interrupt!\n"); + return; + } + + sc->sc_last = 0; + + sysmon_task_queue_init(); + memset(&sc->sc_pbutton, 0, sizeof(struct sysmon_pswitch)); + sc->sc_pbutton.smpsw_name = device_xname(sc->sc_dev); + sc->sc_pbutton.smpsw_type = PSWITCH_TYPE_POWER; + if (sysmon_pswitch_register(&sc->sc_pbutton) != 0) + aprint_error_dev(sc->sc_dev, + "unable to register power button with sysmon\n"); + pmf_device_register(self, NULL, NULL);
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: christos Date: Mon Apr 9 19:11:38 UTC 2018 Modified Files: src/sys/arch/sgimips/conf: GENERIC32_IP2x src/sys/arch/sgimips/hpc: files.hpc Log Message: rename "panel" to "button" to avoid conflict with fdt To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/sys/arch/sgimips/conf/GENERIC32_IP2x cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sgimips/hpc/files.hpc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC32_IP2x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.112 src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.113 --- src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.112 Tue Jan 23 09:47:56 2018 +++ src/sys/arch/sgimips/conf/GENERIC32_IP2x Mon Apr 9 15:11:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP2x,v 1.112 2018/01/23 14:47:56 sevan Exp $ +# $NetBSD: GENERIC32_IP2x,v 1.113 2018/04/09 19:11:38 christos Exp $ # # GENERIC32_IP2x machine description file # @@ -29,7 +29,7 @@ makeoptions TEXTADDR=0x88069000 # entry options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32-IP2x-$Revision: 1.112 $" +#ident "GENERIC32-IP2x-$Revision: 1.113 $" maxusers 32 @@ -238,7 +238,7 @@ tlphy* at mii? phy ? # ThunderLAN PHY sq* at hpc? offset ? # On-board ethernet / E++ adapter wdsc* at hpc? offset ? # On-board SCSI / GIO32 SCSI adapter haltwo* at hpc0 offset ? # IP22 / 24 -panel* at hpc0 offset ? # front panel buttons on Indy +button* at hpc0 offset ? # front panel buttons on Indy pckbc* at hpc0 offset ? pckbd* at pckbc? Index: src/sys/arch/sgimips/hpc/files.hpc diff -u src/sys/arch/sgimips/hpc/files.hpc:1.14 src/sys/arch/sgimips/hpc/files.hpc:1.15 --- src/sys/arch/sgimips/hpc/files.hpc:1.14 Wed May 13 21:10:19 2009 +++ src/sys/arch/sgimips/hpc/files.hpc Mon Apr 9 15:11:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.hpc,v 1.14 2009/05/14 01:10:19 macallan Exp $ +# $NetBSD: files.hpc,v 1.15 2018/04/09 19:11:38 christos Exp $ device sq: arp, ether, ifnet attach sq at hpc @@ -25,6 +25,6 @@ device pi1ppc: parport attach pi1ppc at hpc file arch/sgimips/hpc/pi1ppc.c pi1ppc -device panel : sysmon_power, sysmon_taskq -attach panel at hpc -file arch/sgimips/hpc/panel.c panel +device button : sysmon_power, sysmon_taskq +attach button at hpc +file arch/sgimips/hpc/panel.c button
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: jmcneill Date: Fri Mar 23 09:43:33 UTC 2018 Modified Files: src/sys/arch/sgimips/mace: if_mec.c Log Message: No need to print interrupt status for RX underflow as this status bit is handled already To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sgimips/mace/if_mec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/if_mec.c diff -u src/sys/arch/sgimips/mace/if_mec.c:1.55 src/sys/arch/sgimips/mace/if_mec.c:1.56 --- src/sys/arch/sgimips/mace/if_mec.c:1.55 Thu Dec 15 09:28:04 2016 +++ src/sys/arch/sgimips/mace/if_mec.c Fri Mar 23 09:43:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mec.c,v 1.55 2016/12/15 09:28:04 ozaki-r Exp $ */ +/* $NetBSD: if_mec.c,v 1.56 2018/03/23 09:43:33 jmcneill Exp $ */ /*- * Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.55 2016/12/15 09:28:04 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.56 2018/03/23 09:43:33 jmcneill Exp $"); #include "opt_ddb.h" @@ -1599,7 +1599,6 @@ mec_intr(void *arg) (MEC_INT_TX_LINK_FAIL | MEC_INT_TX_MEM_ERROR | MEC_INT_TX_ABORT | - MEC_INT_RX_FIFO_UNDERFLOW | MEC_INT_RX_DMA_UNDERFLOW)) { printf("%s: %s: interrupt status = 0x%08x\n", device_xname(sc->sc_dev), __func__, statreg);
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: jmcneill Date: Sun Mar 18 11:33:58 UTC 2018 Modified Files: src/sys/arch/sgimips/conf: GENERIC32_IP3x Log Message: Enable BUFQ_PRIOCSCAN To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/sgimips/conf/GENERIC32_IP3x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC32_IP3x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.115 src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.116 --- src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.115 Tue Jan 23 14:47:56 2018 +++ src/sys/arch/sgimips/conf/GENERIC32_IP3x Sun Mar 18 11:33:58 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP3x,v 1.115 2018/01/23 14:47:56 sevan Exp $ +# $NetBSD: GENERIC32_IP3x,v 1.116 2018/03/18 11:33:58 jmcneill Exp $ # # GENERIC32_IP3x machine description file # @@ -28,7 +28,7 @@ makeoptions TEXTADDR="0x80069000" # entr options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32_IP3x-$Revision: 1.115 $" +#ident "GENERIC32_IP3x-$Revision: 1.116 $" maxusers 32 @@ -55,7 +55,7 @@ options SYSCTL_INCLUDE_DESCR # Include # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. #options BUFQ_READPRIO -#options BUFQ_PRIOCSCAN +options BUFQ_PRIOCSCAN # Diagnostic/debugging support options #options DIAGNOSTIC # expensive kernel consistency checks
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: jmcneill Date: Sat Mar 17 13:14:27 UTC 2018 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: Add support for overriding the video mode by setting an ARCS environment variable. If the "crmfb_mode" environment variable is set, treat it as a mode string in the form WIDTHxHEIGHT[@REFRESH] and generate monitor timings using the VESA GTF formula. If set, this overrides the EDID preferred mode. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.44 src/sys/arch/sgimips/dev/crmfb.c:1.45 --- src/sys/arch/sgimips/dev/crmfb.c:1.44 Fri May 19 19:25:53 2017 +++ src/sys/arch/sgimips/dev/crmfb.c Sat Mar 17 13:14:27 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.44 2017/05/19 19:25:53 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.45 2018/03/17 13:14:27 jmcneill Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.44 2017/05/19 19:25:53 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.45 2018/03/17 13:14:27 jmcneill Exp $"); #include #include @@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1. #include #include #include +#include #include #include @@ -232,6 +233,7 @@ static void crmfb_setup_ddc(struct crmfb /* mode setting stuff */ static uint32_t calc_pll(int); /* frequency in kHz */ static int crmfb_set_mode(struct crmfb_softc *, const struct videomode *); +static int crmfb_parse_mode(const char *, struct videomode *); CFATTACH_DECL_NEW(crmfb, sizeof(struct crmfb_softc), crmfb_match, crmfb_attach, NULL, NULL); @@ -254,6 +256,8 @@ crmfb_attach(device_t parent, device_t s unsigned long v; long defattr; const char *consdev; + const char *modestr; + struct videomode mode, *pmode; int rv, i; sc = device_private(self); @@ -305,11 +309,16 @@ crmfb_attach(device_t parent, device_t s sc->sc_console_depth = 8; crmfb_setup_ddc(sc); - if ((sc->sc_edid_info.edid_preferred_mode != NULL)) { - if (crmfb_set_mode(sc, sc->sc_edid_info.edid_preferred_mode)) - aprint_normal_dev(sc->sc_dev, "using %dx%d\n", - sc->sc_width, sc->sc_height); - } + pmode = sc->sc_edid_info.edid_preferred_mode; + + modestr = arcbios_GetEnvironmentVariable("crmfb_mode"); + if (crmfb_parse_mode(modestr, &mode) == 0) + pmode = &mode; + + if (pmode != NULL && crmfb_set_mode(sc, pmode)) + aprint_normal_dev(sc->sc_dev, "using %dx%d\n", + sc->sc_width, sc->sc_height); + /* * first determine how many tiles we need * in 32bit each tile is 128x128 pixels @@ -1859,3 +1868,34 @@ crmfb_set_mode(struct crmfb_softc *sc, c return TRUE; } + +/* + * Parse a mode string in the form WIDTHxHEIGHT[@REFRESH] and return + * monitor timings generated using the VESA GTF formula. + */ +static int +crmfb_parse_mode(const char *modestr, struct videomode *mode) +{ + char *x, *at; + int width, height, refresh; + + if (modestr == NULL) + return EINVAL; + + x = strchr(modestr, 'x'); + at = strchr(modestr, '@'); + + if (x == NULL || (at != NULL && at < x)) + return EINVAL; + + width = strtoul(modestr, NULL, 10); + height = strtoul(x + 1, NULL, 10); + refresh = at ? strtoul(at + 1, NULL, 10) : 60; + + if (width == 0 || height == 0 || refresh == 0) + return EINVAL; + + vesagtf_mode(width, height, refresh, mode); + + return 0; +}
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: mrg Date: Sun Mar 4 21:42:28 UTC 2018 Modified Files: src/sys/arch/sgimips/gio: grtwo.c Log Message: #if 0 grtwo_cursor_data[] to match the #if 0'd code that uses it. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/gio/grtwo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/grtwo.c diff -u src/sys/arch/sgimips/gio/grtwo.c:1.13 src/sys/arch/sgimips/gio/grtwo.c:1.14 --- src/sys/arch/sgimips/gio/grtwo.c:1.13 Sat Oct 27 17:18:09 2012 +++ src/sys/arch/sgimips/gio/grtwo.c Sun Mar 4 21:42:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: grtwo.c,v 1.13 2012/10/27 17:18:09 chs Exp $ */ +/* $NetBSD: grtwo.c,v 1.14 2018/03/04 21:42:28 mrg Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.13 2012/10/27 17:18:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.14 2018/03/04 21:42:28 mrg Exp $"); #include #include @@ -156,6 +156,7 @@ static int grtwo_is_console = 0; #define GR2_ATTR_BG(a) ((a) & 0xff) #define GR2_ATTR_FG(a) (((a) >> 8) & 0xff) +#if 0 static const u_int16_t grtwo_cursor_data[128] = { /* Bit 0 */ 0xff00, 0x, @@ -225,6 +226,7 @@ static const u_int16_t grtwo_cursor_data 0x, 0x, 0x, 0x, }; +#endif static const u_int8_t grtwo_defcmap[8 * 3] = { /* Normal colors */
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: skrll Date: Fri Jun 9 07:32:24 UTC 2017 Modified Files: src/sys/arch/sgimips/conf: INSTALL64_IP2x Log Message: Align MEMORY_ROOT_DISK_SIZE with INSTALL32_IP2x To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/conf/INSTALL64_IP2x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/INSTALL64_IP2x diff -u src/sys/arch/sgimips/conf/INSTALL64_IP2x:1.2 src/sys/arch/sgimips/conf/INSTALL64_IP2x:1.3 --- src/sys/arch/sgimips/conf/INSTALL64_IP2x:1.2 Mon Dec 14 00:46:12 2009 +++ src/sys/arch/sgimips/conf/INSTALL64_IP2x Fri Jun 9 07:32:24 2017 @@ -11,4 +11,4 @@ makeoptions COPTS="-Os" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0# no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=6144# size of memory disk, in blocks (3MB) +options MEMORY_DISK_ROOT_SIZE=6400# size of memory disk, in blocks (3MB)
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: christos Date: Sat Jun 3 14:46:51 UTC 2017 Modified Files: src/sys/arch/sgimips/gio: devlist2h.awk Log Message: remove my copyright To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/gio/devlist2h.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/devlist2h.awk diff -u src/sys/arch/sgimips/gio/devlist2h.awk:1.5 src/sys/arch/sgimips/gio/devlist2h.awk:1.6 --- src/sys/arch/sgimips/gio/devlist2h.awk:1.5 Fri May 2 14:11:05 2008 +++ src/sys/arch/sgimips/gio/devlist2h.awk Sat Jun 3 10:46:51 2017 @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: devlist2h.awk,v 1.5 2008/05/02 18:11:05 martin Exp $ +# $NetBSD: devlist2h.awk,v 1.6 2017/06/03 14:46:51 christos Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. # All rights reserved. @@ -42,7 +42,6 @@ # 3. All advertising materials mentioning features or use of this software #must display the following acknowledgement: # This product includes software developed by Christopher G. Demetriou. -# This product includes software developed by Christos Zoulas # 4. The name of the author(s) may not be used to endorse or promote products #derived from this software without specific prior written permission #
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: christos Date: Fri Feb 10 04:00:48 UTC 2017 Modified Files: src/sys/arch/sgimips/sgimips: machdep.c Log Message: kill variable stack allocation To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.143 src/sys/arch/sgimips/sgimips/machdep.c:1.144 --- src/sys/arch/sgimips/sgimips/machdep.c:1.143 Thu Dec 22 09:47:59 2016 +++ src/sys/arch/sgimips/sgimips/machdep.c Thu Feb 9 23:00:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.143 2016/12/22 14:47:59 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.143 2016/12/22 14:47:59 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -255,7 +255,10 @@ mach_init(int argc, int32_t argv32[], ui struct btinfo_symtab *bi_syms; #endif #ifdef _LP64 - char *argv[argc+1]; + char *argv[20]; + + if (argc >= __arraycount(argv)) + panic("too many args"); for (i = 0; i < argc; i++) { argv[i] = (void *)(intptr_t)argv32[i];
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: macallan Date: Thu Nov 17 23:46:52 UTC 2016 Modified Files: src/sys/arch/sgimips/sgimips: cpu.c Log Message: KASSERT that MIPS_SR_KX is set when entering interrupt handler in !o32 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sgimips/sgimips/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/cpu.c diff -u src/sys/arch/sgimips/sgimips/cpu.c:1.26 src/sys/arch/sgimips/sgimips/cpu.c:1.27 --- src/sys/arch/sgimips/sgimips/cpu.c:1.26 Sun Feb 20 07:59:51 2011 +++ src/sys/arch/sgimips/sgimips/cpu.c Thu Nov 17 23:46:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.26 2011/02/20 07:59:51 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.27 2016/11/17 23:46:52 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.26 2011/02/20 07:59:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.27 2016/11/17 23:46:52 macallan Exp $"); #include #include @@ -109,6 +109,11 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s curcpu()->ci_data.cpu_nintr++; +#if !defined(__mips_o32) + KASSERTMSG(mips_cp0_status_read() & MIPS_SR_KX, + "pc %"PRIxVADDR ", status %x\n", pc, status); +#endif + (void)(*platform.watchdog_reset)(); while (ppl < (ipl = splintr(&pending))) {
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: macallan Date: Wed Nov 16 19:39:38 UTC 2016 Modified Files: src/sys/arch/sgimips/sgimips: bus.c Log Message: reenable mips1-specific dmamem_sync method clean up a bit while there To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sgimips/sgimips/bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/bus.c diff -u src/sys/arch/sgimips/sgimips/bus.c:1.68 src/sys/arch/sgimips/sgimips/bus.c:1.69 --- src/sys/arch/sgimips/sgimips/bus.c:1.68 Thu Jul 14 19:08:12 2016 +++ src/sys/arch/sgimips/sgimips/bus.c Wed Nov 16 19:39:38 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $ */ +/* $NetBSD: bus.c,v 1.69 2016/11/16 19:39:38 macallan Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.69 2016/11/16 19:39:38 macallan Exp $"); #include #include @@ -80,22 +80,17 @@ bus_space_tag_t normal_memt = NULL; void sgimips_bus_dma_init(void) { - printf("%s\n", __func__); normal_bus_mem_init(&normal_mbst, NULL); normal_memt = &normal_mbst; -#if 0 +#ifdef MIPS1 switch (mach_type) { /* R2000/R3000 */ - case MACH_SGI_IP6 | MACH_SGI_IP10: + case MACH_SGI_IP6 | MACH_SGI_IP10: /* same number... */ case MACH_SGI_IP12: sgimips_default_bus_dma_tag._dmamap_ops.dmamap_sync = _bus_dmamap_sync_mips1; break; - - default: - panic("sgimips_bus_dma_init: unsupported mach type IP%d\n", - mach_type); } #endif } @@ -129,6 +124,7 @@ bus_space_read_1(bus_space_tag_t t, bus_ } #endif +#ifdef MIPS1 /* Common function from DMA map synchronization. May be called * by chipset-specific DMA map synchronization functions. * @@ -230,24 +226,6 @@ _bus_dmamap_sync_mips1(bus_dma_tag_t t, len -= minlen; } } - -#if 0 -paddr_t -bus_space_mmap(bus_space_tag_t space, bus_addr_t addr, off_t off, - int prot, int flags) -{ - - if (flags & BUS_SPACE_MAP_CACHEABLE) { - - return mips_btop(MIPS_KSEG0_TO_PHYS(addr) + off); - } else -#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64) - return mips_btop((MIPS_KSEG1_TO_PHYS(addr) + off) - | PGC_NOCACHE); -#else - return mips_btop((MIPS_KSEG1_TO_PHYS(addr) + off)); -#endif -} #endif #define CHIP normal
CVS commit: src/sys/arch/sgimips/stand
Module Name:src Committed By: christos Date: Thu Sep 8 14:43:48 UTC 2016 Modified Files: src/sys/arch/sgimips/stand: Makefile.booters Makefile.inc src/sys/arch/sgimips/stand/boot64: Makefile Log Message: Avoid the PIE To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sgimips/stand/Makefile.booters cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/stand/Makefile.inc cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/stand/boot64/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/Makefile.booters diff -u src/sys/arch/sgimips/stand/Makefile.booters:1.22 src/sys/arch/sgimips/stand/Makefile.booters:1.23 --- src/sys/arch/sgimips/stand/Makefile.booters:1.22 Sun Jan 12 10:26:30 2014 +++ src/sys/arch/sgimips/stand/Makefile.booters Thu Sep 8 10:43:48 2016 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile.booters,v 1.22 2014/01/12 15:26:30 tsutsui Exp $ +# $NetBSD: Makefile.booters,v 1.23 2016/09/08 14:43:48 christos Exp $ # PROG set by parent. NOMAN= # defined +NOPIE= # defined -.include +.include .include # for HOST_SH # $S must correspond to the top of the 'sys' tree Index: src/sys/arch/sgimips/stand/Makefile.inc diff -u src/sys/arch/sgimips/stand/Makefile.inc:1.1 src/sys/arch/sgimips/stand/Makefile.inc:1.2 --- src/sys/arch/sgimips/stand/Makefile.inc:1.1 Wed Nov 21 17:14:51 2001 +++ src/sys/arch/sgimips/stand/Makefile.inc Thu Sep 8 10:43:48 2016 @@ -1,5 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.1 2001/11/21 22:14:51 soren Exp $ +# $NetBSD: Makefile.inc,v 1.2 2016/09/08 14:43:48 christos Exp $ -.include +NOPIE= # defined BINDIR?= /usr/mdec Index: src/sys/arch/sgimips/stand/boot64/Makefile diff -u src/sys/arch/sgimips/stand/boot64/Makefile:1.12 src/sys/arch/sgimips/stand/boot64/Makefile:1.13 --- src/sys/arch/sgimips/stand/boot64/Makefile:1.12 Wed Jan 15 20:15:34 2014 +++ src/sys/arch/sgimips/stand/boot64/Makefile Thu Sep 8 10:43:48 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2014/01/16 01:15:34 christos Exp $ +# $NetBSD: Makefile,v 1.13 2016/09/08 14:43:48 christos Exp $ PROG= ip30boot NOMAN= # defined @@ -9,7 +9,7 @@ SRCS= start.S boot.c bootinfo.c conf.c d CLEANFILES+= boot.map -.include +.include # $S must correspond to the top of the 'sys' tree S= ${.CURDIR}/../../../..
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Fri Aug 5 20:21:58 UTC 2016 Modified Files: src/sys/arch/sgimips/mace: pci_mace.c Log Message: simplify macepci_intr(): - use uint32_t - always clear all error bits - avoid a compiler bug(?) which caused the test for MACE_PERR_MASTER_ABORT to fail on n32 now my O2 no longer hangs when leaving cold To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/mace/pci_mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/pci_mace.c diff -u src/sys/arch/sgimips/mace/pci_mace.c:1.20 src/sys/arch/sgimips/mace/pci_mace.c:1.21 --- src/sys/arch/sgimips/mace/pci_mace.c:1.20 Fri Oct 2 05:22:52 2015 +++ src/sys/arch/sgimips/mace/pci_mace.c Fri Aug 5 20:21:58 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_mace.c,v 1.20 2015/10/02 05:22:52 msaitoh Exp $ */ +/* $NetBSD: pci_mace.c,v 1.21 2016/08/05 20:21:58 macallan Exp $ */ /* * Copyright (c) 2001,2003 Christopher Sekiya @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.20 2015/10/02 05:22:52 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.21 2016/08/05 20:21:58 macallan Exp $"); #include "opt_pci.h" #include "pci.h" @@ -293,11 +293,11 @@ macepci_intr(void *arg) { struct macepci_softc *sc = (struct macepci_softc *)arg; pci_chipset_tag_t pc = &sc->sc_pc; - u_int32_t error, address; + uint32_t error, address; error = bus_space_read_4(pc->iot, pc->ioh, MACE_PCI_ERROR_FLAGS); address = bus_space_read_4(pc->iot, pc->ioh, MACE_PCI_ERROR_ADDR); - while (error & 0xffc0) { + if (error & 0xffc0) { if (error & MACE_PERR_MASTER_ABORT) { /* * this seems to be a more-or-less normal error @@ -305,73 +305,47 @@ macepci_intr(void *arg) * a _lot_ of these errors, so no message for now * while I figure out if I missed a trick somewhere. */ - error &= ~MACE_PERR_MASTER_ABORT; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_TARGET_ABORT) { printf("mace: target abort at %x\n", address); - error &= ~MACE_PERR_TARGET_ABORT; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_DATA_PARITY_ERR) { printf("mace: parity error at %x\n", address); - error &= ~MACE_PERR_DATA_PARITY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_RETRY_ERR) { printf("mace: retry error at %x\n", address); - error &= ~MACE_PERR_RETRY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_ILLEGAL_CMD) { printf("mace: illegal command at %x\n", address); - error &= ~MACE_PERR_ILLEGAL_CMD; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_SYSTEM_ERR) { printf("mace: system error at %x\n", address); - error &= ~MACE_PERR_SYSTEM_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_INTERRUPT_TEST) { printf("mace: interrupt test at %x\n", address); - error &= ~MACE_PERR_INTERRUPT_TEST; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_PARITY_ERR) { printf("mace: parity error at %x\n", address); - error &= ~MACE_PERR_PARITY_ERR; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_RSVD) { printf("mace: reserved condition at %x\n", address); - error &= ~MACE_PERR_RSVD; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } if (error & MACE_PERR_OVERRUN) { printf("mace: overrun at %x\n", address); - error &= ~MACE_PERR_OVERRUN; - bus_space_write_4(pc->iot, pc->ioh, - MACE_PCI_ERROR_FLAGS, error); } + + /* clear all */ + bus_space_write_4(pc->iot, pc->ioh, + MACE_PCI_ERROR_FLAGS, error & ~0xffc0); } return 0; }
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: macallan Date: Sun Jul 24 16:47:49 UTC 2016 Modified Files: src/sys/arch/sgimips/hpc: hpc.c Log Message: use bus_space_map() To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sgimips/hpc/hpc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/hpc.c diff -u src/sys/arch/sgimips/hpc/hpc.c:1.68 src/sys/arch/sgimips/hpc/hpc.c:1.69 --- src/sys/arch/sgimips/hpc/hpc.c:1.68 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/hpc/hpc.c Sun Jul 24 16:47:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: hpc.c,v 1.68 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.68 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpc.c,v 1.69 2016/07/24 16:47:49 macallan Exp $"); #include #include @@ -527,7 +527,9 @@ hpc_attach(device_t parent, device_t sel /* XXX This is disgusting. */ ha.ha_st = normal_memt; - ha.ha_sh = MIPS_PHYS_TO_KSEG1(sc->sc_base); + if (bus_space_map(normal_memt, sc->sc_base, 0, + BUS_SPACE_MAP_LINEAR, &ha.ha_sh) != 0) + continue; ha.ha_dmat = &sgimips_default_bus_dma_tag; if (hpctype == 3) ha.hpc_regs = &hpc3_values;
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Wed Jul 20 22:16:37 UTC 2016 Modified Files: src/sys/arch/sgimips/gio: gio.c Log Message: use bus_space_map() instead of fudging our own bus_space_handle_t To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sgimips/gio/gio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/gio.c diff -u src/sys/arch/sgimips/gio/gio.c:1.34 src/sys/arch/sgimips/gio/gio.c:1.35 --- src/sys/arch/sgimips/gio/gio.c:1.34 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/gio/gio.c Wed Jul 20 22:16:37 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: gio.c,v 1.34 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: gio.c,v 1.35 2016/07/20 22:16:37 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.34 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.35 2016/07/20 22:16:37 macallan Exp $"); #include "opt_ddb.h" @@ -207,14 +207,17 @@ gio_attach(device_t parent, device_t sel ga.ga_slot = -1; ga.ga_addr = gfx_bases[i].base; + /* XXX */ + if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr), + sizeof(uint32_t))) + continue; ga.ga_iot = normal_memt; - /* XXX bus_space_map() */ - ga.ga_ioh = MIPS_PHYS_TO_KSEG1(ga.ga_addr); + if (bus_space_map(normal_memt, ga.ga_addr, 0, + BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0) + continue; ga.ga_dmat = &sgimips_default_bus_dma_tag; ga.ga_product = -1; - if (platform.badaddr((void *)ga.ga_ioh, sizeof(uint32_t))) - continue; if (config_found_sm_loc(self, "gio", NULL, &ga, gio_print, gio_submatch)) { @@ -252,13 +255,16 @@ gio_attach(device_t parent, device_t sel ga.ga_slot = slot_bases[i].slot; ga.ga_addr = slot_bases[i].base; + /* XXX */ + if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr), + sizeof(uint32_t))) + continue; ga.ga_iot = normal_memt; - ga.ga_ioh = MIPS_PHYS_TO_KSEG1(ga.ga_addr); + if (bus_space_map(normal_memt, ga.ga_addr, 0, + BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0) + continue; ga.ga_dmat = &sgimips_default_bus_dma_tag; - if (platform.badaddr((void *)ga.ga_ioh, sizeof(uint32_t))) - continue; - ga.ga_product = bus_space_read_4(ga.ga_iot, ga.ga_ioh, 0); config_found_sm_loc(self, "gio", NULL, &ga, gio_print, @@ -366,14 +372,17 @@ gio_cnattach(void) ga.ga_slot = -1; ga.ga_addr = gfx_bases[i].base; + /* XXX */ + if (platform.badaddr((void *)MIPS_PHYS_TO_KSEG1(ga.ga_addr), + sizeof(uint32_t))) + continue; ga.ga_iot = normal_memt; - ga.ga_ioh = MIPS_PHYS_TO_KSEG1(ga.ga_addr); + if (bus_space_map(normal_memt, ga.ga_addr, 0, + BUS_SPACE_MAP_LINEAR, &ga.ga_ioh) != 0) + continue; ga.ga_dmat = &sgimips_default_bus_dma_tag; ga.ga_product = -1; - if (platform.badaddr((void *)ga.ga_ioh,sizeof(uint32_t))) - continue; - #if (NGRTWO > 0) if (grtwo_cnattach(&ga) == 0) return 0;
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: skrll Date: Thu Jul 14 19:08:12 UTC 2016 Modified Files: src/sys/arch/sgimips/sgimips: bus.c Log Message: Wrap long line To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sgimips/sgimips/bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/bus.c diff -u src/sys/arch/sgimips/sgimips/bus.c:1.67 src/sys/arch/sgimips/sgimips/bus.c:1.68 --- src/sys/arch/sgimips/sgimips/bus.c:1.67 Wed Jul 13 21:31:03 2016 +++ src/sys/arch/sgimips/sgimips/bus.c Thu Jul 14 19:08:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.67 2016/07/13 21:31:03 skrll Exp $ */ +/* $NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.67 2016/07/13 21:31:03 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $"); #include #include @@ -218,8 +218,8 @@ _bus_dmamap_sync_mips1(bus_dma_tag_t t, #ifdef BUS_DMA_DEBUG printf("bus_dmamap_sync_mips1: flushing segment %d " - "(0x%"PRIxBUSADDR"..0x%"PRIxBUSADDR") ...", i, addr + offset, - addr + offset + minlen - 1); + "(0x%"PRIxBUSADDR"..0x%"PRIxBUSADDR") ...", i, + addr + offset, addr + offset + minlen - 1); #endif mips_dcache_inv_range( MIPS_PHYS_TO_KSEG0(addr + offset), minlen);
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Wed Jul 13 21:33:28 UTC 2016 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: appease gcc by removing now unnecessary cast To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.22 src/sys/arch/sgimips/mace/mace.c:1.23 --- src/sys/arch/sgimips/mace/mace.c:1.22 Tue Jun 30 03:55:23 2015 +++ src/sys/arch/sgimips/mace/mace.c Wed Jul 13 21:33:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.22 2015/06/30 03:55:23 macallan Exp $ */ +/* $NetBSD: mace.c,v 1.23 2016/07/13 21:33:28 macallan Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.22 2015/06/30 03:55:23 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.23 2016/07/13 21:33:28 macallan Exp $"); #include #include @@ -317,7 +317,7 @@ mace_intr(int irqs) /* irq 4 is the ISA cascade interrupt. Must handle with care. */ if (irqs & (1 << 4)) { - isa_irq = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(MACE_BASE + isa_irq = mips3_ld(MIPS_PHYS_TO_KSEG1(MACE_BASE + MACE_ISA_INT_STATUS)); for (i = 0; i < MACE_NINTR; i++) { if ((maceintrtab[i].irq == (1 << 4)) &&
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: skrll Date: Wed Jul 13 21:31:03 UTC 2016 Modified Files: src/sys/arch/sgimips/sgimips: bus.c Log Message: Fix compile To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/sgimips/sgimips/bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/bus.c diff -u src/sys/arch/sgimips/sgimips/bus.c:1.66 src/sys/arch/sgimips/sgimips/bus.c:1.67 --- src/sys/arch/sgimips/sgimips/bus.c:1.66 Wed Feb 18 16:47:59 2015 +++ src/sys/arch/sgimips/sgimips/bus.c Wed Jul 13 21:31:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.66 2015/02/18 16:47:59 macallan Exp $ */ +/* $NetBSD: bus.c,v 1.67 2016/07/13 21:31:03 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.66 2015/02/18 16:47:59 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.67 2016/07/13 21:31:03 skrll Exp $"); #include #include @@ -218,7 +218,7 @@ _bus_dmamap_sync_mips1(bus_dma_tag_t t, #ifdef BUS_DMA_DEBUG printf("bus_dmamap_sync_mips1: flushing segment %d " - "(0x%lx..0x%lx) ...", i, addr + offset, + "(0x%"PRIxBUSADDR"..0x%"PRIxBUSADDR") ...", i, addr + offset, addr + offset + minlen - 1); #endif mips_dcache_inv_range(
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: dholland Date: Sun Feb 14 19:11:20 UTC 2016 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: Remove extra stray break missed by Christos when committing PR 50783. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.42 src/sys/arch/sgimips/dev/crmfb.c:1.43 --- src/sys/arch/sgimips/dev/crmfb.c:1.42 Mon Feb 8 16:44:45 2016 +++ src/sys/arch/sgimips/dev/crmfb.c Sun Feb 14 19:11:19 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.42 2016/02/08 16:44:45 christos Exp $ */ +/* $NetBSD: crmfb.c,v 1.43 2016/02/14 19:11:19 dholland Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.42 2016/02/08 16:44:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.43 2016/02/14 19:11:19 dholland Exp $"); #include #include @@ -1128,7 +1128,6 @@ crmfb_setup_video(struct crmfb_softc *sc case 32: sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32; - break; sc->sc_mte_mode = MTE_MODE_DST_ECC | (MTE_TLB_A << MTE_DST_TLB_SHIFT) | (MTE_TLB_A << MTE_SRC_TLB_SHIFT) |
CVS commit: src/sys/arch/sgimips/stand/common
Module Name:src Committed By: dholland Date: Sun Feb 14 18:09:51 UTC 2016 Modified Files: src/sys/arch/sgimips/stand/common: disk.c Log Message: Add missing va_list, from David Binderman in PR 50796. XXX: this file and arch/arc/stand/boot/disk.c are cutpaste clones. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/stand/common/disk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/common/disk.c diff -u src/sys/arch/sgimips/stand/common/disk.c:1.11 src/sys/arch/sgimips/stand/common/disk.c:1.12 --- src/sys/arch/sgimips/stand/common/disk.c:1.11 Sun Jul 17 20:54:47 2011 +++ src/sys/arch/sgimips/stand/common/disk.c Sun Feb 14 18:09:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: disk.c,v 1.11 2011/07/17 20:54:47 joerg Exp $ */ +/* $NetBSD: disk.c,v 1.12 2016/02/14 18:09:51 dholland Exp $ */ /* * Copyright (c) 1992, 1993 @@ -112,8 +112,8 @@ diskopen(struct open_file *f, ...) va_list ap; va_start(ap, f); - device = va_arg(ap, char *); + va_end(ap); /* * For NetBSD/sgimips, since we use the SGI partition map directly,
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: christos Date: Mon Feb 8 16:44:46 UTC 2016 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: PR/50783: David Binderman: Indent switch properly, add missing break. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.41 src/sys/arch/sgimips/dev/crmfb.c:1.42 --- src/sys/arch/sgimips/dev/crmfb.c:1.41 Wed Sep 23 16:09:45 2015 +++ src/sys/arch/sgimips/dev/crmfb.c Mon Feb 8 11:44:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.41 2015/09/23 20:09:45 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.42 2016/02/08 16:44:45 christos Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.41 2015/09/23 20:09:45 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.42 2016/02/08 16:44:45 christos Exp $"); #include #include @@ -1107,36 +1107,37 @@ crmfb_setup_video(struct crmfb_softc *sc bus_space_write_8(sc->sc_iot, sc->sc_reh, 0x40, 0); switch (depth) { - case 8: - sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | - DE_MODE_TYPE_CI | DE_MODE_PIXDEPTH_8; - sc->sc_mte_mode = MTE_MODE_DST_ECC | - (MTE_TLB_A << MTE_DST_TLB_SHIFT) | - (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | - (MTE_DEPTH_8 << MTE_DEPTH_SHIFT); - sc->sc_mte_x_shift = 0; - break; - case 16: - sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_16 | - DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_16; - sc->sc_mte_mode = MTE_MODE_DST_ECC | - (MTE_TLB_A << MTE_DST_TLB_SHIFT) | - (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | - (MTE_DEPTH_16 << MTE_DEPTH_SHIFT); - sc->sc_mte_x_shift = 1; - break; - case 32: - sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | - DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32; - break; - sc->sc_mte_mode = MTE_MODE_DST_ECC | - (MTE_TLB_A << MTE_DST_TLB_SHIFT) | - (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | - (MTE_DEPTH_32 << MTE_DEPTH_SHIFT); - sc->sc_mte_x_shift = 2; - default: - panic("%s: unsuported colour depth %d\n", __func__, - depth); + case 8: + sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | + DE_MODE_TYPE_CI | DE_MODE_PIXDEPTH_8; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_8 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 0; + break; + case 16: + sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_16 | + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_16; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_16 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 1; + break; + case 32: + sc->sc_de_mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32; + break; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_32 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 2; + break; + default: + panic("%s: unsuported colour depth %d\n", __func__, + depth); } sc->sc_needs_sync = 0; sc->sc_src_mode = 0x;
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: macallan Date: Wed Sep 30 19:46:27 UTC 2015 Modified Files: src/sys/arch/sgimips/sgimips: console.c Log Message: don't MIPS_PHYS_TO_KSEG1() the hardware address for O2's serial ports now serial console works again To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sgimips/sgimips/console.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/console.c diff -u src/sys/arch/sgimips/sgimips/console.c:1.44 src/sys/arch/sgimips/sgimips/console.c:1.45 --- src/sys/arch/sgimips/sgimips/console.c:1.44 Wed Feb 18 16:47:59 2015 +++ src/sys/arch/sgimips/sgimips/console.c Wed Sep 30 19:46:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.44 2015/02/18 16:47:59 macallan Exp $ */ +/* $NetBSD: console.c,v 1.45 2015/09/30 19:46:27 macallan Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.44 2015/02/18 16:47:59 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.45 2015/09/30 19:46:27 macallan Exp $"); #include "opt_kgdb.h" @@ -227,7 +227,7 @@ mace_serial_init(const char *consdev) /* XXX: hardcoded MACE iotag */ mace_init_bus(); - if (comcnattach(mace_isa_memt, MIPS_PHYS_TO_KSEG1(MACE_BASE + base), + if (comcnattach(mace_isa_memt, MACE_BASE + base, speed, COM_FREQ, COM_TYPE_NORMAL, comcnmode) == 0) return (1); }
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Wed Sep 30 19:44:58 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: com_mace.c Log Message: pass the port's hardware address in COM_INIT_REGS() so the com driver can figure out wether this is the console or not To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/mace/com_mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/com_mace.c diff -u src/sys/arch/sgimips/mace/com_mace.c:1.10 src/sys/arch/sgimips/mace/com_mace.c:1.11 --- src/sys/arch/sgimips/mace/com_mace.c:1.10 Wed Feb 18 16:47:59 2015 +++ src/sys/arch/sgimips/mace/com_mace.c Wed Sep 30 19:44:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: com_mace.c,v 1.10 2015/02/18 16:47:59 macallan Exp $ */ +/* $NetBSD: com_mace.c,v 1.11 2015/09/30 19:44:58 macallan Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.10 2015/02/18 16:47:59 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.11 2015/09/30 19:44:58 macallan Exp $"); #include #include @@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: com_mace.c,v #include #include +#include #include #include @@ -96,7 +97,8 @@ com_mace_attach(device_t parent, device_ */ ioh = maa->maa_sh + maa->maa_offset; /* note that ioh on mac is *also* the iobase address */ - COM_INIT_REGS(sc->sc_regs, mace_isa_memt, ioh, 0); + COM_INIT_REGS(sc->sc_regs, mace_isa_memt, ioh, + MACE_BASE + maa->maa_offset); sc->sc_frequency = COM_FREQ;
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Thu Sep 24 17:56:59 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: pci_mace.c Log Message: on mips64 we can use the whole PCI space, not just the two 32MB windows accessible via KSEG* To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/mace/pci_mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/pci_mace.c diff -u src/sys/arch/sgimips/mace/pci_mace.c:1.18 src/sys/arch/sgimips/mace/pci_mace.c:1.19 --- src/sys/arch/sgimips/mace/pci_mace.c:1.18 Wed Feb 18 16:47:59 2015 +++ src/sys/arch/sgimips/mace/pci_mace.c Thu Sep 24 17:56:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_mace.c,v 1.18 2015/02/18 16:47:59 macallan Exp $ */ +/* $NetBSD: pci_mace.c,v 1.19 2015/09/24 17:56:59 macallan Exp $ */ /* * Copyright (c) 2001,2003 Christopher Sekiya @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.18 2015/02/18 16:47:59 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.19 2015/09/24 17:56:59 macallan Exp $"); #include "opt_pci.h" #include "pci.h" @@ -65,6 +65,11 @@ __KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v #include +#ifndef __mips_o32 +#define USE_HIGH_PCI +#endif + + struct macepci_softc { struct sgimips_pci_chipset sc_pc; }; @@ -156,15 +161,23 @@ macepci_attach(device_t parent, device_t bus_space_write_4(pc->iot, pc->ioh, MACEPCI_CONTROL, control); #if NPCI > 0 +#ifdef USE_HIGH_PCI + pc->pc_ioext = extent_create("macepciio", 0x1000, 0x01ff, + NULL, 0, EX_NOWAIT); + pc->pc_memext = extent_create("macepcimem", 0x8000, 0x, + NULL, 0, EX_NOWAIT); +#else pc->pc_ioext = extent_create("macepciio", 0x1000, 0x01ff, NULL, 0, EX_NOWAIT); + /* XXX no idea why we limit ourselves to only half of the 32MB window */ pc->pc_memext = extent_create("macepcimem", 0x8010, 0x81ff, NULL, 0, EX_NOWAIT); +#endif /* USE_HIGH_PCI */ pci_configure_bus(pc, pc->pc_ioext, pc->pc_memext, NULL, 0, mips_cache_info.mci_dcache_align); memset(&pba, 0, sizeof pba); -/*XXX*/ pba.pba_iot = mace_pci_iot; -/*XXX*/ pba.pba_memt = mace_pci_memt; + pba.pba_iot = mace_pci_iot; + pba.pba_memt = mace_pci_memt; pba.pba_dmat = &pci_bus_dma_tag; pba.pba_dmat64 = NULL; pba.pba_bus = 0; @@ -209,9 +222,6 @@ macepci_conf_read(pci_chipset_tag_t pc, void macepci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) { - /* XXX O2 soren */ - if (tag == 0) - return; bus_space_write_4(pc->iot, pc->ioh, MACE_PCI_CONFIG_ADDR, (tag | reg)); bus_space_write_4(pc->iot, pc->ioh, MACE_PCI_CONFIG_DATA, data); @@ -377,7 +387,7 @@ macepci_intr(void *arg) */ #define CHIP_W1_BUS_START(v) 0x8000UL #define CHIP_W1_BUS_END(v) 0xUL -#ifdef _LP64 +#ifdef USE_HIGH_PCI #define CHIP_W1_SYS_START(v) MACE_PCI_HI_MEMORY #define CHIP_W1_SYS_END(v) MACE_PCI_HI_MEMORY + 0x7fffUL #else @@ -402,7 +412,7 @@ macepci_intr(void *arg) #define CHIP_MEM /* defined */ #define CHIP_W1_BUS_START(v) 0xUL #define CHIP_W1_BUS_END(v) 0xUL -#ifdef _LP64 +#ifdef USE_HIGH_PCI #define CHIP_W1_SYS_START(v) MACE_PCI_HI_IO #define CHIP_W1_SYS_END(v) MACE_PCI_HI_IO + 0xUL #else
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Wed Sep 23 20:09:45 UTC 2015 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: no need to set RI_CLEAR - we do our own clearing and rasops assumes a linear framebuffer anyway. Now we can get away with leaving ri_bits at NULL where it belongs on this hardware. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.40 src/sys/arch/sgimips/dev/crmfb.c:1.41 --- src/sys/arch/sgimips/dev/crmfb.c:1.40 Wed Feb 18 16:47:58 2015 +++ src/sys/arch/sgimips/dev/crmfb.c Wed Sep 23 20:09:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.40 2015/02/18 16:47:58 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.41 2015/09/23 20:09:45 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.40 2015/02/18 16:47:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.41 2015/09/23 20:09:45 macallan Exp $"); #include #include @@ -626,10 +626,7 @@ crmfb_init_screen(void *c, struct vcons_ break; } - ri->ri_bits = KERNADDR(sc->sc_dma); - - if (existing) - ri->ri_flg |= RI_CLEAR; + ri->ri_bits = NULL; rasops_init(ri, 0, 0); ri->ri_caps = WSSCREEN_WSCOLORS;
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Tue Aug 25 02:09:18 UTC 2015 Modified Files: src/sys/arch/sgimips/gio: newport.c Log Message: - pass the right address to bus_space_mmap() so this works on N32 kernels - don't mess with XMAP9 when switching to graphics mode To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/gio/newport.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.18 src/sys/arch/sgimips/gio/newport.c:1.19 --- src/sys/arch/sgimips/gio/newport.c:1.18 Mon Jun 2 15:16:23 2014 +++ src/sys/arch/sgimips/gio/newport.c Tue Aug 25 02:09:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $ */ +/* $NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $"); #include #include @@ -58,10 +58,9 @@ struct newport_softc { }; struct newport_devconfig { - uint32_t dc_addr; - bus_space_tag_t dc_st; bus_space_handle_t dc_sh; + bus_addr_t dc_addr; int dc_boardrev; int dc_vc2rev; @@ -909,12 +908,6 @@ newport_ioctl(void *v, void *vs, u_long rex3_wait_gfifo(dc); newport_setup_hw(dc); vcons_redraw_screen(vd->active); - } else { -xmap9_write_mode(dc, 0, - XMAP9_MODE_GAMMA_BYPASS | -XMAP9_CONFIG_RGBMAP_2 | - XMAP9_MODE_PIXSIZE_24BPP); -xmap9_write(dc, XMAP9_DCBCRS_MODE_SELECT, 0); } } return 0; @@ -934,5 +927,5 @@ newport_mmap(void *v, void *vs, off_t of if ( offset >= 0xf) return -1; - return bus_space_mmap(dc->dc_st, dc->dc_sh, offset, prot, 0); + return bus_space_mmap(dc->dc_st, dc->dc_addr, offset, prot, 0); }
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Tue Jun 30 03:55:23 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: shorten the interrupt name so the level field is actually readable in systat To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.21 src/sys/arch/sgimips/mace/mace.c:1.22 --- src/sys/arch/sgimips/mace/mace.c:1.21 Wed Feb 18 16:47:59 2015 +++ src/sys/arch/sgimips/mace/mace.c Tue Jun 30 03:55:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.21 2015/02/18 16:47:59 macallan Exp $ */ +/* $NetBSD: mace.c,v 1.22 2015/06/30 03:55:23 macallan Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.21 2015/02/18 16:47:59 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.22 2015/06/30 03:55:23 macallan Exp $"); #include #include @@ -261,7 +261,7 @@ mace_intr_establish(int intr, int level, maceintrtab[i].intrmask = level; snprintf(maceintrtab[i].evname, sizeof(maceintrtab[i].evname), - "intr %d level 0x%x", intr, level); + "intr %d lv 0x%x", intr, level); evcnt_attach_dynamic(&maceintrtab[i].evcnt, EVCNT_TYPE_INTR, NULL, "mace", maceintrtab[i].evname);
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: matt Date: Fri Jun 26 22:55:06 UTC 2015 Modified Files: src/sys/arch/sgimips/include: intr.h src/sys/arch/sgimips/sgimips: machdep.c Log Message: Cleanup includes To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sgimips/include/intr.h cvs rdiff -u -r1.140 -r1.141 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/include/intr.h diff -u src/sys/arch/sgimips/include/intr.h:1.27 src/sys/arch/sgimips/include/intr.h:1.28 --- src/sys/arch/sgimips/include/intr.h:1.27 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/include/intr.h Fri Jun 26 22:55:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.27 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: intr.h,v 1.28 2015/06/26 22:55:06 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -43,8 +43,6 @@ #include #include #include -#include -#include #define NINTR 32 Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.140 src/sys/arch/sgimips/sgimips/machdep.c:1.141 --- src/sys/arch/sgimips/sgimips/machdep.c:1.140 Mon Mar 24 19:10:34 2014 +++ src/sys/arch/sgimips/sgimips/machdep.c Fri Jun 26 22:55:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.141 2015/06/26 22:55:06 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.141 2015/06/26 22:55:06 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -50,10 +50,12 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -67,18 +69,15 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include -#include +#include + #include #include -#include #include #include #include -#include #include -#include -#include #include #include #ifdef ENABLE_MIPS4_CACHE_R10K
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: riastradh Date: Mon Apr 13 21:22:34 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: if_mec.c Log Message: Missed a spot: rnd.h -> rndsource.h. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/sgimips/mace/if_mec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/if_mec.c diff -u src/sys/arch/sgimips/mace/if_mec.c:1.50 src/sys/arch/sgimips/mace/if_mec.c:1.51 --- src/sys/arch/sgimips/mace/if_mec.c:1.50 Sun Aug 10 16:44:34 2014 +++ src/sys/arch/sgimips/mace/if_mec.c Mon Apr 13 21:22:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mec.c,v 1.50 2014/08/10 16:44:34 tls Exp $ */ +/* $NetBSD: if_mec.c,v 1.51 2015/04/13 21:22:34 riastradh Exp $ */ /*- * Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.50 2014/08/10 16:44:34 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.51 2015/04/13 21:22:34 riastradh Exp $"); #include "opt_ddb.h" @@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1 #include #include -#include +#include #include #include
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Sat Apr 4 14:19:00 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: macekbc.c Log Message: malloc() -> kmem_alloc() for private data, also kmem_free() them if we don't finish attaching for whatever reason found by Brainy To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/mace/macekbc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/macekbc.c diff -u src/sys/arch/sgimips/mace/macekbc.c:1.7 src/sys/arch/sgimips/mace/macekbc.c:1.8 --- src/sys/arch/sgimips/mace/macekbc.c:1.7 Sat Oct 27 17:18:10 2012 +++ src/sys/arch/sgimips/mace/macekbc.c Sat Apr 4 14:19:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: macekbc.c,v 1.7 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: macekbc.c,v 1.8 2015/04/04 14:19:00 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -31,12 +31,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: macekbc.c,v 1.7 2012/10/27 17:18:10 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: macekbc.c,v 1.8 2015/04/04 14:19:00 macallan Exp $"); #include #include #include -#include +#include #include #include @@ -125,7 +125,7 @@ macekbc_attach(device_t parent, device_t aprint_normal(": PS2 controller\n"); aprint_naive("\n"); - t = malloc(sizeof(struct macekbc_internal), M_DEVBUF, M_NOWAIT|M_ZERO); + t = kmem_alloc(sizeof(struct macekbc_internal), KM_NOSLEEP); if (t == NULL) { aprint_error("%s: not enough memory\n", device_xname(self)); return; @@ -137,20 +137,20 @@ macekbc_attach(device_t parent, device_t 0, &t->t_ioh[PCKBPORT_KBD_SLOT]) != 0) { aprint_error("%s: couldn't map kbd registers\n", device_xname(self)); - return; + goto bork; } if (bus_space_subregion(t->t_iot, maa->maa_sh, maa->maa_offset + 32, 0, &t->t_ioh[PCKBPORT_AUX_SLOT]) != 0) { aprint_error("%s: couldn't map aux registers\n", device_xname(self)); - return; + goto bork; } if ((t->t_rxih = cpu_intr_establish(maa->maa_intr, maa->maa_intrmask, macekbc_intr, t)) == NULL) { printf("%s: couldn't establish interrupt\n", device_xname(self)); - return; + goto bork; } sc->sc_id = t; t->t_sc = sc; @@ -169,6 +169,9 @@ macekbc_attach(device_t parent, device_t t->t_present[PCKBPORT_AUX_SLOT] = 1; return; +bork: + kmem_free(t, sizeof(struct macekbc_internal)); + return; } static int
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Sat Apr 4 14:12:40 UTC 2015 Modified Files: src/sys/arch/sgimips/dev: scn.c Log Message: don't malloc a tiny, fixed size buffer to scribble into, then not use it and never free it either found by Brainy To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/dev/scn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/scn.c diff -u src/sys/arch/sgimips/dev/scn.c:1.7 src/sys/arch/sgimips/dev/scn.c:1.8 --- src/sys/arch/sgimips/dev/scn.c:1.7 Fri Jul 25 08:10:34 2014 +++ src/sys/arch/sgimips/dev/scn.c Sat Apr 4 14:12:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: scn.c,v 1.7 2014/07/25 08:10:34 dholland Exp $ */ +/* $NetBSD: scn.c,v 1.8 2015/04/04 14:12:40 macallan Exp $ */ /* * Resurrected from the old pc532 port 1/18/2009. @@ -92,7 +92,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.7 2014/07/25 08:10:34 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.8 2015/04/04 14:12:40 macallan Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -815,7 +815,6 @@ scn_attach(device_t parent, device_t sel u_char mr1, mr2; enum scntype scntype = SCNUNK; const char *duart_type = "Unknown"; - char *intrname; bool console, first; devmajor_t major; @@ -906,9 +905,6 @@ scn_attach(device_t parent, device_t sel ch_base[CH_MR] = mr2; splx(s); - intrname = malloc(sizeof("scnXX"), M_DEVBUF, M_NOWAIT); - snprintf(intrname, sizeof("scnXX"), "scn%d", unit); - /* * On IP6 the console chip is duart1. The keyboard/mouse * is duart0. Each chip has two channels and the channels
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: macallan Date: Wed Feb 18 16:47:59 UTC 2015 Modified Files: src/sys/arch/sgimips/conf: files.sgimips src/sys/arch/sgimips/dev: crime.c crmfb.c ctl.c dpclock.c dsclock.c imc.c int.c pic.c zs.c src/sys/arch/sgimips/gio: gio.c pci_gio.c src/sys/arch/sgimips/hpc: hpc.c if_sq.c panel.c pckbc_hpc.c wdsc.c src/sys/arch/sgimips/include: bus_defs.h bus_funcs.h pci_machdep.h src/sys/arch/sgimips/ioc: ioc.c oioc.c src/sys/arch/sgimips/mace: com_mace.c mace.c mcclock_mace.c pci_mace.c pcireg_mace.h src/sys/arch/sgimips/pci: pci_machdep.c src/sys/arch/sgimips/sgimips: bus.c console.c Log Message: switch sgimips to common bus_dma and bus_space in arch/mips/ Tested on O2 and Indy. Things that are compile-tested only for lack of hardware: - GIO ethernet cards with PCI bridges - IP2x hardware not found on Indy - IP1x To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sgimips/conf/files.sgimips cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sgimips/dev/crime.c cvs rdiff -u -r1.39 -r1.40 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sgimips/dev/ctl.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/dev/dpclock.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/dev/dsclock.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sgimips/dev/imc.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sgimips/dev/int.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sgimips/dev/pic.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sgimips/dev/zs.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sgimips/gio/gio.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/gio/pci_gio.c cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sgimips/hpc/hpc.c cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sgimips/hpc/if_sq.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/hpc/panel.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/hpc/pckbc_hpc.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sgimips/hpc/wdsc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/include/bus_defs.h \ src/sys/arch/sgimips/include/bus_funcs.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/include/pci_machdep.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/ioc/ioc.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sgimips/ioc/oioc.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/mace/com_mace.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/mace/mace.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sgimips/mace/mcclock_mace.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sgimips/mace/pci_mace.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/mace/pcireg_mace.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sgimips/pci/pci_machdep.c cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sgimips/sgimips/bus.c cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sgimips/sgimips/console.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/files.sgimips diff -u src/sys/arch/sgimips/conf/files.sgimips:1.52 src/sys/arch/sgimips/conf/files.sgimips:1.53 --- src/sys/arch/sgimips/conf/files.sgimips:1.52 Sun Jul 20 10:22:55 2014 +++ src/sys/arch/sgimips/conf/files.sgimips Wed Feb 18 16:47:58 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.sgimips,v 1.52 2014/07/20 10:22:55 alnsn Exp $ +# $NetBSD: files.sgimips,v 1.53 2015/02/18 16:47:58 macallan Exp $ maxpartitions 16 @@ -26,8 +26,7 @@ file arch/sgimips/sgimips/console.c file arch/sgimips/sgimips/disksubr.c file arch/sgimips/sgimips/machdep.c -file dev/bus_dma/bus_dmamem_common.c - +file arch/mips/mips/bus_dma.c file arch/mips/mips/mips3_clock.c mips3 file arch/mips/mips/mips3_clockintr.c mips3 Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.37 src/sys/arch/sgimips/dev/crime.c:1.38 --- src/sys/arch/sgimips/dev/crime.c:1.37 Sat May 17 20:44:08 2014 +++ src/sys/arch/sgimips/dev/crime.c Wed Feb 18 16:47:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.37 2014/05/17 20:44:08 mrg Exp $ */ +/* $NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.37 2014/05/17 20:44:08 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.38 2015/02/18 16:47:58 macallan Exp $"); #include #include @@ -108,9 +108,9 @@ crime_attach(device_t parent, device_t s uint32_t startctr, endctr, cps; sc->sc_dev = self; - crm_iot = SGIMIPS_BUS_SPACE_CRIME; + crm_iot = normal_memt; - if (bus_space_map(crm_iot, ma->ma_addr, 0 /* XXX */, + if (bus_space_map(crm_iot, ma->ma_addr, 0x1000, BUS_SPACE_MAP_LINEAR, &crm_ioh)) panic("%s: can't map I/O space", __func__); Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.39 src/sys/arch/sgimips/dev/crmfb.c:1.40 --- src/sys/arch/sgimips/dev/crmfb.c:1.39 Tue Jan 20 12:13:04 2015 +++ src/sys/arch/sgimips/dev/crmfb.c Wed Feb 18 16:47:58 2015 @@ -1,4 +1,
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: macallan Date: Wed Feb 18 11:15:19 UTC 2015 Modified Files: src/sys/arch/sgimips/conf: GENERIC64_32_IP2x GENERIC64_32_IP3x std.sgimips64_32 Log Message: cleanup compat options, disable COMPAT_LINUX for N32 kernels To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/conf/GENERIC64_32_IP2x \ src/sys/arch/sgimips/conf/GENERIC64_32_IP3x cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sgimips/conf/std.sgimips64_32 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC64_32_IP2x diff -u src/sys/arch/sgimips/conf/GENERIC64_32_IP2x:1.2 src/sys/arch/sgimips/conf/GENERIC64_32_IP2x:1.3 --- src/sys/arch/sgimips/conf/GENERIC64_32_IP2x:1.2 Sat Aug 23 20:26:59 2014 +++ src/sys/arch/sgimips/conf/GENERIC64_32_IP2x Wed Feb 18 11:15:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC64_32_IP2x,v 1.2 2014/08/23 20:26:59 dholland Exp $ +# $NetBSD: GENERIC64_32_IP2x,v 1.3 2015/02/18 11:15:19 macallan Exp $ # # GENERIC32_IP2x machine description file # @@ -29,7 +29,7 @@ include "arch/sgimips/conf/std.sgimips6 no makeoptions TEXTADDR # entry point makeoptions TEXTADDR=0x88069000 # entry point -#ident "GENERIC64-IP2x-$Revision: 1.2 $" +#ident "GENERIC64-IP2x-$Revision: 1.3 $" no makeoptions WANT_ECOFF makeoptions WANT_ECOFF="no" # Create an ECOFF kernel in addition @@ -37,14 +37,3 @@ makeoptions WANT_ECOFF="no" # Create an # netbooting Indigo (IP20) and some # Indigo2 (IP22) machines -# Compatibility options -#options COMPAT_15 # NetBSD 1.5, -#options COMPAT_16 # NetBSD 1.6, -#options COMPAT_20 # NetBSD 2.0, -#options COMPAT_30 # NetBSD 3.0, -#options COMPAT_40 # NetBSD 4.0 binary compatibility. -#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. - -#options COMPAT_LINUX # binary compatibility with Linux -#options COMPAT_ULTRIX # binary compatibility with Ultrix -#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. Index: src/sys/arch/sgimips/conf/GENERIC64_32_IP3x diff -u src/sys/arch/sgimips/conf/GENERIC64_32_IP3x:1.2 src/sys/arch/sgimips/conf/GENERIC64_32_IP3x:1.3 --- src/sys/arch/sgimips/conf/GENERIC64_32_IP3x:1.2 Sat Aug 23 20:26:59 2014 +++ src/sys/arch/sgimips/conf/GENERIC64_32_IP3x Wed Feb 18 11:15:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC64_32_IP3x,v 1.2 2014/08/23 20:26:59 dholland Exp $ +# $NetBSD: GENERIC64_32_IP3x,v 1.3 2015/02/18 11:15:19 macallan Exp $ # # GENERIC32_IP3x machine description file # @@ -30,16 +30,4 @@ makeoptions TEXTADDR="0x80069000 no makeoptions CPUFLAGS makeoptions CPUFLAGS="-march=mips4 -mtune=vr5000" -#ident "GENERIC64_IP3x-$Revision: 1.2 $" - -# Compatibility options -#options COMPAT_15 # NetBSD 1.5, -#options COMPAT_16 # NetBSD 1.6, -#options COMPAT_20 # NetBSD 2.0, -#options COMPAT_30 # NetBSD 3.0, and -#options COMPAT_40 # NetBSD 4.0 binary compatibility. -#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. - -no options COMPAT_LINUX # binary compatibility with Linux -#options COMPAT_ULTRIX # binary compatibility with Ultrix -#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. +#ident "GENERIC64_IP3x-$Revision: 1.3 $" Index: src/sys/arch/sgimips/conf/std.sgimips64_32 diff -u src/sys/arch/sgimips/conf/std.sgimips64_32:1.3 src/sys/arch/sgimips/conf/std.sgimips64_32:1.4 --- src/sys/arch/sgimips/conf/std.sgimips64_32:1.3 Wed Jun 4 18:18:21 2014 +++ src/sys/arch/sgimips/conf/std.sgimips64_32 Wed Feb 18 11:15:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: std.sgimips64_32,v 1.3 2014/06/04 18:18:21 macallan Exp $ +# $NetBSD: std.sgimips64_32,v 1.4 2015/02/18 11:15:19 macallan Exp $ # this is for building n32 kernels no makeoptions MACHINE_ARCH @@ -11,3 +11,5 @@ makeoptions LP64="no" # for some reason this kicks in for n32 binaries as well, causing problems # with pkgsrc ( MACHINE_ARCH vs. uname -p mismatch ) #options COMPAT_NETBSD32 + +no options COMPAT_LINUX
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Tue Feb 17 11:25:43 UTC 2015 Modified Files: src/sys/arch/sgimips/mace: mavb.c Log Message: move DAC1 output channel to master so things like OSS and kmix work as expected To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/mace/mavb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mavb.c diff -u src/sys/arch/sgimips/mace/mavb.c:1.9 src/sys/arch/sgimips/mace/mavb.c:1.10 --- src/sys/arch/sgimips/mace/mavb.c:1.9 Sat Oct 27 17:18:10 2012 +++ src/sys/arch/sgimips/mace/mavb.c Tue Feb 17 11:25:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mavb.c,v 1.9 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: mavb.c,v 1.10 2015/02/17 11:25:43 macallan Exp $ */ /* $OpenBSD: mavb.c,v 1.6 2005/04/15 13:05:14 mickey Exp $ */ /* @@ -723,16 +723,16 @@ mavb_query_devinfo(void *hdl, struct mix case AD1843_DAC1_GAIN: di->type = AUDIO_MIXER_VALUE; - di->mixer_class = AD1843_INPUT_CLASS; + di->mixer_class = AD1843_OUTPUT_CLASS; di->next = AD1843_DAC1_MUTE; - strlcpy(di->label.name, AudioNdac "1", sizeof di->label.name); + strlcpy(di->label.name, AudioNmaster, sizeof di->label.name); di->un.v.num_channels = 2; strlcpy(di->un.v.units.name, AudioNvolume, sizeof di->un.v.units.name); break; case AD1843_DAC1_MUTE: di->type = AUDIO_MIXER_ENUM; - di->mixer_class = AD1843_INPUT_CLASS; + di->mixer_class = AD1843_OUTPUT_CLASS; di->prev = AD1843_DAC1_GAIN; strlcpy(di->label.name, AudioNmute, sizeof di->label.name); di->un.e.num_mem = 2;
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Tue Jan 20 12:13:04 UTC 2015 Modified Files: src/sys/arch/sgimips/dev: crmfb.c crmfbreg.h Log Message: - remove scratch area, it's been unused since we're drawing characters by hardware - don't sync the rendering engine unless we have to, watch FIFO levels instead - support anti-aliased fonts and let the drawing engine do all the work To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/dev/crmfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.38 src/sys/arch/sgimips/dev/crmfb.c:1.39 --- src/sys/arch/sgimips/dev/crmfb.c:1.38 Tue Sep 2 15:44:44 2014 +++ src/sys/arch/sgimips/dev/crmfb.c Tue Jan 20 12:13:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.38 2014/09/02 15:44:44 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.39 2015/01/20 12:13:04 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.38 2014/09/02 15:44:44 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.39 2015/01/20 12:13:04 macallan Exp $"); #include #include @@ -154,7 +154,10 @@ struct crmfb_softc { int sc_mte_x_shift; uint32_t sc_mte_mode; uint32_t sc_de_mode; - uint8_t *sc_scratch; + uint32_t sc_src_mode; + uint32_t sc_dst_mode; + int sc_needs_sync; + uint8_t *sc_lptr; paddr_t sc_linear; uint32_t sc_vtflags; int sc_wsmode, sc_video_on; @@ -198,6 +201,7 @@ static void crmfb_copyrows(void *, int, static void crmfb_eraserows(void *, int, int, long); static void crmfb_cursor(void *, int, int, int); static void crmfb_putchar(void *, int, int, u_int, long); +static void crmfb_putchar_aa(void *, int, int, u_int, long); /* I2C glue */ static int crmfb_i2c_acquire_bus(void *, int); @@ -336,8 +340,8 @@ crmfb_attach(device_t parent, device_t s if (rv) panic("crmfb_attach: can't load DMA map"); - /* allocate an extra 64Kb for a linear buffer */ - sc->sc_dma.size = 0x1 * (16 * sc->sc_tiles_x + 1); + /* allocate an extra 128Kb for a linear buffer */ + sc->sc_dma.size = 0x1 * (16 * sc->sc_tiles_x + 2); rv = bus_dmamem_alloc(sc->sc_dmat, sc->sc_dma.size, 65536, 0, sc->sc_dma.segs, sizeof(sc->sc_dma.segs) / sizeof(sc->sc_dma.segs[0]), @@ -365,8 +369,8 @@ crmfb_attach(device_t parent, device_t s } bus_dmamap_sync(sc->sc_dmat, sc->sc_dmai.map, 0, sc->sc_dmai.size, BUS_DMASYNC_PREWRITE); - sc->sc_scratch = (char *)KERNADDR(sc->sc_dma) + (0xf * sc->sc_tiles_x); sc->sc_linear = (paddr_t)DMAADDR(sc->sc_dma) + 0x10 * sc->sc_tiles_x; + sc->sc_lptr = (char *)KERNADDR(sc->sc_dma) + (0x10 * sc->sc_tiles_x); aprint_normal_dev(sc->sc_dev, "allocated %d byte fb @ %p (%p)\n", sc->sc_fbsize, KERNADDR(sc->sc_dmai), KERNADDR(sc->sc_dma)); @@ -580,8 +584,8 @@ crmfb_mmap(void *v, void *vs, off_t offs /* now the actual engine registers */ if ((offset >= 0x15002000) && (offset < 0x15005000)) return bus_space_mmap(sc->sc_iot, offset, 0, prot, 0); - /* and now the scratch area */ - if ((offset >= 0x1501) && (offset < 0x1502)) + /* and now the linear area */ + if ((offset >= 0x1501) && (offset < 0x1503)) return bus_dmamem_mmap(sc->sc_dmat, sc->sc_dma.segs, sc->sc_dma.nsegs, offset + (0x10 * sc->sc_tiles_x) - 0x1501, @@ -599,7 +603,7 @@ crmfb_init_screen(void *c, struct vcons_ sc = (struct crmfb_softc *)c; ri = &scr->scr_ri; - ri->ri_flg = RI_CENTER | RI_FULLCLEAR; + ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_ENABLE_ALPHA; ri->ri_depth = sc->sc_console_depth; ri->ri_width = sc->sc_width; ri->ri_height = sc->sc_height; @@ -639,8 +643,11 @@ crmfb_init_screen(void *c, struct vcons_ ri->ri_ops.eraserows = crmfb_eraserows; ri->ri_ops.copycols = crmfb_copycols; ri->ri_ops.erasecols = crmfb_erasecols; - ri->ri_ops.putchar = crmfb_putchar; - + if (FONT_IS_ALPHA(ri->ri_font)) { + ri->ri_ops.putchar = crmfb_putchar_aa; + } else { + ri->ri_ops.putchar = crmfb_putchar; + } return; } @@ -831,6 +838,61 @@ crmfb_read_reg(struct crmfb_softc *sc, i return bus_space_read_4(sc->sc_iot, sc->sc_ioh, offset); } +static inline void +crmfb_wait_idle(struct crmfb_softc *sc) +{ + int i = 0; + + do { + i++; + } while (((bus_space_read_4(sc->sc_iot, sc->sc_reh, CRIME_DE_STATUS) & + CRIME_DE_IDLE) == 0) && (i < 1)); + if (i >= 1) + aprint_error("crmfb_wait_idle() timed out\n"); + sc->sc_needs_sync = 0; +} + +/* writes to CRIME_DE_MODE_* only take effect when the engine is idle */ + +static inline void +crmfb_src_mode(struct crmfb_softc *sc, uint32_t mode) +{ + if (mode == sc->sc_src_mode) + return; + bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC, mode); + sc-
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Tue Sep 2 15:44:44 UTC 2014 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: support ioctl() WSDISPLAYIO_SVIDEO, _GVIDEO and _GET_EDID now xf86-video-crime can actually turn the monitor off To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.37 src/sys/arch/sgimips/dev/crmfb.c:1.38 --- src/sys/arch/sgimips/dev/crmfb.c:1.37 Mon Dec 16 15:45:29 2013 +++ src/sys/arch/sgimips/dev/crmfb.c Tue Sep 2 15:44:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $ */ +/* $NetBSD: crmfb.c,v 1.38 2014/09/02 15:44:44 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.38 2014/09/02 15:44:44 macallan Exp $"); #include #include @@ -153,10 +153,13 @@ struct crmfb_softc { int sc_mte_direction; int sc_mte_x_shift; uint32_t sc_mte_mode; + uint32_t sc_de_mode; uint8_t *sc_scratch; paddr_t sc_linear; - int sc_wsmode; - struct edid_info sc_edid_info; + uint32_t sc_vtflags; + int sc_wsmode, sc_video_on; + uint8_t sc_edid_data[128]; + struct edid_info sc_edid_info; /* cursor stuff */ int sc_cur_x; @@ -283,6 +286,10 @@ crmfb_attach(device_t parent, device_t s sc->sc_depth = 32; if (sc->sc_width == 0 || sc->sc_height == 0) { + /* + * XXX + * actually, these days we probably could + */ aprint_error_dev(sc->sc_dev, "device unusable if not setup by firmware\n"); bus_space_unmap(sc->sc_iot, sc->sc_ioh, 0 /* XXX */); @@ -367,6 +374,7 @@ crmfb_attach(device_t parent, device_t s crmfb_setup_video(sc, sc->sc_console_depth); ri = &crmfb_console_screen.scr_ri; memset(ri, 0, sizeof(struct rasops_info)); + sc->sc_video_on = 1; vcons_init(&sc->sc_vd, sc, &crmfb_defaultscreen, &crmfb_accessops); sc->sc_vd.init_screen = crmfb_init_screen; @@ -428,7 +436,7 @@ crmfb_ioctl(void *v, void *vs, u_long cm switch (cmd) { case WSDISPLAYIO_GTYPE: /* not really, but who cares? */ - /* wsfb does */ + /* xf86-video-crime does */ *(u_int *)data = WSDISPLAY_TYPE_CRIME; return 0; case WSDISPLAYIO_GINFO: @@ -468,8 +476,27 @@ crmfb_ioctl(void *v, void *vs, u_long cm } return 0; case WSDISPLAYIO_SVIDEO: + { + int d = *(int *)data; + if (d == sc->sc_video_on) +return 0; + sc->sc_video_on = d; + if (d == WSDISPLAYIO_VIDEO_ON) { +crmfb_write_reg(sc, +CRMFB_VT_FLAGS, sc->sc_vtflags); + } else { +/* turn all SYNCs off */ +crmfb_write_reg(sc, CRMFB_VT_FLAGS, +sc->sc_vtflags | CRMFB_VT_FLAGS_VDRV_LOW | + CRMFB_VT_FLAGS_HDRV_LOW | + CRMFB_VT_FLAGS_SYNC_LOW); + } + } + return 0; + case WSDISPLAYIO_GVIDEO: - return ENODEV; /* not supported yet */ + *(int *)data = sc->sc_video_on; + return 0; case WSDISPLAYIO_GCURPOS: { @@ -511,6 +538,16 @@ crmfb_ioctl(void *v, void *vs, u_long cm cu = (struct wsdisplay_cursor *)data; return crmfb_scursor(sc, cu); } + case WSDISPLAYIO_GET_EDID: { + struct wsdisplayio_edid_info *d = data; + + d->data_size = 128; + if (d->buffer_size < 128) + return EAGAIN; + if (sc->sc_edid_data[1] == 0) + return ENODATA; + return copyout(sc->sc_edid_data, d->edid_data, 128); + } } return EPASSTHROUGH; } @@ -567,8 +604,11 @@ crmfb_init_screen(void *c, struct vcons_ ri->ri_width = sc->sc_width; ri->ri_height = sc->sc_height; ri->ri_stride = ri->ri_width * (ri->ri_depth / 8); -#if 1 + switch (ri->ri_depth) { + case 8: + ri->ri_flg |= RI_8BIT_IS_RGB; + break; case 16: ri->ri_rnum = ri->ri_gnum = ri->ri_bnum = 5; ri->ri_rpos = 11; @@ -582,7 +622,7 @@ crmfb_init_screen(void *c, struct vcons_ ri->ri_bpos = 24; break; } -#endif + ri->ri_bits = KERNADDR(sc->sc_dma); if (existing) @@ -814,7 +854,7 @@ static int crmfb_setup_video(struct crmfb_softc *sc, int depth) { uint64_t reg; - uint32_t d, h, mode, page; + uint32_t d, h, page; int i, bail, tile_width, tlbptr, lptr, j, tx, shift, overhang; const char *wantsync; uint16_t v; @@ -862,7 +902,7 @@ crmfb_setup_video(struct crmfb_softc *sc /* setup colour mode */ switch (depth) { case 8: - h = CRMFB_MODE_TYP_I8; + h = CRMFB_MODE_TYP_RG3B2; tile_width = 512; break; case 16: @@ -943,9 +983,7 @@ crmfb_setup_video(struct crmfb_softc *sc wantsync = arcbios_GetEnvironmentVariable("SyncOnGreen"); if ( (wantsync != NULL) && (wantsync[0] == 'n') ) { - d = ( 1 << CRMFB_VT_FLAGS_SYNC_LOW_LSB) & - CRMFB_REG_MASK(CRMFB_VT_FLAGS_SYNC_LOW_MSB, - CRMFB_VT_FLAGS_SYNC_LOW_LSB); + sc->sc_vtflags |= CRMFB_VT_FLAGS_SYNC_LOW; crmf
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: macallan Date: Wed Jun 4 18:19:20 UTC 2014 Added Files: src/sys/arch/sgimips/conf: GENERIC64_32_IP2x Log Message: n32 kernel for IP2x To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/conf/GENERIC64_32_IP2x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/sgimips/conf/GENERIC64_32_IP2x diff -u /dev/null src/sys/arch/sgimips/conf/GENERIC64_32_IP2x:1.1 --- /dev/null Wed Jun 4 18:19:20 2014 +++ src/sys/arch/sgimips/conf/GENERIC64_32_IP2x Wed Jun 4 18:19:20 2014 @@ -0,0 +1,50 @@ +# $NetBSD: GENERIC64_32_IP2x,v 1.1 2014/06/04 18:19:20 macallan Exp $ +# +# GENERIC32_IP2x machine description file +# +# This machine description file is used to generate the default NetBSD +# kernel. The generic kernel does not include all options, subsystems +# and device drivers, but should be useful for most applications. +# +# The machine description file can be customised for your specific +# machine to reduce the kernel size and improve its performance. +# +# For further information on compiling NetBSD kernels, see the config(8) +# man page. +# +# For further information on hardware support for this architecture, see +# the intro(4) man page. For further information about kernel options +# for this architecture, see the options(4) man page. For an explanation +# of each device driver in this file see the section 4 man page for the +# device. +# +# +# Currently this config file supports Indigo R4k, Indigo2 and Indy +# (IP20, IP22 and IP24, respectively). +# + +include "arch/sgimips/conf/GENERIC32_IP2x" +include "arch/sgimips/conf/std.sgimips64_32" + +no makeoptions TEXTADDR # entry point +makeoptions TEXTADDR=0x88069000 # entry point + +#ident "GENERIC64-IP2x-$Revision: 1.1 $" + +no makeoptions WANT_ECOFF +makeoptions WANT_ECOFF="no" # Create an ECOFF kernel in addition + # to an ELF kernel -- required for + # netbooting Indigo (IP20) and some + # Indigo2 (IP22) machines + +# Compatibility options +#options COMPAT_15 # NetBSD 1.5 +#options COMPAT_16 # NetBSD 1.6 +#options COMPAT_20 # NetBSD 2.0 +#options COMPAT_30 # NetBSD 3.0 +#options COMPAT_40 # NetBSD 4.0 compatibility. +#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. + +#options COMPAT_LINUX # binary compatibility with Linux +#options COMPAT_ULTRIX # binary compatibility with Ultrix +#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys.
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: macallan Date: Wed Jun 4 18:18:21 UTC 2014 Modified Files: src/sys/arch/sgimips/conf: std.sgimips64_32 Log Message: fix comments To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/conf/std.sgimips64_32 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/std.sgimips64_32 diff -u src/sys/arch/sgimips/conf/std.sgimips64_32:1.2 src/sys/arch/sgimips/conf/std.sgimips64_32:1.3 --- src/sys/arch/sgimips/conf/std.sgimips64_32:1.2 Sat May 31 16:16:52 2014 +++ src/sys/arch/sgimips/conf/std.sgimips64_32 Wed Jun 4 18:18:21 2014 @@ -1,10 +1,13 @@ -# $NetBSD: std.sgimips64_32,v 1.2 2014/05/31 16:16:52 macallan Exp $ +# $NetBSD: std.sgimips64_32,v 1.3 2014/06/04 18:18:21 macallan Exp $ # this is for building n32 kernels no makeoptions MACHINE_ARCH makeoptions MACHINE_ARCH="mips64eb" makeoptions LP64="no" -# we do not need or want these in a 32bit kernel +# ELF64 doesn't currently buid with 32bit kernels #options EXEC_ELF64 # exec ELF64 binaries + +# for some reason this kicks in for n32 binaries as well, causing problems +# with pkgsrc ( MACHINE_ARCH vs. uname -p mismatch ) #options COMPAT_NETBSD32
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Tue Jun 3 12:15:00 UTC 2014 Modified Files: src/sys/arch/sgimips/dev: int.c Log Message: actually get rid of actually unused variables, still works on my Indy thanks mrg To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sgimips/dev/int.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/int.c diff -u src/sys/arch/sgimips/dev/int.c:1.26 src/sys/arch/sgimips/dev/int.c:1.27 --- src/sys/arch/sgimips/dev/int.c:1.26 Mon Jun 2 15:07:24 2014 +++ src/sys/arch/sgimips/dev/int.c Tue Jun 3 12:15:00 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int.c,v 1.26 2014/06/02 15:07:24 macallan Exp $ */ +/* $NetBSD: int.c,v 1.27 2014/06/03 12:15:00 macallan Exp $ */ /* * Copyright (c) 2009 Stephen M. Rumble @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.26 2014/06/02 15:07:24 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.27 2014/06/03 12:15:00 macallan Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -479,7 +479,7 @@ int2_cal_timer(void) int s; int roundtime; int sampletime; - int __unused(startmsb), __unused(lsb), msb; + int msb; unsigned long startctr, endctr; /* @@ -489,7 +489,6 @@ int2_cal_timer(void) */ roundtime = (100 / hz) / 2; sampletime = (100 / hz) + 0xff; - startmsb = (sampletime >> 8); s = splhigh(); @@ -503,7 +502,7 @@ int2_cal_timer(void) /* Wait for the MSB to count down to zero */ do { bus_space_write_1(iot, ioh, INT2_TIMER_CONTROL, TIMER_SEL2); - lsb = bus_space_read_1(iot, ioh, INT2_TIMER_2) & 0xff; + (void)bus_space_read_1(iot, ioh, INT2_TIMER_2); msb = bus_space_read_1(iot, ioh, INT2_TIMER_2) & 0xff; endctr = mips3_cp0_count_read();
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Mon Jun 2 15:16:23 UTC 2014 Modified Files: src/sys/arch/sgimips/gio: newport.c Log Message: more __unused() To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sgimips/gio/newport.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.17 src/sys/arch/sgimips/gio/newport.c:1.18 --- src/sys/arch/sgimips/gio/newport.c:1.17 Wed Jan 11 21:23:38 2012 +++ src/sys/arch/sgimips/gio/newport.c Mon Jun 2 15:16:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.17 2012/01/11 21:23:38 macallan Exp $ */ +/* $NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.17 2012/01/11 21:23:38 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.18 2014/06/02 15:16:23 macallan Exp $"); #include #include @@ -433,7 +433,7 @@ newport_get_resolution(struct newport_de static void newport_setup_hw(struct newport_devconfig *dc) { - uint16_t curp,tmp; + uint16_t __unused(curp), tmp; int i; uint32_t scratch; @@ -882,7 +882,7 @@ newport_ioctl(void *v, void *vs, u_long { struct vcons_data *vd; struct newport_devconfig *dc; - struct vcons_screen *ms; + struct vcons_screen *__unused(ms); int nmode; vd = (struct vcons_data *)v;
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Mon Jun 2 15:07:24 UTC 2014 Modified Files: src/sys/arch/sgimips/dev: int.c Log Message: sprinkle __unused() To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sgimips/dev/int.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/int.c diff -u src/sys/arch/sgimips/dev/int.c:1.25 src/sys/arch/sgimips/dev/int.c:1.26 --- src/sys/arch/sgimips/dev/int.c:1.25 Sat Oct 27 17:18:09 2012 +++ src/sys/arch/sgimips/dev/int.c Mon Jun 2 15:07:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: int.c,v 1.25 2012/10/27 17:18:09 chs Exp $ */ +/* $NetBSD: int.c,v 1.26 2014/06/02 15:07:24 macallan Exp $ */ /* * Copyright (c) 2009 Stephen M. Rumble @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.25 2012/10/27 17:18:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.26 2014/06/02 15:07:24 macallan Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -479,7 +479,7 @@ int2_cal_timer(void) int s; int roundtime; int sampletime; - int startmsb, lsb, msb; + int __unused(startmsb), __unused(lsb), msb; unsigned long startctr, endctr; /*
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: macallan Date: Sat May 31 16:16:52 UTC 2014 Modified Files: src/sys/arch/sgimips/conf: std.sgimips64_32 Log Message: we don't need or want COMPAT_NETBSD32 in a 32bit kernel should cure pkgsrc MACHINE_ARCH mismatches To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/conf/std.sgimips64_32 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/std.sgimips64_32 diff -u src/sys/arch/sgimips/conf/std.sgimips64_32:1.1 src/sys/arch/sgimips/conf/std.sgimips64_32:1.2 --- src/sys/arch/sgimips/conf/std.sgimips64_32:1.1 Wed May 21 10:04:03 2014 +++ src/sys/arch/sgimips/conf/std.sgimips64_32 Sat May 31 16:16:52 2014 @@ -1,9 +1,10 @@ -# $NetBSD: std.sgimips64_32,v 1.1 2014/05/21 10:04:03 macallan Exp $ +# $NetBSD: std.sgimips64_32,v 1.2 2014/05/31 16:16:52 macallan Exp $ # this is for building n32 kernels no makeoptions MACHINE_ARCH makeoptions MACHINE_ARCH="mips64eb" makeoptions LP64="no" +# we do not need or want these in a 32bit kernel #options EXEC_ELF64 # exec ELF64 binaries -options COMPAT_NETBSD32 +#options COMPAT_NETBSD32
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: macallan Date: Wed May 21 10:04:03 UTC 2014 Added Files: src/sys/arch/sgimips/conf: GENERIC64_32_IP3x std.sgimips64_32 Log Message: config goop for building 32bit sgimips64 kernels works fine on my O2 ( now to make the actual LP64 kernels work... ) To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/sgimips/conf/GENERIC64_32_IP3x \ src/sys/arch/sgimips/conf/std.sgimips64_32 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/sgimips/conf/GENERIC64_32_IP3x diff -u /dev/null src/sys/arch/sgimips/conf/GENERIC64_32_IP3x:1.1 --- /dev/null Wed May 21 10:04:03 2014 +++ src/sys/arch/sgimips/conf/GENERIC64_32_IP3x Wed May 21 10:04:03 2014 @@ -0,0 +1,45 @@ +# $NetBSD: GENERIC64_32_IP3x,v 1.1 2014/05/21 10:04:03 macallan Exp $ +# +# GENERIC32_IP3x machine description file +# +# This machine description file is used to generate the default NetBSD +# kernel. The generic kernel does not include all options, subsystems +# and device drivers, but should be useful for most applications. +# +# The machine description file can be customised for your specific +# machine to reduce the kernel size and improve its performance. +# +# For further information on compiling NetBSD kernels, see the config(8) +# man page. +# +# For further information on hardware support for this architecture, see +# the intro(4) man page. For further information about kernel options +# for this architecture, see the options(4) man page. For an explanation +# of each device driver in this file see the section 4 man page for the +# device. +# +# +# Currently this config file supports O2 (IP32). +# + +include "arch/sgimips/conf/GENERIC32_IP3x" +include "arch/sgimips/conf/std.sgimips64_32" + +no makeoptions TEXTADDR +makeoptions TEXTADDR="0x80069000" # entry point +no makeoptions CPUFLAGS +makeoptions CPUFLAGS="-march=mips4 -mtune=vr5000" + +#ident "GENERIC64_IP3x-$Revision: 1.1 $" + +# Compatibility options +#options COMPAT_15 # NetBSD 1.5 +#options COMPAT_16 # NetBSD 1.6 +#options COMPAT_20 # NetBSD 2.0 +#options COMPAT_30 # NetBSD 3.0 +#options COMPAT_40 # NetBSD 4.0 compatibility. +#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. + +no options COMPAT_LINUX # binary compatibility with Linux +#options COMPAT_ULTRIX # binary compatibility with Ultrix +#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. Index: src/sys/arch/sgimips/conf/std.sgimips64_32 diff -u /dev/null src/sys/arch/sgimips/conf/std.sgimips64_32:1.1 --- /dev/null Wed May 21 10:04:03 2014 +++ src/sys/arch/sgimips/conf/std.sgimips64_32 Wed May 21 10:04:03 2014 @@ -0,0 +1,9 @@ +# $NetBSD: std.sgimips64_32,v 1.1 2014/05/21 10:04:03 macallan Exp $ +# this is for building n32 kernels + +no makeoptions MACHINE_ARCH +makeoptions MACHINE_ARCH="mips64eb" +makeoptions LP64="no" + +#options EXEC_ELF64 # exec ELF64 binaries +options COMPAT_NETBSD32
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: mrg Date: Sat May 17 20:44:08 UTC 2014 Modified Files: src/sys/arch/sgimips/dev: crime.c Log Message: split crime_bus_reset() into crime_{cpu,mem}_reset() and only reset the cpu or the memory upon either error, not both. seems to make my O2 slightly less likely to hang, and matches what the linux crime driver does. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sgimips/dev/crime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.36 src/sys/arch/sgimips/dev/crime.c:1.37 --- src/sys/arch/sgimips/dev/crime.c:1.36 Thu Aug 18 02:56:21 2011 +++ src/sys/arch/sgimips/dev/crime.c Sat May 17 20:44:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $ */ +/* $NetBSD: crime.c,v 1.37 2014/05/17 20:44:08 mrg Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.37 2014/05/17 20:44:08 mrg Exp $"); #include #include @@ -63,7 +63,9 @@ __KERNEL_RCSID(0, "$NetBSD: crime.c,v 1. static int crime_match(device_t, struct cfdata *, void *); static void crime_attach(device_t, device_t, void *); -void crime_bus_reset(void); +static void crime_mem_reset(void); +static void crime_cpu_reset(void); +static void crime_bus_reset(void); void crime_watchdog_reset(void); void crime_watchdog_disable(void); void crime_intr(vaddr_t, uint32_t, uint32_t); @@ -142,7 +144,8 @@ crime_attach(device_t parent, device_t s aprint_normal(" (CRIME_ID: %" PRIu64 ")\n", crm_id); /* reset CRIME CPU & memory error registers */ - crime_bus_reset(); + crime_mem_reset(); + crime_cpu_reset(); crime_watchdog_disable(); @@ -237,17 +240,17 @@ crime_intr(vaddr_t pc, uint32_t status, CRIME_MEM_ERROR_STAT); printf("crime: memory error address %" PRIu64 " status %" PRIu64 "\n", address << 2, stat); - crime_bus_reset(); + crime_mem_reset(); } if (crime_ipending & CRIME_INT_CRMERR) { stat = bus_space_read_8(crm_iot, crm_ioh, CRIME_CPU_ERROR_STAT); -printf("crime: cpu error %" PRIu64 " at" -" address %" PRIu64 "\n", stat, -bus_space_read_8(crm_iot, crm_ioh, -CRIME_CPU_ERROR_ADDR)); - crime_bus_reset(); + address = bus_space_read_8(crm_iot, crm_ioh, + CRIME_CPU_ERROR_ADDR) << 2; + printf("crime: cpu error %" PRIu64 " at address %" + PRIu64 "\n", stat, address); + crime_cpu_reset(); } } @@ -283,14 +286,28 @@ crime_intr_unmask(unsigned int intr) } void -crime_bus_reset(void) +crime_mem_reset(void) { - bus_space_write_8(crm_iot, crm_ioh, CRIME_CPU_ERROR_STAT, 0); bus_space_write_8(crm_iot, crm_ioh, CRIME_MEM_ERROR_STAT, 0); } void +crime_cpu_reset(void) +{ + + bus_space_write_8(crm_iot, crm_ioh, CRIME_CPU_ERROR_STAT, 0); +} + +void +crime_bus_reset(void) +{ + + crime_mem_reset(); + crime_cpu_reset(); +} + +void crime_watchdog_reset(void) {
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: ozaki-r Date: Wed Apr 2 00:46:12 UTC 2014 Modified Files: src/sys/arch/sgimips/gio: pci_gio.c Log Message: Get rid of a wrong comma To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/gio/pci_gio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/pci_gio.c diff -u src/sys/arch/sgimips/gio/pci_gio.c:1.12 src/sys/arch/sgimips/gio/pci_gio.c:1.13 --- src/sys/arch/sgimips/gio/pci_gio.c:1.12 Sat Mar 29 19:28:30 2014 +++ src/sys/arch/sgimips/gio/pci_gio.c Wed Apr 2 00:46:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_gio.c,v 1.12 2014/03/29 19:28:30 christos Exp $ */ +/* $NetBSD: pci_gio.c,v 1.13 2014/04/02 00:46:11 ozaki-r Exp $ */ /* * Copyright (c) 2006 Stephen M. Rumble @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.12 2014/03/29 19:28:30 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.13 2014/04/02 00:46:11 ozaki-r Exp $"); /* * Glue for PCI devices that are connected to the GIO bus by various little @@ -302,7 +302,7 @@ giopci_intr_map(const struct pci_attach_ static const char * giopci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih, char * buf, -size_t, len) +size_t len) { snprintf(buf, len, "slot %s", (ih == GIO_SLOT_EXP0) ? "EXP0" : (ih == GIO_SLOT_EXP1) ? "EXP1" : "GFX");
CVS commit: src/sys/arch/sgimips/include
Module Name:src Committed By: ozaki-r Date: Tue Apr 1 12:57:46 UTC 2014 Modified Files: src/sys/arch/sgimips/include: pci_machdep.h Log Message: Add a missing comma To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/include/pci_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/include/pci_machdep.h diff -u src/sys/arch/sgimips/include/pci_machdep.h:1.12 src/sys/arch/sgimips/include/pci_machdep.h:1.13 --- src/sys/arch/sgimips/include/pci_machdep.h:1.12 Sat Mar 29 19:28:30 2014 +++ src/sys/arch/sgimips/include/pci_machdep.h Tue Apr 1 12:57:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.12 2014/03/29 19:28:30 christos Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.13 2014/04/01 12:57:46 ozaki-r Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -93,7 +93,7 @@ void pci_conf_write(pci_chipset_tag_t, int pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t); int pci_intr_map(const struct pci_attach_args *, pci_intr_handle_t *); -const char *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t, char * +const char *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t, char *, size_t); const struct evcnt *pci_intr_evcnt(pci_chipset_tag_t, pci_intr_handle_t); void *pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
CVS commit: src/sys/arch/sgimips/stand/sgivol
Module Name:src Committed By: christos Date: Fri Mar 28 15:00:53 UTC 2014 Modified Files: src/sys/arch/sgimips/stand/sgivol: sgivol.c Log Message: use err To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/stand/sgivol/sgivol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/sgivol/sgivol.c diff -u src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.20 src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.21 --- src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.20 Wed Mar 26 12:16:06 2014 +++ src/sys/arch/sgimips/stand/sgivol/sgivol.c Fri Mar 28 11:00:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sgivol.c,v 1.20 2014/03/26 16:16:06 christos Exp $ */ +/* $NetBSD: sgivol.c,v 1.21 2014/03/28 15:00:53 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -53,6 +53,7 @@ #include #include #include +#include #ifndef HAVE_NBTOOL_CONFIG_H #include #endif @@ -80,7 +81,7 @@ struct stat st; struct disklabel lbl; #endif -unsigned char buf[512]; +char buf[512]; const char *sgi_types[] = { "Volume Header", @@ -99,20 +100,18 @@ const char *sgi_types[] = { "XVM" }; -int main(int, char *[]); - void display_vol(void); -void init_volhdr(void); +void init_volhdr(const char *); void read_file(void); -void write_file(void); -void delete_file(void); -void move_file(void); -void modify_partition(void); -void write_volhdr(void); +void write_file(const char *); +void delete_file(const char *); +void move_file(const char *); +void modify_partition(const char *); +void write_volhdr(const char *); int allocate_space(int); void checksum_vol(void); int names_match(int, const char *); -void usage(void); +void usage(void) __dead; int main(int argc, char *argv[]) @@ -201,80 +200,63 @@ main(int argc, char *argv[]) fd = open(argv[0], (opt_i | opt_m | opt_w | opt_d | opt_p) ? O_RDWR : O_RDONLY); - if (fd < 0) { -#if HAVE_NBTOOL_CONFIG_H - perror("File open"); - exit(1); -#else + if (fd == -1) { +#ifndef HAVE_NBTOOL_CONFIG_H snprintf(buf, sizeof(buf), "/dev/r%s%c", argv[0], 'a' + getrawpartition()); - fd = open((char *)buf, (opt_i | opt_w | opt_d | opt_p) -? O_RDWR : O_RDONLY); - if (fd < 0) { - printf("Error opening device %s: %s\n", -argv[0], strerror(errno)); - exit(1); - } + fd = open(buf, (opt_i | opt_w | opt_d | opt_p) + ? O_RDWR : O_RDONLY); + if (fd == -1) #endif + err(EXIT_FAILURE, "Error opening device `%s'", argv[0]); } - if (read(fd, buf, sizeof(buf)) != sizeof(buf)) { - perror("read volhdr"); - exit(1); - } + + if (read(fd, buf, sizeof(buf)) != sizeof(buf)) + err(EXIT_FAILURE, "Can't read volhdr from `%s'", argv[0]); + #if HAVE_NBTOOL_CONFIG_H - if (fstat(fd, &st) < 0) { - perror("stat error"); - exit(1); - } - if (!S_ISREG(st.st_mode)) { - printf("Must be regular file\n"); - exit(1); - } - if (st.st_size % SGI_BOOT_BLOCK_BLOCKSIZE) { - printf("Size must be multiple of %d\n", + if (fstat(fd, &st) == -1) + err(EXIT_FAILURE, "Can't stat `%s'", argv[0]); + if (!S_ISREG(st.st_mode)) + errx(EXIT_FAILURE, "Not a regular file `%s'", argv[0]); + + if (st.st_size % SGI_BOOT_BLOCK_BLOCKSIZE) + errx(EXIT_FAILURE, "Size must be multiple of %d", SGI_BOOT_BLOCK_BLOCKSIZE); - exit(1); - } - if (st.st_size < (SGIVOL_NBTOOL_NSECS * SGIVOL_NBTOOL_NTRACKS)) { - printf("Minimum size of %d required\n", + if (st.st_size < (SGIVOL_NBTOOL_NSECS * SGIVOL_NBTOOL_NTRACKS)) + errx(EXIT_FAILURE, "Minimum size of %d required", SGIVOL_NBTOOL_NSECS * SGIVOL_NBTOOL_NTRACKS); - exit(1); - } #else - if (ioctl(fd, DIOCGDINFO, &lbl) < 0) { - perror("DIOCGDINFO"); - exit(1); - } + if (ioctl(fd, DIOCGDINFO, &lbl) == -1) + err(EXIT_FAILURE, "ioctl DIOCGDINFO failed"); #endif volhdr = (struct sgi_boot_block *) buf; if (opt_i) { - init_volhdr(); - exit(0); - } - if (be32toh(volhdr->magic) != SGI_BOOT_BLOCK_MAGIC) { - printf("No Volume Header found, magic=%x. Use -i first.\n", - be32toh(volhdr->magic)); - exit(1); + init_volhdr(argv[0]); + return 0; } + if (be32toh(volhdr->magic) != SGI_BOOT_BLOCK_MAGIC) + errx(EXIT_FAILURE, "No Volume Header found, magic=%x. " + "Use -i first.\n", be32toh(volhdr->magic)); if (opt_r) { read_file(); - exit(0); + return 0; } if (opt_w) { - write_file(); - exit(0); + write_file(argv[0]); + return 0; } if (opt_d) { - delete_file(); - exit(0); + delete_file(argv[0]); + return 0; } if (opt_m) { - move_file(); - exit(0); + move_file(argv[0]); + return 0; } if (opt_p) { - modify_partition(); - exit(0); + modify_partition(argv[0]); + return 0; } if (!opt_q) @@ -295,15 +277,14 @@ names_match(int slot, const char *b) { int cmp; - if (slot < 0 || slot >= SGI_BOOT_BLOCK_MAXVOLDIRS) { - printf("Internal error: bad slot in %s()\n", __func__); - exit(1); - } + if (slot < 0 || slot >= SGI_BO
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: christos Date: Wed Mar 26 16:16:06 UTC 2014 Modified Files: src/sys/arch/sgimips/mace: pci_mace.c src/sys/arch/sgimips/sgimips: arcemu.c src/sys/arch/sgimips/stand/common: boot.c src/sys/arch/sgimips/stand/sgivol: sgivol.c Log Message: kill sprintf. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/mace/pci_mace.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/sgimips/arcemu.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/stand/common/boot.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/stand/sgivol/sgivol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/pci_mace.c diff -u src/sys/arch/sgimips/mace/pci_mace.c:1.15 src/sys/arch/sgimips/mace/pci_mace.c:1.16 --- src/sys/arch/sgimips/mace/pci_mace.c:1.15 Sat Oct 27 13:18:10 2012 +++ src/sys/arch/sgimips/mace/pci_mace.c Wed Mar 26 12:16:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_mace.c,v 1.15 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: pci_mace.c,v 1.16 2014/03/26 16:16:06 christos Exp $ */ /* * Copyright (c) 2001,2003 Christopher Sekiya @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.15 2012/10/27 17:18:10 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.16 2014/03/26 16:16:06 christos Exp $"); #include "opt_pci.h" #include "pci.h" @@ -252,7 +252,7 @@ macepci_intr_string(pci_chipset_tag_t pc { static char irqstr[32]; - sprintf(irqstr, "crime interrupt %d", ih); + snprintf(irqstr, sizeof(irqstr), "crime interrupt %d", ih); return irqstr; } Index: src/sys/arch/sgimips/sgimips/arcemu.c diff -u src/sys/arch/sgimips/sgimips/arcemu.c:1.21 src/sys/arch/sgimips/sgimips/arcemu.c:1.22 --- src/sys/arch/sgimips/sgimips/arcemu.c:1.21 Fri Jul 1 14:54:32 2011 +++ src/sys/arch/sgimips/sgimips/arcemu.c Wed Mar 26 12:16:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: arcemu.c,v 1.21 2011/07/01 18:54:32 dyoung Exp $ */ +/* $NetBSD: arcemu.c,v 1.22 2014/03/26 16:16:06 christos Exp $ */ /* * Copyright (c) 2004 Steve Rumble @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.21 2011/07/01 18:54:32 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.22 2014/03/26 16:16:06 christos Exp $"); #ifndef _LP64 @@ -298,7 +298,7 @@ arcemu_eeprom_read(void) } /* cache enaddr string */ - sprintf(enaddr, "%02x:%02x:%02x:%02x:%02x:%02x", + snprintf(enaddr, sizeof(enaddr), "%02x:%02x:%02x:%02x:%02x:%02x", nvram.enaddr[0], nvram.enaddr[1], nvram.enaddr[2], Index: src/sys/arch/sgimips/stand/common/boot.c diff -u src/sys/arch/sgimips/stand/common/boot.c:1.19 src/sys/arch/sgimips/stand/common/boot.c:1.20 --- src/sys/arch/sgimips/stand/common/boot.c:1.19 Sun Feb 20 02:59:52 2011 +++ src/sys/arch/sgimips/stand/common/boot.c Wed Mar 26 12:16:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.19 2011/02/20 07:59:52 matt Exp $ */ +/* $NetBSD: boot.c,v 1.20 2014/03/26 16:16:06 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -160,14 +160,16 @@ main(int argc, char **argv) */ if (strstr(argv[0], "cdrom(")) { + char *ep = strcpy(bootfile, argv[0]); - i = (strrchr(bootfile, ')') - bootfile); + ep = strrchr(bootfile, ')'); + i = ep - bootfile; bootfile[i - 1] = '0'; if (strstr(bootfile, "ip3x")) kernel = "ip3x"; else kernel = "ip2x"; - sprintf((strrchr(bootfile, ')') + 1), kernel); + strcpy(ep + 1, kernel); if ((loadfile(bootfile, marks, LOAD_KERNEL)) >= 0) goto finish; } Index: src/sys/arch/sgimips/stand/sgivol/sgivol.c diff -u src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.19 src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.20 --- src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.19 Thu Jun 27 17:24:08 2013 +++ src/sys/arch/sgimips/stand/sgivol/sgivol.c Wed Mar 26 12:16:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sgivol.c,v 1.19 2013/06/27 21:24:08 christos Exp $ */ +/* $NetBSD: sgivol.c,v 1.20 2014/03/26 16:16:06 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -206,7 +206,8 @@ main(int argc, char *argv[]) perror("File open"); exit(1); #else - sprintf((char *)buf, "/dev/r%s%c", argv[0], 'a' + getrawpartition()); + snprintf(buf, sizeof(buf), "/dev/r%s%c", argv[0], + 'a' + getrawpartition()); fd = open((char *)buf, (opt_i | opt_w | opt_d | opt_p) ? O_RDWR : O_RDONLY); if (fd < 0) {
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: christos Date: Mon Mar 24 19:10:34 UTC 2014 Modified Files: src/sys/arch/sgimips/dev: scn.c zs.c src/sys/arch/sgimips/sgimips: machdep.c Log Message: - use cpu_{g,s}etmodel - fix unused To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/dev/scn.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sgimips/dev/zs.c cvs rdiff -u -r1.139 -r1.140 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/scn.c diff -u src/sys/arch/sgimips/dev/scn.c:1.5 src/sys/arch/sgimips/dev/scn.c:1.6 --- src/sys/arch/sgimips/dev/scn.c:1.5 Sun Mar 16 01:20:25 2014 +++ src/sys/arch/sgimips/dev/scn.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $ */ +/* $NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $ */ /* * Resurrected from the old pc532 port 1/18/2009. @@ -92,7 +92,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.5 2014/03/16 05:20:25 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.6 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -517,6 +517,7 @@ scn_setchip(struct scn_softc *sc) u_char temp; /* start C/T running */ temp = dp->base[DU_CSTRT]; +__USE(temp); } dp->ocounter = dp->counter; } @@ -806,7 +807,7 @@ scn_attach(device_t parent, device_t sel int channel; int speed; int s; - int maj; + int maj __diagused; u_char unit; u_char duartno; u_char delim = ':'; @@ -1080,7 +1081,6 @@ scnopen(dev_t dev, int flags, int mode, int unit = DEV_UNIT(dev); struct scn_softc *sc; int error = 0; - int hwset = 0; if (unit >= scn_cd.cd_ndevs) return ENXIO; @@ -1130,7 +1130,6 @@ scnopen(dev_t dev, int flags, int mode, /* enable receiver interrupts */ scn_rxenable(sc); - hwset = 1; /* set carrier state; */ if ((sc->sc_swflags & SCN_SW_SOFTCAR) || /* check ttyflags */ @@ -1670,15 +1669,10 @@ scnioctl(dev_t dev, u_long cmd, void *da case TIOCMGET: { int bits; - unsigned char ip, op; + unsigned char ip; /* s = spltty(); */ ip = sc->sc_duart->base[DU_IP]; - /* - * XXX sigh; cannot get op current state!! even if - * maintained in private, RTS is done in h/w!! - */ - op = 0; /* splx(s); */ bits = 0; @@ -1688,6 +1682,11 @@ scnioctl(dev_t dev, u_long cmd, void *da bits |= TIOCM_CTS; #if 0 + /* + * XXX sigh; cannot get op current state!! even if + * maintained in private, RTS is done in h/w!! + */ + unsigned char op = 0; if (op & sc->sc_op_dtr) bits |= TIOCM_DTR; if (op & sc->sc_op_rts) Index: src/sys/arch/sgimips/dev/zs.c diff -u src/sys/arch/sgimips/dev/zs.c:1.37 src/sys/arch/sgimips/dev/zs.c:1.38 --- src/sys/arch/sgimips/dev/zs.c:1.37 Sun Feb 20 02:59:50 2011 +++ src/sys/arch/sgimips/dev/zs.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $ */ /*- * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.38 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -444,7 +444,7 @@ zs_get_speed(struct zs_chanstate *cs) int zs_set_speed(struct zs_chanstate *cs, int bps) { - int tconst, real_bps; + int tconst; #if 0 while (!(zs_read_csr(cs) & ZSRR0_TX_READY)) @@ -464,11 +464,11 @@ zs_set_speed(struct zs_chanstate *cs, in if (tconst < 0) return (EINVAL); +#if 0 /* Convert back to make sure we can do it. */ - real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst); + int real_bps = TCONST_TO_BPS(cs->cs_brg_clk, tconst); /* XXX - Allow some tolerance here? */ -#if 0 if (real_bps != bps) return (EINVAL); #endif Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.139 src/sys/arch/sgimips/sgimips/machdep.c:1.140 --- src/sys/arch/sgimips/sgimips/machdep.c:1.139 Mon Dec 16 10:45:29 2013 +++ src/sys/arch/sgimips/sgimips/machdep.c Mon Mar 24 15:10:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 2014/03/24 19:10:34 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -63,6 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include @@ -285,7 +286,7 @@ mach_init(int argc, int32_t argv32[], ui #endif } - strcpy(cpu_model, arcbios_sy
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: christos Date: Fri Jan 10 16:36:30 UTC 2014 Modified Files: src/sys/arch/sgimips/gio: Makefile.giodevs Log Message: include bsd.own.mk To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/gio/Makefile.giodevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/Makefile.giodevs diff -u src/sys/arch/sgimips/gio/Makefile.giodevs:1.5 src/sys/arch/sgimips/gio/Makefile.giodevs:1.6 --- src/sys/arch/sgimips/gio/Makefile.giodevs:1.5 Sun Oct 19 18:05:21 2008 +++ src/sys/arch/sgimips/gio/Makefile.giodevs Fri Jan 10 11:36:29 2014 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.giodevs,v 1.5 2008/10/19 22:05:21 apb Exp $ +# $NetBSD: Makefile.giodevs,v 1.6 2014/01/10 16:36:29 christos Exp $ -.include +.include giodevs.h: giodevs devlist2h.awk /bin/rm -f giodevs.h giodevs_data.h
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: mrg Date: Mon Dec 16 15:45:29 UTC 2013 Modified Files: src/sys/arch/sgimips/dev: crmfb.c src/sys/arch/sgimips/mace: mace.c mcclock_mace.c src/sys/arch/sgimips/sgimips: autoconf.c machdep.c Log Message: - remove unused variables - use (void) when we don't care about the return value To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/mace/mace.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sgimips/mace/mcclock_mace.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sgimips/sgimips/autoconf.c cvs rdiff -u -r1.138 -r1.139 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.36 src/sys/arch/sgimips/dev/crmfb.c:1.37 --- src/sys/arch/sgimips/dev/crmfb.c:1.36 Wed Jan 11 16:18:30 2012 +++ src/sys/arch/sgimips/dev/crmfb.c Mon Dec 16 15:45:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $"); #include #include @@ -419,13 +419,11 @@ crmfb_ioctl(void *v, void *vs, u_long cm { struct vcons_data *vd; struct crmfb_softc *sc; - struct vcons_screen *ms; struct wsdisplay_fbinfo *wdf; int nmode; vd = (struct vcons_data *)v; sc = (struct crmfb_softc *)vd->cookie; - ms = (struct vcons_screen *)vd->active; switch (cmd) { case WSDISPLAYIO_GTYPE: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.19 src/sys/arch/sgimips/mace/mace.c:1.20 --- src/sys/arch/sgimips/mace/mace.c:1.19 Sat Oct 27 17:18:10 2012 +++ src/sys/arch/sgimips/mace/mace.c Mon Dec 16 15:45:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.19 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: mace.c,v 1.20 2013/12/16 15:45:29 mrg Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.19 2012/10/27 17:18:10 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.20 2013/12/16 15:45:29 mrg Exp $"); #include #include @@ -295,13 +295,11 @@ mace_intr_disestablish(void *cookie) void mace_intr(int irqs) { - uint64_t isa_irq, isa_mask; + uint64_t isa_irq; int i; /* irq 4 is the ISA cascade interrupt. Must handle with care. */ if (irqs & (1 << 4)) { - isa_mask = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(MACE_BASE - + MACE_ISA_INT_MASK)); isa_irq = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(MACE_BASE + MACE_ISA_INT_STATUS)); for (i = 0; i < MACE_NINTR; i++) { Index: src/sys/arch/sgimips/mace/mcclock_mace.c diff -u src/sys/arch/sgimips/mace/mcclock_mace.c:1.14 src/sys/arch/sgimips/mace/mcclock_mace.c:1.15 --- src/sys/arch/sgimips/mace/mcclock_mace.c:1.14 Fri Jul 1 18:53:47 2011 +++ src/sys/arch/sgimips/mace/mcclock_mace.c Mon Dec 16 15:45:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_mace.c,v 1.14 2011/07/01 18:53:47 dyoung Exp $ */ +/* $NetBSD: mcclock_mace.c,v 1.15 2013/12/16 15:45:29 mrg Exp $ */ /* * Copyright (c) 2001 Antti Kantee. All Rights Reserved. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.14 2011/07/01 18:53:47 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.15 2013/12/16 15:45:29 mrg Exp $"); #include #include @@ -226,13 +226,12 @@ mcclock_mace_settime_ymdhms(todr_chip_ha void mcclock_poweroff(void) { - int s; uint8_t a, xctl_a, xctl_b; if (mace0 == NULL) return; - s = splhigh(); + (void)splhigh(); a = ds1687_read(mace0, DS1687_CONTROLA); a &= ~DS1687_DV2; a |= DS1687_DV1; Index: src/sys/arch/sgimips/sgimips/autoconf.c diff -u src/sys/arch/sgimips/sgimips/autoconf.c:1.44 src/sys/arch/sgimips/sgimips/autoconf.c:1.45 --- src/sys/arch/sgimips/sgimips/autoconf.c:1.44 Sat Oct 27 17:18:10 2012 +++ src/sys/arch/sgimips/sgimips/autoconf.c Mon Dec 16 15:45:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.44 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: autoconf.c,v 1.45 2013/12/16 15:45:29 mrg Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.44 2012/10/27 17:18:10 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.45 2013/12/16 15:45:29 mrg Exp $"); #include "opt_ddb.h" @@ -64,9 +64,8 @@ extern struct platform platform; void cpu_configure(void) { - int s; - s = splhigh(); + (void)splhigh(); if (config_rootfound("mainbus", NULL) == NULL) panic("no mainbus found"); Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/s
CVS commit: src/sys/arch/sgimips/stand/sgivol
Module Name:src Committed By: christos Date: Thu Jun 27 21:24:08 UTC 2013 Modified Files: src/sys/arch/sgimips/stand/sgivol: sgivol.c Log Message: close fp http://M00nBSD.net/ae123a9bae03f7dde5c6d654412daf5a.html To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sgimips/stand/sgivol/sgivol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/stand/sgivol/sgivol.c diff -u src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.18 src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.19 --- src/sys/arch/sgimips/stand/sgivol/sgivol.c:1.18 Sun Aug 3 13:42:34 2008 +++ src/sys/arch/sgimips/stand/sgivol/sgivol.c Thu Jun 27 17:24:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sgivol.c,v 1.18 2008/08/03 17:42:34 rumble Exp $ */ +/* $NetBSD: sgivol.c,v 1.19 2013/06/27 21:24:08 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -529,6 +529,7 @@ write_file(void) } i -= i > 512 ? 512 : i; } + fclose(fp); } void
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Wed Jan 11 21:23:38 UTC 2012 Modified Files: src/sys/arch/sgimips/gio: grtwo.c light.c newport.c Log Message: adjust for wsfont_find() change To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/gio/grtwo.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/gio/light.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sgimips/gio/newport.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/grtwo.c diff -u src/sys/arch/sgimips/gio/grtwo.c:1.11 src/sys/arch/sgimips/gio/grtwo.c:1.12 --- src/sys/arch/sgimips/gio/grtwo.c:1.11 Sun Nov 22 19:09:15 2009 +++ src/sys/arch/sgimips/gio/grtwo.c Wed Jan 11 21:23:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */ +/* $NetBSD: grtwo.c,v 1.12 2012/01/11 21:23:38 macallan Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grtwo.c,v 1.12 2012/01/11 21:23:38 macallan Exp $"); #include #include @@ -476,7 +476,7 @@ grtwo_attach_common(struct grtwo_devconf wsfont_init(); dc->dc_font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R, - WSDISPLAY_FONTORDER_L2R); + WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP); if (dc->dc_font < 0) panic("grtwo_attach_common: no suitable fonts"); Index: src/sys/arch/sgimips/gio/light.c diff -u src/sys/arch/sgimips/gio/light.c:1.5 src/sys/arch/sgimips/gio/light.c:1.6 --- src/sys/arch/sgimips/gio/light.c:1.5 Sun Mar 4 06:00:39 2007 +++ src/sys/arch/sgimips/gio/light.c Wed Jan 11 21:23:38 2012 @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.5 2007/03/04 06:00:39 christos Exp $ */ +/* $Id: light.c,v 1.6 2012/01/11 21:23:38 macallan Exp $ */ /* * Copyright (c) 2006 Stephen M. Rumble @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.5 2007/03/04 06:00:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: light.c,v 1.6 2012/01/11 21:23:38 macallan Exp $"); #include #include @@ -297,7 +297,7 @@ light_attach_common(struct light_devconf wsfont_init(); dc->dc_font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R, - WSDISPLAY_FONTORDER_L2R); + WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP); if (dc->dc_font < 0) panic("light_attach_common: no suitable fonts"); Index: src/sys/arch/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.16 src/sys/arch/sgimips/gio/newport.c:1.17 --- src/sys/arch/sgimips/gio/newport.c:1.16 Wed Jan 11 16:18:30 2012 +++ src/sys/arch/sgimips/gio/newport.c Wed Jan 11 21:23:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $ */ +/* $NetBSD: newport.c,v 1.17 2012/01/11 21:23:38 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.17 2012/01/11 21:23:38 macallan Exp $"); #include #include @@ -536,7 +536,7 @@ newport_attach_common(struct newport_dev wsfont_init(); dc->dc_font = wsfont_find(NULL, 8, 16, 0, WSDISPLAY_FONTORDER_L2R, - WSDISPLAY_FONTORDER_L2R); + WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP); if (dc->dc_font < 0) panic("newport_attach_common: no suitable fonts");
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Wed Jan 11 21:23:07 UTC 2012 Modified Files: src/sys/arch/sgimips/gio: newportreg.h Log Message: add some register definitions To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/gio/newportreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/newportreg.h diff -u src/sys/arch/sgimips/gio/newportreg.h:1.5 src/sys/arch/sgimips/gio/newportreg.h:1.6 --- src/sys/arch/sgimips/gio/newportreg.h:1.5 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/gio/newportreg.h Wed Jan 11 21:23:07 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: newportreg.h,v 1.5 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: newportreg.h,v 1.6 2012/01/11 21:23:07 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -194,6 +194,7 @@ #define REX3_REG_STATUS 0x1338 #define REX3_STATUS_GFXBUSY 0x0008 +#define REX3_STATUS_PIPELEVEL_MASK 0x1f80 /* VC2 */ @@ -261,6 +262,7 @@ #define XMAP9_DCBCRS_MODE_SETUP 5 #define XMAP9_MODE_GAMMA_BYPASS 0x04 #define XMAP9_MODE_PIXSIZE_8BPP 0x000400 +#define XMAP9_MODE_PIXSIZE_24BPP 0x000c00 #define XMAP9_DCBCRS_MODE_SELECT 7 /* DCB addresses */
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: macallan Date: Wed Jan 11 16:18:30 UTC 2012 Modified Files: src/sys/arch/sgimips/dev: crmfb.c src/sys/arch/sgimips/gio: newport.c Log Message: use rasops_init(0,0) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/gio/newport.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.35 src/sys/arch/sgimips/dev/crmfb.c:1.36 --- src/sys/arch/sgimips/dev/crmfb.c:1.35 Fri Jul 1 18:53:46 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Wed Jan 11 16:18:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $ */ +/* $NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $"); #include #include @@ -590,7 +590,7 @@ crmfb_init_screen(void *c, struct vcons_ if (existing) ri->ri_flg |= RI_CLEAR; - rasops_init(ri, ri->ri_height / 16, ri->ri_width / 8); + rasops_init(ri, 0, 0); ri->ri_caps = WSSCREEN_WSCOLORS; rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight, ri->ri_width / ri->ri_font->fontwidth); Index: src/sys/arch/sgimips/gio/newport.c diff -u src/sys/arch/sgimips/gio/newport.c:1.15 src/sys/arch/sgimips/gio/newport.c:1.16 --- src/sys/arch/sgimips/gio/newport.c:1.15 Tue May 12 23:51:25 2009 +++ src/sys/arch/sgimips/gio/newport.c Wed Jan 11 16:18:30 2012 @@ -1,7 +1,8 @@ -/* $NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $ */ +/* $NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen + * 2009 Michael Lorenz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.16 2012/01/11 16:18:30 macallan Exp $"); #include #include @@ -171,7 +172,8 @@ rex3_read(struct newport_devconfig *dc, static void rex3_wait_gfifo(struct newport_devconfig *dc) { - while (rex3_read(dc, REX3_REG_STATUS) & REX3_STATUS_GFXBUSY) + while (rex3_read(dc, REX3_REG_STATUS) & + (REX3_STATUS_GFXBUSY | REX3_STATUS_PIPELEVEL_MASK)) ; } @@ -589,6 +591,7 @@ newport_attach(device_t parent, device_t &newport_console_screen.scr_ri.ri_ops; memcpy(&newport_textops, &newport_console_screen.scr_ri.ri_ops, sizeof(struct wsdisplay_emulops)); + vcons_replay_msgbuf(&newport_console_screen); } wa.scrdata = &newport_screenlist; wa.accessops = &newport_accessops; @@ -651,7 +654,7 @@ newport_init_screen(void *cookie, struct /*&ri->ri_bits = (char *)sc->sc_fb.fb_pixels;*/ - rasops_init(ri, dc->dc_yres / 8, dc->dc_xres / 8); + rasops_init(ri, 0, 0); ri->ri_caps = WSSCREEN_WSCOLORS; rasops_reconfig(ri, dc->dc_yres / ri->ri_font->fontheight, @@ -777,6 +780,7 @@ newport_putchar(void *c, int row, int co bitmap += font->stride; } + rex3_wait_gfifo(dc); } static void @@ -905,6 +909,12 @@ newport_ioctl(void *v, void *vs, u_long rex3_wait_gfifo(dc); newport_setup_hw(dc); vcons_redraw_screen(vd->active); + } else { +xmap9_write_mode(dc, 0, + XMAP9_MODE_GAMMA_BYPASS | +XMAP9_CONFIG_RGBMAP_2 | + XMAP9_MODE_PIXSIZE_24BPP); +xmap9_write(dc, XMAP9_DCBCRS_MODE_SELECT, 0); } } return 0; @@ -924,5 +934,5 @@ newport_mmap(void *v, void *vs, off_t of if ( offset >= 0xf) return -1; - return mips_btop(dc->dc_addr + offset); + return bus_space_mmap(dc->dc_st, dc->dc_sh, offset, prot, 0); }
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: he Date: Thu Oct 6 12:25:42 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: files.dev Log Message: The crmfb device does not depend on iic; i2cbus and i2c_bitbang is sufficient, says jmcneill@ Fixes a build problem for (at least) the GENERIC32_IP3x kernel. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/dev/files.dev Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/files.dev diff -u src/sys/arch/sgimips/dev/files.dev:1.13 src/sys/arch/sgimips/dev/files.dev:1.14 --- src/sys/arch/sgimips/dev/files.dev:1.13 Sun May 22 12:33:49 2011 +++ src/sys/arch/sgimips/dev/files.dev Thu Oct 6 12:25:42 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.13 2011/05/22 12:33:49 macallan Exp $ +# $NetBSD: files.dev,v 1.14 2011/10/06 12:25:42 he Exp $ define giobus {} @@ -31,7 +31,7 @@ device crime attach crime at mainbus file arch/sgimips/dev/crime.c crime needs-flag -device crmfb: wsemuldisplaydev, vcons, rasops8, rasops15, rasops16, rasops32, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid +device crmfb: wsemuldisplaydev, vcons, rasops8, rasops15, rasops16, rasops32, i2cbus, i2c_bitbang, ddc_read_edid, edid attach crmfb at mainbus file arch/sgimips/dev/crmfb.c crmfb needs-flag defflag opt_crmfb.h CRMFB_DEBUG
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: macallan Date: Thu Aug 18 03:25:34 UTC 2011 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: device_t-ify To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.17 src/sys/arch/sgimips/mace/mace.c:1.18 --- src/sys/arch/sgimips/mace/mace.c:1.17 Fri Jul 1 18:53:47 2011 +++ src/sys/arch/sgimips/mace/mace.c Thu Aug 18 03:25:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.17 2011/07/01 18:53:47 dyoung Exp $ */ +/* $NetBSD: mace.c,v 1.18 2011/08/18 03:25:34 macallan Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.17 2011/07/01 18:53:47 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.18 2011/08/18 03:25:34 macallan Exp $"); #include #include @@ -87,7 +87,7 @@ } maceintrtab[MACE_NINTR]; struct mace_softc { - struct device sc_dev; + device_t sc_dev; bus_space_tag_t iot; bus_space_handle_t ioh; @@ -105,7 +105,7 @@ static int mace_search(struct device *, struct cfdata *, const int *, void *); -CFATTACH_DECL(mace, sizeof(struct mace_softc), +CFATTACH_DECL_NEW(mace, sizeof(struct mace_softc), mace_match, mace_attach, NULL, NULL); #if defined(BLINK) @@ -114,7 +114,7 @@ #endif static int -mace_match(struct device *parent, struct cfdata *match, void *aux) +mace_match(device_t parent, struct cfdata *match, void *aux) { /* @@ -127,12 +127,13 @@ } static void -mace_attach(struct device *parent, struct device *self, void *aux) +mace_attach(device_t parent, device_t self, void *aux) { - struct mace_softc *sc = (struct mace_softc *)self; + struct mace_softc *sc = device_private(self); struct mainbus_attach_args *ma = aux; uint32_t scratch; + sc->sc_dev = self; #ifdef BLINK callout_init(&mace_blink_ch, 0); #endif @@ -202,10 +203,10 @@ } static int -mace_search(struct device *parent, struct cfdata *cf, +mace_search(device_t parent, struct cfdata *cf, const int *ldesc, void *aux) { - struct mace_softc *sc = (struct mace_softc *)parent; + struct mace_softc *sc = device_private(parent); struct mace_attach_args maa; int tryagain;
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Thu Aug 18 02:56:21 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crime.c crimevar.h Log Message: device_t-ify To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/dev/crime.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/dev/crimevar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.35 src/sys/arch/sgimips/dev/crime.c:1.36 --- src/sys/arch/sgimips/dev/crime.c:1.35 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crime.c Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $"); #include #include @@ -61,8 +61,8 @@ #define DISABLE_CRIME_WATCHDOG -static int crime_match(struct device *, struct cfdata *, void *); -static void crime_attach(struct device *, struct device *, void *); +static int crime_match(device_t, struct cfdata *, void *); +static void crime_attach(device_t, device_t, void *); void crime_bus_reset(void); void crime_watchdog_reset(void); void crime_watchdog_disable(void); @@ -72,7 +72,7 @@ static bus_space_tag_t crm_iot; static bus_space_handle_t crm_ioh; -CFATTACH_DECL(crime, sizeof(struct crime_softc), +CFATTACH_DECL_NEW(crime, sizeof(struct crime_softc), crime_match, crime_attach, NULL, NULL); #define CRIME_NINTR 32 /* XXX */ @@ -83,7 +83,7 @@ } crime[CRIME_NINTR]; static int -crime_match(struct device *parent, struct cfdata *match, void *aux) +crime_match(device_t parent, struct cfdata *match, void *aux) { /* @@ -96,14 +96,16 @@ } static void -crime_attach(struct device *parent, struct device *self, void *aux) +crime_attach(device_t parent, device_t self, void *aux) { struct mainbus_attach_args *ma = aux; struct cpu_info * const ci = curcpu(); + struct crime_softc *sc = device_private(self); uint64_t crm_id; uint64_t baseline, endline; uint32_t startctr, endctr, cps; + sc->sc_dev = self; crm_iot = SGIMIPS_BUS_SPACE_CRIME; if (bus_space_map(crm_iot, ma->ma_addr, 0 /* XXX */, Index: src/sys/arch/sgimips/dev/crimevar.h diff -u src/sys/arch/sgimips/dev/crimevar.h:1.8 src/sys/arch/sgimips/dev/crimevar.h:1.9 --- src/sys/arch/sgimips/dev/crimevar.h:1.8 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crimevar.h Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crimevar.h,v 1.8 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crimevar.h,v 1.9 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2003 Christopher SEKIYA @@ -35,7 +35,7 @@ #include struct crime_softc { - struct device sc_dev; + device_t sc_dev; }; void crime_intr_mask(unsigned int);
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: uebayasi Date: Thu Jul 28 04:06:09 UTC 2011 Modified Files: src/sys/arch/sgimips/sgimips: machdep.c Log Message: Fix DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.135 src/sys/arch/sgimips/sgimips/machdep.c:1.136 --- src/sys/arch/sgimips/sgimips/machdep.c:1.135 Fri Jul 1 18:54:33 2011 +++ src/sys/arch/sgimips/sgimips/machdep.c Thu Jul 28 04:06:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $ */ +/* $NetBSD: machdep.c,v 1.136 2011/07/28 04:06:09 uebayasi Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.136 2011/07/28 04:06:09 uebayasi Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -581,7 +581,7 @@ if ((mem = arcbios_GetMemoryDescriptor(mem)) != NULL) { i++; printf("Mem block %d: type %d, " - "base 0x%04lx, size 0x%04lx\n", + "base 0x%04"PRIx32", size 0x%04"PRIx32"\n", i, mem->Type, mem->BasePage, mem->PageCount); } } while (mem != NULL);
CVS commit: src/sys/arch/sgimips/include
Module Name:src Committed By: mrg Date: Mon Jul 4 12:18:53 UTC 2011 Modified Files: src/sys/arch/sgimips/include: param.h Log Message: don't mark delay as extern inline. it's defined normally in machdep.c. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sgimips/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/include/param.h diff -u src/sys/arch/sgimips/include/param.h:1.15 src/sys/arch/sgimips/include/param.h:1.16 --- src/sys/arch/sgimips/include/param.h:1.15 Fri Mar 18 16:33:41 2011 +++ src/sys/arch/sgimips/include/param.h Mon Jul 4 12:18:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.15 2011/03/18 16:33:41 tsutsui Exp $ */ +/* $NetBSD: param.h,v 1.16 2011/07/04 12:18:53 mrg Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -54,7 +54,7 @@ #ifdef _KERNEL #ifndef _LOCORE -__inline extern void delay(unsigned long); +extern void delay(unsigned long); #define DELAY(n) delay(n) #include
CVS commit: src/sys/arch/sgimips/include
Module Name:src Committed By: dyoung Date: Fri Jul 1 21:00:21 UTC 2011 Modified Files: src/sys/arch/sgimips/include: autoconf.h z8530var.h Log Message: #include instead of . To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/include/autoconf.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/include/z8530var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/include/autoconf.h diff -u src/sys/arch/sgimips/include/autoconf.h:1.10 src/sys/arch/sgimips/include/autoconf.h:1.11 --- src/sys/arch/sgimips/include/autoconf.h:1.10 Wed Oct 17 19:57:04 2007 +++ src/sys/arch/sgimips/include/autoconf.h Fri Jul 1 21:00:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.10 2007/10/17 19:57:04 garbled Exp $ */ +/* $NetBSD: autoconf.h,v 1.11 2011/07/01 21:00:21 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include struct mainbus_attach_args { char *ma_name; Index: src/sys/arch/sgimips/include/z8530var.h diff -u src/sys/arch/sgimips/include/z8530var.h:1.9 src/sys/arch/sgimips/include/z8530var.h:1.10 --- src/sys/arch/sgimips/include/z8530var.h:1.9 Sat Mar 29 19:15:35 2008 +++ src/sys/arch/sgimips/include/z8530var.h Fri Jul 1 21:00:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: z8530var.h,v 1.9 2008/03/29 19:15:35 tsutsui Exp $ */ +/* $NetBSD: z8530var.h,v 1.10 2011/07/01 21:00:21 dyoung Exp $ */ /* * Copyright (c) 1992, 1993 @@ -83,7 +83,7 @@ * @(#)zsvar.h 8.1 (Berkeley) 6/11/93 */ -#include +#include #include struct zs_channel {
CVS commit: src/sys/arch/sgimips/sgimips
Module Name:src Committed By: dyoung Date: Fri Jul 1 18:54:33 UTC 2011 Modified Files: src/sys/arch/sgimips/sgimips: arcemu.c console.c machdep.c Log Message: #include instead of . To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/sgimips/arcemu.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sgimips/sgimips/console.c cvs rdiff -u -r1.134 -r1.135 src/sys/arch/sgimips/sgimips/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/sgimips/arcemu.c diff -u src/sys/arch/sgimips/sgimips/arcemu.c:1.20 src/sys/arch/sgimips/sgimips/arcemu.c:1.21 --- src/sys/arch/sgimips/sgimips/arcemu.c:1.20 Sun Feb 20 07:59:51 2011 +++ src/sys/arch/sgimips/sgimips/arcemu.c Fri Jul 1 18:54:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: arcemu.c,v 1.20 2011/02/20 07:59:51 matt Exp $ */ +/* $NetBSD: arcemu.c,v 1.21 2011/07/01 18:54:32 dyoung Exp $ */ /* * Copyright (c) 2004 Steve Rumble @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.20 2011/02/20 07:59:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.21 2011/07/01 18:54:32 dyoung Exp $"); #ifndef _LP64 @@ -37,7 +37,7 @@ #include #include -#include +#include #include Index: src/sys/arch/sgimips/sgimips/console.c diff -u src/sys/arch/sgimips/sgimips/console.c:1.41 src/sys/arch/sgimips/sgimips/console.c:1.42 --- src/sys/arch/sgimips/sgimips/console.c:1.41 Sun Feb 20 07:59:51 2011 +++ src/sys/arch/sgimips/sgimips/console.c Fri Jul 1 18:54:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.41 2011/02/20 07:59:51 matt Exp $ */ +/* $NetBSD: console.c,v 1.42 2011/07/01 18:54:32 dyoung Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.41 2011/02/20 07:59:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.42 2011/07/01 18:54:32 dyoung Exp $"); #include "opt_kgdb.h" @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include Index: src/sys/arch/sgimips/sgimips/machdep.c diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.134 src/sys/arch/sgimips/sgimips/machdep.c:1.135 --- src/sys/arch/sgimips/sgimips/machdep.c:1.134 Sun Feb 20 07:59:51 2011 +++ src/sys/arch/sgimips/sgimips/machdep.c Fri Jul 1 18:54:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.134 2011/02/20 07:59:51 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.134 2011/02/20 07:59:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -75,7 +75,7 @@ #include #include #include -#include +#include #include #include
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: dyoung Date: Fri Jul 1 18:53:48 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crime.c crimevar.h crmfb.c ctl.c dpclock.c dsclock.c imc.c int.c pic.c src/sys/arch/sgimips/eisa: eisa_machdep.c src/sys/arch/sgimips/gio: gio.c giovar.h grtwovar.h lightvar.h newportvar.h pci_gio.c src/sys/arch/sgimips/hpc: haltwo.c hpc.c hpcdma.c hpcdma.h if_sq.c pi1ppc.c pi1ppcvar.h wdsc.c src/sys/arch/sgimips/ioc: ioc.c oioc.c oiocsc.c oiocvar.h src/sys/arch/sgimips/mace: com_mace.c if_mec.c lpt_mace.c mace.c macekbc.c mavb.c mcclock_mace.c pci_mace.c src/sys/arch/sgimips/pci: pci_machdep.c Log Message: #include instead of . To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sgimips/dev/crime.c \ src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/dev/crimevar.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/dev/ctl.c \ src/sys/arch/sgimips/dev/dpclock.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sgimips/dev/dsclock.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/dev/imc.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sgimips/dev/int.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sgimips/dev/pic.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/eisa/eisa_machdep.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/gio/gio.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/gio/giovar.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sgimips/gio/grtwovar.h \ src/sys/arch/sgimips/gio/newportvar.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/gio/lightvar.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/gio/pci_gio.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sgimips/hpc/haltwo.c cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sgimips/hpc/hpc.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/hpc/hpcdma.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/hpc/hpcdma.h \ src/sys/arch/sgimips/hpc/pi1ppc.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sgimips/hpc/if_sq.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/hpc/pi1ppcvar.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/hpc/wdsc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/ioc/ioc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sgimips/ioc/oioc.c \ src/sys/arch/sgimips/ioc/oiocsc.c src/sys/arch/sgimips/ioc/oiocvar.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/mace/com_mace.c \ src/sys/arch/sgimips/mace/lpt_mace.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sgimips/mace/if_mec.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sgimips/mace/mace.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sgimips/mace/macekbc.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/mace/mavb.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/mace/mcclock_mace.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/mace/pci_mace.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sgimips/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.34 src/sys/arch/sgimips/dev/crime.c:1.35 --- src/sys/arch/sgimips/dev/crime.c:1.34 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/dev/crime.c Fri Jul 1 18:53:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.34 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.34 2011/02/20 07:59:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $"); #include #include @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.34 src/sys/arch/sgimips/dev/crmfb.c:1.35 --- src/sys/arch/sgimips/dev/crmfb.c:1.34 Tue May 17 22:52:28 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Fri Jul 1 18:53:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.34 2011/05/17 22:52:28 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.34 2011/05/17 22:52:28 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.35 2011/07/01 18:53:46 dyoung Exp $"); #include #include @@ -41,7 +41,7 @@ #define _SGIMIPS_BUS_DMA_PRIVATE #include -#include +#include #include #include Index: src/sys/arch/sgimips/dev/crimevar.h diff -u src/sys/arch/sgimips/dev/crimevar.h:1.7 src/sys/arch/sgimips/dev/crimevar.h:1.8 --- src/sys/arch/sgimips/dev/crimevar.h:1.7 Wed Oct 17 19:57:03 2007 +++ src/sys/arch/sgimips/dev/crimevar.h Fri Jul 1 18:53:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crimevar.h,v 1.7 2007/10/17 19:57:03 garbled Exp $ */ +/* $NetBSD: crimevar.h,v 1.8 2011/07/01 18:53:45 dyoung Exp $ */ /* * Co
CVS commit: src/sys/arch/sgimips/hpc
Module Name:src Committed By: rmind Date: Thu Jun 9 02:49:32 UTC 2011 Modified Files: src/sys/arch/sgimips/hpc: pi1ppc.c pi1ppcvar.h Log Message: Convert simple_lock/ltsleep to mutex/condvar and malloc to kmem. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/hpc/pi1ppc.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sgimips/hpc/pi1ppcvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/hpc/pi1ppc.c diff -u src/sys/arch/sgimips/hpc/pi1ppc.c:1.9 src/sys/arch/sgimips/hpc/pi1ppc.c:1.10 --- src/sys/arch/sgimips/hpc/pi1ppc.c:1.9 Wed Feb 16 23:44:20 2011 +++ src/sys/arch/sgimips/hpc/pi1ppc.c Thu Jun 9 02:49:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $ */ +/* $NetBSD: pi1ppc.c,v 1.10 2011/06/09 02:49:32 rmind Exp $ */ /* * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -33,19 +33,16 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.9 2011/02/16 23:44:20 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pi1ppc.c,v 1.10 2011/06/09 02:49:32 rmind Exp $"); #include "opt_pi1ppc.h" #include #include #include +#include #include -#include -#include #include -#include -#include #include /*#include */ @@ -74,7 +71,6 @@ int pi1ppc_verbose = 1; #endif - /* Prototypes for functions. */ /* PC-style register emulation */ @@ -100,7 +96,6 @@ 0,4,BUS_SPACE_BARRIER_WRITE) #define pi1ppc_barrier(_x) pi1ppc_barrier_r(_x) - /* Print function for config_found() */ static int pi1ppc_print(void *, const char *); @@ -139,7 +134,7 @@ static int pi1ppc_poll_str(struct pi1ppc_softc * const, const uint8_t, const uint8_t); -static int pi1ppc_wait_interrupt(struct pi1ppc_softc * const, const void *, +static int pi1ppc_wait_interrupt(struct pi1ppc_softc * const, kcondvar_t *, const uint8_t); static int pi1ppc_poll_interrupt_stat(struct pi1ppc_softc * const, @@ -209,8 +204,6 @@ struct parport_adapter sc_parport_adapter; char buf[64]; - PI1PPC_LOCK_INIT(lsc); - /* For a PC, this is where the installed chipset is probed. * We *know* what we have, no need to probe. */ @@ -219,7 +212,11 @@ /* XXX Once we support Interrupts & DMA, update this */ lsc->sc_has = PI1PPC_HAS_PS2; - + + mutex_init(&lsc->sc_lock, MUTEX_DEFAULT, IPL_TTY); + cv_init(&lsc->sc_in_cv, "pi1ppcin"); + cv_init(&lsc->sc_out_cv, "pi1ppcou"); + /* Print out chipset capabilities */ snprintb(buf, sizeof(buf), "\20\1INTR\2DMA\3FIFO\4PS2\5ECP\6EPP", lsc->sc_has); @@ -233,14 +230,9 @@ /* Last configuration step: set mode to standard mode */ if (pi1ppc_setmode(lsc->sc_dev, PPBUS_COMPATIBLE) != 0) { PI1PPC_DPRINTF(("%s: unable to initialize mode.\n", -device_xname(lsc->sc_dev))); + device_xname(lsc->sc_dev))); } -#if defined (MULTIPROCESSOR) || defined (LOCKDEBUG) - /* Initialize lock structure */ - simple_lock_init(&(lsc->sc_lock)); -#endif - /* Set up parport_adapter structure */ /* Set capabilites */ @@ -311,10 +303,12 @@ printf("continuing (DETACH_FORCE)\n"); } } - if (!(flag & DETACH_QUIET)) printf("%s detached", device_xname(dev)); + mutex_destroy(&lsc->sc_lock); + cv_destroy(&lsc->sc_in_cv); + cv_destroy(&lsc->sc_out_cv); return 0; } @@ -341,9 +335,7 @@ struct pi1ppc_softc *pi1ppc = device_private(dev); int claim = 1; enum { NONE, READER, WRITER } wake_up = NONE; - int s; - s = splpi1ppc(); PI1PPC_LOCK(pi1ppc); /* Record registers' status */ @@ -435,17 +427,15 @@ break; case READER: - wakeup(atppc->sc_inb); + cv_broadcast(atppc->sc_in_cv); break; case WRITER: - wakeup(atppc->sc_outb); + cv_broadcast(atppc->sc_out_cv); break; } } - PI1PPC_UNLOCK(atppc); - /* Call all of the installed handlers */ if (claim) { struct atppc_handler_node * callback; @@ -454,8 +444,7 @@ (*callback->func)(callback->arg); } } - - splx(s); + PI1PPC_UNLOCK(atppc); return claim; #else @@ -478,9 +467,7 @@ { struct pi1ppc_softc *pi1ppc = device_private(dev); int error = 0; - int s; - s = splpi1ppc(); PI1PPC_LOCK(pi1ppc); *cnt = 0; @@ -522,7 +509,6 @@ error = pi1ppc->sc_inerr; PI1PPC_UNLOCK(pi1ppc); - splx(s); return (error); } @@ -533,11 +519,9 @@ { struct pi1ppc_softc * const pi1ppc = device_private(dev); int error = 0; - int s; *cnt = 0; - s = splpi1ppc(); PI1PPC_LOCK(pi1ppc); /* Set up line buffer */ @@ -574,7 +558,6 @@ error = pi1ppc->sc_outerr; PI1PPC_UNLOCK(pi1ppc); - splx(s); return (error); } @@ -596,10 +579,8 @@ struct pi1ppc_softc *pi1ppc = device_private(dev); uint8_t ecr; uint8_t chipset_mode; - int s; int rval = 0; - s = splpi1ppc(); PI1PPC_LOCK(pi1ppc); switch (mode) { @@ -641,7 +622,6 @@ end: PI1PPC_UNLOCK(pi1ppc); - splx(s); return rval; } @@ -652,
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Sun May 22 12:33:49 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: files.dev Log Message: crmfb may run in more than 8 bit now so we need the other rasops* as well To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/dev/files.dev Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/files.dev diff -u src/sys/arch/sgimips/dev/files.dev:1.12 src/sys/arch/sgimips/dev/files.dev:1.13 --- src/sys/arch/sgimips/dev/files.dev:1.12 Thu Apr 7 01:07:31 2011 +++ src/sys/arch/sgimips/dev/files.dev Sun May 22 12:33:49 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.12 2011/04/07 01:07:31 macallan Exp $ +# $NetBSD: files.dev,v 1.13 2011/05/22 12:33:49 macallan Exp $ define giobus {} @@ -31,7 +31,7 @@ attach crime at mainbus file arch/sgimips/dev/crime.c crime needs-flag -device crmfb: wsemuldisplaydev, vcons, rasops8, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid +device crmfb: wsemuldisplaydev, vcons, rasops8, rasops15, rasops16, rasops32, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid attach crmfb at mainbus file arch/sgimips/dev/crmfb.c crmfb needs-flag defflag opt_crmfb.h CRMFB_DEBUG
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Tue May 17 22:52:28 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: add support for running the console in more than 8 bit Now modes like 1680x1050 work. The hardware requires a stride of a multiple of 32 bytes, with 1680 this requires 16bit colour. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.33 src/sys/arch/sgimips/dev/crmfb.c:1.34 --- src/sys/arch/sgimips/dev/crmfb.c:1.33 Wed Apr 13 16:22:09 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Tue May 17 22:52:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $ */ +/* $NetBSD: crmfb.c,v 1.34 2011/05/17 22:52:28 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.34 2011/05/17 22:52:28 macallan Exp $"); #include #include @@ -147,9 +147,12 @@ int sc_width; int sc_height; int sc_depth; + int sc_console_depth; int sc_tiles_x, sc_tiles_y; uint32_t sc_fbsize; int sc_mte_direction; + int sc_mte_x_shift; + uint32_t sc_mte_mode; uint8_t *sc_scratch; paddr_t sc_linear; int sc_wsmode; @@ -289,6 +292,8 @@ aprint_normal_dev(sc->sc_dev, "initial resolution %dx%d\n", sc->sc_width, sc->sc_height); + sc->sc_console_depth = 8; + crmfb_setup_ddc(sc); if ((sc->sc_edid_info.edid_preferred_mode != NULL)) { if (crmfb_set_mode(sc, sc->sc_edid_info.edid_preferred_mode)) @@ -359,7 +364,7 @@ aprint_normal_dev(sc->sc_dev, "allocated %d byte fb @ %p (%p)\n", sc->sc_fbsize, KERNADDR(sc->sc_dmai), KERNADDR(sc->sc_dma)); - crmfb_setup_video(sc, 8); + crmfb_setup_video(sc, sc->sc_console_depth); ri = &crmfb_console_screen.scr_ri; memset(ri, 0, sizeof(struct rasops_info)); @@ -456,7 +461,7 @@ if (nmode != sc->sc_wsmode) { sc->sc_wsmode = nmode; if (nmode == WSDISPLAYIO_MODE_EMUL) { -crmfb_setup_video(sc, 8); +crmfb_setup_video(sc, sc->sc_console_depth); crmfb_setup_palette(sc); vcons_redraw_screen(vd->active); } else { @@ -560,17 +565,17 @@ ri = &scr->scr_ri; ri->ri_flg = RI_CENTER | RI_FULLCLEAR; - ri->ri_depth = sc->sc_depth; + ri->ri_depth = sc->sc_console_depth; ri->ri_width = sc->sc_width; ri->ri_height = sc->sc_height; ri->ri_stride = ri->ri_width * (ri->ri_depth / 8); - +#if 1 switch (ri->ri_depth) { case 16: ri->ri_rnum = ri->ri_gnum = ri->ri_bnum = 5; - ri->ri_rpos = 10; - ri->ri_gpos = 5; - ri->ri_bpos = 0; + ri->ri_rpos = 11; + ri->ri_gpos = 6; + ri->ri_bpos = 1; break; case 32: ri->ri_rnum = ri->ri_gnum = ri->ri_bnum = 8; @@ -579,7 +584,7 @@ ri->ri_bpos = 24; break; } - +#endif ri->ri_bits = KERNADDR(sc->sc_dma); if (existing) @@ -1012,15 +1017,30 @@ case 8: mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI | DE_MODE_PIXDEPTH_8; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_8 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 0; break; case 16: mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_16 | - DE_MODE_TYPE_RGB | DE_MODE_PIXDEPTH_16; + DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_16; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_16 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 1; break; case 32: mode = DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 | DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32; break; + sc->sc_mte_mode = MTE_MODE_DST_ECC | + (MTE_TLB_A << MTE_DST_TLB_SHIFT) | + (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | + (MTE_DEPTH_32 << MTE_DEPTH_SHIFT); + sc->sc_mte_x_shift = 2; default: panic("%s: unsuported colour depth %d\n", __func__, depth); @@ -1032,11 +1052,7 @@ /* initialize memory transfer engine */ bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_MODE, - MTE_MODE_DST_ECC | - (MTE_TLB_A << MTE_DST_TLB_SHIFT) | - (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | - (MTE_DEPTH_8 << MTE_DEPTH_SHIFT) | - MTE_MODE_COPY); + sc->sc_mte_mode | MTE_MODE_COPY); sc->sc_mte_direction = 1; bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST_Y_STEP, 1); bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC_Y_STEP, 1); @@ -1086,20 +1102,20 @@ crmfb_fill_rect(struct crmfb_softc *sc, int x, int y, int width, int height, uint32_t colour) { + int rxa, rxe; + + rxa = x << sc->sc_mte_x_shift; + rxe = ((x + width) << sc->sc_mte_x_shift) - 1; crmfb_wait_idle(sc); crmfb_set_mte_directi
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Tue May 17 22:26:33 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfbreg.h Log Message: add some constants, clarify some hw limitations To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sgimips/dev/crmfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfbreg.h diff -u src/sys/arch/sgimips/dev/crmfbreg.h:1.14 src/sys/arch/sgimips/dev/crmfbreg.h:1.15 --- src/sys/arch/sgimips/dev/crmfbreg.h:1.14 Thu Apr 7 01:20:31 2011 +++ src/sys/arch/sgimips/dev/crmfbreg.h Tue May 17 22:26:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfbreg.h,v 1.14 2011/04/07 01:20:31 macallan Exp $ */ +/* $NetBSD: crmfbreg.h,v 1.15 2011/05/17 22:26:33 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -166,8 +166,9 @@ #define CRMFB_OVR_CONTROL_DMAEN_SHIFT 0 #define CRMFB_FRM_TILESIZE 0x0003 -#define CRMFB_FRM_TILESIZE_RHS_SHIFT 0 -#define CRMFB_FRM_TILESIZE_WIDTH_SHIFT 5 +#define CRMFB_FRM_TILESIZE_RHS_SHIFT 0 /* width of a partial tile + * on the right in 32 BYTES */ +#define CRMFB_FRM_TILESIZE_WIDTH_SHIFT 5 /* width in tiles */ #define CRMFB_FRM_TILESIZE_DEPTH_SHIFT 13 #define CRMFB_FRM_TILESIZE_DEPTH_8 0 #define CRMFB_FRM_TILESIZE_DEPTH_16 1 @@ -193,6 +194,9 @@ #define CRMFB_MODE 0x00048000 #define CRMFB_MODE_TYP_SHIFT 2 #define CRMFB_MODE_TYP_I8 0 +#define CRMFB_MODE_TYP_I12 1 +#define CRMFB_MODE_TYP_RG3B2 2 +#define CRMFB_MODE_TYP_RGB4 3 #define CRMFB_MODE_TYP_ARGB5 4 #define CRMFB_MODE_TYP_RGB8 5 #define CRMFB_MODE_BUF_SHIFT 0
CVS commit: src/sys/arch/sgimips
Module Name:src Committed By: dyoung Date: Wed May 11 17:49:31 UTC 2011 Modified Files: src/sys/arch/sgimips/gio: pci_gio.c src/sys/arch/sgimips/include: pci_machdep.h src/sys/arch/sgimips/mace: pci_mace.c src/sys/arch/sgimips/pci: pci_machdep.c Log Message: Now that GENERIC32_IPX3x builds again, fix some pci_attach_args constification that I'd missed. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sgimips/gio/pci_gio.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/include/pci_machdep.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/mace/pci_mace.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sgimips/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/gio/pci_gio.c diff -u src/sys/arch/sgimips/gio/pci_gio.c:1.6 src/sys/arch/sgimips/gio/pci_gio.c:1.7 --- src/sys/arch/sgimips/gio/pci_gio.c:1.6 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/gio/pci_gio.c Wed May 11 17:49:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_gio.c,v 1.6 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: pci_gio.c,v 1.7 2011/05/11 17:49:31 dyoung Exp $ */ /* * Copyright (c) 2006 Stephen M. Rumble @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.6 2011/02/20 07:59:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_gio.c,v 1.7 2011/05/11 17:49:31 dyoung Exp $"); /* * Glue for PCI devices that are connected to the GIO bus by various little @@ -80,7 +80,8 @@ static pcireg_t giopci_conf_read(pci_chipset_tag_t, pcitag_t, int); static void giopci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); static int giopci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t); -static int giopci_intr_map(struct pci_attach_args *, pci_intr_handle_t *); +static int giopci_intr_map(const struct pci_attach_args *, + pci_intr_handle_t *); static const char * giopci_intr_string(pci_chipset_tag_t, pci_intr_handle_t); static void*giopci_intr_establish(int, int, int (*)(void *), void *); @@ -290,7 +291,7 @@ } static int -giopci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) +giopci_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *ihp) { struct giopci_softc *sc = pa->pa_pc->cookie; Index: src/sys/arch/sgimips/include/pci_machdep.h diff -u src/sys/arch/sgimips/include/pci_machdep.h:1.9 src/sys/arch/sgimips/include/pci_machdep.h:1.10 --- src/sys/arch/sgimips/include/pci_machdep.h:1.9 Wed Aug 30 23:35:10 2006 +++ src/sys/arch/sgimips/include/pci_machdep.h Wed May 11 17:49:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.9 2006/08/30 23:35:10 rumble Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.10 2011/05/11 17:49:31 dyoung Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -60,7 +60,7 @@ pcireg_t); int (*pc_conf_hook)(pci_chipset_tag_t, int, int, int, pcireg_t); - int (*pc_intr_map)(struct pci_attach_args *, + int (*pc_intr_map)(const struct pci_attach_args *, pci_intr_handle_t *); const char * (*pc_intr_string)(pci_chipset_tag_t pc, pci_intr_handle_t); @@ -91,7 +91,8 @@ void pci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); int pci_conf_hook(pci_chipset_tag_t, int, int, int, pcireg_t); -int pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *); +int pci_intr_map(const struct pci_attach_args *, + pci_intr_handle_t *); const char *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t); const struct evcnt *pci_intr_evcnt(pci_chipset_tag_t, pci_intr_handle_t); void *pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t, Index: src/sys/arch/sgimips/mace/pci_mace.c diff -u src/sys/arch/sgimips/mace/pci_mace.c:1.10 src/sys/arch/sgimips/mace/pci_mace.c:1.11 --- src/sys/arch/sgimips/mace/pci_mace.c:1.10 Sun Feb 20 07:59:51 2011 +++ src/sys/arch/sgimips/mace/pci_mace.c Wed May 11 17:49:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_mace.c,v 1.10 2011/02/20 07:59:51 matt Exp $ */ +/* $NetBSD: pci_mace.c,v 1.11 2011/05/11 17:49:31 dyoung Exp $ */ /* * Copyright (c) 2001,2003 Christopher Sekiya @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.10 2011/02/20 07:59:51 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.11 2011/05/11 17:49:31 dyoung Exp $"); #include "opt_pci.h" #include "pci.h" @@ -76,7 +76,8 @@ static int macepci_bus_maxdevs(pci_chipset_tag_t, int); static pcireg_t macepci_conf_read(pci_chipset_tag_t, pcitag_t, int); static void macepci_conf_write(pci_chipset_tag_t, pcitag_t, int, pcireg_t); -static int macepci_intr_map(struct pci_attach_args *, pci_intr_handle_t *); +static int macepci_intr_map(const struct pci_attach_args *, + pci_intr_handle_t *); static const char * macepci_intr_string(pci_chipset_tag_t, pci_intr_handle_t); static int macepci_intr(void *); @@ -207,7 +208,7 @@ } int -macepci_intr_map(struct pci_attach_a
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: plunky Date: Wed Apr 13 16:22:09 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: use PRIx64 for printing 64-bit values To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.32 src/sys/arch/sgimips/dev/crmfb.c:1.33 --- src/sys/arch/sgimips/dev/crmfb.c:1.32 Thu Apr 7 01:20:31 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Wed Apr 13 16:22:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.33 2011/04/13 16:22:09 plunky Exp $"); #include #include @@ -968,7 +968,7 @@ bus_space_write_8(sc->sc_iot, sc->sc_reh, CRIME_RE_TLB_A + tlbptr + lptr, reg); -DPRINTF("%04x: %016llx\n", tlbptr + lptr, reg); +DPRINTF("%04x: %016"PRIx64"\n", tlbptr + lptr, reg); reg = 0; lptr += 8; } @@ -977,7 +977,7 @@ if (shift != 64) { bus_space_write_8(sc->sc_iot, sc->sc_reh, CRIME_RE_TLB_A + tlbptr + lptr, reg); - DPRINTF("%04x: %016llx\n", tlbptr + lptr, reg); + DPRINTF("%04x: %016"PRIx64"\n", tlbptr + lptr, reg); } tlbptr += 32; }
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Thu Apr 7 01:20:31 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c crmfbreg.h Log Message: add mode setting support If we find a monitor via DDC we switch to its preferred mode if it reports one, otherwise stick with whatever the firmware set up. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sgimips/dev/crmfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.31 src/sys/arch/sgimips/dev/crmfb.c:1.32 --- src/sys/arch/sgimips/dev/crmfb.c:1.31 Mon Apr 4 22:50:36 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Thu Apr 7 01:20:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.32 2011/04/07 01:20:31 macallan Exp $"); #include #include @@ -62,7 +62,13 @@ #include -/*#define CRMFB_DEBUG*/ +#include "opt_crmfb.h" + +#ifdef CRMFB_DEBUG +#define DPRINTF printf +#else +#define DPRINTF while (0) printf +#endif struct wsscreen_descr crmfb_defaultscreen = { "default", @@ -147,6 +153,7 @@ uint8_t *sc_scratch; paddr_t sc_linear; int sc_wsmode; + struct edid_info sc_edid_info; /* cursor stuff */ int sc_cur_x; @@ -213,6 +220,10 @@ }; static void crmfb_setup_ddc(struct crmfb_softc *); +/* mode setting stuff */ +static uint32_t calc_pll(int); /* frequency in kHz */ +static int crmfb_set_mode(struct crmfb_softc *, const struct videomode *); + CFATTACH_DECL_NEW(crmfb, sizeof(struct crmfb_softc), crmfb_match, crmfb_attach, NULL, NULL); @@ -254,8 +265,6 @@ if (rv) panic("crmfb_attach: can't map rendering engine"); - //crmfb_setup_ddc(sc); - /* determine mode configured by firmware */ d = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_VT_HCMAP); sc->sc_width = (d >> CRMFB_VT_HCMAP_ON_SHIFT) & 0xfff; @@ -280,6 +289,12 @@ aprint_normal_dev(sc->sc_dev, "initial resolution %dx%d\n", sc->sc_width, sc->sc_height); + crmfb_setup_ddc(sc); + if ((sc->sc_edid_info.edid_preferred_mode != NULL)) { + if (crmfb_set_mode(sc, sc->sc_edid_info.edid_preferred_mode)) + aprint_normal_dev(sc->sc_dev, "using %dx%d\n", + sc->sc_width, sc->sc_height); + } /* * first determine how many tiles we need * in 32bit each tile is 128x128 pixels @@ -381,7 +396,6 @@ sc->sc_hot_x = 0; sc->sc_hot_y = 0; - crmfb_setup_ddc(sc); return; } @@ -798,7 +812,7 @@ { uint64_t reg; uint32_t d, h, mode, page; - int i, bail, tile_width, tlbptr, lptr, j, tx, shift; + int i, bail, tile_width, tlbptr, lptr, j, tx, shift, overhang; const char *wantsync; uint16_t v; @@ -811,7 +825,7 @@ d &= ~(1 << CRMFB_FRM_CONTROL_DMAEN_SHIFT); crmfb_write_reg(sc, CRMFB_FRM_CONTROL, d); DELAY(5); - crmfb_write_reg(sc, CRMFB_DID_CONTROL, 0); + crmfb_write_reg(sc, CRMFB_DID_CONTROL, d); DELAY(5); if (!crmfb_wait_dma_idle(sc)) @@ -875,8 +889,16 @@ d = ((int)(sc->sc_width / tile_width)) << CRMFB_FRM_TILESIZE_WIDTH_SHIFT; - if ((sc->sc_width & (tile_width - 1)) != 0) - d |= sc->sc_tiles_y; + overhang = sc->sc_width % tile_width; + if (overhang != 0) { + uint32_t val; + DPRINTF("tile width: %d\n", tile_width); + DPRINTF("overhang: %d\n", overhang); + val = (overhang * (depth >> 3)) >> 5; + DPRINTF("reg: %08x\n", val); + d |= (val & 0x1f); + DPRINTF("d: %08x\n", d); + } switch (depth) { case 8: @@ -903,17 +925,17 @@ crmfb_write_reg(sc, CRMFB_OVR_WIDTH_TILE, 0); crmfb_write_reg(sc, CRMFB_CURSOR_CONTROL, 0); - /* enable drawing again */ - d = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_DOTCLOCK); - d |= (1 << CRMFB_DOTCLOCK_CLKRUN_SHIFT); - crmfb_write_reg(sc, CRMFB_DOTCLOCK, d); - crmfb_write_reg(sc, CRMFB_VT_XY, 0); - /* turn on DMA for the framebuffer */ d = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_FRM_CONTROL); d |= (1 << CRMFB_FRM_CONTROL_DMAEN_SHIFT); crmfb_write_reg(sc, CRMFB_FRM_CONTROL, d); + /* enable drawing again */ + crmfb_write_reg(sc, CRMFB_VT_XY, 0); + d = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_DOTCLOCK); + d |= (1 << CRMFB_DOTCLOCK_CLKRUN_SHIFT); + crmfb_write_reg(sc, CRMFB_DOTCLOCK, d); + /* turn off sync-on-green */ wantsync = arcbios_GetEnvironmentVariable("SyncOnGreen"); @@ -932,9 +954,7 @@ tx = ((sc->sc_width + (tile_width - 1)) & ~(tile_width - 1)) / tile_width; -#ifdef CRMFB_DEBUG - printf("tx: %d\n", tx); -#endif + DPRINTF("tx: %d\n", tx); for (i = 0; i < 16; i++) { reg = 0; @@ -948,9 +968,7 @@ bus_space_write_8(sc->sc_iot, sc->sc_r
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Thu Apr 7 01:07:31 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: files.dev Log Message: defflag CRMFB_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/dev/files.dev Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/files.dev diff -u src/sys/arch/sgimips/dev/files.dev:1.11 src/sys/arch/sgimips/dev/files.dev:1.12 --- src/sys/arch/sgimips/dev/files.dev:1.11 Mon Apr 4 22:15:13 2011 +++ src/sys/arch/sgimips/dev/files.dev Thu Apr 7 01:07:31 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.11 2011/04/04 22:15:13 macallan Exp $ +# $NetBSD: files.dev,v 1.12 2011/04/07 01:07:31 macallan Exp $ define giobus {} @@ -34,6 +34,7 @@ device crmfb: wsemuldisplaydev, vcons, rasops8, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid attach crmfb at mainbus file arch/sgimips/dev/crmfb.c crmfb needs-flag +defflag opt_crmfb.h CRMFB_DEBUG device scn: tty attach scn at mainbus
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Mon Apr 4 22:50:36 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: remove some old debug code To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.30 src/sys/arch/sgimips/dev/crmfb.c:1.31 --- src/sys/arch/sgimips/dev/crmfb.c:1.30 Thu Mar 31 00:01:08 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Mon Apr 4 22:50:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.31 2011/04/04 22:50:36 macallan Exp $"); #include #include @@ -174,10 +174,6 @@ static int crmfb_setup_video(struct crmfb_softc *, int); static void crmfb_setup_palette(struct crmfb_softc *); -#ifdef CRMFB_DEBUG -void crmfb_test_mte(struct crmfb_softc *); -#endif - static void crmfb_fill_rect(struct crmfb_softc *, int, int, int, int, uint32_t); static void crmfb_bitblt(struct crmfb_softc *, int, int, int, int, int, int, uint32_t); @@ -385,9 +381,6 @@ sc->sc_hot_x = 0; sc->sc_hot_y = 0; -#ifdef CRMFB_DEBUG - crmfb_test_mte(sc); -#endif crmfb_setup_ddc(sc); return; } @@ -1183,120 +1176,6 @@ (rxde << 16) | ryde); } -#ifdef CRMFB_DEBUG -void -crmfb_test_mte(struct crmfb_softc *sc) -{ - uint64_t addr, reg; - uint32_t addrs[256]; - int i, j, boo; - - crmfb_wait_idle(sc); - addr = (uint64_t)(DMAADDR(sc->sc_dma) + sc->sc_fbsize); - addr = addr >> 12; - for (i = 0; i < 64; i += 8) { -#if 1 - reg = (addr << 32) | (addr + 1) | 0x80008000LL; - bus_space_write_8(sc->sc_iot, sc->sc_reh, - CRIME_RE_LINEAR_A + i, reg); - printf(" %08x", (uint32_t)(addr & 0x)); -#endif - addr += 2; - } - printf("\n"); - memset(sc->sc_scratch, 4, 0x1); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC, - DE_MODE_LIN_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI | - DE_MODE_PIXDEPTH_8); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_STRD_SRC, 1); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_DRAWMODE, - DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP | - DE_DRAWMODE_XFER_EN); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_ROP, 3); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_PRIMITIVE, - DE_PRIM_RECTANGLE | DE_PRIM_TB); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_ADDR_SRC, 0); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_X_VERTEX_0, - 0x0200); - bus_space_write_4(sc->sc_iot, sc->sc_reh, - CRIME_DE_X_VERTEX_1 | CRIME_DE_START, - 0x04000100); - - crmfb_wait_idle(sc); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC, - DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI | - DE_MODE_PIXDEPTH_8); - -#if 1 - delay(400); - - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_BG, 0x15151515); - crmfb_wait_idle(sc); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_MODE, - MTE_MODE_DST_ECC | - (MTE_TLB_LIN_A << MTE_DST_TLB_SHIFT) | - (MTE_TLB_A << MTE_SRC_TLB_SHIFT) | - (MTE_DEPTH_8 << MTE_DEPTH_SHIFT) | - 0/*MTE_MODE_COPY*/); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST_STRIDE, 1); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC_STRIDE, 1); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC0, 0x); - //bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_SRC1, 0x01000100); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST0, 0x); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_MTE_DST1 | - CRIME_DE_START, 0x0001); - //status[9] = bus_space_read_4(sc->sc_iot, sc->sc_reh, CRIME_DE_STATUS); - crmfb_wait_idle(sc); - /* now look for 0x05050505 in RAM */ - - boo = 0; - for (i = 0xA000; i < 0xB000; i += 0x1000) - if (*((uint32_t *)i) == 0x15151515) { - /* see if there's more */ - j = 4; - while ((j < 0x100) && (*((uint32_t *)(i + j)) == - 0x15151515)) -j += 4; - if (j > 0x20) { -addrs[boo] = i; -boo++; - } - } - printf("..."); - for (i = 0; i < boo; i++) - printf(" %08x", addrs[i]); - printf("\n"); -#endif - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC, - DE_MODE_LIN_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI | - DE_MODE_PIXDEPTH_8); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_XFER_STRD_SRC, 1); - crmfb_bitblt(sc, 0, 0, 400, 0, 512, 64, 3); - crmfb_wait_idle(sc); - bus_space_write_4(sc->sc_iot, sc->sc_reh, CRIME_DE_MODE_SRC, - DE_MODE_TLB_A | DE_MODE_BUFDEPTH_8 | DE_MODE_TYPE_CI | -
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Mon Apr 4 22:15:14 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: files.dev Log Message: crmfb needs edid and friends now To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sgimips/dev/files.dev Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/files.dev diff -u src/sys/arch/sgimips/dev/files.dev:1.10 src/sys/arch/sgimips/dev/files.dev:1.11 --- src/sys/arch/sgimips/dev/files.dev:1.10 Thu Feb 12 06:33:57 2009 +++ src/sys/arch/sgimips/dev/files.dev Mon Apr 4 22:15:13 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.10 2009/02/12 06:33:57 rumble Exp $ +# $NetBSD: files.dev,v 1.11 2011/04/04 22:15:13 macallan Exp $ define giobus {} @@ -31,7 +31,7 @@ attach crime at mainbus file arch/sgimips/dev/crime.c crime needs-flag -device crmfb: wsemuldisplaydev, vcons, rasops8, rasops16, rasops32 +device crmfb: wsemuldisplaydev, vcons, rasops8, i2cbus, iic, i2c_bitbang, ddc_read_edid, edid attach crmfb at mainbus file arch/sgimips/dev/crmfb.c crmfb needs-flag
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Thu Mar 31 00:01:08 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c crmfbreg.h Log Message: add DDC2 support. Not too useful yet. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sgimips/dev/crmfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.29 src/sys/arch/sgimips/dev/crmfb.c:1.30 --- src/sys/arch/sgimips/dev/crmfb.c:1.29 Wed Mar 30 19:16:35 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Thu Mar 31 00:01:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.29 2011/03/30 19:16:35 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.29 2011/03/30 19:16:35 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.30 2011/03/31 00:01:08 macallan Exp $"); #include #include @@ -54,6 +54,12 @@ #include #include +#include +#include +#include +#include +#include + #include /*#define CRMFB_DEBUG*/ @@ -120,6 +126,8 @@ struct crmfb_softc { device_t sc_dev; struct vcons_data sc_vd; + struct i2c_controller sc_i2c; + int sc_dir; bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; @@ -182,6 +190,33 @@ static void crmfb_cursor(void *, int, int, int); static void crmfb_putchar(void *, int, int, u_int, long); +/* I2C glue */ +static int crmfb_i2c_acquire_bus(void *, int); +static void crmfb_i2c_release_bus(void *, int); +static int crmfb_i2c_send_start(void *, int); +static int crmfb_i2c_send_stop(void *, int); +static int crmfb_i2c_initiate_xfer(void *, i2c_addr_t, int); +static int crmfb_i2c_read_byte(void *, uint8_t *, int); +static int crmfb_i2c_write_byte(void *, uint8_t, int); + +/* I2C bitbang glue */ +static void crmfb_i2cbb_set_bits(void *, uint32_t); +static void crmfb_i2cbb_set_dir(void *, uint32_t); +static uint32_t crmfb_i2cbb_read(void *); + +static const struct i2c_bitbang_ops crmfb_i2cbb_ops = { + crmfb_i2cbb_set_bits, + crmfb_i2cbb_set_dir, + crmfb_i2cbb_read, + { + CRMFB_I2C_SDA, + CRMFB_I2C_SCL, + 0, + 1 + } +}; +static void crmfb_setup_ddc(struct crmfb_softc *); + CFATTACH_DECL_NEW(crmfb, sizeof(struct crmfb_softc), crmfb_match, crmfb_attach, NULL, NULL); @@ -223,6 +258,8 @@ if (rv) panic("crmfb_attach: can't map rendering engine"); + //crmfb_setup_ddc(sc); + /* determine mode configured by firmware */ d = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_VT_HCMAP); sc->sc_width = (d >> CRMFB_VT_HCMAP_ON_SHIFT) & 0xfff; @@ -351,6 +388,7 @@ #ifdef CRMFB_DEBUG crmfb_test_mte(sc); #endif + crmfb_setup_ddc(sc); return; } @@ -1435,3 +1473,108 @@ } } } + +static void +crmfb_setup_ddc(struct crmfb_softc *sc) +{ + int i; + char edid_data[128]; + struct edid_info ei; + + memset(edid_data, 0, 128); + sc->sc_i2c.ic_cookie = sc; + sc->sc_i2c.ic_acquire_bus = crmfb_i2c_acquire_bus; + sc->sc_i2c.ic_release_bus = crmfb_i2c_release_bus; + sc->sc_i2c.ic_send_start = crmfb_i2c_send_start; + sc->sc_i2c.ic_send_stop = crmfb_i2c_send_stop; + sc->sc_i2c.ic_initiate_xfer = crmfb_i2c_initiate_xfer; + sc->sc_i2c.ic_read_byte = crmfb_i2c_read_byte; + sc->sc_i2c.ic_write_byte = crmfb_i2c_write_byte; + sc->sc_i2c.ic_exec = NULL; + i = 0; + while (edid_data[1] == 0 && i++ < 10) + ddc_read_edid(&sc->sc_i2c, edid_data, 128); + if (i > 1) + aprint_debug_dev(sc->sc_dev, + "had to try %d times to get EDID data\n", i); + if (i < 11) { + edid_parse(edid_data, &ei); + edid_print(&ei); + } +} + +/* I2C bitbanging */ +static void +crmfb_i2cbb_set_bits(void *cookie, uint32_t bits) +{ + struct crmfb_softc *sc = cookie; + + bus_space_write_4(sc->sc_iot, sc->sc_ioh, CRMFB_I2C_VGA, bits ^ 3); +} + +static void +crmfb_i2cbb_set_dir(void *cookie, uint32_t dir) +{ + + /* Nothing to do */ +} + +static uint32_t +crmfb_i2cbb_read(void *cookie) +{ + struct crmfb_softc *sc = cookie; + + return bus_space_read_4(sc->sc_iot, sc->sc_ioh, CRMFB_I2C_VGA) ^ 3; +} + +/* higher level I2C stuff */ +static int +crmfb_i2c_acquire_bus(void *cookie, int flags) +{ + + /* private bus */ + return 0; +} + +static void +crmfb_i2c_release_bus(void *cookie, int flags) +{ + + /* private bus */ +} + +static int +crmfb_i2c_send_start(void *cookie, int flags) +{ + + return i2c_bitbang_send_start(cookie, flags, &crmfb_i2cbb_ops); +} + +static int +crmfb_i2c_send_stop(void *cookie, int flags) +{ + + return i2c_bitbang_send_stop(cookie, flags, &crmfb_i2cbb_ops); +} + +static int +crmfb_i2c_initiate_xfer(void *cookie, i2c_addr_t addr, int flags) +{ + + return i2c_bitbang_initiate_xfer(cookie, addr, flags, + &crmfb_i2cbb_ops); +} + +static int +crmfb_i2c_read_byte(void *cookie, uint8_t *valp, int flags) +{ + + retur
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Wed Mar 30 19:16:35 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfb.c Log Message: device_t-ify, use aprint_*_dev() where appropriate To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sgimips/dev/crmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.28 src/sys/arch/sgimips/dev/crmfb.c:1.29 --- src/sys/arch/sgimips/dev/crmfb.c:1.28 Tue Mar 1 21:47:13 2011 +++ src/sys/arch/sgimips/dev/crmfb.c Wed Mar 30 19:16:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.28 2011/03/01 21:47:13 macallan Exp $ */ +/* $NetBSD: crmfb.c,v 1.29 2011/03/30 19:16:35 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.28 2011/03/01 21:47:13 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.29 2011/03/30 19:16:35 macallan Exp $"); #include #include @@ -98,8 +98,8 @@ */ #define CRMFB_TILESIZE (512*128) -static int crmfb_match(struct device *, struct cfdata *, void *); -static void crmfb_attach(struct device *, struct device *, void *); +static int crmfb_match(device_t, struct cfdata *, void *); +static void crmfb_attach(device_t, device_t, void *); int crmfb_probe(void); #define KERNADDR(p) ((void *)((p).addr)) @@ -118,7 +118,7 @@ }; struct crmfb_softc { - struct device sc_dev; + device_t sc_dev; struct vcons_data sc_vd; bus_space_tag_t sc_iot; @@ -182,17 +182,17 @@ static void crmfb_cursor(void *, int, int, int); static void crmfb_putchar(void *, int, int, u_int, long); -CFATTACH_DECL(crmfb, sizeof(struct crmfb_softc), +CFATTACH_DECL_NEW(crmfb, sizeof(struct crmfb_softc), crmfb_match, crmfb_attach, NULL, NULL); static int -crmfb_match(struct device *parent, struct cfdata *cf, void *opaque) +crmfb_match(device_t parent, struct cfdata *cf, void *opaque) { return crmfb_probe(); } static void -crmfb_attach(struct device *parent, struct device *self, void *opaque) +crmfb_attach(device_t parent, device_t self, void *opaque) { struct mainbus_attach_args *ma; struct crmfb_softc *sc; @@ -205,7 +205,9 @@ const char *consdev; int rv, i; - sc = (struct crmfb_softc *)self; + sc = device_private(self); + sc->sc_dev = self; + ma = (struct mainbus_attach_args *)opaque; sc->sc_iot = SGIMIPS_BUS_SPACE_CRIME; @@ -236,14 +238,14 @@ sc->sc_depth = 32; if (sc->sc_width == 0 || sc->sc_height == 0) { - aprint_error("%s: device unusable if not setup by firmware\n", - sc->sc_dev.dv_xname); + aprint_error_dev(sc->sc_dev, + "device unusable if not setup by firmware\n"); bus_space_unmap(sc->sc_iot, sc->sc_ioh, 0 /* XXX */); return; } - aprint_normal("%s: initial resolution %dx%d\n", - sc->sc_dev.dv_xname, sc->sc_width, sc->sc_height); + aprint_normal_dev(sc->sc_dev, "initial resolution %dx%d\n", + sc->sc_width, sc->sc_height); /* * first determine how many tiles we need @@ -306,8 +308,7 @@ sc->sc_scratch = (char *)KERNADDR(sc->sc_dma) + (0xf * sc->sc_tiles_x); sc->sc_linear = (paddr_t)DMAADDR(sc->sc_dma) + 0x10 * sc->sc_tiles_x; - aprint_normal("%s: allocated %d byte fb @ %p (%p)\n", - sc->sc_dev.dv_xname, + aprint_normal_dev(sc->sc_dev, "allocated %d byte fb @ %p (%p)\n", sc->sc_fbsize, KERNADDR(sc->sc_dmai), KERNADDR(sc->sc_dma)); crmfb_setup_video(sc, 8);
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: macallan Date: Wed Mar 30 18:25:31 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: crmfbreg.h Log Message: add a bunch of GBE registers, no functional change (yet) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sgimips/dev/crmfbreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/crmfbreg.h diff -u src/sys/arch/sgimips/dev/crmfbreg.h:1.11 src/sys/arch/sgimips/dev/crmfbreg.h:1.12 --- src/sys/arch/sgimips/dev/crmfbreg.h:1.11 Tue Mar 1 21:47:13 2011 +++ src/sys/arch/sgimips/dev/crmfbreg.h Wed Mar 30 18:25:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfbreg.h,v 1.11 2011/03/01 21:47:13 macallan Exp $ */ +/* $NetBSD: crmfbreg.h,v 1.12 2011/03/30 18:25:31 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -34,26 +34,137 @@ #ifndef CRMFBREG_H #define CRMFBREG_H +#define CRMFB_CTRLSTAT 0x +#define CRMFB_CTRLSTAT_CHIPID_MASK 0x000f +#define CRMFB_CTRLSTAT_SENSE 0x0010 /* monitor sense pin */ +#define CRMFB_CTRLSTAT_GPIO0_SENSE 0x0040 +#define CRMFB_CTRLSTAT_GPIO0_INPUT 0x0080 +#define CRMFB_CTRLSTAT_GPIO1_SENSE 0x0100 +#define CRMFB_CTRLSTAT_GPIO1_INPUT 0x0200 +#define CRMFB_CTRLSTAT_GPIO2_SENSE 0x0400 +#define CRMFB_CTRLSTAT_GPIO2_INPUT 0x0800 +#define CRMFB_CTRLSTAT_GPIO3_SENSE 0x1000 +#define CRMFB_CTRLSTAT_GPIO3_INPUT 0x2000 +#define CRMFB_CTRLSTAT_GPIO4_SENSE 0x4000 +#define CRMFB_CTRLSTAT_GPIO4_INPUT 0x8000 +#define CRMFB_CTRLSTAT_GPIO5_SENSE 0x0001 +#define CRMFB_CTRLSTAT_GPIO5_INPUT 0x0002 +#define CRMFB_CTRLSTAT_GPIO6_SENSE 0x0004 +#define CRMFB_CTRLSTAT_GPIO6_INPUT 0x0008 +#define CRMFB_CTRLSTAT_GPIO7_SENSE 0x0010 +#define CRMFB_CTRLSTAT_GPIO7_INPUT 0x0020 +#define CRMFB_CTRLSTAT_GPIO8_SENSE 0x0040 +#define CRMFB_CTRLSTAT_GPIO8_INPUT 0x0080 +#define CRMFB_CTRLSTAT_GPIO9_SENSE 0x0100 +#define CRMFB_CTRLSTAT_GPIO9_INPUT 0x0200 +#define CRMFB_CTRLSTAT_HALF_PHASE 0x0400 /* for flat panel */ +#define CRMFB_CTRLSTAT_CSYNC_ALOW 0x0800 /* csync active low */ +#define CRMFB_CTRLSTAT_EXTERNAL_PCLK 0x +#define CRMFB_CTRLSTAT_DIFF_PCLK 0x1000 /* differential pclock */ +#define CRMFB_CTRLSTAT_INTERNAL_PCLK 0x3000 + #define CRMFB_DOTCLOCK 0x0004 +#define CRMFB_DOTCLOCK_M_MASK 0x00ff +#define CRMFB_DOTCLOCK_N_MASK 0x3f00 +#define CRMFB_DOTCLOCK_P_MASK 0xc000 #define CRMFB_DOTCLOCK_CLKRUN_SHIFT 20 -#define CRMFB_VT_XY 0x0001 +#define CRMFB_DOTCLOCK_OUT_OF_RANGE 0x0040 +#define CRMFB_DOTCLOCK_OUT_OF_LOCK 0x0080 +#define CRMFB_DOTCLOCK_TDWNI 0x0100 /* ? */ +#define CRMFB_DOTCLOCK_TUPI 0x0200 /* ? */ + +#define CRMFB_I2C_VGA 0x0008 +#define CRMFB_I2C_SDA 0x0001 +#define CRMFB_I2C_SCL 0x0002 + +#define CRMFB_SYSCLK 0x000c + +#define CRMFB_I2C_FP 0x0010 /* same bits as CRMFB_I2C_VGA */ + +#define CRMFB_DEVICE_ID 0x0014 +#define CRMFB_DEVICE_ID_DEF 0x0666 /* this chip is EVIL */ + + +#define CRMFB_VT_XY 0x0001 /* pixel / line counters */ +#define CRMFB_VT_XY_X_MASK 0x0fff +#define CRMFB_VT_XY_Y_MASK 0x00fff000 #define CRMFB_VT_XY_FREEZE_SHIFT 31 +#define CRMFB_VT_MAX 0x00010004 /* same masks as CRMFB_VT_XY, counters in + * CRMFB_VT_XY reset when reaching max */ +#define CRMFB_VT_VSYNC 0x00010008 +#define CRMFB_VT_VSYNC_OFF_MASK 0x0fff +#define CRMFB_VT_VSYNC_ON_MASK 0x00fff000 +#define CRMFB_VT_HSYNC 0x0001000c +#define CRMFB_VT_HSYNC_OFF_MASK 0x0fff +#define CRMFB_VT_HSYNC_ON_MASK 0x00fff000 +#define CRMFB_VT_VBLANK 0x00010010 +#define CRMFB_VT_VBLANK_OFF_MASK 0x0fff +#define CRMFB_VT_VBLANK_ON_MASK 0x00fff000 +#define CRMFB_VT_HBLANK 0x00010014 +#define CRMFB_VT_HBLANK_OFF_MASK 0x0fff +#define CRMFB_VT_HBLANK_ON_MASK 0x00fff000 + #define CRMFB_VT_FLAGS 0x00010018 +#define CRMFB_VT_FLAGS_VDRV_INVERT 0x0001 +#define CRMFB_VT_FLAGS_VDRV_LOW 0x0002 +#define CRMFB_VT_FLAGS_HDRV_INVERT 0x0004 +#define CRMFB_VT_FLAGS_HDRV_LOW 0x0008 /* put monitor to sleep */ +#define CRMFB_VT_FLAGS_SYNC_HIGH 0x0010 +#define CRMFB_VT_FLAGS_SYNC_LOW 0x0020 #define CRMFB_VT_FLAGS_SYNC_LOW_MSB 5 #define CRMFB_VT_FLAGS_SYNC_LOW_LSB 5 +#define CRMFB_VT_FLAGS_F2RF_HIGH 0x0040 /* sync left/right ? */ + +#define CRMFB_VT_FRAMELOCK 0x0001001c +#define CRMFB_VT_FRAMELOCK_F2RF_MASK 0x0fff /* f2rf toggles when y + * reaches this */ +#define CRMFB_VT_FRAMELOCK_LOCK_MASK 0x00fff000 + +/* scanline interrupts! */ #define CRMFB_VT_INTR01 0x00010020 -#define CRMFB_VT_INTR01_EN 0x +#define CRMFB_INTR_1_MASK 0x0fff /* intr1 when y == this */ +#define CRMFB_INTR_0_MASK 0x00fff000 /* intr0 when y == this */ #define CRMFB_VT_INTR23 0x00010024 -#define CRMFB_VT_INTR23_EN 0xf
CVS commit: src/sys/arch/sgimips/include
Module Name:src Committed By: tsutsui Date: Fri Mar 18 16:33:41 UTC 2011 Modified Files: src/sys/arch/sgimips/include: param.h Log Message: Include after MACHINE is defined. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sgimips/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/include/param.h diff -u src/sys/arch/sgimips/include/param.h:1.14 src/sys/arch/sgimips/include/param.h:1.15 --- src/sys/arch/sgimips/include/param.h:1.14 Sun Mar 6 20:34:55 2011 +++ src/sys/arch/sgimips/include/param.h Fri Mar 18 16:33:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.14 2011/03/06 20:34:55 he Exp $ */ +/* $NetBSD: param.h,v 1.15 2011/03/18 16:33:41 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -41,12 +41,10 @@ #define MSGBUFSIZE 8192 #endif -#include - #define _MACHINE sgimips -#ifdef _KERNEL #define MACHINE "sgimips" -#endif + +#include #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
CVS commit: src/sys/arch/sgimips/dev
Module Name:src Committed By: tsutsui Date: Thu Mar 10 17:32:46 UTC 2011 Modified Files: src/sys/arch/sgimips/dev: int.c Log Message: Set correct struct clockframe .intr value for hardclock(9). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sgimips/dev/int.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/dev/int.c diff -u src/sys/arch/sgimips/dev/int.c:1.22 src/sys/arch/sgimips/dev/int.c:1.23 --- src/sys/arch/sgimips/dev/int.c:1.22 Sun Feb 20 07:59:50 2011 +++ src/sys/arch/sgimips/dev/int.c Thu Mar 10 17:32:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: int.c,v 1.22 2011/02/20 07:59:50 matt Exp $ */ +/* $NetBSD: int.c,v 1.23 2011/03/10 17:32:46 tsutsui Exp $ */ /* * Copyright (c) 2009 Stephen M. Rumble @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.22 2011/02/20 07:59:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: int.c,v 1.23 2011/03/10 17:32:46 tsutsui Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -639,6 +639,7 @@ cf.pc = pc; cf.sr = status; + cf.intr = (curcpu()->ci_idepth > 1); hardclock(&cf);
CVS commit: src/sys/arch/sgimips/conf
Module Name:src Committed By: joerg Date: Sat Mar 5 23:38:40 UTC 2011 Modified Files: src/sys/arch/sgimips/conf: GENERIC32_IP12 GENERIC32_IP2x GENERIC32_IP3x Log Message: Disable COMPAT_IRIX and related code. The usefulness is under discussion and code that dereferences pointer into userland without proper checking needs a full audit. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/conf/GENERIC32_IP12 cvs rdiff -u -r1.84 -r1.85 src/sys/arch/sgimips/conf/GENERIC32_IP2x cvs rdiff -u -r1.86 -r1.87 src/sys/arch/sgimips/conf/GENERIC32_IP3x Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/conf/GENERIC32_IP12 diff -u src/sys/arch/sgimips/conf/GENERIC32_IP12:1.8 src/sys/arch/sgimips/conf/GENERIC32_IP12:1.9 --- src/sys/arch/sgimips/conf/GENERIC32_IP12:1.8 Tue Nov 23 11:14:05 2010 +++ src/sys/arch/sgimips/conf/GENERIC32_IP12 Sat Mar 5 23:38:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP12,v 1.8 2010/11/23 11:14:05 hannken Exp $ +# $NetBSD: GENERIC32_IP12,v 1.9 2011/03/05 23:38:40 joerg Exp $ # # GENERIC32_IP12 machine description file # @@ -32,7 +32,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32-IP2x-$Revision: 1.8 $" +#ident "GENERIC32-IP2x-$Revision: 1.9 $" maxusers 32 @@ -86,7 +86,7 @@ options COMPAT_50 # NetBSD 5.0 compatibility. #options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. -options COMPAT_IRIX # binary compatibility with IRIX +#options COMPAT_IRIX # binary compatibility with IRIX #options COMPAT_LINUX # binary compatibility with Linux #options COMPAT_ULTRIX # binary compatibility with Ultrix options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. @@ -283,8 +283,8 @@ #pseudo-device vcoda 4 # coda minicache <-> venus comm. # pseudo devices used for IRIX binary compatibility -pseudo-device irix_kmem # IRIX /dev/kmem -pseudo-device irix_usema # IRIX /dev/usema +#pseudo-device irix_kmem # IRIX /dev/kmem +#pseudo-device irix_usema # IRIX /dev/usema # Veriexec # Index: src/sys/arch/sgimips/conf/GENERIC32_IP2x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.84 src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.85 --- src/sys/arch/sgimips/conf/GENERIC32_IP2x:1.84 Tue Nov 23 11:14:05 2010 +++ src/sys/arch/sgimips/conf/GENERIC32_IP2x Sat Mar 5 23:38:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP2x,v 1.84 2010/11/23 11:14:05 hannken Exp $ +# $NetBSD: GENERIC32_IP2x,v 1.85 2011/03/05 23:38:40 joerg Exp $ # # GENERIC32_IP2x machine description file # @@ -29,7 +29,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32-IP2x-$Revision: 1.84 $" +#ident "GENERIC32-IP2x-$Revision: 1.85 $" maxusers 32 @@ -86,7 +86,7 @@ options COMPAT_50 # NetBSD 5.0 compatibility. #options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. -options COMPAT_IRIX # binary compatibility with IRIX +#options COMPAT_IRIX # binary compatibility with IRIX options COMPAT_LINUX # binary compatibility with Linux #options COMPAT_ULTRIX # binary compatibility with Ultrix options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. @@ -329,8 +329,8 @@ pseudo-device vcoda 4 # coda minicache <-> venus comm. # pseudo devices used for IRIX binary compatibility -pseudo-device irix_kmem # IRIX /dev/kmem -pseudo-device irix_usema # IRIX /dev/usema +#pseudo-device irix_kmem # IRIX /dev/kmem +#pseudo-device irix_usema # IRIX /dev/usema # Veriexec # Index: src/sys/arch/sgimips/conf/GENERIC32_IP3x diff -u src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.86 src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.87 --- src/sys/arch/sgimips/conf/GENERIC32_IP3x:1.86 Tue Nov 23 11:14:05 2010 +++ src/sys/arch/sgimips/conf/GENERIC32_IP3x Sat Mar 5 23:38:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC32_IP3x,v 1.86 2010/11/23 11:14:05 hannken Exp $ +# $NetBSD: GENERIC32_IP3x,v 1.87 2011/03/05 23:38:40 joerg Exp $ # # GENERIC32_IP3x machine description file # @@ -28,7 +28,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC32_IP3x-$Revision: 1.86 $" +#ident "GENERIC32_IP3x-$Revision: 1.87 $" maxusers 32 @@ -79,7 +79,7 @@ options COMPAT_50 # NetBSD 5.0 compatibility. #options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. -options COMPAT_IRIX # binary compatibility with IRIX +#options COMPAT_IRIX # binary compatibility with IRIX options COMPAT_LINUX # binary compatibility with Linux #options COMPAT_ULTRIX # binary compatibility with Ultrix options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. @@ -475,8 +475,8 @@ pseudo-device vcoda 4 # coda minicache <-> venus comm. # pseudo devices used for IRIX binary compatibility -pseudo-device irix_kmem # IRIX /dev/kmem -pseudo-device irix_usema # IRIX /dev/usema +#pseudo-device irix_kmem # IRIX /dev/kmem +#pseudo-device irix_usema # IRIX /dev/usema #