CVS commit: src/sys/arch/i386/stand/efiboot
Module Name:src Committed By: rin Date: Mon Jul 24 01:56:59 UTC 2023 Modified Files: src/sys/arch/i386/stand/efiboot: Makefile.efiboot eficons.c Added Files: src/sys/arch/i386/stand/efiboot: eficpufunc.c eficpufunc.h Log Message: efiboot/x86: Add serial console support via raw I/O port access Unfortunately, some (most?) UEFI implementations do not support com ports by ``Serial I/O Protocol''. ``PNP0501-0'' and friends are not recognized also. In this case, if user explicitly requires to switch to serial console by ``consdev'' command, try to use raw I/O port access. Ugly, but what FreeBSD does, at least. Proposed as PR port-amd64/57523 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/efiboot/eficons.c cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/stand/efiboot/eficpufunc.c \ src/sys/arch/i386/stand/efiboot/eficpufunc.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/i386/stand/efiboot
Module Name:src Committed By: rin Date: Mon Jul 24 01:56:59 UTC 2023 Modified Files: src/sys/arch/i386/stand/efiboot: Makefile.efiboot eficons.c Added Files: src/sys/arch/i386/stand/efiboot: eficpufunc.c eficpufunc.h Log Message: efiboot/x86: Add serial console support via raw I/O port access Unfortunately, some (most?) UEFI implementations do not support com ports by ``Serial I/O Protocol''. ``PNP0501-0'' and friends are not recognized also. In this case, if user explicitly requires to switch to serial console by ``consdev'' command, try to use raw I/O port access. Ugly, but what FreeBSD does, at least. Proposed as PR port-amd64/57523 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/stand/efiboot/Makefile.efiboot cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/efiboot/eficons.c cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/stand/efiboot/eficpufunc.c \ src/sys/arch/i386/stand/efiboot/eficpufunc.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/i386/stand/efiboot/Makefile.efiboot diff -u src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.21 src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.22 --- src/sys/arch/i386/stand/efiboot/Makefile.efiboot:1.21 Sat Jun 3 08:52:56 2023 +++ src/sys/arch/i386/stand/efiboot/Makefile.efiboot Mon Jul 24 01:56:59 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.21 2023/06/03 08:52:56 lukem Exp $ +# $NetBSD: Makefile.efiboot,v 1.22 2023/07/24 01:56:59 rin Exp $ S= ${.CURDIR}/../../../../.. @@ -14,9 +14,11 @@ AFLAGS.start.S= ${${ACTIVE_CC} == "clang SOURCES= start.S boot.c conf.c devopen.c dev_net.c self_reloc.c panic.c SOURCES+= efiboot.c efichar.c eficons.c efidelay.c efidev.c +SOURCES+= eficpufunc.c SOURCES+= efidisk.c efidisk_ll.c efigetsecs.c efimemory.c SOURCES+= efinet.c efipxe.c LIBI386SRCS= biosdisk.c bootinfo.c bootinfo_biosgeom.c bootmenu.c +LIBI386SRCS+= comio_direct.c LIBI386SRCS+= diskbuf.c exec.c menuutils.c parseutils.c pread.c LIBI386SRCS+= exec_multiboot1.c exec_multiboot2.c # use our own nfs implementation Index: src/sys/arch/i386/stand/efiboot/eficons.c diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.12 src/sys/arch/i386/stand/efiboot/eficons.c:1.13 --- src/sys/arch/i386/stand/efiboot/eficons.c:1.12 Thu Oct 28 06:13:13 2021 +++ src/sys/arch/i386/stand/efiboot/eficons.c Mon Jul 24 01:56:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: eficons.c,v 1.12 2021/10/28 06:13:13 kim Exp $ */ +/* $NetBSD: eficons.c,v 1.13 2023/07/24 01:56:59 rin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -29,6 +29,8 @@ #include #include +#include + #include "efiboot.h" #include "bootinfo.h" @@ -60,6 +62,8 @@ static u_char serbuf[16]; static int serbuf_read = 0; static int serbuf_write = 0; +static int raw_com_addr = 0; + static void eficons_init_video(void); static void efi_switch_video_to_text_mode(void); @@ -76,6 +80,12 @@ static int efi_com_putc(int); static int efi_com_status(int); static int efi_com_waitforinputevent(uint64_t); +static int raw_com_init(int, int); +static int raw_com_getc(void); +static int raw_com_putc(int); +static int raw_com_status(int); +static int raw_com_waitforinputevent(uint64_t); + static int efi_find_gop_mode(char *); static int iodev; @@ -134,11 +144,8 @@ ok: case CONSDEV_COM3: iodev = dev; btinfo_console.addr = ioport; - if (btinfo_console.addr == 0) { - if (!efi_valid_com(iodev)) -goto nocom; + if (btinfo_console.addr == 0) btinfo_console.addr = getcomaddr(iodev - CONSDEV_COM0); - } if (speed != 0) btinfo_console.speed = speed; efi_com_init(btinfo_console.addr, btinfo_console.speed); @@ -149,8 +156,6 @@ ok: case CONSDEV_COM2KBD: case CONSDEV_COM3KBD: iodev = dev - CONSDEV_COM0KBD + CONSDEV_COM0; - if (!efi_valid_com(iodev)) - goto nocom; btinfo_console.addr = getcomaddr(iodev - CONSDEV_COM0); efi_cons_putc('0' + iodev - CONSDEV_COM0); @@ -869,7 +874,7 @@ efi_com_init(int addr, int speed) return 0; if (!efi_valid_com(iodev)) - return 0; + return raw_com_init(addr, speed); serio = serios[iodev - CONSDEV_COM0]; @@ -885,6 +890,7 @@ efi_com_init(int addr, int speed) } } + raw_com_addr = 0; default_comspeed = speed; internal_getchar = efi_com_getc; internal_putchar = efi_com_putc; @@ -1019,3 +1025,65 @@ efi_com_waitforinputevent(uint64_t timeo return ETIMEDOUT; return EINVAL; } + +static int +raw_com_init(int addr, int speed) +{ + + if (addr == 0 || speed <= 0) + return 0; + + speed = cominit_d(addr, speed); + + raw_com_addr = addr; + default_comspeed = speed; + internal_getchar = raw_com_getc; + internal_putchar = raw_com_putc; + internal_iskey = raw_com_status; + internal_waitforinputevent = raw_com_waitforinputevent; + + return speed; +} + +static int +raw_com_getc(void) +{ + + if (raw_com_addr == 0) + panic("%s: Invalid serial port", __fu
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Jul 23 21:06:52 UTC 2023 Modified Files: src/distrib/sets/lists/debug: md.ia64 src/sys/dev/pci: radeonfbvar.h Log Message: s/probaby/probably/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/md.ia64 cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/radeonfbvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/md.ia64 diff -u src/distrib/sets/lists/debug/md.ia64:1.1 src/distrib/sets/lists/debug/md.ia64:1.2 --- src/distrib/sets/lists/debug/md.ia64:1.1 Sat Aug 6 20:08:00 2016 +++ src/distrib/sets/lists/debug/md.ia64 Sun Jul 23 21:06:52 2023 @@ -1,8 +1,8 @@ -# $NetBSD: md.ia64,v 1.1 2016/08/06 20:08:00 martin Exp $ +# $NetBSD: md.ia64,v 1.2 2023/07/23 21:06:52 andvar Exp $ # # XXX add skiload for now # -# XXX loader.sym probaby not necessary +# XXX loader.sym probably not necessary # ./usr/libdata/debug/usr/mdec/loader.sym.debug comp-sys-debug debug ./usr/libdata/debug/usr/mdec/skiload.debug comp-sys-debug debug Index: src/sys/dev/pci/radeonfbvar.h diff -u src/sys/dev/pci/radeonfbvar.h:1.22 src/sys/dev/pci/radeonfbvar.h:1.23 --- src/sys/dev/pci/radeonfbvar.h:1.22 Mon Sep 28 05:43:58 2020 +++ src/sys/dev/pci/radeonfbvar.h Sun Jul 23 21:06:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfbvar.h,v 1.22 2020/09/28 05:43:58 macallan Exp $ */ +/* $NetBSD: radeonfbvar.h,v 1.23 2023/07/23 21:06:52 andvar Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -185,7 +185,7 @@ struct radeonfb_display { struct radeonfb_crtc rd_crtcs[2]; struct radeonfb_cursor rd_cursor, rd_tempcursor; - /* XXX: this should probaby be an array for CRTCs */ + /* XXX: this should probably be an array for CRTCs */ //struct videomode rd_videomode; struct wsscreen_list rd_wsscreenlist;
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Jul 23 21:06:52 UTC 2023 Modified Files: src/distrib/sets/lists/debug: md.ia64 src/sys/dev/pci: radeonfbvar.h Log Message: s/probaby/probably/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/debug/md.ia64 cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/radeonfbvar.h 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: lukem Date: Sun Jul 23 16:52:38 UTC 2023 Modified Files: src/doc: CHANGES src/share/man/man5: mk.conf.5 src/share/mk: bsd.own.mk Log Message: bsd.own.mk: force MKSTRIPSYM=no if MKDEBUG=yes Local symbols are desirable with MKDEBUG=yes, so don't strip them. Per request from mrg@ To generate a diff of this commit: cvs rdiff -u -r1.2983 -r1.2984 src/doc/CHANGES cvs rdiff -u -r1.107 -r1.108 src/share/man/man5/mk.conf.5 cvs rdiff -u -r1.1344 -r1.1345 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
Module Name:src Committed By: lukem Date: Sun Jul 23 16:52:38 UTC 2023 Modified Files: src/doc: CHANGES src/share/man/man5: mk.conf.5 src/share/mk: bsd.own.mk Log Message: bsd.own.mk: force MKSTRIPSYM=no if MKDEBUG=yes Local symbols are desirable with MKDEBUG=yes, so don't strip them. Per request from mrg@ To generate a diff of this commit: cvs rdiff -u -r1.2983 -r1.2984 src/doc/CHANGES cvs rdiff -u -r1.107 -r1.108 src/share/man/man5/mk.conf.5 cvs rdiff -u -r1.1344 -r1.1345 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/doc/CHANGES diff -u src/doc/CHANGES:1.2983 src/doc/CHANGES:1.2984 --- src/doc/CHANGES:1.2983 Fri Jul 21 02:42:54 2023 +++ src/doc/CHANGES Sun Jul 23 16:52:38 2023 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2983 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2984 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -163,3 +163,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0: gcc(1): Import GCC 10.5. [mrg 20230710] dhcpcd: Import version 10.0.2. [roy 20230719] bta2dpd(8): Add throttle when playing from file. [nat 20230720] + build: Force MKSTRIPSYM=no if MKDEBUG=yes. Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.107 src/share/man/man5/mk.conf.5:1.108 --- src/share/man/man5/mk.conf.5:1.107 Sat Jul 22 18:49:40 2023 +++ src/share/man/man5/mk.conf.5 Sun Jul 23 16:52:37 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.107 2023/07/22 18:49:40 lukem Exp $ +.\" $NetBSD: mk.conf.5,v 1.108 2023/07/23 16:52:37 lukem 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 July 22, 2023 +.Dd July 23, 2023 .Dt MK.CONF 5 .Os .\" turn off hyphenation @@ -691,6 +691,12 @@ and set and installed in .Sy DESTDIR Ns Pa /usr/libdata/debug . .NODEF NODEBUG +.Pp +If +.Dq yes , +acts as +.Sy MKSTRIPSYM=no . +. .DFLTn . .It Sy MKDEBUGKERNEL @@ -1649,6 +1655,7 @@ userland libraries and getting a backtra .Xr rumpkernel 7 kernel loading shared libraries. +.NOVAR MKDEBUG=yes .DFLTy . .It Sy MKTEGRAFIRMWARE Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1344 src/share/mk/bsd.own.mk:1.1345 --- src/share/mk/bsd.own.mk:1.1344 Sun Jul 23 16:49:29 2023 +++ src/share/mk/bsd.own.mk Sun Jul 23 16:52:37 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1344 2023/07/23 16:49:29 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.1345 2023/07/23 16:52:37 lukem Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1498,6 +1498,13 @@ MKLIBCXX:= yes .endif # +# Disable MKSTRIPSYM if MKDEBUG is enabled. +# +.if ${MKDEBUG} != "no" +MKSTRIPSYM:= no +.endif + +# # install(1) parameters. # COPY?= -c
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jul 23 16:49:29 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: style: block comments, move CC_flag vars Add #{ .. #} block comments to a long conditional. Move the CC_flag variables closer to other compiler-related variables instead of being in the middle of some arch-specific overrides. To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 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.1343 src/share/mk/bsd.own.mk:1.1344 --- src/share/mk/bsd.own.mk:1.1343 Fri Jul 21 20:03:13 2023 +++ src/share/mk/bsd.own.mk Sun Jul 23 16:49:29 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1343 2023/07/21 20:03:13 riastradh Exp $ +# $NetBSD: bsd.own.mk,v 1.1344 2023/07/23 16:49:29 lukem Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -70,7 +70,7 @@ TOOLCHAIN_MISSING?= no # # GCC Using platforms. # -.if ${MKGCC:Uyes} != "no" +.if ${MKGCC:Uyes} != "no" # { # # What GCC is used? @@ -94,9 +94,10 @@ EXTERNAL_GCC_SUBDIR?= gcc .else EXTERNAL_GCC_SUBDIR?= /does/not/exist .endif -.else + +.else # MKGCC == no # } { MKGCCCMDS?= no -.endif +.endif # MKGCC == no # } # # What binutils is used? @@ -670,6 +671,32 @@ CXX= ${TOOL_CXX.${ACTIVE_CXX}} FC= ${TOOL_FC.${ACTIVE_FC}} OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} +# +# Clang and GCC compiler-specific options, usually to disable warnings. +# The naming convention is "CC" + the compiler flag converted +# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`. +# For variable naming purposes, treat -Werror=FLAG as -WFLAG, +# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang). +# +# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains +# both -Wno-error=address-of-packed-member for Clang, +# and -Wno-address-of-packed-member for GCC 9+. +# +# Use these with e.g. +# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} +# +CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ +${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} + +CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} +CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} +CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} +CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} +CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} +CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} +CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} +CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} + # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha @@ -872,32 +899,6 @@ NOPROFILE= # defined .endif # -# Clang and GCC compiler-specific options, usually to disable warnings. -# The naming convention is "CC" + the compiler flag converted -# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`. -# For variable naming purposes, treat -Werror=FLAG as -WFLAG, -# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang). -# -# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains -# both -Wno-error=address-of-packed-member for Clang, -# and -Wno-address-of-packed-member for GCC 9+. -# -# Use these with e.g. -# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} -# -CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ -${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} - -CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} -CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} -CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} -CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} -CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} -CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} -CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} -CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} - -# # The ia64 port is incomplete. # MKGDB.ia64= no
CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jul 23 16:49:29 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: style: block comments, move CC_flag vars Add #{ .. #} block comments to a long conditional. Move the CC_flag variables closer to other compiler-related variables instead of being in the middle of some arch-specific overrides. To generate a diff of this commit: cvs rdiff -u -r1.1343 -r1.1344 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/sys/arch/hppa
Module Name:src Committed By: skrll Date: Sun Jul 23 10:09:37 UTC 2023 Modified Files: src/sys/arch/hppa/hppa: genassym.cf trap.S trap.c src/sys/arch/hppa/include: proc.h types.h Log Message: PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN Provide syscall_intern and use the md_syscall in syscall trap handling. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/genassym.cf cvs rdiff -u -r1.74 -r1.75 src/sys/arch/hppa/hppa/trap.S cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/trap.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/include/proc.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hppa/include/types.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/hppa/hppa/genassym.cf diff -u src/sys/arch/hppa/hppa/genassym.cf:1.4 src/sys/arch/hppa/hppa/genassym.cf:1.5 --- src/sys/arch/hppa/hppa/genassym.cf:1.4 Sat Mar 14 16:55:17 2020 +++ src/sys/arch/hppa/hppa/genassym.cf Sun Jul 23 10:09:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.4 2020/03/14 16:55:17 ad Exp $ +# $NetBSD: genassym.cf,v 1.5 2023/07/23 10:09:36 skrll Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -174,7 +174,7 @@ member TF_CR30 tf_cr30 # proc fields and values struct proc member P_RASLIST p_raslist -member P_MD p_md +member P_MD_SYSCALL p_md.md_syscall struct lwp member L_PROC l_proc Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.74 src/sys/arch/hppa/hppa/trap.S:1.75 --- src/sys/arch/hppa/hppa/trap.S:1.74 Mon Sep 6 21:56:03 2021 +++ src/sys/arch/hppa/hppa/trap.S Sun Jul 23 10:09:36 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.74 2021/09/06 21:56:03 andvar Exp $ */ +/* $NetBSD: trap.S,v 1.75 2023/07/23 10:09:36 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -373,13 +373,17 @@ syscall_entry: ldil L%$global$,%dp ldo R%$global$(%dp),%dp - /* do a syscall */ - .import syscall,code - CALL(syscall, %r1) + GET_CURLWP(%r3) + ldw L_PROC(%r3), %r1 + ldw P_MD_SYSCALL(%r1), %r1 + + .call + blr %r0, %rp + bv,n %r0(%r1) + nop /* load curlwp's trapframe pointer */ - GET_CURLWP(%r1) - ldw L_MD(%r1), %t3 + ldw L_MD(%r3), %t3 .exit .procend Index: src/sys/arch/hppa/hppa/trap.c diff -u src/sys/arch/hppa/hppa/trap.c:1.121 src/sys/arch/hppa/hppa/trap.c:1.122 --- src/sys/arch/hppa/hppa/trap.c:1.121 Fri Sep 2 23:48:10 2022 +++ src/sys/arch/hppa/hppa/trap.c Sun Jul 23 10:09:36 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.121 2022/09/02 23:48:10 thorpej Exp $ */ +/* $NetBSD: trap.c,v 1.122 2023/07/23 10:09:36 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.121 2022/09/02 23:48:10 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.122 2023/07/23 10:09:36 skrll Exp $"); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -1250,6 +1250,12 @@ process_sstep(struct lwp *l, int sstep) #endif +void +syscall_intern(struct proc *p) +{ + p->p_md.md_syscall = syscall; +} + /* * call actual syscall routine * from the low-level syscall handler: Index: src/sys/arch/hppa/include/proc.h diff -u src/sys/arch/hppa/include/proc.h:1.14 src/sys/arch/hppa/include/proc.h:1.15 --- src/sys/arch/hppa/include/proc.h:1.14 Sun Jul 23 08:04:29 2023 +++ src/sys/arch/hppa/include/proc.h Sun Jul 23 10:09:36 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.14 2023/07/23 08:04:29 skrll Exp $ */ +/* $NetBSD: proc.h,v 1.15 2023/07/23 10:09:36 skrll Exp $ */ /* $OpenBSD: proc.h,v 1.4 2009/12/29 13:11:40 jsing Exp $ */ @@ -49,6 +49,8 @@ struct mdlwp { }; struct mdproc { + void (*md_syscall)(struct trapframe *, int *); + int md_flags; /* machine-dependent flags */ #define MDP_OLDSPACE __BIT(0) }; Index: src/sys/arch/hppa/include/types.h diff -u src/sys/arch/hppa/include/types.h:1.31 src/sys/arch/hppa/include/types.h:1.32 --- src/sys/arch/hppa/include/types.h:1.31 Thu Apr 1 04:35:46 2021 +++ src/sys/arch/hppa/include/types.h Sun Jul 23 10:09:36 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.31 2021/04/01 04:35:46 simonb Exp $ */ +/* $NetBSD: types.h,v 1.32 2023/07/23 10:09:36 skrll Exp $ */ /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ @@ -83,10 +83,10 @@ typedef int __register_t; #define __SIMPLELOCK_LOCKED { { 0, 0, 0, 0} } #define __SIMPLELOCK_UNLOCKED { { 1, 1, 1, 1} } - #define __MACHINE_STACK_GROWS_UP /* stack grows to higher addresses */ #define __HAVE_FUNCTION_DESCRIPTORS /* function ptrs may be descriptors */ #define __HAVE_RAS +#define __HAVE_SYSCALL_INTERN /* * On hppa, declaring RAS labels as functions doesn't work, since the toolchain
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Sun Jul 23 10:09:37 UTC 2023 Modified Files: src/sys/arch/hppa/hppa: genassym.cf trap.S trap.c src/sys/arch/hppa/include: proc.h types.h Log Message: PR/57261: hppa should be converted to __HAVE_SYSCALL_INTERN Provide syscall_intern and use the md_syscall in syscall trap handling. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/genassym.cf cvs rdiff -u -r1.74 -r1.75 src/sys/arch/hppa/hppa/trap.S cvs rdiff -u -r1.121 -r1.122 src/sys/arch/hppa/hppa/trap.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/include/proc.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hppa/include/types.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/hppa/include
Module Name:src Committed By: skrll Date: Sun Jul 23 08:04:29 UTC 2023 Modified Files: src/sys/arch/hppa/include: proc.h Log Message: Use __BIT To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/include/proc.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/hppa/include
Module Name:src Committed By: skrll Date: Sun Jul 23 08:04:29 UTC 2023 Modified Files: src/sys/arch/hppa/include: proc.h Log Message: Use __BIT To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/include/proc.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/hppa/include/proc.h diff -u src/sys/arch/hppa/include/proc.h:1.13 src/sys/arch/hppa/include/proc.h:1.14 --- src/sys/arch/hppa/include/proc.h:1.13 Sat Dec 5 22:49:50 2020 +++ src/sys/arch/hppa/include/proc.h Sun Jul 23 08:04:29 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.13 2020/12/05 22:49:50 christos Exp $ */ +/* $NetBSD: proc.h,v 1.14 2023/07/23 08:04:29 skrll Exp $ */ /* $OpenBSD: proc.h,v 1.4 2009/12/29 13:11:40 jsing Exp $ */ @@ -50,7 +50,7 @@ struct mdlwp { struct mdproc { int md_flags; /* machine-dependent flags */ -#define MDP_OLDSPACE 0x0001 +#define MDP_OLDSPACE __BIT(0) }; /* md_flags */
CVS commit: src/common/lib/libc/arch/aarch64/string
Module Name:src Committed By: skrll Date: Sun Jul 23 07:54:37 UTC 2023 Modified Files: src/common/lib/libc/arch/aarch64/string: bcopy.S Log Message: port-arm/57388: Minor bug fix in bcopy.S Use correct register to check alignment of destination in backwards copy. Patch from Antoni Pokusinski. Thanks. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/aarch64/string/bcopy.S 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/libc/arch/aarch64/string/bcopy.S diff -u src/common/lib/libc/arch/aarch64/string/bcopy.S:1.2 src/common/lib/libc/arch/aarch64/string/bcopy.S:1.3 --- src/common/lib/libc/arch/aarch64/string/bcopy.S:1.2 Sat Apr 11 05:12:52 2020 +++ src/common/lib/libc/arch/aarch64/string/bcopy.S Sun Jul 23 07:54:37 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bcopy.S,v 1.2 2020/04/11 05:12:52 ryo Exp $ */ +/* $NetBSD: bcopy.S,v 1.3 2023/07/23 07:54:37 skrll Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu @@ -29,7 +29,7 @@ #include #if defined(LIBC_SCCS) -RCSID("$NetBSD: bcopy.S,v 1.2 2020/04/11 05:12:52 ryo Exp $") +RCSID("$NetBSD: bcopy.S,v 1.3 2023/07/23 07:54:37 skrll Exp $") #endif #if defined(MEMCOPY) @@ -306,7 +306,7 @@ backward_tiny: ret 9: /* length is small(<32), and src or dst may be unaligned */ - eor TMP_X, SRC0, DST0 + eor TMP_X, SRC0, DST ands TMP_X, TMP_X, #7 bne notaligned_backward_small
CVS commit: src/common/lib/libc/arch/aarch64/string
Module Name:src Committed By: skrll Date: Sun Jul 23 07:54:37 UTC 2023 Modified Files: src/common/lib/libc/arch/aarch64/string: bcopy.S Log Message: port-arm/57388: Minor bug fix in bcopy.S Use correct register to check alignment of destination in backwards copy. Patch from Antoni Pokusinski. Thanks. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/aarch64/string/bcopy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: skrll Date: Sun Jul 23 07:25:36 UTC 2023 Modified Files: src/sys/uvm/pmap: pmap_segtab.c Log Message: KASSERT -> KASSERTMSG To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/uvm/pmap/pmap_segtab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: skrll Date: Sun Jul 23 07:25:36 UTC 2023 Modified Files: src/sys/uvm/pmap: pmap_segtab.c Log Message: KASSERT -> KASSERTMSG To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/uvm/pmap/pmap_segtab.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/uvm/pmap/pmap_segtab.c diff -u src/sys/uvm/pmap/pmap_segtab.c:1.32 src/sys/uvm/pmap/pmap_segtab.c:1.33 --- src/sys/uvm/pmap/pmap_segtab.c:1.32 Sat Jul 1 07:10:13 2023 +++ src/sys/uvm/pmap/pmap_segtab.c Sun Jul 23 07:25:36 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_segtab.c,v 1.32 2023/07/01 07:10:13 skrll Exp $ */ +/* $NetBSD: pmap_segtab.c,v 1.33 2023/07/23 07:25:36 skrll Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.32 2023/07/01 07:10:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.33 2023/07/23 07:25:36 skrll Exp $"); /* * Manages physical address maps. @@ -282,7 +282,10 @@ pmap_ptpage(struct pmap *pmap, vaddr_t v // UVMHIST_LOG(pmaphist, "pm_pdetab %#jx", ptb, 0, 0, 0); - KASSERT(pmap != pmap_kernel() || !pmap_md_direct_mapped_vaddr_p(va)); + KASSERTMSG(pmap != pmap_kernel() || !pmap_md_direct_mapped_vaddr_p(va), + "pmap_kernel: %s, va %#" PRIxVADDR, + pmap == pmap_kernel() ? "true" : "false", + pmap == pmap_kernel() ? va : 0); #ifdef _LP64 for (size_t segshift = XSEGSHIFT;
CVS commit: src/lib/libc/arch
Module Name:src Committed By: skrll Date: Sun Jul 23 07:25:04 UTC 2023 Modified Files: src/lib/libc/arch/aarch64: SYS.h src/lib/libc/arch/arm: SYS.h Log Message: ENTRY / END indentation. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/aarch64/SYS.h cvs rdiff -u -r1.15 -r1.16 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/arch
Module Name:src Committed By: skrll Date: Sun Jul 23 07:25:04 UTC 2023 Modified Files: src/lib/libc/arch/aarch64: SYS.h src/lib/libc/arch/arm: SYS.h Log Message: ENTRY / END indentation. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/aarch64/SYS.h cvs rdiff -u -r1.15 -r1.16 src/lib/libc/arch/arm/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/aarch64/SYS.h diff -u src/lib/libc/arch/aarch64/SYS.h:1.3 src/lib/libc/arch/aarch64/SYS.h:1.4 --- src/lib/libc/arch/aarch64/SYS.h:1.3 Sat Mar 9 02:50:07 2019 +++ src/lib/libc/arch/aarch64/SYS.h Sun Jul 23 07:25:04 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.3 2019/03/09 02:50:07 christos Exp $ */ +/* $NetBSD: SYS.h,v 1.4 2023/07/23 07:25:04 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #define SYSTRAP(x) svc #(SYS_ ## x) #define _SYSCALL_NOERROR(x,y) \ - ENTRY(x); \ +ENTRY(x);\ SYSTRAP(y) #define _INVOKE_CERROR() \ @@ -60,12 +60,12 @@ #define PSEUDO_NOERROR(x,y) \ _SYSCALL_NOERROR(x,y); \ ret;\ - END(x) +END(x) #define PSEUDO(x,y) \ _SYSCALL(x,y); \ ret;\ - END(x) +END(x) #define RSYSCALL_NOERROR(x) \ PSEUDO_NOERROR(x,x) Index: src/lib/libc/arch/arm/SYS.h diff -u src/lib/libc/arch/arm/SYS.h:1.15 src/lib/libc/arch/arm/SYS.h:1.16 --- src/lib/libc/arch/arm/SYS.h:1.15 Mon Aug 19 22:13:34 2013 +++ src/lib/libc/arch/arm/SYS.h Sun Jul 23 07:25:04 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.15 2013/08/19 22:13:34 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.16 2023/07/23 07:25:04 skrll Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -79,7 +79,7 @@ #define CURBRK _C_LABEL(__curbrk) #define _SYSCALL_NOERROR(x,y) \ - ENTRY(x); \ +ENTRY(x);\ SYSTRAP(y) #if !defined(__thumb__) || defined(_ARM_ARCH_T2) @@ -102,12 +102,12 @@ #define PSEUDO_NOERROR(x,y) \ _SYSCALL_NOERROR(x,y); \ RET;\ - END(x) +END(x) #define PSEUDO(x,y) \ _SYSCALL(x,y); \ RET;\ - END(x) +END(x) #define RSYSCALL_NOERROR(x) \
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: skrll Date: Sun Jul 23 07:24:20 UTC 2023 Modified Files: src/lib/libc/arch/mips: SYS.h Log Message: Indentation consistency. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/mips/SYS.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/mips/SYS.h diff -u src/lib/libc/arch/mips/SYS.h:1.20 src/lib/libc/arch/mips/SYS.h:1.21 --- src/lib/libc/arch/mips/SYS.h:1.20 Sat Feb 25 21:16:50 2017 +++ src/lib/libc/arch/mips/SYS.h Sun Jul 23 07:24:20 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.20 2017/02/25 21:16:50 joerg Exp $ */ +/* $NetBSD: SYS.h,v 1.21 2023/07/23 07:24:20 skrll Exp $ */ /*- * Copyright (c) 1996 Jonathan Stone @@ -128,7 +128,7 @@ LEAF(x);\ SYSTRAP(y); \ j ra;\ - END(x) +END(x) #define PSEUDO(x,y) \ LEAF(x);\
CVS commit: src/lib/libc/arch/mips
Module Name:src Committed By: skrll Date: Sun Jul 23 07:24:20 UTC 2023 Modified Files: src/lib/libc/arch/mips: SYS.h Log Message: Indentation consistency. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/mips/SYS.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/mips/include
Module Name:src Committed By: skrll Date: Sun Jul 23 07:20:45 UTC 2023 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: USE __BIT() for CPUF_* flags. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/arch/mips/include/cpu.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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.134 src/sys/arch/mips/include/cpu.h:1.135 --- src/sys/arch/mips/include/cpu.h:1.134 Tue Jan 31 21:11:24 2023 +++ src/sys/arch/mips/include/cpu.h Sun Jul 23 07:20:45 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.134 2023/01/31 21:11:24 andvar Exp $ */ +/* $NetBSD: cpu.h,v 1.135 2023/07/23 07:20:45 skrll Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -150,11 +150,11 @@ struct cpu_info { struct evcnt ci_evcnt_synci_deferred_rqst; struct evcnt ci_evcnt_synci_ipi_rqst; -#define CPUF_PRIMARY 0x01 /* CPU is primary CPU */ -#define CPUF_PRESENT 0x02 /* CPU is present */ -#define CPUF_RUNNING 0x04 /* CPU is running */ -#define CPUF_PAUSED 0x08 /* CPU is paused */ -#define CPUF_USERPMAP 0x20 /* CPU has a user pmap activated */ +#define CPUF_PRIMARY __BIT(0) /* CPU is primary CPU */ +#define CPUF_PRESENT __BIT(1) /* CPU is present */ +#define CPUF_RUNNING __BIT(2) /* CPU is running */ +#define CPUF_PAUSED __BIT(3) /* CPU is paused */ +#define CPUF_USERPMAP __BIT(5) /* CPU has a user pmap activated */ kcpuset_t *ci_shootdowncpus; kcpuset_t *ci_multicastcpus; kcpuset_t *ci_watchcpus;
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: skrll Date: Sun Jul 23 07:20:45 UTC 2023 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: USE __BIT() for CPUF_* flags. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/arch/mips/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.