278702 Commits

Author SHA1 Message Date
gutteridge
5c46104e5e netstat.1: add various xrefs present in the body to "See Also" 2020-07-21 04:58:43 +00:00
nia
6e4479f819 fortune: arc4random_uniform for better uniform values than random() % ... 2020-07-21 03:05:40 +00:00
nia
6ad85e2cf9 tetris: Use arc4random_uniform instead of modulo for better randomness 2020-07-21 02:42:05 +00:00
nia
970d926d53 Fix location of device trees 2020-07-21 02:21:12 +00:00
rillig
ce5a7d84b5 make(1): extract :ts<separator> modifier into separate function 2020-07-20 21:33:13 +00:00
riastradh
0a5240447d viadrmums: Stop gracefully at the end of the PCI id list. 2020-07-20 21:29:38 +00:00
rillig
54377a3dde make(1): clean up implementation of :[...] and other modifiers 2020-07-20 20:56:39 +00:00
rillig
e7adb96342 make(1): fix edge cases with $ at the end of the :@ modifier
In both parts of the :@ modifier, by passing &pflags to
ParseModifierPart, a final $ was interpreted as an anchor, which only
makes sense in the :S and :C modifiers.

This edge case is neither used by src nor by pkgsrc, except for the unit
tests that have been adjusted.
2020-07-20 19:53:40 +00:00
rillig
58f4db2e7d make(1): add test for nested assignments
This test demonstrates that in ApplyModifier_Assign, the call to
ParseModifierPart must get its pflags.
2020-07-20 19:03:25 +00:00
sjg
bfa35b9119 Make DEBUG_HASH less of a fire-hose.
Reporting keys on every lookup is overkill unless
playing with a new HASH, so wrap in #ifdef DEBUG_HASH_LOOKUP
Also add some stats at the end so we can see
final size and max chain length - maxchain is a better
variable name than maxlen.
2020-07-20 18:12:48 +00:00
jmcneill
8bf8eed88c Fix coreX/IP4 summary register offsets 2020-07-20 17:56:13 +00:00
rillig
396186ceac make(1): make conditions work without pattern flags
The "pattern flag" VARP_NOSUBST was used to prevent evaluating
irrelevant conditions.  Omitting the evaluation flag VARE_WANTRES has the
same effect.
2020-07-20 16:55:10 +00:00
riastradh
bbc1ed881b Revert 1.112 "Disable x86 in-kernel AES temporarily."
The bug in fpu_kern_enter motivating this appears to have been fixed.
2020-07-20 16:45:41 +00:00
riastradh
60dedb5904 Fix fpu_kern_enter in a softint that interrupted a softint.
We need to find the lwp that was originally interrupted to save its
fpu state.

With this, fpu-heavy programs (like firefox) are once again stable,
at least under modest stress testing, on systems configured to use
wifi with WPA2 and CCMP.
2020-07-20 16:43:03 +00:00
riastradh
33ee64ee91 Save fpu state at IPL_VM to exclude fpu_kern_enter/leave.
This way fpu_kern_enter/leave cannot interrupt the transition, so the
transition from state-on-CPU to state-in-memory (with TS set) is
atomic whether in an interrupt or not.

(I am not 100% convinced that this is necessary, but it makes
reasoning about the transition simpler.)
2020-07-20 16:41:18 +00:00
riastradh
f62a83e7d2 Revert 1.66 "Fix race in fpu save with fpu_kern_enter in softint."
This only fixed part of the race, and we can do it more simply.
2020-07-20 16:38:47 +00:00
riastradh
42b2e9dc0b Revert 1.67 "Restore the lwp's fpu state, not zeros, and leave with fpu enabled."
This didn't actually avoid double-restore, and it doesn't solve the
problem anyway, and made it harder to detect in-kernel fpu abuse.
2020-07-20 16:37:34 +00:00
rillig
d802fc9c37 make(1): fix obscure edge case for ${VAR:e$=x}
The characters "$=" do not occur in either src or pkgsrc, therefore this
case is unlikely to occur in practice.
2020-07-20 16:32:14 +00:00
rillig
274b9fb5a7 make(1): demonstrate obscure edge case in SysV modifier 2020-07-20 16:27:55 +00:00
rillig
bf9a254a57 make(1): move documentation for assignment modifiers 2020-07-20 16:12:52 +00:00
rillig
317c5a3676 make(1): add test for :tu modifier with spaces 2020-07-20 16:12:02 +00:00
rillig
65c0da7b0b make(1): prefer memcmp over strncmp 2020-07-20 15:48:50 +00:00
rillig
b27184d9a8 make(1): fix type of VarPattern.lhsLen and rhsLen
String length is measured in size_t, not int.
2020-07-20 15:44:12 +00:00
rillig
14d545daea make(1): fix undefined behavior in :S modifier
The expression word + wordLen - leftLen had resulted in an out-of-bounds
pointer before.  Luckily the heap addresses were high enough in typical
applications to prevent a wrap-around.
2020-07-20 15:15:32 +00:00
riastradh
8f5a67bbb4 Disable x86 in-kernel AES temporarily.
There's a bug in the FPU state handling that it triggers -- likely
limited to the softint path since I've only ever seen it on a system
using wifi configured with WPA2 and CCMP, which uses AES heavily in
softint.

