Commit Graph

304183 Commits

Author SHA1 Message Date
rin 774ff440e7 lists/debug/mi: Sprinkle gcc to lib[al]san_g.a to fix clang build 2023-11-06 08:56:12 +00:00
rin ddb267309a x86/dosboot: Drop no-longer-available -DSLOW for libz
It should be lost during merge from upstream.

We may introduce a similar hack again, if it is *really* required;
inflate_fast() may be dropped by using slow path unconditionally.
2023-11-06 07:09:08 +00:00
rin 4e85348786 x86/dosboot: Do not page-align data segment
4K alignment is too heavy burden for COM executable with 64K limit :)

Fix binary size overflow for clang/amd64.
2023-11-06 07:02:17 +00:00
rin 5893e8509c x86/dosboot: Allow NULL dereference to fetch command line arguments
DOS command line arguments are provided as struct psp at 0x0000;
see doscommain.c.

Recent versions of gcc and clang are clever enough to optimize code
block involving NULL dereference into ud2 insn.

Sprinkle -fno-delete-null-pointer-checks to doscommain.c to
prevent this behavior.

Note that dosboot.com for netbsd-9 and later was broken due to
this ``over optimization''. gcc 5.5.0 and clang 4.0.0 in netbsd-8
generate correct codes without this workaround.

XXX
Are there still use cases for dosboot.com? Does anyone want to
boot NetBSD from real-mode DOS in 2023?
2023-11-06 06:53:52 +00:00
brad 77871fbede gpioirq(4) version 2
This update makes this driver more than just an example and allows for:

o More than one pin to be attached to a gpioirq instance.  That is,
  the mask parameter can be greater than 0x01 now.

o A /dev/gpioirqN device that allows GPIO pin interrupts to be
  transported into userland.  This is a device that can be opened for
  reading with a simple fixed output indicating the device unit, pin
  number and current pin state.


This update was used as part of a physical intrusion detection system
where multiple switches (i.e. window magnetic reed switches and etc.)
are tied to a bunch of GPIO inputs with userland software that reacts
to the pins changing state.
2023-11-06 00:35:05 +00:00
andvar 96f512bb33 Return missing debug message text and remove obsolete sched_whichqs param.
Allows INTR_DEBUG code to compile.
2023-11-05 22:05:07 +00:00
andvar 331f9a200b Fix format specifiers for debug code. 2023-11-05 21:54:27 +00:00
andvar d5173657cf Use DPRINTF instead of __gsfb_print() to print smap status.
__gsfb_printf() is defined only with the GSFB_DEBUG_MONITOR option.
2023-11-05 21:50:27 +00:00
riastradh 8fde1c3f4c t_fenv: Improve diagnostics when rounding mode tests fail.
Print the correct input, and print the rounding mode for clarity so
you don't have to cross-reference it by line number.

PR port-mips/57680

XXX pullup-10
2023-11-05 21:13:06 +00:00
jdolecek f0634c6a5b ena(4) improvements committed
Pull request: https://github.com/maleic1618/NetBSD/pull/1:
"""
This PR fixes some bugs and MP-ifies ena(4), including RSS.

On t3.small instance, its forward throughput has grown as followings:

               64 bytes	256 bytes
-current 1flow	21.58	110.51
-current 8flow	28.27	123.19
patched 1flow	37.20	142.21
patched 8flow	92.26	366.85
(Unit: Mbps, NET_MPSAFE enabled, Using https://github.com/iij/ipgen)

It also worked well on a aarch64 machine.

Addendum: I forgot to mention that this PR is reviewed ozaki-r@n.o.
"""

Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
Reviewed also by ozaki-r@n.o
2023-11-05 18:32:01 +00:00
jdolecek 835165f1bb ena(4): stop management first when detaching
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:26:11 +00:00
jdolecek e5f5445a48 ena(4): destroy all wait_event
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:24:31 +00:00
jdolecek a53df5384a ena(4): establish interrupt after setting up resources
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:23:29 +00:00
jdolecek bc911a556a ena(4): prevent AENQ handler from use-after-free
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:21:54 +00:00
jdolecek 80fc65d6b8 ena(4) is MP-ready, always use MPSAFE
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:18:56 +00:00
jdolecek 9c0a482bc2 ena(4): support RSS and delete FreeBSD-specified code
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:17:41 +00:00
jdolecek a964a2995f ena(4): replace malloc(9) to kmem(9)
Code contributed by KUSABA Takeshi <t-kusaba@iij.ad.jp>
2023-11-05 18:15:02 +00:00
mrg a11174ffe8 add a note about realtek 8156* support working here.
(it can and should be better in the ure(4) driver, but the support
is not yet ported over.)

