OpenBSD cvs log

created 2024-04-10T22:05:20Z
begin 2024-03-29T00:00:00Z
end 2024-03-30T00:00:00Z
path src/sys
commits 32

date 2024-03-29T02:36:49Z
author jsg
files src/sys/dev/pci/sdhc_pci.c log diff annotate
message Elkhart Lake needs the 0V quirk

fixes accessing eMMC on a machine with Celeron J6413
from and tested by Sven Falempin

date 2024-03-29T06:47:05Z
author deraadt
files src/sys/sys/syscall_mi.h log diff annotate
message Remove the at-syscall-time check for msyscall(2)'s behaviour. msyscall(2)
was a big coding effort to ensure that system calls could only be performed
from static-binary/ld.so/libc.so/sigtramp regions of memory, by caching a
uvm entry with a serial number; new mmap/mprotect calls would increment
the map serial, and the entry would need to be looked up again. So the
cost was O(1) in the usual case, but O(log n) with some locking if a map
change required a new lookup.
In the new world order, such regions are immutable so they cannot be
changed/split by mmap/mprotect; also we know the precise entry locations
of the syscalls due to system call pinning (ELF OPENBSD_SYSCALL and
pinsyscalls(2)), and this is all done as O(1) without any locking.

All the other parts of the subsystem will be ripped out but please
run a kernel with this before I make changes to ld.so..
ok kettenis

date 2024-03-29T06:50:06Z
author miod
files src/sys/kern/kern_sysctl.c log diff annotate
message Remove one global variable duplicating uvmexp.pagesize.
ok guenther@ deraadt@

date 2024-03-29T08:19:40Z
author stsp
files src/sys/dev/ic/dwqe.c log diff annotate
message skip dwqe_tx_proc() processing while the interface is not up

Prevents a crash seen by bluhm@ while running flood ping in parallel
to looping ifconfig dwqe0 down up:
kernel: protection fault trap, code=0
Stopped at m_tag_delete_chain+0x30: movq 0(%rsi),%rax

ok kettenis@ dlg@ patrick@ deraadt@

date 2024-03-29T12:45:13Z
author kettenis
files src/sys/dev/fdt/dwpcie.c log diff annotate
message Fix writing the prefetchable mmio window base/limit.

ok patrick@

date 2024-03-29T21:04:37Z
author miod
files src/sys/arch/sparc64/include/frame.h log diff annotate
message Now that this file is no longer used by any libc C file, get rid of checks
for the _LIBC preprocessor symbol.

Also move the CC64FSZ and BIAS defines earlier in order to only have one
!_LOCORE block.

ok claudio@ kettenis@

date 2024-03-29T21:05:34Z
author miod
files src/sys/arch/sparc64/include/asm.h log diff annotate
message Remove unconditional define of _LOCORE.

This was used to get once-protected-by-_LOCORE defines from
<machine/frame.h>, but is now completely unnecessary and possibly dangerous.

ok claudio@ kettenis@

date 2024-03-29T21:06:14Z
author miod
files src/sys/arch/sparc64/include/autoconf.h log diff annotate
src/sys/arch/sparc64/include/conf.h log diff annotate
src/sys/arch/sparc64/include/cpu.h log diff annotate
src/sys/arch/sparc64/include/idprom.h log diff annotate
src/sys/arch/sparc64/include/pte.h log diff annotate
src/sys/arch/sparc64/include/vmparam.h log diff annotate
src/sys/arch/sparc64/sparc64/clock.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/ofw_machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/pmap.c log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message Remove dead defines, prototypes and data, and duplicate or misleading comments.

ok claudio@ kettenis@

date 2024-03-29T21:07:11Z
author miod
files src/sys/arch/sparc64/fpu/fpu.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_add.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_compare.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_div.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_emu.h log diff annotate
src/sys/arch/sparc64/fpu/fpu_explode.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_extern.h log diff annotate
src/sys/arch/sparc64/fpu/fpu_implode.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_mul.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_sqrt.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_subr.c log diff annotate
message De-register fpu completion code.

There are pending changes to some of these files, and this would get in the
way.

ok claudio@ kettenis@

date 2024-03-29T21:08:10Z
author miod
files src/sys/arch/sparc64/fpu/fpu.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_add.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_compare.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_div.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_explode.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_implode.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_subr.c log diff annotate
message No longer include <machine/fsr.h> from <machine/reg.h>, and have the few
users which need both explicitly include both.

