CVS commit: src/share/man/man5
Module Name:src Committed By: rin Date: Wed Jun 14 02:28:41 UTC 2023 Modified Files: src/share/man/man5: mk.conf.5 Log Message: Fix previous. Patch mistakenly applied somehow... To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.104 src/share/man/man5/mk.conf.5:1.105 --- src/share/man/man5/mk.conf.5:1.104 Wed Jun 14 01:16:28 2023 +++ src/share/man/man5/mk.conf.5 Wed Jun 14 02:28:41 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.104 2023/06/14 01:16:28 rin Exp $ +.\" $NetBSD: mk.conf.5,v 1.105 2023/06/14 02:28:41 rin Exp $ .\" .\" Copyright (c) 1999-2023 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -747,12 +747,6 @@ will be installed. .NODEF NODOC .NOVAR MKSHARE=no .DFLTy -.Pp -.Em Note : -see also -.Pa src/sys/rump/README.compileopts -for variables used during the build of the -.Xr rump 3 . . .It Sy MKDTB .YorN @@ -773,12 +767,6 @@ on other platforms. .YorN Indicates whether the Device Tree Compiler (dtc) will be built and installed. .DFLTy -.Pp -.Em Note : -see also -.Pa src/sys/rump/README.compileopts -for variables used during the build of the -.Xr rump 3 . . .It Sy MKDTRACE .YorN @@ -1534,6 +1522,12 @@ Indicates whether the headers, libraries, and programs are to be installed. .NOVAR COVERITY_TOP_CONFIG No is defined .DFLTy +.Pp +.Em Note : +see also +.Pa src/sys/rump/README.compileopts +for variables used during the build of the +.Xr rump 3 . . .It Sy MKSANITIZER .YorN
CVS commit: src/share/man/man5
Module Name:src Committed By: rin Date: Wed Jun 14 02:28:41 UTC 2023 Modified Files: src/share/man/man5: mk.conf.5 Log Message: Fix previous. Patch mistakenly applied somehow... To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/conf
Module Name:src Committed By: rin Date: Wed Jun 14 01:27:47 UTC 2023 Modified Files: src/sys/arch/x86/conf: files.x86 Log Message: Make PCI_ADDR_FIXUP depended on PCI_BUS_FIXUP. It is no-op if PCI_BUS_FIXUP is missing. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/arch/x86/conf/files.x86 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/x86/conf/files.x86 diff -u src/sys/arch/x86/conf/files.x86:1.125 src/sys/arch/x86/conf/files.x86:1.126 --- src/sys/arch/x86/conf/files.x86:1.125 Fri Oct 28 07:16:34 2022 +++ src/sys/arch/x86/conf/files.x86 Wed Jun 14 01:27:47 2023 @@ -1,4 +1,4 @@ -# $NetBSD: files.x86,v 1.125 2022/10/28 07:16:34 skrll Exp $ +# $NetBSD: files.x86,v 1.126 2023/06/14 01:27:47 rin Exp $ # options for MP configuration through the MP spec defflag opt_mpbios.h MPBIOS MPDEBUG MPBIOS_SCANPCI @@ -11,8 +11,8 @@ defflag MTRR defflag opt_intrdebug.h INTRDEBUG # PCI fixup options -defflag opt_pcifixup.h PCI_ADDR_FIXUP PCI_BUS_FIXUP - PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE +defflag opt_pcifixup.h PCI_BUS_FIXUP PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE +defflag opt_pcifixup.h PCI_ADDR_FIXUP : PCI_BUS_FIXUP defflag opt_pci.h NO_PCI_MSI_MSIX # To be able to test for NetBSD/xen in shared files
CVS commit: src/sys/arch/x86/conf
Module Name:src Committed By: rin Date: Wed Jun 14 01:27:47 UTC 2023 Modified Files: src/sys/arch/x86/conf: files.x86 Log Message: Make PCI_ADDR_FIXUP depended on PCI_BUS_FIXUP. It is no-op if PCI_BUS_FIXUP is missing. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/arch/x86/conf/files.x86 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man5
Module Name:src Committed By: rin Date: Wed Jun 14 01:16:28 UTC 2023 Modified Files: src/share/man/man5: mk.conf.5 Log Message: Cite src/sys/rump/README.compileopts as a reference for MKRUMP. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.103 src/share/man/man5/mk.conf.5:1.104 --- src/share/man/man5/mk.conf.5:1.103 Sun Jun 11 20:33:46 2023 +++ src/share/man/man5/mk.conf.5 Wed Jun 14 01:16:28 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.103 2023/06/11 20:33:46 lukem Exp $ +.\" $NetBSD: mk.conf.5,v 1.104 2023/06/14 01:16:28 rin Exp $ .\" .\" Copyright (c) 1999-2023 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 11, 2023 +.Dd June 14, 2023 .Dt MK.CONF 5 .Os .\" turn off hyphenation @@ -747,6 +747,12 @@ will be installed. .NODEF NODOC .NOVAR MKSHARE=no .DFLTy +.Pp +.Em Note : +see also +.Pa src/sys/rump/README.compileopts +for variables used during the build of the +.Xr rump 3 . . .It Sy MKDTB .YorN @@ -767,6 +773,12 @@ on other platforms. .YorN Indicates whether the Device Tree Compiler (dtc) will be built and installed. .DFLTy +.Pp +.Em Note : +see also +.Pa src/sys/rump/README.compileopts +for variables used during the build of the +.Xr rump 3 . . .It Sy MKDTRACE .YorN
CVS commit: src/share/man/man5
Module Name:src Committed By: rin Date: Wed Jun 14 01:16:28 UTC 2023 Modified Files: src/share/man/man5: mk.conf.5 Log Message: Cite src/sys/rump/README.compileopts as a reference for MKRUMP. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Jun 14 00:52:25 UTC 2023 Modified Files: src/sys/stand/efiboot: efiblock.c Log Message: Avoid void * pointer arithmetic; cast to UINT8 * explicitly. No binary changes for aarch64 at least. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efiblock.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/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.19 src/sys/stand/efiboot/efiblock.c:1.20 --- src/sys/stand/efiboot/efiblock.c:1.19 Sun Apr 24 06:49:38 2022 +++ src/sys/stand/efiboot/efiblock.c Wed Jun 14 00:52:25 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.19 2022/04/24 06:49:38 mlelstv Exp $ */ +/* $NetBSD: efiblock.c,v 1.20 2023/06/14 00:52:25 rin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -442,7 +442,7 @@ efi_block_find_partitions_gpt(struct efi } for (entry = 0; entry < le32toh(hdr.hdr_entries); entry++) { - memcpy(, buf + (entry * le32toh(hdr.hdr_entsz)), + memcpy(, (UINT8 *)buf + (entry * le32toh(hdr.hdr_entsz)), sizeof(ent)); efi_block_find_partitions_gpt_entry(bdev, , , entry); }
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Jun 14 00:52:25 UTC 2023 Modified Files: src/sys/stand/efiboot: efiblock.c Log Message: Avoid void * pointer arithmetic; cast to UINT8 * explicitly. No binary changes for aarch64 at least. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/efiblock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Jun 14 00:42:21 UTC 2023 Modified Files: src/sys/stand/efiboot: boot.c Log Message: Add missing member for terminating sentinel. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/stand/efiboot/boot.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.44 src/sys/stand/efiboot/boot.c:1.45 --- src/sys/stand/efiboot/boot.c:1.44 Sun Aug 14 11:26:41 2022 +++ src/sys/stand/efiboot/boot.c Wed Jun 14 00:42:21 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.44 2022/08/14 11:26:41 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.45 2023/06/14 00:42:21 rin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -148,7 +148,7 @@ const struct boot_command commands[] = { { "help", command_help, "help|?" }, { "?", command_help, NULL }, { "quit", command_quit, "quit" }, - { NULL, NULL }, + { NULL, NULL, NULL }, }; static int
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Jun 14 00:42:21 UTC 2023 Modified Files: src/sys/stand/efiboot: boot.c Log Message: Add missing member for terminating sentinel. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/stand/efiboot/boot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/common/lib/libprop
Module Name:src Committed By: rin Date: Wed Jun 14 00:35:19 UTC 2023 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block. It is expanded into /* nothing */ for _STANDALONE. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_dictionary.c diff -u src/common/lib/libprop/prop_dictionary.c:1.45 src/common/lib/libprop/prop_dictionary.c:1.46 --- src/common/lib/libprop/prop_dictionary.c:1.45 Wed Aug 3 21:13:46 2022 +++ src/common/lib/libprop/prop_dictionary.c Wed Jun 14 00:35:18 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_dictionary.c,v 1.45 2022/08/03 21:13:46 riastradh Exp $ */ +/* $NetBSD: prop_dictionary.c,v 1.46 2023/06/14 00:35:18 rin Exp $ */ /*- * Copyright (c) 2006, 2007, 2020 The NetBSD Foundation, Inc. @@ -915,15 +915,17 @@ _prop_dictionary_get(prop_dictionary_t p if (! prop_object_is_dictionary(pd)) return (NULL); - if (!locked) + if (!locked) { _PROP_RWLOCK_RDLOCK(pd->pd_rwlock); + } pde = _prop_dict_lookup(pd, key, NULL); if (pde != NULL) { _PROP_ASSERT(pde->pde_objref != NULL); po = pde->pde_objref; } - if (!locked) + if (!locked) { _PROP_RWLOCK_UNLOCK(pd->pd_rwlock); + } return (po); } /*
CVS commit: src/common/lib/libprop
Module Name:src Committed By: rin Date: Wed Jun 14 00:35:19 UTC 2023 Modified Files: src/common/lib/libprop: prop_dictionary.c Log Message: Sprinkle braces around _PROP_RWLOCK_UNLOCK() in ``if'' block. It is expanded into /* nothing */ for _STANDALONE. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/common/lib/libprop/prop_dictionary.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: rin Date: Wed Jun 14 00:28:55 UTC 2023 Modified Files: src/sys/lib/libsa: cread.c Log Message: Add /* FALLTHROUGH */ comment for sure. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libsa/cread.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/lib/libsa/cread.c diff -u src/sys/lib/libsa/cread.c:1.28 src/sys/lib/libsa/cread.c:1.29 --- src/sys/lib/libsa/cread.c:1.28 Sun Jan 17 04:35:42 2016 +++ src/sys/lib/libsa/cread.c Wed Jun 14 00:28:55 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cread.c,v 1.28 2016/01/17 04:35:42 tsutsui Exp $ */ +/* $NetBSD: cread.c,v 1.29 2023/06/14 00:28:55 rin Exp $ */ /* * Copyright (c) 1996 @@ -453,6 +453,7 @@ lseek(int fd, off_t offset, int where) switch(where) { case SEEK_CUR: offset += s->stream.total_out; + /* FALLTHROUGH */ case SEEK_SET: /* if seek backwards, simply start from the beginning */ if (offset < s->stream.total_out) {
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: rin Date: Wed Jun 14 00:28:55 UTC 2023 Modified Files: src/sys/lib/libsa: cread.c Log Message: Add /* FALLTHROUGH */ comment for sure. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libsa/cread.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/arm/sociox
Module Name:src Committed By: nisimura Date: Wed Jun 14 00:07:22 UTC 2023 Modified Files: src/sys/arch/arm/sociox: if_scx.c Log Message: force PHY loopback while uengine reloading process as tianocore/EDK2 UEFI mentions. A piece of comment updates. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/sociox/if_scx.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/arm/sociox/if_scx.c diff -u src/sys/arch/arm/sociox/if_scx.c:1.41 src/sys/arch/arm/sociox/if_scx.c:1.42 --- src/sys/arch/arm/sociox/if_scx.c:1.41 Tue Jun 13 00:15:52 2023 +++ src/sys/arch/arm/sociox/if_scx.c Wed Jun 14 00:07:22 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_scx.c,v 1.41 2023/06/13 00:15:52 nisimura Exp $ */ +/* $NetBSD: if_scx.c,v 1.42 2023/06/14 00:07:22 nisimura Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.41 2023/06/13 00:15:52 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.42 2023/06/14 00:07:22 nisimura Exp $"); #include #include @@ -156,14 +156,12 @@ struct rdes { #define RXI_RC_ERR (1U<<16) /* recv error */ #define RXI_PKTCNT (1U<<15) /* recv counter has new value */ #define RXI_TMREXP (1U<<14) /* coalesce guard timer expired */ -/* 13 sets of special purpose desc interrupt handling register exist */ #define TDBA_LO 0x408 /* tdes array base addr 31:0 */ #define TDBA_HI 0x434 /* tdes array base addr 63:32 */ #define RDBA_LO 0x448 /* rdes array base addr 31:0 */ #define RDBA_HI 0x474 /* rdes array base addr 63:32 */ -/* 13 pairs of special purpose desc array base address register exist */ -#define TXCONF 0x430 -#define RXCONF 0x470 +#define TXCONF 0x430 /* tdes config */ +#define RXCONF 0x470 /* rdes config */ #define DESCNF_UP (1U<<31) /* 'up-and-running' */ #define DESCNF_CHRST (1U<<30) /* channel reset */ #define DESCNF_TMR (1U<<4) /* coalesce timer mode select */ @@ -197,8 +195,8 @@ struct rdes { #define MACCMD 0x11c4 /* gmac register operation */ #define CMD_IOWR (1U<<28) /* write op */ #define CMD_BUSY (1U<<31) /* busy bit */ -#define MACSTAT 0x1024 /* gmac status; ??? */ -#define MACINTE 0x1028 /* interrupt enable; ??? */ +#define MACSTAT 0x1024 /* mac interrupt status (unused) */ +#define MACINTE 0x1028 /* mac interrupt enable (unused) */ #define FLOWTHR 0x11cc /* flow control threshold */ /* 31:16 pause threshold, 15:0 resume threshold */ @@ -212,8 +210,6 @@ struct rdes { #define MODE_TRANS 0x500 /* mode change completion status */ #define N2T_DONE (1U<<20) /* normal->taiki change completed */ #define T2N_DONE (1U<<19) /* taiki->normal change completed */ -#define MACADRH 0x10c /* ??? */ -#define MACADRL 0x110 /* ??? */ #define MCVER 0x22c /* micro controller version */ #define HWVER 0x230 /* hardware version */ @@ -247,7 +243,7 @@ struct rdes { #define AFR_HPF (1U<<10) /* hash+perfect filter, or hash only */ #define AFR_SAF (1U<<9) /* source address filter */ #define AFR_SAIF (1U<<8) /* SA inverse filtering */ -#define AFR_PCF (2U<<6) /* ??? */ +#define AFR_PCF (2U<<6) /* 7:6 accept pause frame 0~3 */ #define AFR_DBF (1U<<5) /* reject broadcast frame */ #define AFR_PM (1U<<4) /* accept all multicast frame */ #define AFR_DAIF (1U<<3) /* DA inverse filtering */ @@ -585,6 +581,8 @@ static void dump_hwfeature(struct scx_so static void resetuengine(struct scx_softc *); static void loaducode(struct scx_softc *); static void injectucode(struct scx_softc *, int, bus_addr_t, bus_size_t); +static void forcephyloopback(struct scx_softc *); +static void resetphytonormal(struct scx_softc *); static int get_mdioclk(uint32_t); @@ -997,7 +995,7 @@ aprint_normal_dev(sc->sc_dev, "descripto /* 802.1Q VLAN-sized frames, and 9000 jumbo frame are supported */ sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU; - sc->sc_ethercom.ec_capabilities |= ETHERCAP_JUMBO_MTU; + /* sc->sc_ethercom.ec_capabilities |= ETHERCAP_JUMBO_MTU; not yet */ sc->sc_flowflags = 0; /* track PAUSE flow caps */ @@ -1025,12 +1023,24 @@ aprint_normal_dev(sc->sc_dev, "descripto CSR_WRITE(sc, RXCONF, DESCNF_LE); /* little endian */ CSR_WRITE(sc, DMACTL_TMR, sc->sc_freq / 100 - 1); + forcephyloopback(sc);/* make PHY loopback mode for uengine init */ + + CSR_WRITE(sc, xINTSR, IRQ_UCODE); /* pre-cautional W1C */ + CSR_WRITE(sc, CORESTAT, 0); /* start uengine to reprogram */ + error = WAIT_FOR_SET(sc, xINTSR, IRQ_UCODE); + if (error) { + aprint_error_dev(sc->sc_dev, "uengine start failed\n"); + } + CSR_WRITE(sc, xINTSR, IRQ_UCODE); /* W1C load complete report */ + + resetphytonormal(sc); /* take back PHY to normal mode */ + CSR_WRITE(sc, DMACTL_M2H, M2H_MODE_TRANS); - CSR_WRITE(sc, PKTCTRL, MODENRM); /* change to use normal mode */ - WAIT_FOR_SET(sc, MODE_TRANS, T2N_DONE); - /* do {
CVS commit: src/sys/arch/arm/sociox
Module Name:src Committed By: nisimura Date: Wed Jun 14 00:07:22 UTC 2023 Modified Files: src/sys/arch/arm/sociox: if_scx.c Log Message: force PHY loopback while uengine reloading process as tianocore/EDK2 UEFI mentions. A piece of comment updates. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/sociox/if_scx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Tue Jun 13 16:56:00 UTC 2023 Modified Files: src: build.sh Log Message: fix build.sh wrong variable use that caused nbmake to be always rebult (Jan-Benedict Glaw) To generate a diff of this commit: cvs rdiff -u -r1.371 -r1.372 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.371 src/build.sh:1.372 --- src/build.sh:1.371 Fri Jun 2 16:48:09 2023 +++ src/build.sh Tue Jun 13 12:56:00 2023 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.371 2023/06/02 20:48:09 lukem Exp $ +# $NetBSD: build.sh,v 1.372 2023/06/13 16:56:00 christos Exp $ # # Copyright (c) 2001-2023 The NetBSD Foundation, Inc. # All rights reserved. @@ -1613,7 +1613,7 @@ print_tooldir_program() [ -n "${possible_TOP_OBJ}" ] || continue possible_TOOLDIR="${possible_TOP_OBJ}/tooldir.${host_ostype}" possible_program="${possible_TOOLDIR}/bin/${toolprefix}${program}" - if [ -x "${possible_make}" ]; then + if [ -x "${possible_program}" ]; then echo ${possible_program} return; fi @@ -2016,7 +2016,7 @@ createmakewrapper() eval cat <
CVS commit: src
Module Name:src Committed By: christos Date: Tue Jun 13 16:56:00 UTC 2023 Modified Files: src: build.sh Log Message: fix build.sh wrong variable use that caused nbmake to be always rebult (Jan-Benedict Glaw) To generate a diff of this commit: cvs rdiff -u -r1.371 -r1.372 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Tue Jun 13 10:11:17 UTC 2023 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: - use sx_wait() to avoid stalling the MBus - request 32bit alignment for glyphcache cells To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc/dev/cgfourteen.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/sparc/dev
Module Name:src Committed By: macallan Date: Tue Jun 13 10:11:17 UTC 2023 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: - use sx_wait() to avoid stalling the MBus - request 32bit alignment for glyphcache cells To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/sparc/dev/cgfourteen.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/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.94 src/sys/arch/sparc/dev/cgfourteen.c:1.95 --- src/sys/arch/sparc/dev/cgfourteen.c:1.94 Tue May 23 10:20:12 2023 +++ src/sys/arch/sparc/dev/cgfourteen.c Tue Jun 13 10:11:17 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.94 2023/05/23 10:20:12 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.95 2023/06/13 10:11:17 macallan Exp $ */ /* * Copyright (c) 1996 @@ -173,7 +173,9 @@ static void cg14_eraserows(void *, int, * issue ALU instruction: * sxi(OPCODE, srcA, srcB, dest, count) */ -#define sxi(inst, a, b, d, cnt) sx_write(sc->sc_sx, SX_INSTRUCTIONS, inst((a), (b), (d), (cnt))) +#define sxi(inst, a, b, d, cnt) \ + sx_wait(sc->sc_sx); \ + sx_write(sc->sc_sx, SX_INSTRUCTIONS, inst((a), (b), (d), (cnt))) /* * issue memory referencing instruction: @@ -770,13 +772,13 @@ cg14_setup_wsdisplay(struct cgfourteen_s sc->sc_defaultscreen_descr.capabilities = ri->ri_caps; sc->sc_defaultscreen_descr.nrows = ri->ri_rows; sc->sc_defaultscreen_descr.ncols = ri->ri_cols; - glyphcache_init(>sc_gc, sc->sc_fb.fb_type.fb_height + 5, + glyphcache_init_align(>sc_gc, sc->sc_fb.fb_type.fb_height + 5, (sc->sc_vramsize / sc->sc_fb.fb_type.fb_width) - sc->sc_fb.fb_type.fb_height - 5, sc->sc_fb.fb_type.fb_width, ri->ri_font->fontwidth, ri->ri_font->fontheight, - defattr); + defattr, 4); if (is_cons) { wsdisplay_cnattach(>sc_defaultscreen_descr, ri, 0, 0, defattr);
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Tue Jun 13 10:09:32 UTC 2023 Modified Files: src/sys/arch/sparc/dev: sx.c sxvar.h Log Message: add counter to periodically drain the instruction queue in order to avoid stalling the MBus during long SX operations adapted from xf86-video-suncg14 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc/dev/sx.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/dev/sxvar.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/sparc/dev/sx.c diff -u src/sys/arch/sparc/dev/sx.c:1.6 src/sys/arch/sparc/dev/sx.c:1.7 --- src/sys/arch/sparc/dev/sx.c:1.6 Thu Apr 13 13:07:48 2023 +++ src/sys/arch/sparc/dev/sx.c Tue Jun 13 10:09:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sx.c,v 1.6 2023/04/13 13:07:48 macallan Exp $ */ +/* $NetBSD: sx.c,v 1.7 2023/06/13 10:09:31 macallan Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sx.c,v 1.6 2023/04/13 13:07:48 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sx.c,v 1.7 2023/06/13 10:09:31 macallan Exp $"); #include "locators.h" @@ -84,6 +84,7 @@ sx_attach(device_t parent, device_t self sc->sc_dev = self; sc->sc_tag = ma->ma_bustag; sc->sc_uregs = ma->ma_paddr + 0x1000; + sc->sc_cnt = 0; if (bus_space_map(sc->sc_tag, ma->ma_paddr, 0x1000, 0, >sc_regh)) { aprint_error_dev(self, "failed to map registers\n"); Index: src/sys/arch/sparc/dev/sxvar.h diff -u src/sys/arch/sparc/dev/sxvar.h:1.4 src/sys/arch/sparc/dev/sxvar.h:1.5 --- src/sys/arch/sparc/dev/sxvar.h:1.4 Fri Mar 1 02:30:42 2019 +++ src/sys/arch/sparc/dev/sxvar.h Tue Jun 13 10:09:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sxvar.h,v 1.4 2019/03/01 02:30:42 macallan Exp $ */ +/* $NetBSD: sxvar.h,v 1.5 2023/06/13 10:09:31 macallan Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -32,11 +32,14 @@ #ifndef SXVAR_H #define SXVAR_H +#include + struct sx_softc { device_t sc_dev; bus_addr_t sc_uregs; bus_space_tag_t sc_tag; bus_space_handle_t sc_regh; + int sc_cnt; }; static inline void @@ -51,6 +54,26 @@ sx_read(struct sx_softc *sc, int addr) return bus_space_read_4(sc->sc_tag, sc->sc_regh, addr); } +/* + * to be used before issuing SX instructions + * this will periodically allow the instruction queue to drain in order + * to avoid excessive MBus relinquish & retry cycles during long SX ops + * which may cause us to lose interrupts + */ +static inline void +sx_wait(struct sx_softc *sc) +{ + uint32_t reg; + if (sc->sc_cnt > 6) { + do { + reg = bus_space_read_4(sc->sc_tag, sc->sc_regh, + SX_CONTROL_STATUS); + } while ((reg & SX_MT) == 0); + sc->sc_cnt = 0; + } else + sc->sc_cnt++; +} + void sx_dump(void); #endif
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Tue Jun 13 10:09:32 UTC 2023 Modified Files: src/sys/arch/sparc/dev: sx.c sxvar.h Log Message: add counter to periodically drain the instruction queue in order to avoid stalling the MBus during long SX operations adapted from xf86-video-suncg14 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc/dev/sx.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/dev/sxvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.