Commit Graph

279606 Commits

Author SHA1 Message Date
skrll
f9d40dbbb8 Disable __HAVE_PREEMPTION. It is currently marked
#if defined(MULTIPROCESSOR) && defined(__HAVE_FAST_SOFTINTS)

but has no chance of working on OCTEON due to at least the spl functions
2020-08-17 14:17:49 +00:00
mrg
5c87c55a47 enable raidframe. 2020-08-17 09:03:03 +00:00
mrg
a152fe0b55 add pmaphist calls around seg_tab[] manipulation. hopefully will
help find what causes this:

panic: pmap_segtab_alloc: pm_segtab.seg_tab[1010] != 0 (0x980000004eeb6068): from free list
2020-08-17 08:56:27 +00:00
nonaka
7e1880b3d2 ipmi(4): Fixed a bug that incorrect condition is notified.
When the value obtained from the sensor is below the lower limit of
the critical threshold, it is notified that the value is below the lower
limit of the warning threshold.
2020-08-17 08:34:36 +00:00
msaitoh
5cf2b8e2be Simplify SFP+ check. No functional change. 2020-08-17 08:23:30 +00:00
msaitoh
82f6d01a1b Re-enabling interrupt is required only when a work is scheduled form the
interrput context.
2020-08-17 07:59:06 +00:00
simonb
c26067d669 Add some compile time asserts for endianness on boards/systems that
only support a single endianness.
2020-08-17 07:50:41 +00:00
msaitoh
53eb66a1b2 Fix a bug that the driver sometimes missed module insertion.
The ixgbe_sfp_probe() function was only for 82598 and other chips had no
way to poll SFP+ cage. The ixgbe_handle_mod() already has function to treat
module insertion/removal for all chips, so enqueue the work if the cage
status changed. All of ixgbe chips' SFP+ module interrupt is only on the
inserstion. This change also detect the removal by the timer.
2020-08-17 07:26:55 +00:00
mrg
13b7915743 remove duplicate symbol now published in shared mips. 2020-08-17 07:22:46 +00:00
msaitoh
0c83cbed3a Add missing workqueue_wait() for the recovery_mode_timer workqueue. 2020-08-17 06:30:25 +00:00
simonb
02abda66c9 Handle using "octeth" as root device by converting "octethN" to "cnmacN"
for any N < 100.  This allows booting for u-boot to use root=$(ethact)
on the command line and the kernel can use the ethernet interface the
kernel was loaded on as the NFS root device.
2020-08-17 06:23:01 +00:00
gson
de5f9e0f37 Remove unused function rump_shutdown() 2020-08-17 06:18:39 +00:00
wiz
106ec726e5 cprng(9): Remove trailing comma. 2020-08-17 06:07:53 +00:00
mrg
0e3b39d202 note mips crash(8). 2020-08-17 04:16:24 +00:00
mrg
4d62e2455a mostly complete basic port of crash(8) to mips.
tested on mipsel and mips64eb.  basic functionality works
on the running kernel, not yet tested on crash dumps.
2020-08-17 04:15:33 +00:00
mrg
da9502ad27 enable dumppcb. 2020-08-17 03:22:13 +00:00
mrg
d7467c185e port crash(8) to mips. (most of the kernel side.)
- expose parts of _KERNEL to _KMEMUSER as well
- hide more things for _KERNEL
- avoid DB_MACHINE_COMMANDS in crash(8)
- XXX add mips_label_t for !_KERNEL and use it in the pcb to
  avoid conflicting with the ddb/crash one
- enable dumppcb

some changes to make stack trace fail instead of SEGV and
the userland changes to crash itself not part of this change.
2020-08-17 03:19:35 +00:00
mrg
83a3090f5d add a "special3 offset" type of decode to ddb disasm so we see the
offsets properly decoded.  add mips r6 "cache" insn.

avoid signed/unsigned compare and ufetch_32() for upcoming crash(8).
2020-08-17 03:14:08 +00:00
mrg
2751b32d20 swap sys/param.h for machine/param.h. this still obtains the
wanted COHERENCY_UNIT, while avoiding have a cascade of
failures where sys/mutex.h ends up including arm/cpu.h which
ends up including sys/resourcevar.h and then sys/mutex.h,
but as the first includer of sys/mutex.h has defined the
idempotent header define, the second one is empty, and as
kmutex_t isn't defined by the first attempt yet the kmutex_t
used in resourcevar.h generates an error.

should fix evbarm v5/v5eb, hpcarm, iyonix and zaurus builds.