This is to be reverted once we diagnose the bug.  (There is also a
performance regression on wifi with WPA2 and CCMP, which I plan to
fix too once we figure out the FPU state handling bug.)
2020-07-20 15:11:29 +00:00
rillig
9b9cedd7d3 make(1): make implementation of the :S modifier simpler 2020-07-20 15:10:35 +00:00
jmcneill
51d8a97b81 No need for cpu_hatch_lock after all since we hatch secondaries one at a time 2020-07-20 14:59:57 +00:00
rillig
e5aca3d79b make(1): make modifier handling simpler
Implementing a modifier such as :S or :M should not be concerned with
separating the words of the resulting string.  Ideally this should be
done in the same way by all modifiers.

Before, the :R (filename root) modifier added a separator even if the
resulting filename root was an empty string.  The chances that this
change in behavior breaks anything are epsilon.

The :@ modifier, if it appeared after a :ts modifier, did not use the
word separator from the :ts modifier (which all other modifiers do) but
always added a space.  This behavior has been preserved for now.  It's an
unnecessary inconsistency though.

In contrast to Buffer, the newly added SepBuf uses size_t for memory
sizes and also uses the conventional parameter order (mem, memsize)
instead of the unusual (memsize, mem).
2020-07-20 14:50:41 +00:00
skrll
85188c8353 Fix non-MULTIPROCESSOR build 2020-07-20 14:38:38 +00:00
tsutsui
2414371414 Switch ports using MI wsfb drivers to HAVE_XORG_SERVER_VER=120.
Xorg wsfb servers from 1.20 for dreamcast (16bpp), hp300 (8bpp), and
luna68k (1bpp) work fine even on NetBSD 9.0, and zaurus is also
confirmed working.

Discussed with mrg@ and macallan@ on tech-x11:
 https://mail-index.netbsd.org/tech-x11/2020/07/thread1.html#002098
2020-07-20 14:24:13 +00:00
jmcneill
bb657399e1 Serialize CPU hatch annoucement printfs and wait for CPUs to start before
returning from cpu_boot_secondary_processors.
2020-07-20 14:19:41 +00:00
jmcneill
7d9c74a06d Simplify IPI handling even more for now and run everything at IPL_HIGH. 2020-07-20 14:05:51 +00:00
tsutsui
4cade5e54a Remove extra "-I" for ${X11INCS.DIX} macro. 2020-07-20 13:59:57 +00:00
fcambus
a41247a4c5 Update Spleen wscons fonts to version 1.8.1, bringing the following
improvements:

- Center tilde vertically for all sizes, as modern fonts do
2020-07-20 13:58:52 +00:00
tsutsui
879355ad78 Fix typos in ${X11INCS.DIX} include paths. PR/55500 2020-07-20 13:55:08 +00:00
fcambus
9bcf342ddb Update Spleen kernel fonts to version 1.8.1, bringing the following
improvements:

- Center tilde vertically for all sizes, as modern fonts do
2020-07-20 13:41:16 +00:00
jmcneill
e75f7f687c Fix confusion between ipi bitmask and mbox register bit assignments. 2020-07-20 13:30:41 +00:00
skrll
29538e30ed Move exc_step definition under MIPS64_OCTEON and use it in the zeroising
memset as length for correctness.
2020-07-20 10:53:47 +00:00
mrg
909bc537c1 clear all interrupts, not just those we expect from the hostintmask.
this removes the final hard hang i have seen in pinebookpro wifi,
though one may still need to 'ifconfig bwfm0 down up' occasionally,
so we still have bugs to fix here (the hang is usually associated
with 'checksum error' from bwfm/sdio.)
2020-07-20 06:47:02 +00:00
mrg
d8c7203634 only ask for SDPCMD_INTSTATUS_HMB_SW_MASK and SDPCMD_INTSTATUS_CHIPACTIVE
interrupts, not all of them.  we only ack these ones.

mostly fixes pinebookpro wifi hard hangs.  still is problematic and can
trigger interrupt storm that appears as a hard hang without NET_MPSAFE,
and a follow up, less clearly right, change will reduce that to a soft
hang of the interface that can be cleared with 'ifconfig bwfm0 down up',
and even often recovers itself now.
2020-07-20 06:44:55 +00:00
maxv
ee1ed0c711 Revert previous, to unbreak the build (NVMM declares the macro too).
There are hundreds of MSRs, we're not going to list them all, especially
when the majority are unused.
2020-07-20 05:50:55 +00:00
simonb
0600e66eb5 Less magic numbers. 2020-07-20 03:26:07 +00:00
simonb
d7093b1e3b Remove check/limit for only 2 cores.
Use MIPS_EBASE_CPUNUM instead of magic numbers.
2020-07-20 03:24:59 +00:00
simonb
fa7606ad02 Use MIPS_EBASE_CPUNUM instead of magic numbers. 2020-07-20 03:23:42 +00:00
simonb
fc31894f8f Expose MIPS_EBASE_CPUNUM. 2020-07-20 03:22:39 +00:00
simonb
9a1762babc Expose the width of the MIPS_EBASE_CPUNUM bitfield for asm code. 2020-07-20 03:17:44 +00:00
uwe
7b99bbb4d0 Use COPY_SYMTAB to get kernel symbols. 2020-07-20 02:04:43 +00:00
simonb
7c3b31f5c6 Add an extra bitfield in MIPS_COP_0_EBASE. 2020-07-20 01:10:38 +00:00
uwe
8845bbfb27 Implement cngetc to be able to talk to DDB. 2020-07-20 01:06:33 +00:00
uwe
b24f7b719f Add placeholders/boilerplate for NextVoD.
STMicroelectronics support needs to be written for both the CPU and
devices.  This config and related files is absolute bare bones to get
a scaffolding kernel to compile to actually work on that support.
Don't hold your breath.
2020-07-19 23:44:36 +00:00