ok claudio@ kettenis@

date 2024-03-29T21:08:11Z
author miod
files src/sys/arch/sparc64/include/reg.h log diff annotate
src/sys/arch/sparc64/sparc64/genassym.cf log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message No longer include <machine/fsr.h> from <machine/reg.h>, and have the few
users which need both explicitly include both.

ok claudio@ kettenis@

date 2024-03-29T21:09:04Z
author miod
files src/sys/arch/sparc64/dev/z8530kbd.c log diff annotate
src/sys/arch/sparc64/dev/zs.c log diff annotate
src/sys/arch/sparc64/include/cpu.h log diff annotate
src/sys/arch/sparc64/sparc64/autoconf.c log diff annotate
src/sys/arch/sparc64/sparc64/intr.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message Remove dead code. Some of it had been dead since the very beginning of the
sparc64 port.

ok claudio@ kettenis@

date 2024-03-29T21:09:49Z
author miod
files src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/ofw_machdep.c log diff annotate
message Comment out unused routines. They might become used in the future, so they
are better not moved to the Attic yet.

ok claudio@ kettenis@

date 2024-03-29T21:11:31Z
author miod
files src/sys/arch/sparc64/conf/files.sparc64 log diff annotate
message Clean-up cache-related definitions and routines.

ok claudio@ kettenis@

date 2024-03-29T21:11:32Z
author miod
files src/sys/arch/sparc64/sparc64/Attic/cache.c log diff annotate
src/sys/arch/sparc64/sparc64/cache.h log diff annotate
src/sys/arch/sparc64/sparc64/cpu.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/pmap.c log diff annotate
message Clean-up cache-related definitions and routines.

ok claudio@ kettenis@

date 2024-03-29T21:12:58Z
author miod
files src/sys/arch/sparc64/sparc64/vm_machdep.c log diff annotate
message Be sure to reset p->p_md.md_fpstate to NULL after freeing it in cpu_exit().
There should hopefully be no further faults on this proc causing an fpu
state to be handled, but better play safe than sorry.

ok claudio@ kettenis@

date 2024-03-29T21:14:31Z
author miod
files src/sys/arch/sparc64/fpu/fpu.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_extern.h log diff annotate
src/sys/arch/sparc64/include/reg.h log diff annotate
src/sys/arch/sparc64/sparc64/emul.c log diff annotate
src/sys/arch/sparc64/sparc64/genassym.cf log diff annotate
src/sys/arch/sparc64/sparc64/process_machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message Clean the fpu trap code:
- since there are no hardware fpu operation queues on real sparc64 hardware,
don't bother declaring the relevant struct and fields.
- when an fpu instruction needs to be emulated, pass it directly to
fpu_cleanup rather than fake its appearance in the fpu queue. While there,
also pass the ready-to-use union sigval computed in trap() in case a
signal needs to be delivered.

ok claudio@ kettenis@

date 2024-03-29T21:14:56Z
author miod
files src/sys/arch/sparc64/sparc64/genassym.cf log diff annotate
message Get rid of unnecessary defines in assym.h.

ok claudio@ kettenis@

date 2024-03-29T21:16:01Z
author miod
files src/sys/arch/sparc64/include/intr.h log diff annotate
src/sys/arch/sparc64/sparc64/intreg.h log diff annotate
message Move C declarations from intreg.h to <machine/intr.h> which includes it.

This makes intreg.h locore-friendly - it only contains the MAXINTNUM define
after that.

ok claudio@ kettenis@

date 2024-03-29T21:16:38Z
author miod
files src/sys/arch/sparc64/include/signal.h log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
message Stop including <machine/signal.h> in locore and remove _LOCORE guards
from this header file.

ok claudio@ kettenis@

date 2024-03-29T21:17:13Z
author miod
files src/sys/arch/sparc64/dev/zs.c log diff annotate
src/sys/arch/sparc64/include/z8530var.h log diff annotate
src/sys/arch/sparc64/sparc64/autoconf.c log diff annotate
src/sys/arch/sparc64/sparc64/conf.c log diff annotate
src/sys/arch/sparc64/sparc64/intr.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/pmap.c log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message Update/fix/remove obsolete or just plainly wrong comments.

ok claudio@ kettenis@

