CVS commit: src/sys/dev/audio
Module Name:src Committed By: maya Date: Sat May 11 03:26:43 UTC 2019 Modified Files: src/sys/dev/audio: audio.c Log Message: Don't use a confusing GCC extension. NFC To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/audio/audio.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/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.2 src/sys/dev/audio/audio.c:1.3 --- src/sys/dev/audio/audio.c:1.2 Wed May 8 13:40:17 2019 +++ src/sys/dev/audio/audio.c Sat May 11 03:26:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.2 2019/05/08 13:40:17 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.3 2019/05/11 03:26:43 maya Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -149,7 +149,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.2 2019/05/08 13:40:17 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.3 2019/05/11 03:26:43 maya Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -7214,7 +7214,7 @@ audiogetinfo(struct audio_softc *sc, str * XXX hiwat/lowat is a playback-only parameter. What should I * return for a record-only descriptor? */ - track = ptrack ?: rtrack; + track = ptrack ? ptrack : rtrack; if (track) { ai->blocksize = track->usrbuf_blksize; ai->hiwat = track->usrbuf_usedhigh / track->usrbuf_blksize;
CVS commit: src/sys/dev/audio
Module Name:src Committed By: maya Date: Sat May 11 03:26:43 UTC 2019 Modified Files: src/sys/dev/audio: audio.c Log Message: Don't use a confusing GCC extension. NFC To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat May 11 02:40:31 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: Everyone is using gcc-7 now. To generate a diff of this commit: cvs rdiff -u -r1.1133 -r1.1134 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1133 src/share/mk/bsd.own.mk:1.1134 --- src/share/mk/bsd.own.mk:1.1133 Fri May 10 02:19:54 2019 +++ src/share/mk/bsd.own.mk Fri May 10 22:40:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1133 2019/05/10 06:19:54 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1134 2019/05/11 02:40:31 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -58,10 +58,6 @@ TOOLCHAIN_MISSING?= no # # What GCC is used? # -.if \ -${MACHINE_ARCH} == "powerpc64" -HAVE_GCC?= 6 -.endif HAVE_GCC?= 7 #
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat May 11 02:40:31 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: Everyone is using gcc-7 now. To generate a diff of this commit: cvs rdiff -u -r1.1133 -r1.1134 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib/libgcc
Module Name:src Committed By: christos Date: Sat May 11 02:39:32 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libgcc: Makefile.inc Log Message: remove the ppc64 long-double-128; the default is 64 now. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/gcc/lib/libgcc/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Sat May 11 02:39:48 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: defs.mk src/external/gpl3/gcc/lib/libiberty: defs.mk src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h gstdint.h symver-config.h src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: configargs.h Log Message: regen for ppc64 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/lib/libiberty/defs.mk cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h cvs rdiff -u -r1.18 -r1.19 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk diff -u src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk:1.8 src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk:1.9 --- src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk:1.8 Tue Apr 16 03:37:56 2019 +++ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk Fri May 10 22:39:48 2019 @@ -6,7 +6,7 @@ G_INCLUDES=-I. -I. -I../.././gcc -I${GNU G_INTERNAL_CFLAGS=-g -O2 -O2 -DIN_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -I. -I. -I../.././gcc -I${GNUHOSTDIST}/libgcc -I${GNUHOSTDIST}/libgcc/. -I${GNUHOSTDIST}/libgcc/../gcc -I${GNUHOSTDIST}/libgcc/../include -DHAVE_CC_TLS G_LIB2ADD=${GNUHOSTDIST}/libgcc/config/rs6000/tramp.S enable-execute-stack.c G_LIB2ADDEH=${GNUHOSTDIST}/libgcc/unwind-dw2.c ${GNUHOSTDIST}/libgcc/unwind-dw2-fde-dip.c ${GNUHOSTDIST}/libgcc/unwind-sjlj.c ${GNUHOSTDIST}/libgcc/unwind-c.c ${GNUHOSTDIST}/libgcc/emutls.c -G_LIB2ADD_ST=${GNUHOSTDIST}/libgcc/config/rs6000/crtsavfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtsavgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresxfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresxgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtsavevr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtrestvr.S addkf3-sw.c subkf3-sw.c mulkf3-sw.c divkf3-sw.c negkf2-sw.c unordkf2-sw.c eqkf2-sw.c gekf2-sw.c lekf2-sw.c extendsfkf2-sw.c extenddfkf2-sw.c trunckfsf2-sw.c trunckfdf2-sw.c fixkfsi-sw.c fixkfdi-sw.c fixunskfsi-sw.c fixunskfdi-sw.c floatsikf-sw.c floatdikf-sw.c floatunsikf-sw.c floatundikf-sw.c ${GNUHOSTDIST}/libgcc/config/rs6000/floattikf.c ${GNUHOSTDIST}/libgcc/config/rs6000/floatuntikf.c ${GNUHOSTDIST}/libgcc/config/rs6000/fixkfti.c ${GNUHOSTDIST}/libgcc/config/rs6000/fixunskfti.c ${GNUHOSTDIST}/libgcc/config/rs6000/extendkftf2-sw.c ${GNUHOSTDIST}/libgcc/config/rs6000/trunctfkf2-sw.c ${GNU HOSTDIST}/libgcc/config/rs6000/sfp-exceptions.c ${GNUHOSTDIST}/libgcc/config/rs6000/_mulkc3.c ${GNUHOSTDIST}/libgcc/config/rs6000/_divkc3.c +G_LIB2ADD_ST=${GNUHOSTDIST}/libgcc/config/rs6000/crtsavfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtsavgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresxfpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtresxgpr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtsavevr.S ${GNUHOSTDIST}/libgcc/config/rs6000/crtrestvr.S G_LIB1ASMFUNCS= G_LIB1ASMSRC= G_LIB2_DIVMOD_FUNCS=_divdi3 _moddi3 _divmoddi4 _udivdi3 _umoddi3 _udivmoddi4 _udiv_w_sdiv Index: src/external/gpl3/gcc/lib/libiberty/defs.mk diff -u src/external/gpl3/gcc/lib/libiberty/defs.mk:1.20 src/external/gpl3/gcc/lib/libiberty/defs.mk:1.21 --- src/external/gpl3/gcc/lib/libiberty/defs.mk:1.20 Tue Feb 5 07:42:08 2019 +++ src/external/gpl3/gcc/lib/libiberty/defs.mk Fri May 10 22:39:48 2019 @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.99 2019/02/04 01:46:59 mrg Exp +# Generated from: NetBSD: mknative-gcc,v 1.101 2019/02/23 06:54:45 mrg Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o strverscmp.o +G_LIBOBJS=mempcpy.o strverscmp.o vfork.o G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: christos Date: Sat May 11 02:39:48 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libgcc/arch/powerpc64: defs.mk src/external/gpl3/gcc/lib/libiberty: defs.mk src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64: c++config.h gstdint.h symver-config.h src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64: configargs.h Log Message: regen for ppc64 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/lib/libiberty/defs.mk cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/symver-config.h cvs rdiff -u -r1.18 -r1.19 \ src/external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/gcc/config/rs6000
Module Name:src Committed By: christos Date: Sat May 11 02:37:58 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc/config/rs6000: netbsd64.h Log Message: Switch PPC64 long double to 64 bits until the compiler is fixed. XXX: This changes the ABI of the libraries. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 \ src/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Sat May 11 02:34:19 UTC 2019 Modified Files: src/sys/dev/pci: auich.c Log Message: Don't return the raw audio formats; return the ones after we disabled some of them because the device does not support them. Fixes panic in virtualbox. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/dev/pci/auich.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Sat May 11 02:34:19 UTC 2019 Modified Files: src/sys/dev/pci: auich.c Log Message: Don't return the raw audio formats; return the ones after we disabled some of them because the device does not support them. Fixes panic in virtualbox. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/dev/pci/auich.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/dev/pci/auich.c diff -u src/sys/dev/pci/auich.c:1.155 src/sys/dev/pci/auich.c:1.156 --- src/sys/dev/pci/auich.c:1.155 Wed May 8 09:40:18 2019 +++ src/sys/dev/pci/auich.c Fri May 10 22:34:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: auich.c,v 1.155 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: auich.c,v 1.156 2019/05/11 02:34:19 christos Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2008 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.155 2019/05/08 13:40:18 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.156 2019/05/11 02:34:19 christos Exp $"); #include #include @@ -959,7 +959,7 @@ auich_query_format(void *v, struct audio return audio_query_format(auich_spdif_formats, AUICH_SPDIF_NFORMATS, afp); } else { - return audio_query_format(auich_audio_formats, + return audio_query_format(sc->sc_audio_formats, AUICH_AUDIO_NFORMATS, afp); } }
Re: CVS commit: src/sys
Kamil Rytarowski writes: > On 08.05.2019 11:34, Ryota Ozaki wrote: >> On Sat, Apr 20, 2019 at 6:45 PM Ryota Ozaki wrote: >>> >>> On Fri, Apr 19, 2019 at 6:49 PM Kamil Rytarowski wrote: On 19.04.2019 11:41, J. Hannken-Illjes wrote: >> On 19. Apr 2019, at 03:52, Ryota Ozaki wrote: >> >> Module Name: src >> Committed By:ozaki-r >> Date:Fri Apr 19 01:52:56 UTC 2019 >> >> Modified Files: >> src/sys/kern: kern_lwp.c kern_softint.c subr_psref.c >> src/sys/rump/kern/lib/libsysproxy: sysproxy.c >> src/sys/sys: lwp.h userret.h >> >> Log Message: >> Implement a simple psref leak detector >> >> It detects leaks by counting up the number of held psref by an LWP and >> checking >> its zeroness at the end of syscalls and softint handlers. For the >> counter, a >> unused field of struct lwp is reused. > > For DIAGNOSTIC-only operations LWP specific data > (see kern/subr_lwp_specificdata.c) is a better choice. > I wanted to propose the same. An exampe of this is in KCOV. >>> >>> Thanks. I'll try it. (I'll be AFK for the next few days...) >> >> I'm sorry for delaying this task. Finally I have benchmarked a revised patch >> (our benchmarking setups have been out of service for a couple of weeks...). >> >> Performance degradation of IP forwarding is 3%. Is it acceptable as >> DIAGNOSTIC? >> > > For DIAGNOSTIC should be fine. I think 3% is too much for DIAGNOSTIC. DEBUG, sure, and a specific option to turn it on seems fine. DIAGNOSTIC historically has been only for things that check invariants and assert, such that if you don't mind the crashes when detecting things, there is no performance reason to avoid it.
Re: CVS commit: src/sys
On 08.05.2019 11:34, Ryota Ozaki wrote: > On Sat, Apr 20, 2019 at 6:45 PM Ryota Ozaki wrote: >> >> On Fri, Apr 19, 2019 at 6:49 PM Kamil Rytarowski wrote: >>> >>> On 19.04.2019 11:41, J. Hannken-Illjes wrote: > On 19. Apr 2019, at 03:52, Ryota Ozaki wrote: > > Module Name: src > Committed By:ozaki-r > Date:Fri Apr 19 01:52:56 UTC 2019 > > Modified Files: > src/sys/kern: kern_lwp.c kern_softint.c subr_psref.c > src/sys/rump/kern/lib/libsysproxy: sysproxy.c > src/sys/sys: lwp.h userret.h > > Log Message: > Implement a simple psref leak detector > > It detects leaks by counting up the number of held psref by an LWP and > checking > its zeroness at the end of syscalls and softint handlers. For the > counter, a > unused field of struct lwp is reused. For DIAGNOSTIC-only operations LWP specific data (see kern/subr_lwp_specificdata.c) is a better choice. >>> >>> I wanted to propose the same. An exampe of this is in KCOV. >> >> Thanks. I'll try it. (I'll be AFK for the next few days...) > > I'm sorry for delaying this task. Finally I have benchmarked a revised patch > (our benchmarking setups have been out of service for a couple of weeks...). > > Performance degradation of IP forwarding is 3%. Is it acceptable as > DIAGNOSTIC? > For DIAGNOSTIC should be fine. > Thanks, > ozaki-r > signature.asc Description: OpenPGP digital signature
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Fri May 10 23:21:42 UTC 2019 Modified Files: src/sys/arch/sgimips/gio: newport.c Log Message: general overhaul, in no particular order: - use MIPS_PHYS_TO_KSEG1() - get rid of duplicated rasops_allocattr() and _mapchar() methods - use rasops_init() - support fonts that aren't 8x16 - use fastclear mode for rectangle fills - don't mess with XMAP9's config register - initialize all 32 XMAP9 mode registers, just in case - make newport_fill_rectangle() use x, y, wi, he like everyone else - use R3G3B2 palette in preparation for alpha font support To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Fri May 10 23:21:42 UTC 2019 Modified Files: src/sys/arch/sgimips/gio: newport.c Log Message: general overhaul, in no particular order: - use MIPS_PHYS_TO_KSEG1() - get rid of duplicated rasops_allocattr() and _mapchar() methods - use rasops_init() - support fonts that aren't 8x16 - use fastclear mode for rectangle fills - don't mess with XMAP9's config register - initialize all 32 XMAP9 mode registers, just in case - make newport_fill_rectangle() use x, y, wi, he like everyone else - use R3G3B2 palette in preparation for alpha font support To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 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.19 src/sys/arch/sgimips/gio/newport.c:1.20 --- src/sys/arch/sgimips/gio/newport.c:1.19 Tue Aug 25 02:09:18 2015 +++ src/sys/arch/sgimips/gio/newport.c Fri May 10 23:21:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $ */ +/* $NetBSD: newport.c,v 1.20 2019/05/10 23:21:42 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.19 2015/08/25 02:09:18 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: newport.c,v 1.20 2019/05/10 23:21:42 macallan Exp $"); #include #include @@ -73,7 +73,6 @@ struct newport_devconfig { int dc_font; struct wsscreen_descr *dc_screen; - struct wsdisplay_font *dc_fontdata; int dc_mode; struct vcons_data dc_vd; }; @@ -87,13 +86,11 @@ CFATTACH_DECL_NEW(newport, sizeof(struct /* textops */ static void newport_cursor(void *, int, int, int); static void newport_cursor_dummy(void *, int, int, int); -static int newport_mapchar(void *, int, unsigned int *); static void newport_putchar(void *, int, int, u_int, long); static void newport_copycols(void *, int, int, int, int); static void newport_erasecols(void *, int, int, int, long); static void newport_copyrows(void *, int, int, int); static void newport_eraserows(void *, int, int, long); -static int newport_allocattr(void *, int, int, int, long *); static void newport_init_screen(void *, struct vcons_screen *, int, long *); @@ -107,22 +104,10 @@ static struct wsdisplay_accessops newpor .mmap = newport_mmap, }; -static struct wsdisplay_emulops newport_textops = { - .cursor = newport_cursor_dummy, - .mapchar = newport_mapchar, - .putchar = newport_putchar, - .copycols = newport_copycols, - .erasecols = newport_erasecols, - .copyrows = newport_copyrows, - .eraserows = newport_eraserows, - .allocattr = newport_allocattr -}; - static struct wsscreen_descr newport_screen = { .name = "default", .ncols = 160, .nrows = 64, - .textops = _textops, .fontwidth = 8, .fontheight = 16, .capabilities = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_REVERSE @@ -141,11 +126,7 @@ static struct vcons_screen newport_conso static struct newport_devconfig newport_console_dc; static int newport_is_console = 0; -#define NEWPORT_ATTR_ENCODE(fg,bg) (((fg) << 8) | (bg)) -#define NEWPORT_ATTR_BG(a) ((a) & 0xff) -#define NEWPORT_ATTR_FG(a) (((a) >> 8) & 0xff) - -extern const u_char rasops_cmap[768]; +uint8_t our_cmap[768]; / Low-level hardware register groveling functions / static void @@ -273,9 +254,19 @@ xmap9_write(struct newport_devconfig *dc rex3_write(dc, REX3_REG_DCBDATA0, val << 24); } +static inline void +xmap9_wait(struct newport_devconfig *dc) +{ + do {} while (xmap9_read(dc, XMAP9_DCBCRS_FIFOAVAIL) == 0); +} + static void xmap9_write_mode(struct newport_devconfig *dc, uint8_t index, uint32_t mode) { + volatile uint32_t junk; + /* wait for FIFO if needed */ + xmap9_wait(dc); + rex3_write(dc, REX3_REG_DCBMODE, REX3_DCBMODE_DW_4 | (NEWPORT_DCBADDR_XMAP_BOTH << REX3_DCBMODE_DCBADDR_SHIFT) | @@ -284,30 +275,40 @@ xmap9_write_mode(struct newport_devconfi (2 << REX3_DCBMODE_CSHOLD_SHIFT) | (1 << REX3_DCBMODE_CSSETUP_SHIFT)); + xmap9_wait(dc); + rex3_write(dc, REX3_REG_DCBDATA0, (index << 24) | mode); + junk = rex3_read(dc, REX3_REG_DCBDATA0); + __USE(junk); } / Helper functions / static void -newport_fill_rectangle(struct newport_devconfig *dc, int x1, int y1, int x2, -int y2, uint8_t color) +newport_fill_rectangle(struct newport_devconfig *dc, int x1, int y1, int wi, +int he, uint32_t color) { + int x2 = x1 + wi - 1; + int y2 = y1 + he - 1; + rex3_wait_gfifo(dc); rex3_write(dc, REX3_REG_DRAWMODE0, REX3_DRAWMODE0_OPCODE_DRAW | REX3_DRAWMODE0_ADRMODE_BLOCK | REX3_DRAWMODE0_DOSETUP | REX3_DRAWMODE0_STOPONX | REX3_DRAWMODE0_STOPONY); + rex3_write(dc, REX3_REG_CLIPMODE, 0x1e00); rex3_write(dc, REX3_REG_DRAWMODE1, - REX3_DRAWMODE1_PLANES_CI | + REX3_DRAWMODE1_PLANES_RGB
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Fri May 10 22:54:51 UTC 2019 Modified Files: src/sys/arch/sgimips/gio: newportreg.h Log Message: move the CIDMATCH bits where they belong, now FASTCLEAR mode can actually work To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.
CVS commit: src/sys/arch/sgimips/gio
Module Name:src Committed By: macallan Date: Fri May 10 22:54:51 UTC 2019 Modified Files: src/sys/arch/sgimips/gio: newportreg.h Log Message: move the CIDMATCH bits where they belong, now FASTCLEAR mode can actually work To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 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.7 src/sys/arch/sgimips/gio/newportreg.h:1.8 --- src/sys/arch/sgimips/gio/newportreg.h:1.7 Sat May 4 00:45:18 2019 +++ src/sys/arch/sgimips/gio/newportreg.h Fri May 10 22:54:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: newportreg.h,v 1.7 2019/05/04 00:45:18 macallan Exp $ */ +/* $NetBSD: newportreg.h,v 1.8 2019/05/10 22:54:51 macallan Exp $ */ /* * Copyright (c) 2003 Ilpo Ruotsalainen @@ -198,10 +198,10 @@ #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_CLIPMODE_CIDMATCH0 0x0200 +#define REX3_CLIPMODE_CIDMATCH1 0x0400 +#define REX3_CLIPMODE_CIDMATCH2 0x0800 +#define REX3_CLIPMODE_CIDMATCH3 0x1000 #define REX3_REG_STATUS 0x1338
CVS commit: src/sys/kern
Module Name:src Committed By: mgorny Date: Fri May 10 21:08:26 UTC 2019 Modified Files: src/sys/kern: sys_ptrace_common.c Log Message: Fix typo: PT_GETFOREGS -> PT_GETFPREGS (NFC) To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/kern/sys_ptrace_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.