summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-10-13Implement support for MBIs. MBIs are message based interrupts that can beMark Kettenis
used as an alternative implementation for MSIs on hardware that doesn't implement an ITS (or where the ITS is broken such as on the Rochchip RK3566 SoC). Based on an earlier WIP diff from patrick@; I just cleaned it up a bit. ok patrick@
2022-10-12Nuke D_BADSECT and disktab's 'sf'.Kenneth R Westerback
DEC standard 144 bad sector information is no longer a thing. As evidenced by bad144(8) moving to the attic 16 years ago. ok miod@, who points out that badsect(8) is now the nail sticking out.
2022-10-12Extend struct todr_chip_handle with a todr_quality member. This allows usMark Kettenis
to assign a quality to RTC implementation and pick the "best" RTC if a system has multiple RTCs (or multiple interfaces to an RTC). This allows us to prefer a battery-backed I2C RTC over an RTC that is part of the SoC which is only running of the SoC is powered. It also allows us to work around issues with firmware RTC interfaces that may lie to us or even crash the system. This change makes sure the todr_quality member of the struct is always initialized. In most cases the quality will be set to zero; further adjustments of the quality for specific subsystems/architectures will follow. ok cheloha@, patrick@
2022-10-12use correct type with sizeofJonathan Gray
ok miod@ kettenis@
2022-10-12Remove powerpc left-oversKlemens Nanni
There since the powerpc -> macppc move/rename. KERN_AS usage disappeared in commit 5b7db11d478192c5908038bb1345e7d51cc35c8e Author: rahnds <rahnds@openbsd.org> Date: Mon May 5 16:47:15 1997 +0000 only build one version of the libraries. REAL_VIRT usage disappeared in commit 08e027d6bb9ca863bfc44a1aa6957ff3a242e2f4 Author: rahnds <rahnds@openbsd.org> Date: Thu Apr 27 12:36:29 2000 +0000 Fixes to xcoff bootloader to allow it to execute and load kernels for OpenBSD. Make agrees that these are defined but not used: $ make -p | grep -e KERN_AS -e REAL_VIRT KERN_AS = library REAL_VIRT = -v $ make -C ofwboot -p | grep -e KERN_AS -e REAL_VIRT KERN_AS = library REAL_VIRT = -v No object change. Feedback OK miod
2022-10-12Fix -Wreturn-typeKlemens Nanni
OK miod
2022-10-12The sigaltstack() MAP_STACK re-map mechanism is incompatible with immutableTheo de Raadt
regions, so immutable stack isn't viable yet. There are configure programs which create sigstacks upon their own stacks, and there is no simple fix for the sigaltstack mechanism... discovered by sthen and tb
2022-10-11Give checkdisklabel() a new parameter supplying the dev_t of theKenneth R Westerback
device whose disklabel is being checked. Within checkdisklabel() use this information to discover a device name iff (sic) the label is an obsolete version. Use the name to generate a meaningful warning message asking the user to rewrite the disklabel and thus promote it to the current version. Suggested by, feedback from and ok deraadt@
2022-10-11add missing unlock in swapmount()Jonathan Gray
ok tb@ kn@ miod@
2022-10-10Add support for the RK817 PMIC.Mark Kettenis
ok patrick@, mlarkin@
2022-10-10Recalculate checksum of normalised packetBjorn Ketelaars
In 2011, henning@ removed fiddling with the ip checksum of normalised packets in r1.131 of sys/net/pf_norm.c. Rationale was that the checksum is always recalculated in all output paths anyway. In 2016, procter@ reintroduced checksum modification to preserve end-to-end checksums in r1.189 of sys/net/pf_norm.c. Likely soomewhere in that timeslot checksum recalculation of normalised packets was broken. With input from bluhm@. OK sashan@, bluhm@
2022-10-10add references to 10h 12h revision guidesJonathan Gray
2022-10-10revert amdgpu dirty fb helper changes from 5.15.71Jonathan Gray
drm/amdgpu: don't register a dirty callback for non-atomic drm/amdgpu: use dirty framebuffer helper kettenis found that these changes made xpdf slow on x395 (picasso). I can not reproduce this on renoir.
2022-10-09RK3566/RK3568 support.Mark Kettenis
ok mlarkin@, patrick@
2022-10-09RK3566/RK3568 support.Mark Kettenis
ok patrick@
2022-10-09Fix typo in debug messages.Kevin Lo
ok deraadt@
2022-10-08Add PNP ID to make this attach on Qualcomm SoCs.Mark Kettenis
ok mglocker@, patrick@
2022-10-08The stack can also be marked immutable, because we expect no sane programTheo de Raadt
to try to change the permissions of it. We won't know who's trying that until we enable it and see what breaks. A tricky piece relating to setrlimit stack size changing was previously commited. ok kettenis
2022-10-08The signal trampoline and timekeep regions can be marked immutable atTheo de Raadt
execve() time ok kettenis
2022-10-08Since the PF_MUTABLE flag is an OpenBSD-specific flag, rename it toMark Kettenis
PF_OPENBSD_MUTABLE. While there, add the missing PF_MASKOS, which makes it obvious this bit is indeed in the space reserved for OS-specific bits. ok deraadt@
2022-10-08regenMarcus Glocker
2022-10-08Add Wacom One M CTL-672 USB tablet.Marcus Glocker
2022-10-07Nuke GPTDOSACTIVE which specified the wrong bit. It was superseded byKenneth R Westerback
GPTPARTATTR_BOOTABLE which specifies the correct one. Reminded by drahn@
2022-10-07syncTheo de Raadt
2022-10-07Add mimmutable(2) system call which locks the permissions (PROT_*) ofTheo de Raadt
memory mappings so they cannot be changed by a later mmap(), mprotect(), or munmap(), which will error with EPERM instead. ok kettenis
2022-10-07new UVM_ET_IMMUTABLE flag marks a uvm entry as immutable.Theo de Raadt
2022-10-07Add identifiers for the new "mutable bss" section, ".openbsd.mutable" isTheo de Raadt
0x65a3dbe5. Also add PF_MUTABLE as a segment flag for later use.
2022-10-07unstub intel_guc_send_busy_loop() ct_send()Jonathan Gray
2022-10-07add msleep_interruptible()Jonathan Gray
2022-10-07unstub guc_ct_buffer_reset() h2g_has_room()Jonathan Gray
2022-10-07add CIRC_SPACE()Jonathan Gray
2022-10-07unstub guc_mmio_reg_add()Jonathan Gray
2022-10-07add bsearch() from libcJonathan Gray
2022-10-07unstub i915_gem_object_create_shmem_from_data()Jonathan Gray
2022-10-06Build CRC calc/static block decode tables when needed to fix netbootKlemens Nanni
The last libz update broke sparc64's ofwboot.net on at least T4-2 machines running OpenBoot 4.38.16 as bootblocks grew too big for OBP to load: # size ofwboot.net.* 60684 596 2472 63752 f908 ofwboot.net.71 71340 596 2472 74408 122a8 ofwboot.net.snap {0} ok boot net Boot device: /virtual-devices@100/channel-devices@200/network@0 File and args: TFTP: Transfer timed out As suggested by tb, adapt b7dd453d18bbd69c3a22e9c7e44e83163348942a to make OBP load and execute ofwboot.net over TFTP again on at least T4-2 and T5220 where ofwboot off disk keeps loading and both bootblocks boot plain and gzipped kernels before. Overall size is now smaller that 7.1 release: -current 71340 596 2472 74408 122a8 ofwboot.net/obj/ofwboot.net 119580 532 2512 122624 1df00 ofwboot/obj/ofwboot 71140 532 2472 74144 121a0 ofwbootfd/obj/ofwbootfd -current with -DDYNAMIC_CRC_TABLE -DBUILDFIXED 59788 608 15040 75436 126ac ofwboot.net/obj/ofwboot.net 108028 544 15080 123652 1e304 ofwboot/obj/ofwboot 59588 544 15040 75172 125a4 ofwbootfd/obj/ofwbootfd happy kettenis OK tb
2022-10-04On CPUs that support the Data Independent Timing feature, enable this featureMark Kettenis
by default in both the kernel and userland. At this point, this feature has only been seen on Apple's CPU cores, where turning it on has no measurable impact on performance. Turning this feature on should help to mitigate timing side-channel attacks. ok deraadt@, beck@
2022-10-04Repair Apple-specific translation support broken by mistake in 1.88; reportedMiod Vallat
by Leonardo Moreno
2022-10-04Add a few more PSTATE bits.Mark Kettenis
ok deraadt@
2022-10-03dapmic(4): support clean shutdown with the power buttonJeremie Courreges-Anglas
Register an interrupt handler and look for nONKEY events. Mask off all other events. Also clear the FAULT_LOG register at startup, but don't attempt to acknowledge its contents at runtime. This lets the user force a shutdown with a long power button press. Some events in EVENT_* or FAULT_LOG may benefit from more graceful handling. This makes it possible to cleanly shutdown my Hifive Unmatched using the power button. Thanks to kettenis@ who wrote sfgpio(4) to handle dapmic(4) interrupts on the Unmatched. ok kettenis@
2022-10-03Reorganize the EFI code a bit. Move the efi.h header from dev/acpi toMark Kettenis
dev/efi and rename the arm64 efi.c to efi_machdep.c, preparing the way for MI EFI code and an amd64 implementation of EFI runtime support. ok deraadt@, mlarkin@
2022-10-03System calls should not fail due to temporary memory shortage inAlexander Bluhm
malloc(9) or pool_get(9). Pass down a wait flag to pru_attach(). During syscall socket(2) it is ok to wait, this logic was missing for internet pcb. Pfkey and route sockets were already waiting. sonewconn() must not wait when called during TCP 3-way handshake. This logic has been preserved. Unix domain stream socket connect(2) can wait until the other side has created the socket to accept. OK mvs@
2022-10-03Add a second membar producer into counters_zero(). Now it isAlexander Bluhm
symmetric to counters_read(). OK jmatthew@
2022-10-03drm/amdgpu: don't register a dirty callback for non-atomicJonathan Gray
From Alex Deucher 21b0301f2234112fbe5cfc1e13968f0a12f0f2d2 in linux 5.15.y/5.15.71 abbc7a3dafb91b9d4ec56b70ec9a7520f8e13334 in mainline linux
2022-10-03drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline for stack usageJonathan Gray
From Nathan Chancellor 1c26968caf181add92bbf556e3eb3c14ccbe7fa2 in linux 5.15.y/5.15.71 41012d715d5d7b9751ae84b8fb255e404ac9c5d0 in mainline linux
2022-10-03drm/amd/display: Reduce number of arguments of dml31's CalculateFlipSchedule()Jonathan Gray
From Nathan Chancellor 492db4ffcff3c3bac1f36bbb100e45c9fe718e34 in linux 5.15.y/5.15.71 21485d3da659b66c37d99071623af83ee1c6733d in mainline linux
2022-10-03drm/amd/display: Reduce number of arguments of dml31's ↵Jonathan Gray
CalculateWatermarksAndDRAMSpeedChangeSupport() From Nathan Chancellor 9539cfc744933198318eb061ffce87964559ff87 in linux 5.15.y/5.15.71 37934d4118e22bceb80141804391975078f31734 in mainline linux
2022-10-03drm/amd/display: Limit user regamma to a valid valueJonathan Gray
From Yao Wang1 a541c011181823494c53b15020fae5c3b45f5ec2 in linux 5.15.y/5.15.71 3601d620f22e37740cf73f8278eabf9f2aa19eb7 in mainline linux
2022-10-03drm/amdgpu: use dirty framebuffer helperJonathan Gray
From Hamza Mahfooz 33b128f790b6df7e44e4435c6b9387b257637d15 in linux 5.15.y/5.15.71 66f99628eb24409cb8feb5061f78283c8b65f820 in mainline linux
2022-10-03drm/amd/pm: disable BACO entry/exit completely on several sienna cichlid cardsJonathan Gray
From Guchun Chen f76d6f309a685d24a32703b4d5c5a71e76f4b793 in linux 5.15.y/5.15.71 7c6fb61a400bf3218c6504cb2d48858f98822c9d in mainline linux
2022-10-03drm/amd/amdgpu: fixing read wrong pf2vf data in SRIOVJonathan Gray
From Jingwen Chen 5f270b61ee8b01ab410e3e6ee4f4cc0b32300605 in linux 5.15.y/5.15.71 9a458402fb69bda886aa6cbe067311b6e3d9c52a in mainline linux