Age | Commit message (Collapse) | Author |
|
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
|
|
this is so drivers can advertise that they can handle 64 dma addresses
to the platform. it may choose to handle dmamaps differently based
on this flag.
tweaks and ok tom@
ok kettenis@
|
|
|
|
they have a different ID from "real" Cortex-A17 cores.
ok phessler@, patrick@
|
|
|
|
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@
|
|
From Markus Hennecke, thanks
|
|
machdep.lidaction=0 # do nothing
machdep.lidaction=1 # suspend
machdep.lidaction=2 # hibernate
lidsuspend is just an alias for lidaction, so if you change one, the
other one will have the same value. The plan is to remove
machdep.lidsuspend eventually when people have upgraded their
/ets/sysctl.conf.
discussed with deraadt, who came up with the new MIB name
no objections mlarkin
ok stsp halex jcs
|
|
Needed for ports/devel/llvm which builds large executables with a .text
section over 32M. Remove the comment about the +/-32M limitation of
branch instructions, which can be lifted using other techniques
(eg cc -mlong-calls) and should not be enforced by the kernel.
ok guenther@ patrick@ jsg@ kettenis@
|
|
leaving out the size, so that
ELFNAME2(exec,makecmds)
becomes
exec_elf_makecmds
instead of
exec_elf{32,64}_makecmds
and then delete the ELFNAME2() and ELFNAMEEND() macros.
Move the prototypes for functions local to exec_elf.c to there from
exec_elf.h.
Simplify the SMALL_KERNEL conditionals around the ELF coredump code.
Change exec_conf.c to use the size-generic names and macros
Remove exec_elf{32,64}.c and just build exec_elf.c; delete the
_KERN_DO_ELF and _KERN_DO_ELF64 #defines.
ok jca@, encouragement from deraadt@ and tom@
|
|
this has been pointed out to me by a couple of people now.
|
|
|
|
ok kettenis@ patrick@
|
|
sense and builds as part of an MP kernel.
ok kettenis@ mpi@
|
|
and remove some xscale definitions.
ok kettenis@
|
|
|
|
ISA and PIO don't really fit in the ARM landscape. Suggested by patrick@
and kettenis@, ok deraadt@
|
|
it happened on a kernel page, we need to consult the kernel pmap
instead of the current proc's pmap. Fixes panic when using tmpfs.
ok kettenis@
|
|
means that even though the hardware in the end never leaves the 32-bit
address space, some addresses used solely in the device tree can be
bigger than 32-bit. As bus_space_map(9) takes addresses of size
bus_addr_t, which is 32-bit on ARMv7, we cannot pass those virtual
addresses to the parent bus, even though it will be mapped back into a
32-bit address in the end. To work around this, make bus_space_map(9)
take a 64-bit address. Since this is implemented as a macro and
function pointer we can safely do that without harming any other
architecture.
ok kettenis@ deraadt@
|
|
ok deraadt@ tom@ patrick@
|
|
ok guenther@
|
|
address of the end of the symbol table. This will make it possible to get
rid of the code in the bootloader that patches up the kernel with the updated
esym value.
ok tom@, patrick@
|
|
Based on a similar diff in bitrig.
No binary change when compiled with gcc.
ok patrick@
|
|
ok guenther@
|
|
on a guess how much memory a typical machine has. If the value is
too high, users may run out of kernel memory. Then we will have
to adjust this again.
OK claudio@ deraadt@
|
|
enable it on CPUs that support it. When enabled, this prevents the kernel
from executing userland code.
ok jsg@, tom@
|
|
xhci(4) on ARM. The only way the load raw operation can get to know
about the coherent flag is via the segments. Store it there when the
memory is initially mapped. Also store the virtual address which we
need to know when we have to flush the caches on a non-coherent mapping.
ok kettenis@
|
|
basically a relic from the past. Using them doesn't make a lot of sense
the way our pmaps work. Support for MMU domains isn't present in
long-descriptor translation table format, so it is clearly on its way out.
Based on a diff from Artituri Alm.
ok patrick@
|
|
prevent the kernel from accidentally executing userland pages that are
writable.
ok jsg@, patrick@
|
|
ok tom@
|
|
BUS_DMA_COHERENT flag was mapped as device memory which does not use the
store buffer. It is now mapped as normal inner and outer non-cacheable
which does.
While we drain the cpu store buffer for this case, on cortex a9 systems we
also need to explicitly drain the PL310 L2's store buffer. With PL310
revisions r3p2 and later this is done automatically after being present in
the store buffer for 256 cycles. On i.MX6 PL310 is rev r3p1 which does
not have this behaviour. This issue is i.MX6 errata ERR055199 and PL310
errata 769419.
This change restores io performance with a usb flash drive attached to
my cubox. Raw reads go from 3 MB/s to 19 MB/s for example.
Based on code written by patrick@ some time ago.
ok kettenis@ patrick@
|
|
effect. This will let us have different settings on armv7 and zaurus and
also unconfuses this developer.
ok tom@, deraadt@
|
|
non-executable.
ok visa@, deraadt@
|
|
L2_S_COHERENT_v7 such that bus_dmamap_sync(9) avoids unnecessary cache
flushes again for DMA'able memory mapped with the BUS_DMA_COHERENT flag.
I broke this in pmap7.c rev 1.35.
ok tom@
|
|
ok visa@
|
|
armv7 pmap.
ok tom@
|
|
Generic xscale support and support for pxa2x0 used by zaurus remains.
|
|
toggling the bit, clearing it when already set. On Cortex-A7 setting the SMP
bit is essential since without it the CPU doesn't actually use its caches.
The SMP bit supposed to be set before turning on the caches and the MMU, so
move the setting of the Auxiliary Control Register before setting the
System Control Register.
ok jsg@
|
|
non Global bit Small page desciptions. iConsistently name the S-bit
Sharable in comments.
|