| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
by miod@ where the powerpc64 claimed to be "for all AArch64 platforms".
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the chipset tag for establishing interrupts now takes a struct cpu_info *.
The normal pci_intr_establish() macro passes NULL as ci, which indicates that
the primary CPU is to be used.
The PCI controller drivers can then simply pass the ci on to our arm64/armv7
interrupt establish "framework".
Prompted by dlg@
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a struct cpu_info *. From a driver point of view the fdt_intr_establish_*
API now also exist same functions with a *_cpu suffix. Internally the
"old" functions now call their *_cpu counterparts, passing NULL as ci.
NULL will be interpreted as primary CPU in the interrupt controller code.
The internal framework for interrupt controllers has been changed so that
the establish methods provided by an interrupt controller function always
takes a struct cpu_info *.
Some drivers, like imxgpio(4) and rkgpio(4), only have a single interrupt
line for multiple pins. On those we simply disallow trying to establish
an interrupt on a non-primary CPU, returning NULL.
Since we do not have MP yet on armv7, all armv7 interrupt controllers do
return NULL if an attempt is made to establish an interrupt on a different
CPU. That said, so far there's no way this can happen. If we ever gain
MP support, this is a reminder that the interrupt controller drivers have
to be adjusted.
Prompted by dlg@
ok 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.
|
|
|
|
| |
ok jsg@
|
|
|
|
|
|
|
|
|
|
|
| |
DMA remapping in the same way as arm64. This relies on the dma-ranges
property in the device tree and allows us to get rid of the hack for
the Raspberry Pi in the dwctwo(4) driver.
Note that this does not include the hack in simplebus(4) that we have on
arm64 since firmware that has the dma-ranges is in widespread use now.
ok patrick@
|
| |
|
|
|
|
|
|
| |
the kernel.
ok patrick@
|
|
|
|
|
|
|
| |
to clang, where the stack frame format changed significantly.
Prompted by guenther@ noticing deprecated ASM warnings
ok drahn@
|
| |
|
|
|
|
| |
ok jsg@
|
|
|
|
|
|
|
|
| |
information from dmesg that is no longer relevant to ARMv7 CPUs in favour
of printing the full architected cache hierarchy in the same way as we
do on arm64. It also is another small step towards SMP support on armv7.
ok patrick@
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
|
|
| |
instruction trap and pass it to the VFP fault handler, so that it
knows if we faulted with the VFP active or disabled. Reading the
status in the VFP fault handler does not work since at that point
the VFP already got disabled.
ok kettenis@
|
| |
|
|
|
|
| |
no words or punctation were modified.
|
|
|
|
|
|
|
| |
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.
ok visa@
|
|
|
|
|
|
|
| |
Use inline functions instead of GNU C statement expressions, and
make them available to userland. With clues from guenther@.
ok guenther@ kettenis@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
Discussed with kettenis@
|
|
|
|
|
|
|
|
| |
doesn't actually spin up any secondary CPUs, it does run. Mostly a cleanup
of <machine/cpu.h> along the lines of what I did earlier on arm64. Makes
armv7 use the MI mplock implementation and implements copyin32.
ok patrick@
|
|
|
|
|
|
| |
arm_intr_* prefix with fdt_intr_*.
ok kettenis@
|
|
|
|
| |
ok kettenis@
|
| |
|
|
|
|
|
|
| |
Fixes the random crashes in sh(1).
ok guenther@
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
ok visa@, patrick@
|
|
|
|
|
|
| |
a common bus space tag that can be used for early console attachment.
ok kettenis@
|
|
|
|
| |
ok visa@, patrick@
|
|
|
|
|
| |
definitions are already found in param.h
ok jsg
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
did the big EABI switch. Do it now before we get into trouble with using
floating-point and vector instructions that actually require things to be
properly aligned.
This breaks the ABI. In particular, file descriptor passing will be
broken if kernel and userland are not in sync. Upgrading from a snap is
highly recommended.
ok otto@, patrick@, jsg@, phessler@, deraadt@
|
|
|
|
| |
Tested by jsg@, ok patrick@
|
|
|
|
|
|
|
|
|
| |
This allows us to use floating-pointer and vector instructions in userland
code. The current implementation assumes all 32 VFP registers are present.
This should be the case on all armv7 hardware currently supported by
OpenBSD.
ok patrick@
|
|
|
|
|
|
| |
state.
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attacks. OpenBSD/armv7 is already in pretty good shape as we have always
been flushing the branch predictor cache on context switches. This diff adds
additional flushes to page faults in kernel address space. The impact on
performance should be minimal as these page faults should only happen when
userland (deliberately or accidentally) tries to access kernel addres space
which would lead to a fatal signal (SIGSEGV or SIGBUS).
Loosely based on changes made by Marc Zyngier in Linux and based on
information in Arm Trusted Firmware Security Advisory TFV 6.
Note that for Cortex-A15 (and Cortex-A72) you will need firmware that sets
the ACTRL[0] bit for this diff to be effective. Also note that with this
diff Cortex-A57 is still vulnerable.
ok jsg@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
of the /chosen node in the device tree to decide whether the framebuffer
should be used as the console device. Most, if not all, machines will
have that set to use a serial console and there is no easy way yet to
change that.
ok jsg@
|
| |
|
| |
|
|
|
|
|
|
|
| |
type for storing pointers in our universe. Avoids an implicit dependence
on <sys/types.h>.
ok tom@
|
|
|
|
| |
"fire away!" tedu
|
| |
|
|
|
|
|
|
| |
correct prologue if compiled with -DPROF.
ok deraadt@
|
|
|
|
| |
Pointed out by deraadt@
|
|
|
|
|
| |
- keep setbits/clearbits and virtio barriers inside _KERNEL
- prefix def_atomic_xxx macros with underscores
|