summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2024-11-08Move sparc64-specific ofw prototypes out of the MI header.Miod Vallat
2024-11-08Add a work-in-progress version of ice(4), a driver for Intel E810 devices.Stefan Sperling
Ported from FreeBSD. This driver does not pass packets yet, lots of code is still missing. The driver will remain disabled in kernel configs until it is ready. At this stage, code for device initialization should be fairly complete. Some hardware features will require additional firmware packages to be loaded. My plan is to get things working in the basic "safe mode" first, which does not require external firmware. I will continue working on this driver in-tree, with funding from genua. Help is welcome. ok dlg@
2024-11-08psp(4) waits for acknowledgement of wbinvd from other CPU.Alexander Bluhm
If any other CPU has not finished wbinvd, PSP command may fail. To avoid races, call wbinvd_on_all_cpus_acked() which waits for acknowledgement from IPI handler. Provide stub to build non-MP kernels. from hshoexer@; OK mlarkin@
2024-11-08Implement interrupt depth counter for sparc64.Miod Vallat
2024-11-08Correctly compute access type for write faults. This allows write-onlyMiod Vallat
mappings to work.
2024-11-08remove ID register values, cpu.c uses different definesJonathan Gray
2024-11-08remove PCI MMIO defines, matches recent amd64 changeJonathan Gray
2024-11-08remove unused pmap_move()Jonathan Gray
2024-11-08remove unused VM_MAXUSER_ADDRESS32Jonathan Gray
2024-11-08remove unused I386_IPI_NAMES, amd64 X86_IPI_NAMES removed in 2019Jonathan Gray
2024-11-07Expand amd64 wbinvd_on_all_cpus() with acknowledge.Alexander Bluhm
Implement wbinvd_on_all_cpus_acked() similar to pmap_tlb_shootpage(). This ensures, wbinvd has been executed on all cores when the function returns. This is needed to avoid psp(4) races. from hshoexer@; OK mlarkin@
2024-11-07Constify strings in symbol-related ddb interfaces, and make the iteratorMiod Vallat
callback interface a bit simpler. ok beck@ claudio@ mpi@
2024-11-07Remove OF_package_to_path(). This routine used to be needed by the OFWMiod Vallat
devices (ofnet, etc) for the VI board in the before-macppc days which nobody remembers, and has never been needed for anything on macs.
2024-11-07Remove leftover indirections required by pre-armv7 cpu support.Miod Vallat
2024-11-07Remove two unnecessary instructions, at least one being a leftover fromMiod Vallat
debug code added in NetBSD 1.51 not being completely removed in 1.133, and which we have been carried since 1.1 here...
2024-11-07add rcs idsJonathan Gray
2024-11-06Do not store the value of sp in struct clockframe, for nothing has a needMiod Vallat
for it.
2024-11-06Address more outdated comments.Miod Vallat
2024-11-06A long, long, time ago, pending interrupt handlers were stored in arraysMiod Vallat
of up to 8 handlers, one arrays par ipl level. Eventually the interrupt logic was changed to linked lists, but the arrays remained, even when the pending interrupt structures were moved to per-cpu data. Simplify this by only keeping a pointer to the list head, per ipl level; update the computations in locore accordingly, and update the relevant comments to match reality as well. ok kettenis@
2024-11-06Give locore a few more symbolic constants to make the code path constructingMiod Vallat
a struct clockframe rather than a struct trapframe, more visible. No functional change. ok claudio@ kettenis@
2024-11-06Remove a non-applicable comment about 32-bit userland code.Miod Vallat
While there, remove unused defines.
2024-11-06Make edid_parse() take a device name as extra argument so that the fewMiod Vallat
messages it may print are tied to the particular device it concerns.
2024-11-05The `pri' field of struct clockframe has become unused since the removal ofMiod Vallat
the need for CLKF_BASEPRI in OpenBSD 3.2. Rename it to stress the fact that it is no longer used.
2024-11-05The first field of struct cfdriver is a pointer. Put NULL rather than 0 here.Miod Vallat
2024-11-05Fix typo in smbios product string for the HP OmniBook X.Mark Kettenis
Keep entries sorted by vendor. ok miod@, mlarkin@
2024-11-05Apply the changes in sys/lib/libsa/alloc.c 1.13 to the other copies of thatMiod Vallat
file modified to use OpenFirmware routines: ``Make the freelist best fit code a tiny bit smarter to not use a block if half or more would be wasted. Causes more effective re-use of blocks.'' Bump bootloader version in the unlikely case this misbehaves on some machines.
2024-11-05The MI boot code used to have an infinite loop trying to boot the kernel,Miod Vallat
which got limited to at most two tries 26 years ago for the 2.3 release, but the documentation was never updated to match this change. Do it now. Reported by Nir Lichtman on tech@, file forgotten in previous commit
2024-11-05The MI boot code used to have an infinite loop trying to boot the kernel,Miod Vallat
which got limited to at most two tries 26 years ago for the 2.3 release, but the documentation was never updated to match this change. Do it now. Reported by Nir Lichtman on tech@
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