tested building iyonix, zaurus and evbarmv7hf.
2020-08-17 01:52:59 +00:00
thorpej
44d0e3f040 - Track the currently-activated pmap in struct cpu_info.
- Reserve some space in struct cpu_info for future pmap changes.
2020-08-17 00:57:37 +00:00
riastradh
c4125b7509 Update cprng_strong API documentation.
Should maybe just get rid of the flags arguments.
2020-08-17 00:55:05 +00:00
riastradh
819baeb60c Update cprng(9) man page for CTR_DRBG -> Hash_DRBG change last year. 2020-08-17 00:49:53 +00:00
riastradh
9493ed8295 Update cgd(4) man page.
- Highlight security model at top.
- Add adiantum and aes-xts.
- Split ciphers into `ciphers' and `obsolete ciphers'.
- Specify the parameters to the ciphers: tweak, CBC IV.
- Relegate obsolete `IV method' concept to a much shorter section.
- Add references.
2020-08-17 00:43:15 +00:00
rillig
94b00ca35c make(1): move tests for the :Ox modifier into separate file
The test has been extended by ensuring that the shuffled words are still
the same.  Comparing two shuffled lists is probabilistic, but comparing
their sorted results is not, therefore that's completely sensible to do.

When writing this test, by coincidence I discovered how to generate the
"Undefined variable" error message.  Unfortunately, the error message is
wrong since the variable NUMBERS is defined at that point.  In summary,
that error message is shown when it shouldn't, and when it should it is
not shown.  Still, I'm glad that I finally found it.
2020-08-16 20:43:01 +00:00
rillig
9e584e4094 make(1): move tests for the :O and :Or modifiers into separate files 2020-08-16 20:13:10 +00:00
thorpej
13ce49a3d0 - Undo part of rev 1.264; go back to not acquiring the pmap lock in
pmap_activate().  As of rev 1.211, the pmap::pm_lev1map field is
  stable across the life of the pmap, and so the conditino that
  the change in 1.264 was intended to avoid would not have happened
  anyway.
- Explicitly use __cacheline_aligned / COHERENCY_UNIT rather than 64
  in a couple of places.
- Update comments around the lev1map lifecycle, and add some assertions
  to enforce the assumptions being described.
- Remove some dubious DEBUG tests that are not MP-safe.
- Chage some long-form #ifdef DIAGNOSTIC checks / panics to KASSERTs.
- Remove the PMAP_ACTIVATE() macro because it's no longer used anywhere
  except for pmap_activate().  Just open-code the equivalent there.
- In pmap_activate(), only perform the SWPCTX if either the PTBR or the
  ASN are different than what the PCB already has.  Also assert that
  preemption is disabled and that the specified lwp is curlwp.
- In pmap_deactivate(), add similar assertions, and add a comment explaining
  why a SWPCTX to get off of the deactivated lev1map is not necessaray.
- Refactor some duplicated code in pmap_growkernel() into a new
  pmap_kptpage_alloc() function.
- In pmap_growkernel(), assert that any user pmap published on the all-pmaps
  list does not reference the kernel_lev1map.
- In pmap_asn_alloc(), get out early if we're called with the kernel pmap,
  since all kernel mappings are ASM.  Remove bogus assertions around the
  value of pmap::pm_lev1map and the current ASN, and simply assert that
  pmap::pm_lev1map is never kernel_lev1map.  Also assert that preemption
  is disabled, since we're manipulating per-cpu data structures.
- Convert the "too much uptime" panic to a simple KASSERT, and update the
  comment to reflect that we're only subject to the longer 75 billion year
  ASN generation overflow (because CPUs that don't implement ASNs never go
  through this code path).
2020-08-16 20:04:36 +00:00
rillig
54a8ac11f2 make(1): move tests for the :M modifier into separate files
The test for the different escaping has been adjusted to actually show
the different parsing results in the test output.  To do this, it had to
get its own file since it needs the -dv debug flag and specialized
post-processing.
2020-08-16 20:03:52 +00:00
rillig
2a9b06ae0f make(1): run tests in an almost empty, controlled environment
Several of the tests use simple variable names that might be influenced
by environment variables of the same name.  Especially the tests for the
?= variable assignment operator need an empty environment to start with,
to produce reliable results.

The PATH must be in the base environment since several tests depend on
the usual tools like echo(1), sleep(1), grep(1).  Setting the PATH to a
fixed value would have made it impossible to run the tests in a custom
environment that don't have a /bin directory.  It's the user's
responsibility to provide a sane PATH.
2020-08-16 18:40:13 +00:00
rillig
065a407e05 make(1): force all tests to be run with the -r flag
Without that flag, <sys.mk> is loaded before the tests.  The tests are
not intended to either use or even test these rules and definitions,
therefore it is safe to omit this command line option.

If there should ever be tests for POSIX-conformance that need the
builtin rules and definitions, these tests can still ".include <sys.mk>"
at the beginning and be done with it, since the -m command line option
is not touched.  The system-default rules and definitions are still
available, they are just not active by default.

Suggested by sjg.
2020-08-16 18:17:17 +00:00
thorpej
1c09ed02a1 In cpu_lwp_fork(), make sure that the PTBR field in l2's HWPCB references
the lev1map associated with l2's pmap.  Otherwise, the first time we
SWPCTX to l2, we'll be on l1's page tables until the first pmap_activate()
call for l2.
2020-08-16 18:05:52 +00:00
rillig
2e45c79a8e make(1): use consistent formatting for running the tests
With the many newly added tests, having two messages ("testing xzy" and
"postprocessing xyz") made the output too noisy since the words were not
aligned nicely.  Use the same formatting as for MAKEVERBOSE=0, and
remove the message for postprocessing.  If there should ever be problems
during postprocessing, it's trivial to run "../make TESTS=bad-test -dl"
to find out where the problem is.
2020-08-16 18:04:33 +00:00
riastradh
613921b5b8 Fix AES NEON code for big-endian softfp ARM.
...which is how the kernel runs.  Switch to using __SOFTFP__ for
consistency with how it gets exposed to C, although I'm not sure how
to get it defined automagically in the toolchain for .S files so
that's set manually in files.aesneon for now.
2020-08-16 18:02:03 +00:00
rillig
5468fbd3be make(1): clean up cleaning of test files
The variables CLEANFILES and CLEANDIRS are not supposed to be
user-settable, thus use a simple "=" instead of "+=".

Since CLEANDIRS is always set, there is no point in making the rm
conditional.
2020-08-16 17:58:48 +00:00
thorpej
2ba5a80446 Be explcit that all calls to pmap_activate() and pmap_deactivate()
from MI code are made with preemption disabled and with l == curlwp.
2020-08-16 16:48:08 +00:00
skrll
f26cdb5c71 G/C MP_CPU_INFO_MEMBERS 2020-08-16 16:01:35 +00:00
martin
9c197a80ad Restrict the NEON code to v7hf - the softfloat toolchain does not like
it (nor is it likely to work if there is no FPU present).
2020-08-16 15:52:14 +00:00
rillig
0920a26f30 make(1): fix archive test
At the beginning of that test, the library archive obviously does not
exist yet.

This test failure is a bit hard to detect since the test is disabled in
usr.bin/make, but not in tests/usr.bin/make.  This is because the latter
just runs all .mk files as tests, no matter whether they are commented
out or not.
2020-08-16 14:39:50 +00:00
rillig
adba330b30 make(1): describe the purpose of each newly added unit test dummy 2020-08-16 14:25:16 +00:00
rillig
70dfb9c270 make(1): move tests for the :gmtime and ::= modifiers to separate files 2020-08-16 12:48:55 +00:00
rillig
6149716f0b make(1): move tests for :S, :C, :@ from modmisc to their separate tests 2020-08-16 12:30:45 +00:00
rillig
d126d9d551 make(1): add dummies for fine-grained tests, one per single feature
The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.
2020-08-16 12:07:50 +00:00
mrg
5f6277270e bump image from 3000k to 3.5M. thanks, time. 2020-08-16 11:43:36 +00:00
jdolecek
2d68cdd6ba note COMPAT_LINUX is disabled by default now 2020-08-16 10:31:40 +00:00
jdolecek
dd45d45423 make COMPAT_LINUX option disabled by default
leave the option enabled only in amd64/i386 ALL kernels to make
sure it continues to be compilable also when included in kernel
2020-08-16 10:27:47 +00:00
skrll
1344fd3121 Improve comments 2020-08-16 10:08:42 +00:00
skrll
3c6d0a11a5 Welcome to 9.99.71 - changes to arm/aarch64 struct cpu_info
Thanks to mrg@ for the hint
2020-08-16 09:41:50 +00:00
skrll
a334a57f55 Define COHERENCY_UNIT and CACHE_LINE_SIZE to fix arm builds.
The recent change to cpu.h and struct cpu_info needs an early definition
for the ARM_INTR_IMPLs that want to inline the spl functions and get
{,set_}curcpl() from cpu.h
2020-08-16 09:37:30 +00:00
isaki
bc6beee95c Update and fix.
All primary bootloaders can recognize Human68k partition table.
2020-08-16 07:25:51 +00:00
isaki
76c2ed7cdd Replace boot_ustar with xxboot_ustarfs.
The old boot_ustar had many hard coding and was small(<1KB).
The new xxboot_ustarfs is a part of integrated larger(<8KB) xxboot.
We had to maintain three similar but not the same bootloaders, but
now we have two!
2020-08-16 07:03:45 +00:00
isaki
7e73c3a86c Overhaul xxboot. And merge floppy boot, taken from boot_ustar.
- Rewrite boot.S completely.
  boot.S now supports boot from SCSI HD/CD and floppy.
- Use IOCS call to identify the floppy format, instead of chkfmt.s which
  accesses hardware directly.
- Import print_hex() debug function from boot_ufs.
- Import a feature that displays initial registers (for debug) from boot_ufs,
  and restore it (this in boot_ufs has been broken).
- Add size optimized alternatives for some libkern routines.
- Stop linking libsa to prevent to link unexpected objects.
- Bump version to 2.0.
2020-08-16 06:43:43 +00:00