| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
OK naddy@; no objections from kettenis@
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the cycle counter usable as timecounter on multiprocessor
machines.
Idea from Linux.
Tested on CN5020, CN6120, CN7130 and CN7360.
Looks reasonable to kettenis@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
|
|
|
|
| |
functionality is provided by <sys/stdarg.h> using compiler builtins.
Tested in a ports bulk build on amd64 by naddy@
OK naddy@ mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it doesn't
use nanotime to get a monotonically increasing set or ordered and
accurate timestamps, it just wants something with bits that change.
there's been discussions for years about letting rnd use a clock
that's super fast to read, but not necessarily accurate, but it
wasn't until recently that i figured out it wasn't interested in
time at all, so things like keeping a fast clock coherent between
cpu cores or correct according to ntp is unecessary. this means we
can just let rnd read the cycle counters on cpus and things will
be fine. cpus with cycle counters that vary in their speed and
arent kept consistent between cores may even be desirable in this
context.
so this is the first step in converting rnd.c to reading cycle
counter. it copies the nanotime backend to each arch, and they can
replace it with something MD as a second step later on.
djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits.
thanks to visa for his eyes.
ok deraadt@ visa@
deraadt@ says he will help handle any MD fallout that occurs.
|
|
|
|
|
|
| |
Nothing uses the header anymore.
OK deraadt@ mpi@
|
| |
|
|
|
|
| |
ok dlg@, jasper@
|
|
|
|
| |
64-bit unsigned arithmetic.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a CPU updates a pmap concurrently with the activation of that pmap
on another CPU, invalidation of TLB entries might be incomplete.
It is also possible that a CPU altogether stops updating its TLB.
Prevent the race by synchronizing pmap activations and logic that
determines where to send TLB invalidation IPIs.
To avoid mutex wait without ability to process IPIs, the context switch
code is adjusted to call pmap_activate() with interrupts enabled.
In practice, interrupts up to IPL_SCHED are still disabled on context
switch.
|
| |
|
|
|
|
| |
on loongson.
|
|
|
|
|
|
|
|
|
| |
The assembler does not handle undeclared local symbols properly
and generates R_MIPS_CALL16 relocations where it should generate
local GOT references. For now, get along with the problem by
declaring local symbols where necessary.
OK kettenis@ guenther@
|
|
|
|
|
|
|
|
|
|
| |
that could leave `ddb_mp_mutex' locked if one CPU incremented
`db_active' while another CPU was in the critical section. When the race
hit, the debugger was unable to resume execution or switch between CPUs.
Race analyzed by patrick@
OK mpi@ patrick@
|
|
|
|
|
|
|
| |
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.
ok visa@
|
| |
|
|
|
|
| |
ok guenther@ tb@ deraadt@
|
|
|
|
|
|
|
|
|
| |
4MB which is far too low especially when the platform is able to run MP.
New limits are, amd64 = 256M; arm64, mips64, sparc64 = 64M; alpha, arm,
hppa, i386, powerpc = 32M; m88k, sh = 8M
Still rather conservative numbers but much better than before. At least
some hangs of arm64 build boxes was caused by this.
OK kettenis@, visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a hardware-accelerated implementation of several encryption
and authentication algorithms for ipsec(4):
AES-CBC
AES-CTR
AES-GCM
AES-GMAC
HMAC-MD5
HMAC-SHA1
HMAC-SHA2-256
HMAC-SHA2-384
HMAC-SHA2-512
Please note that the driver is currently disabled.
OK deraadt@
|
|
|
|
|
|
|
|
|
|
| |
needs (looking at you sgi, but others required this before). This is for
the circumstances we need pagesize known at compile time, not getpagesize()
runtime. Use it for malloc storage sizes, for shm, and to set pthread stack
default sizes. The stack sizes were a mess, and pushing them towards
page-aligned is healthy move (which will also be needed by the coming
stack register checker)
ok guenther kettenis, discussion with stefan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or reordering accesses to the variable. Assume that the assembler
preserves the correct sequence of instructions, which allows the
removal of the explicit noreorder/reorder toggles from the C code.
With ci_ipl being volatile, drop mips_sync() calls that follow
the accesses of the variable. The sync is redundant as a compiler
barrier. In addition, the MIPS64 CPU designs should not need the
sync for pipeline or write buffer control. According to miod@,
the use of the instruction is a carryover from code targeting
early MIPS designs that lack tight integration with the cache
and write buffer.
Discussed with and testing help from miod@.
Tested on CN5020, CN6120, CN7130, CN7360, Loongson 2F and 3A1000,
R4400, R8000, R10000 and R16000.
|
| |
|
|
|
|
|
|
| |
Archs not yet converted can to the jump by defining __USE_MI_MUTEX.
ok visa@
|
|
|
|
|
|
| |
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64.
ok visa@
|
|
|
|
|
|
| |
so that <machine/signal.h> is not needed in setjmp.S.
Suggested by kettenis@ long ago, OK deraadt@
|
|
|
|
|
|
|
| |
Remove `mtx_lock' from i386, add volatile before `mtx_owner' where it
was missing.
Inputs from kettenis@, ok visa@
|
|
|
|
| |
OK mpi@
|
|
|
|
|
|
|
|
| |
pthread_exit from libpthread to libc, along with low-level bits to
support them. Major bump to both libc and libpthread.
Requested by libressl team. Ports testing by naddy@
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
| |
FPUEMUL option is enabled. This benefits OCTEON III systems which can
run floating-point operations natively.
Feedback from and OK miod@; he also helped with testing.
Tested on octeon without FPU (CN5020, CN6120) and with FPU (CN7130),
as well as on sgi/IP27 (MP R16000), sgi/IP32 (R5000), and
loongson (3A1000).
|
| |
|
| |
|
|
|
|
| |
OK guenther@
|
|
|
|
| |
OK guenther@
|
| |
|
|
|
|
| |
"fire away!" tedu
|
| |
|
|
|
|
|
|
| |
the whole TLB space even before this. However, TLB initialization on
boot and TLB flush on ASID wraparound have been incomplete. These have
caused crashes of processes.
|
| |
|
|
|
|
|
|
|
|
| |
derivatives. This lets the kernel utilize the CPUs' Standby Mode to
reduce the power consumption of an idle system.
Suggested by and input from miod@.
He also tested this patch on an RM7000 O2.
|
|
|
|
| |
OK kettenis@
|
|
|
|
|
|
| |
- keep setbits/clearbits inside _KERNEL
ok visa@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This gives fast access to the address on systems that implement
the UserLocal register. TCB caching is still used when running
in the single-threaded mode in order not to penalize old systems.
The kernel counterpart of this change must be in place before
using this diff!
With guenther@
|
|
|
|
|
|
|
|
|
|
| |
This lets programs get the address without a system call on OCTEON II
and later.
Add UserLocal load emulation for systems that do not implement
the RDHWR instruction or the UserLocal register.
OK guenther@
|
| |
|
|
|
|
|
|
|
| |
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB
macro can be unifdef'ed as always defined.
ok kettenis@ visa@ jsing@
|
|
|
|
|
|
| |
The latter is not defined by clang.
OK guenther@, kettenis@
|