date 2024-03-29T21:18:19Z
author miod
files src/sys/arch/sparc64/dev/pyro.c log diff annotate
src/sys/arch/sparc64/dev/vpci.c log diff annotate
src/sys/arch/sparc64/include/intr.h log diff annotate
src/sys/arch/sparc64/sparc64/clock.c log diff annotate
src/sys/arch/sparc64/sparc64/intr.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
message send_softint() was designed as being able to target a particular cpu, but the
code for this was never written and all uses target the running cpu anyway,
so stop pretending it may do things it won't do and drop that cpu argument.

ok claudio@ kettenis@

date 2024-03-29T21:19:30Z
author miod
files src/sys/arch/sparc64/sparc64/trap.c log diff annotate
message Text faults should not invoke uvm_grow() since the fault address is not on
stack. Remove duplicated "panic if uvm_fault() fails and we are in kernel mode"
blocks.

ok claudio@ kettenis@

date 2024-03-29T21:20:03Z
author miod
files src/sys/arch/sparc64/sparc64/locore.s log diff annotate
message STACKFRAME macro is always invoked on a well-formed 64-bit stack, no need
to check for missing BIAS.

ok claudio@ kettenis@

date 2024-03-29T21:23:17Z
author miod
files src/sys/arch/sparc64/sparc64/locore.s log diff annotate
message Simplify two more places where we don't need to check for unbiased stacks.

ok claudio@ kettenis@

date 2024-03-29T21:25:55Z
author miod
files src/sys/arch/sparc64/sparc64/locore.s log diff annotate
message Check for %otherwin being nonzero earlier in rft_user.

There is one code path using it in %g2 and another using it in %g7.
There is no reason for them to use different registers, and fixing
this allows the check to be performed a bit earlier.

ok claudio@ kettenis@

date 2024-03-29T21:26:38Z
author miod
files src/sys/arch/sparc64/sparc64/clock.c log diff annotate
src/sys/arch/sparc64/sparc64/cpu.c log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/pmap.c log diff annotate
message Remove truly unneeded includes (not included indirectly).

ok claudio@ kettenis@

date 2024-03-29T21:27:53Z
author miod
files src/sys/arch/sparc64/include/cpu.h log diff annotate
src/sys/arch/sparc64/include/proc.h log diff annotate
src/sys/arch/sparc64/sparc64/db_interface.c log diff annotate
src/sys/arch/sparc64/sparc64/genassym.cf log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/pmap.c log diff annotate
src/sys/arch/sparc64/sparc64/vm_machdep.c log diff annotate
message Store the physical address of each pcb in struct mdproc, and use this in
order to speed up window spills, rather than doing an inline pmap_extract
(well, pseg_get).

ok claudio@ kettenis@

date 2024-03-29T21:29:33Z
author miod
files src/sys/arch/sparc64/dev/ebus_mainbus.c log diff annotate
src/sys/arch/sparc64/dev/fhc.c log diff annotate
src/sys/arch/sparc64/dev/psycho.c log diff annotate
src/sys/arch/sparc64/dev/pyro.c log diff annotate
src/sys/arch/sparc64/dev/sbus.c log diff annotate
src/sys/arch/sparc64/dev/schizo.c log diff annotate
src/sys/arch/sparc64/dev/vbus.c log diff annotate
src/sys/arch/sparc64/dev/vpci.c log diff annotate
message Drop the first argument of intr_establish().

Instead, require all callers to put the right value in the ih_pil field, and
have intr_establish() trust them rather than assigning this field again from
its first argument.

ok claudio@ kettenis@

date 2024-03-29T21:29:34Z
author miod
files src/sys/arch/sparc64/include/intr.h log diff annotate
src/sys/arch/sparc64/sparc64/clock.c log diff annotate
src/sys/arch/sparc64/sparc64/intr.c log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
message Drop the first argument of intr_establish().

Instead, require all callers to put the right value in the ih_pil field, and
have intr_establish() trust them rather than assigning this field again from
its first argument.

ok claudio@ kettenis@

date 2024-03-29T22:08:09Z
author kettenis
files src/sys/dev/fdt/dwiic_fdt.c log diff annotate
message Skip calculating timings if we can't determine the frequency of the clock.
This avoids programming the hardware with clearly wrong values. On the
Milk-V Pioneer this means the I2C controller remains functional and
rebooting using the appropriate SBI call still works.

ok miod@

date 2024-03-29T22:11:34Z
author kettenis
files src/sys/arch/riscv64/include/sbi.h log diff annotate
src/sys/arch/riscv64/riscv64/sbi.c log diff annotate
message Use SBI calls to reboot or power down the machine when the firmware
supports them.

ok jca@