also add a note about USB 3 speeds.  this device is 2.5G, and i've
seen it do just over 1G speeds.  other 1G devices also use USB 3
speeds not mentioned here.

bump date.
2023-11-05 17:52:09 +00:00
riastradh 40e521dfc3 t_fenv: Add #pragma STDC FENV_ACCESS ON and verify FLT_RADIX is 2.
Except gcc doesn't implement this pragma, so make it conditional.

And clang only supports it on some architectures, so just leave it
out for now with a comment about why.

PR port-mips/57680

XXX pullup-10
2023-11-05 16:28:05 +00:00
riastradh f6d88030b5 t_fenv: Verify rounding mode takes effect.
At least for addition operations, anyway.

Somewhat redundant with the test t_fe_round added by maya@ but this
gives two minimal pairs to easily diagnose exactly what the rounding
mode is when the wrong one was selected.

PR port-mips/57680

XXX pullup-10
2023-11-05 16:06:27 +00:00
riastradh f7171b7a20 t_fenv: Check FLT_ROUNDS whenever we touch the rounding mode.
PR port-mips/57680

XXX pullup-10
2023-11-05 15:28:17 +00:00
riastradh 1865a6485e t_fenv: Print wrong values if tests fail.
XXX pullup-10
2023-11-05 15:27:40 +00:00
tsutsui 82efccb2bd Use DELAY(9), not empty for() loop that could be optimized out.
No visible regression on NWS-3260 and NWS-3470.
2023-11-04 18:13:25 +00:00
tsutsui 327c4e9201 doc: note support for LCD-MONO framebuffer on NWS-32x0 laptop machines. 2023-11-04 15:33:26 +00:00
tsutsui 666894a5f8 Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines.
Tested on NWS-3260, which was sent from ryo@'s belongins and repaired
by me, and also tested on my NWS-3470D, including Xorg mono server.
(Note X.org server on NEWS machines requires keymap modifications)
Also add proper initialization on consinit() in NMB-253 case.

Worth to pull up to netbsd-10 and netbsd-9.
2023-11-04 15:30:52 +00:00
andvar 57a58bce8c Remove unused msr definition.
Fixes ofppc GENERIC.MP build.
2023-11-03 20:25:13 +00:00
wiz e647d4c281 cdce(4): add Club 3D Adapter LAN-Adapter to recognized adapters
Bump date
2023-11-03 18:24:41 +00:00
simonb ac45218fbd Add some earmv4 kernels. 2023-11-03 09:56:14 +00:00
chs feabd72f0c dtrace: add support for SMAP
Add support in dtrace for SMAP, so that actions like copyinstr() work.
It would be better if dtrace could use the SMAP_* hotpatch macros directly,
but the hotpatching code does not currently operate on kernel modules,
so we'll use some tiny functions in the base kernel for now.
2023-11-03 09:07:56 +00:00
simonb f52c4ec833 All other install kernels use a 6MB RAM disk. Stop with the teeny
frequent bumps and jump straight to the size everything is using.
2023-11-03 00:24:20 +00:00
riastradh a0f566c445 eqos(4): Fix multicast filter updates.
1. Don't touch the obsolete IFF_ALLMULTI.
2. Set ETHER_F_ALLMULTI if we're accepting all multicast addresses.
3. If any multicast entry range is not a single address, accept all
   multicast addresses.
2023-11-02 13:50:14 +00:00
riastradh 3ce61ed00f eqos(4): Fix locking around multicast filter updates.
- Can't touch if_flags without IFNET_LOCK.
- Can't take IFNET_LOCK in SIOCADDMULTI/SIOCDELMULTI path.

