Age | Commit message (Collapse) | Author |
|
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@
|
|
|
|
accomodating allocator. an interrupt safe pool may also be used in process
context, as indicated by waitok flags. thanks to the garbage collector, we
can always free pages in process context. the only complication is where
to put the pages. solve this by saving the allocation flags in the pool
page header so the free function can examine them.
not actually used in this diff. (coming soon.)
arm testing and compile fixes from phessler
|
|
warnings/errors about using VFP2 instructions. We use vfpv3 here
(which corresponds to vfpv3-d32) since that is the minimum requirement
for OpenBSD/armv7.
ok jsg@, patrick@
|
|
|
|
no words or punctation were modified.
|
|
ok dlg@ kettenis@
|
|
with the lowest IPL. Once we actually run the IRQ handler
we raise to the highest IPL. Fixes a crash seen when having
a network card in the PCIe slot of the MacchiatoBin.
ok ccardenas@
|
|
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@
|
|
|
|
ok jsg@, patrick@
|
|
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@
|
|
instead of passing sendsig() the code+type+val, pass a siginfo_t*
to copy from. Eliminate the indirection through struct emul for
sendsig(); we no longer have a SunOS4-compat version of sendsig()
ok deraadt@
|
|
ok kettenis@
|
|
extension to the GIC controller, which is represented as subnode in the
device tree. There can be multiple GICv2Ms, so it makes sense to attach
those to ampintc(4) as some kind of simplebus. The GICv2M is simply an
interrupt generator that can be used by PCIe devices to ring the door
bell. There is no need for further configuration, we only need to find
out which SPIs we are allowed to use for MSI and to register an edge
triggered interrupt on a (randomly) allocated SPI.
Implement support for interrupt types. The GIC only seems to support
level triggered active-high or egdge triggered low-to-high interrupts.
We currently always configure them to be level triggered, which is a
sane default for most controllers. Since MSI interupts on the GIC are
edge triggered, we need to be able to parse the type information and to
configure the interrupt correspondingly.
ok kettenis@
|
|
|
|
ok phessler@, guenther@
|
|
Fixes the random crashes in sh(1).
ok guenther@
|
|
we can be sure signals posted from userret() are based on the correct
information
ok kettenis@
|
|
From drahn@, ok guenther@
|
|
ok deraadt@
|
|
that OpenBSD runs on.
ok patrick@
|
|
ok deraadt@
|
|
ok patrick@
|
|
ok visa@, patrick@
|
|
of fdt-enabled platforms in sync.
OK deraadt@
|
|
syscall) confirm the stack register points at MAP_STACK memory, otherwise
SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified
to create a MAP_STACK sub-region which satisfies alignment requirements.
Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the
contents of the region -- there is no mprotect() equivalent operation, so
there is no MAP_STACK-adding gadget.
This opportunistic software-emulation of a stack protection bit makes
stack-pivot operations during ROPchain fragile (kind of like removing a
tool from the toolbox).
original discussion with tedu, uvm work by stefan, testing by mortimer
ok kettenis
|
|
a common bus space tag that can be used for early console attachment.
ok kettenis@
|
|
Extend the logic already present for panic() to any DDB-related
operation such that if ddb(4) is entered because of a fault or
other trap it is still possible to call 'boot reboot'.
While here stop printing splassert() messages as well, to not fill
the buffer.
ok visa@, deraadt@
|
|
ok visa@, patrick@
|
|
that it gives us a read-only data section. In addition the linker
script is now easily diffable to arm64 and we also stop mapping some
unnecessary space before the kernel.
Prompted by deraadt@
ok kettenis@
|
|
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@
|
|
kernels wouldn't boot because the random order in which we happened to link
it would cause these symbols to be misaligned.
Thanks to Brandon Bergren for figuring out the problem.
|
|
|
|
like we already do in the code that flushes the BTB.
ok jsg@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
stack frame format has changed. Apparently AAPCS doesn't specify
at all what a stack frame looks like. We end up with much simpler
code, but also with a lot less information in the trace.
ok kettenis@
|
|
Tested by jsg@, ok patrick@
|
|
especially makes it easier to diff against our other linker scripts.
ok jsg@
|
|
get an alignment fault while copying the data. Turns out that since we
have .rodata in the text segment, it's very easily possible that etext
remains unaligned. Work around this by word-aligning etext. The next
step is to split .rodata out of the text segment.
ok deraadt@
|
|
and tail and cat(1) it together. It was maybe needed when ports needed
different contents, but now it's just a headache.
ok deraadt@
|
|
ok kettenis@
|
|
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@
|