summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2024-11-05Rename ci_intrdepth to ci_idepth in preparation for MI use of it; I mistakenlyMiod Vallat
picked the old name when introducing this field. Reminded by mpi@
2024-11-05Enable ixv(4)YASUOKA Masahiko
ok jan
2024-11-04remove ability to specify root/dump/swap on st(4)Jonathan Gray
support for tape block devices was removed in 2016 ok miod@
2024-11-04correct non-rd major numbers; ok miod@Jonathan Gray
2024-11-04No need to duplicate the scsi_xfer timeout field in spc_acb.Miod Vallat
Tested by & ok aoyama@
2024-11-04Implement support for the new CHLS key that is used to control the batteryMark Kettenis
charge level in newer SMC firmware. ok tobhe@
2024-11-02Move edid_print() behind defined(EDID_DEBUG).Miod Vallat
2024-11-02use correct array index when setting frequencyJonathan Gray
ok miod@
2024-11-02Remove #if !defined(ASSEMBLER) guards, this file is not used by boot blocksMiod Vallat
assembly files (which are compiled with this define).
2024-11-02Kill unused pmap_collect().Martin Pieuchot
ok miod@
2024-11-02Add ixv(4), a driver for virtual functions of Intel 82598EB, 82559,YASUOKA Masahiko
and X540. The driver was originally written by Intel and released as ixv driver version 1.5.32 and ported to OpenBSD by Yuichiro NAITO, naito.yuichiro at gmail.com. tested by henson at acm.org and many others. ok jmatthew
2024-11-01In macppc ofwboot, sync instruction cache before entering kernelGeorge Koehler
My PowerBook G4 had some old code in its instruction cache when it jumped into OpenBSD's kernel. If I got unlucky with a reordered kernel, it would trip over the old code, trap into ddb, and fail to boot. The same kernel would boot fine on a different macppc with different firmware. This problem is rare; I got unlucky only twice, on 2022-04-26 and 2024-07-01. This fix tells ofwboot to invalidate the instruction cache for the loaded kernel before jumping there. Adapted from NetBSD src/sys/arch/macppc/stand/ofwboot/boot.c
2024-11-01Allocate PD for Intel's U-K before transferring mappings to the pae pmap.Martin Pieuchot
Use km_alloc(9) instead of uvm_km_zalloc() for the allocation because the mappings are no longer "lost" when switching over to the pae pmap. Introduce a new function to reduce code duplication involving km_alloc(9). Remove printing some __func__ in panic(9) strings, they are redundant. Tested by sthen@ in a bulk. ok mlarkin@, hshoexer@
2024-10-30directly use dev_t for swdevt[], remove struct swdevtJonathan Gray
ok mpi@ miod@
2024-10-29We should always set the AP power state, so fold the rtkit_set_ap_pwrstate()Mark Kettenis
call into rtkit_boot(). ok patrick@, tobhe@
2024-10-28Set AP power state. Fixes the SMC initialization on (at least) the M1Mark Kettenis
MacBook with the latest system firmware. ok patrick@, jsg@
2024-10-28Improve RK_DEBUG debug code to also print the mailbox messages that we send.Mark Kettenis
ok tobhe@
2024-10-28Unlock KERN_ALLOWKMEM. The `allowkmem' is atomically accessed integer.Vitaliy Makkoveev
Also use atomic_load_int(9) to load `securelevel'. sysctl_securelevel() is mp-safe, but will be under kernel lock until all existing `securelevel' loading became mp-safe too. ok mpi
2024-10-25Rename `ci_intrdepth' to `ci_idepth'.Martin Pieuchot
ok jsg@, miod@
2024-10-24Change macppc's ci_idepth from -1 to 0 when no interruptsGeorge Koehler
Now curcpu()->ci_idepth == 0 would work on macppc as it does on powerpc64 and other archs, by checking that we aren't in an interrupt. This also makes macppc's splassert_check() less different. locore.S checks for the 1st interrupt when it increments ci_idepth. Using -1 for no interrupts had saved an instruction, as "addic." was short for "addi; cmpwi". Using 0, it now does "cmpwi; addi" to compare ci_idepth with 0 before incrementing it. ok mpi@
2024-10-24Stop leaking kernel stack guard pages.Mark Kettenis
ok mpi@, anton@
2024-10-24remove unused T_BITS define; ok miod@Jonathan Gray
2024-10-24Add a ci_intrdepth field to struct cpu_info for sh, and use it to implementMiod Vallat
CLKF_INTR properly.
2024-10-23Remove not-used-in-the-last-20-years-or-so defines.Miod Vallat
2024-10-23Rename `ci_in_intr' to `ci_idepth'.Martin Pieuchot
ok miod@
2024-10-23Rename `ci_intrdepth' to `ci_idepth'.Martin Pieuchot
ok jsg@, aoyama@
2024-10-23Rename `ci_intrdepth' to `ci_idepth'.Martin Pieuchot
ok jsg@, visa@
2024-10-22remove redundant include guard in BUS_SPACE_DEBUG pathJonathan Gray
incorrectly renamed in rev 1.26 discussed with claudio@
2024-10-22put opening { on same line as struct nameJonathan Gray
ok claudio@
2024-10-22Rename `ci_intrdepth' to `ci_idepth'.Martin Pieuchot
ok gkoehler@, jsg@
2024-10-22remove prototypes with no matching functionJonathan Gray
2024-10-22correct name of define for ISS data abort S1PTW bitJonathan Gray
2024-10-21define _MACHINE_ARCH not _MACHINE_ARCJonathan Gray
2024-10-21remove unneeded includesJonathan Gray
2024-10-21We have not been swapping out kernel stacks since forever. So justMark Kettenis
allocate the uarea with zeroed pages using km_alloc(9). Adjust the amd64 code that creates a guard page at the top of the kernel stack to use pmap_kremove(9) instead of pmap_remove(9) to reflect that the uarea no longer uses "managed" pages. ok mpi@
2024-10-21remove unneeded includesJonathan Gray
2024-10-21remove unused MP_PICMODE defineJonathan Gray
2024-10-20add comma to fix offsets of trap type stringsJonathan Gray
ok miod@
2024-10-17use <machine/asm.h> not "machine/asm.h", for consistencyJonathan Gray
2024-10-17remove unneeded includesJonathan Gray
2024-10-16a.out is no longer the commonly encountered binary file format, the world hasMiod Vallat
moved to ELF. Move the a.out specific defines and macros, but the MID_xxx values, from <sys/exec.h> to <a.out.h>, and update the few userland binaries which really need these defines (i.e. boot-related tools for old architectures) to explicitly include <a.out.h> when needed. "Fine" deraadt@
2024-10-16Deliver SIGTRAP, rather than SIGEMT, when a TADDccTV or TSUBccTV instructionMiod Vallat
traps. Such instructions are deprecated in v9 (64-bit) code and should never occur in real-life code. See v9 manual A.59 and A.60 for details. CVS ----------------------------------------------------------------------
2024-10-16Deliver SIGTRAP, rather than SIGEMT, for trap instructions which are neitherMiod Vallat
debugger breakpoints nor compiler-generated divide by zero reports. SIGEMT is a historical curiosity which makes no sense nowadays except on PDP-11 and VAX hardware. Discussed with imp@ and visa@ long ago.
2024-10-16remove unneeded frame.h and riscvreg.h includesJonathan Gray
2024-10-15remove unneeded pte.h includeJonathan Gray
2024-10-14remove unneeded vmparam.h include from pte.hJonathan Gray
include vmparam.h in process_machdep for USER_SPACE_BITS
2024-10-14Fix build w/o SUSPEND optionJan Klemkow
with tweaks from miod@ ok miod@
2024-10-14remove unneeded device.h includeJonathan Gray
2024-10-14remove unused struct sigstate; ok miod@Jonathan Gray
2024-10-10Remove the gazillion of macros to get fields from curcpu(), and useMiod Vallat
relative addressing from the register holding the value of curcpu() instead. No functional change, but shaves a few bytes of code on MULTIPROCESSOR kernels.