Instead, cache IFF_PROMISC and IFF_ALLMULTI on if_init under a lock we
can take in this path.

XXX Is IFF_ALLMULTI relevant any more?  Hasn't it been moved to
ethercom flags?

XXX Should not take sc_lock around if_init/stop -- IFNET_LOCK is
enough.  Should narrow scope of sc_lock to be just tick/mii/multi
stuff.
2023-11-02 13:50:02 +00:00
riastradh a8ea920856 eqos(4): Don't touch if_flags in tx path.
Can't touch this without IFNET_LOCK.
2023-11-02 13:49:49 +00:00
riastradh 4181ebbed4 eqos(4): Wait for callout to halt and make sure it stays halted. 2023-11-02 13:49:37 +00:00
martin 3007f1403a Back out the following revisions on behalf of core:
sys/sys/lwp.h: revision 1.228
	sys/sys/pipe.h: revision 1.40
	sys/kern/uipc_socket.c: revision 1.306
	sys/kern/kern_sleepq.c: revision 1.84
	sys/rump/librump/rumpkern/locks_up.c: revision 1.13
	sys/kern/sys_pipe.c: revision 1.165
	usr.bin/fstat/fstat.c: revision 1.119
	sys/rump/librump/rumpkern/locks.c: revision 1.87
	sys/ddb/db_xxx.c: revision 1.78
	sys/ddb/db_command.c: revision 1.187
	sys/sys/condvar.h: revision 1.18
	sys/ddb/db_interface.h: revision 1.42
	sys/sys/socketvar.h: revision 1.166
	sys/kern/uipc_syscalls.c: revision 1.209
	sys/kern/kern_condvar.c: revision 1.60

  Add cv_fdrestart() [...]
  Use cv_fdrestart() to implement fo_restart.
  Simplify/streamline pipes a little bit [...]

This changes have caused regressions and need to be debugged.
The cv_fdrestart() addition needs more discussion.
2023-11-02 10:31:55 +00:00
yamaguchi 63162a40fe Added the test for vlan over l2tp 2023-11-02 09:50:50 +00:00
yamaguchi b6cc0dbab4 Support vlan(4) over l2tp(4) 2023-11-02 09:48:29 +00:00
yamaguchi 68d5c47912 l2tp(4): use ether_ifattach() to initialize ethercom 2023-11-02 09:43:46 +00:00
yamaguchi 999e639ed7 Use ether_bpf_mtap only when the device supports vlan harware tagging
The function is bpf_mtap() for ethernet devices and *currently*
it is just handling VLAN tag stripped by the hardware.
2023-11-02 09:40:47 +00:00
yamaguchi b97d443e3a Added NULL check 2023-11-02 09:36:27 +00:00
rin 7497308455 igc(4): Notify which of 64- or 32-bit DMA is used 2023-11-02 09:29:30 +00:00
wiz a8529705c8 ixg(4): fix formatting of AUTHORS 2023-11-02 08:56:34 +00:00
rillig c30c9edea2 make: when comparing substrings, don't read beyond the substring's end
Right now, Substring_Words terminates each word with a '\0', but that's
an implementation detail that is not required by the interface, so don't
rely on it.
2023-11-02 06:09:07 +00:00
rillig 10b0fc2dcb make: miscellaneous cleanups
No functional change.
2023-11-02 05:55:22 +00:00
rillig 4a0a477dc7 tests/make: test appending to an environment variable 2023-11-02 05:46:26 +00:00
rillig a76be09c2a make: clean up comments
No functional change.
2023-11-02 05:40:49 +00:00
rillig 946e90dc4c make: sync comments with the extracted ParseModifier_Match
No functional change.
2023-11-02 05:14:58 +00:00
msaitoh f59849c8e7 ixgbe: Whitespace. No functional change. 2023-11-02 05:07:57 +00:00
rillig 713aa52bfd make: inline a single-line cross-file function
No functional change.
2023-11-02 04:50:44 +00:00
msaitoh c800f3a42e eqos(4): Fix typo in comment. 2023-11-02 02:32:41 +00:00