#
d8417bd7 |
| 12-Dec-2023 |
deraadt <deraadt@openbsd.org> |
The sigtramp was calling sigreturn(2), and upon failure exit(2), which doesn't make sense anymore. It is better to just issue an illegal instruction. ok kettenis, with some misgivings about inconsis
The sigtramp was calling sigreturn(2), and upon failure exit(2), which doesn't make sense anymore. It is better to just issue an illegal instruction. ok kettenis, with some misgivings about inconsistant approaches between architectures. In the future we could change sigreturn(2) to never return an exit code, but always just terminate the process. We stopped this system call from being callable ages ago with msyscall(2), and there is no stub for it in libc.. maybe that's the next step to take?
show more ...
|
#
20cef513 |
| 10-Dec-2023 |
deraadt <deraadt@openbsd.org> |
Add a new label "sigcodecall" inside every sigtramp definition, directly in front of the syscall instruction. This is used to calculate the start of the syscall for SYS_sigreturn and pinned system c
Add a new label "sigcodecall" inside every sigtramp definition, directly in front of the syscall instruction. This is used to calculate the start of the syscall for SYS_sigreturn and pinned system calls. ok kettenis
show more ...
|
#
bb00e811 |
| 24-Oct-2023 |
claudio <claudio@openbsd.org> |
Normally context switches happen in mi_switch() but there are 3 cases where a switch happens outside. Cleanup these code paths and make the machine independent.
- when a process forks (fork, tfork,
Normally context switches happen in mi_switch() but there are 3 cases where a switch happens outside. Cleanup these code paths and make the machine independent.
- when a process forks (fork, tfork, kthread), the new proc needs to somehow be scheduled for the first time. This is done by proc_trampoline. Since proc_trampoline is machine dependent assembler code change the MP specific proc_trampoline_mp() to proc_trampoline_mi() and make sure it is now always called. - cpu_hatch: when booting APs the code needs to jump to the first proc running on that CPU. This should be the idle thread for that CPU. - sched_exit: when a proc exits it needs to switch away from itself and then instruct the reaper to clean up the rest. This is done by switching to the idle loop.
Since the last two cases require a context switch to the idle proc factor out the common code to sched_toidle() and use it in those places.
Tested by many on all archs. OK miod@ mpi@ cheloha@
show more ...
|
#
0e6cad35 |
| 21-Aug-2023 |
guenther <guenther@openbsd.org> |
cpu_idle_{enter,leave}() are no-ops in ASM; replace them with no-op macros.
ok gkoehler@
|
#
931ed8ef |
| 22-Mar-2022 |
miod <miod@openbsd.org> |
Make sure kernel longjmp always returns 1 rather than what turns out to be in a register at call-time. with & ok jsg@
|
#
c5fc2d49 |
| 23-Jan-2021 |
kettenis <kettenis@openbsd.org> |
OPAL implements firmware calls that abstract communicating with the BMC over IPMI. Use these calls to add support for impi(4) on PowerNV systems.
ok dlg@
|
#
196daab3 |
| 30-Dec-2020 |
gkoehler <gkoehler@openbsd.org> |
Enter power-saving mode on POWER9 (ISA v3)
When opal(4) attaches, look in the device tree for a psscr value. In cpu_idle_cycle(), use this psscr value and the stop instruction to wait for the next
Enter power-saving mode on POWER9 (ISA v3)
When opal(4) attaches, look in the device tree for a psscr value. In cpu_idle_cycle(), use this psscr value and the stop instruction to wait for the next interrupt. In mp kernels, cpu_unidle() now sends an interrupt. In "sysctl hw.sensors", the power and temperature sensors from opalsens(4) may show lower values.
The cpu may exit stop at the system reset vector after losing user registers. If so, restore some registers. For now, ignore deeper stop states that would lose hypervisor registers.
Our mp kernel uses only the first hardware thread of each core. Take the extra threads from the firmware and stop them forever; this may switch the core from SMT4 to single-thread mode and increase performance.
partly by kettenis@, ok kettenis@
show more ...
|
#
36507d51 |
| 22-Oct-2020 |
mortimer <mortimer@openbsd.org> |
Add retguard to OPAL functions in powerpc64 locore.
ok deraadt@ kettenis@
|
#
37d53b47 |
| 21-Oct-2020 |
mortimer <mortimer@openbsd.org> |
Add retguard macros to powerpc64 locore functions.
ok deraadt@ kettenis@
|
#
1cb5dd39 |
| 10-Oct-2020 |
kettenis <kettenis@openbsd.org> |
Add OPAL_PCI_MAP_PE_DMA_WINDOW.
|
#
55f96d47 |
| 04-Oct-2020 |
kettenis <kettenis@openbsd.org> |
Change kcopy(9) such that it does 64-bit and 32-bit copies whenever possible. This makes sure a kcopy(9) that is a sequence of 64-bit or 32-bit values that are properly aligned is done atomically. T
Change kcopy(9) such that it does 64-bit and 32-bit copies whenever possible. This makes sure a kcopy(9) that is a sequence of 64-bit or 32-bit values that are properly aligned is done atomically. This is needed for kbind(2) as it needs to update PLT/GOT entries atomically when doing lazy binding.
This seems to fix some random SIGSEGV and SIGTRAP when linking stuff with ld.lld.
ok deraadt@
show more ...
|
#
38552676 |
| 25-Sep-2020 |
kettenis <kettenis@openbsd.org> |
Sprinkle some .type statements to help btrace(4) pick function names.
|
#
87c5ae51 |
| 15-Sep-2020 |
kettenis <kettenis@openbsd.org> |
Stop using %r13 as the per-cpu register in the kernel. Since uvm_map_inentry() may sleep we would have to do the same fixup as after calling uvm_fault() there. It is just simpler and safer to just
Stop using %r13 as the per-cpu register in the kernel. Since uvm_map_inentry() may sleep we would have to do the same fixup as after calling uvm_fault() there. It is just simpler and safer to just rely on the pointer in SPRG0.
show more ...
|
#
dc298cac |
| 23-Aug-2020 |
kettenis <kettenis@openbsd.org> |
Add OPAL_SET_XIVE and OPAL_GET_XIVE.
|
#
840bb523 |
| 14-Aug-2020 |
kettenis <kettenis@openbsd.org> |
Fix typo.
Spotted by miod@
|
#
ea057ba5 |
| 21-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Add code to spin up the secondary CPUs.
|
#
12d98fe1 |
| 21-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Add OPAL_START_CPU.
|
#
5c61b451 |
| 10-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Add OPAL_REINIT_CPUS.
|
#
eb0540bf |
| 07-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Add opalsens(4), a driver for sensors provided by the OPAL firmware.
|
#
359d59f6 |
| 05-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Make sure we return ENAMETOOLONG when copying a string into a buffer of zero bytes.
|
#
e8f7dbe3 |
| 01-Jul-2020 |
kettenis <kettenis@openbsd.org> |
Make kcopy(9) copy (32-bit) words when possible such that copyin(9) and copyout(9) of futex variables becomes atomic.
|
#
73a7763b |
| 30-Jun-2020 |
kettenis <kettenis@openbsd.org> |
Use a lone stdcx. instruction to clear possible userland reservations upon context switch.
|
#
fbddd1ec |
| 30-Jun-2020 |
kettenis <kettenis@openbsd.org> |
Flush OPAL console when writing kernel messages. Removes annoying delay before kernel messages show up on the serial console.
|
#
ad0d1d80 |
| 28-Jun-2020 |
kettenis <kettenis@openbsd.org> |
Make the copyin(9) functions handle bad addresses.
|
#
0de853b5 |
| 27-Jun-2020 |
kettenis <kettenis@openbsd.org> |
Support using the FPU and AltiVec registers in userland. The registers are unconditionally saved upon context switch when they are in use.
|