summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-12-08_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386, macppc, mips64, and sparc64 code. ok deraadt@ jca@ krw@
2022-12-08Forcibly set console output to the framebuffer on the Lenovo x13s.Patrick Wildt
We should actually do something like checking that both stdout-path and serial0 don't exist to realize we have to switch, but this hack gets us going for now. ok kettenis@
2022-12-07_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in powerpc64 code. ok gkoehler@
2022-12-07The ACPI tables on the Lenovo x13s are incomplete and unusable. ForPatrick Wildt
that reason, identify that we're running on that machine by looking at the SMBIOS tables and load alternate device tree binaries from disk. ok kettenis@
2022-12-07Document 'uidinfo' structure locks.Vitaliy Makkoveev
Inputs and ok bluhm@
2022-12-07Add END()s to match ENTRY()s.Philip Guenther
ok deraadt@
2022-12-07Prefer numeric labels over L<digit> labels, as the latter clutterPhilip Guenther
the final kernel symbol table. Add END()s to match ENTRY()s. ok deraadt@
2022-12-07Prefer STRONG_ALIAS() over multiple overlapping _ENTRY/_NENTRYPhilip Guenther
uses, as the latter requires manual handling of _PROF_PROLOGUE. Add END()s to match ENTRY()s. ok deraadt@
2022-12-07Apply changes from commitid FWrfGfO9Ojnsh1mq to libkern.Philip Guenther
From original commit message: To mitigate against spectre attacks, AMD processors without the IBRS feature need an lfence instruction after every near ret. See software techniques for managing speculation on AMD processors revision 9.17.20 mitigation G-5. ok deraadt@
2022-12-07Do not store unused ICMPv6 Option PREFIX_INFORMATIONKlemens Nanni
Dead since 2017 sys/netinet6/nd6_rtr.c r1.163 Remove sending of router solicitations and processing of router advertisements from the kernel. It's handled by slaacd(8) these days. sysctl(2) net.inet6.icmp6.nd6_debug does not warn about it like it does for, e.g., duplicate MTU options, so don't do anything with this option. Remove access macros for other unused options while here. Eventually, union nd_opts should be removed completely. All under _KERNEL. tcpdump(8)/rad(8)/slaacd(8) keep showing/sending/receiving this option when running this diff on both router and client. OK claudio
2022-12-07Fix comment by splitting sentance in two. From kn@Claudio Jeker
2022-12-07If the called of ypconnect(2) is root, the socket should acquire aTheo de Raadt
reserved port to received secure-maps from the ypserver. issue found by niklas, using a simpler diff i proposed ok miod
2022-12-06Add support for additional RTKit endpoint advertised by NVMe firmware thatMark Kettenis
comes with newer macOS releases. ok patrick@
2022-12-06Add missing kernel lock around (*if_ioctl)() call withinVitaliy Makkoveev
in{,6}_addmulti(). Since kernel lock is no more taken while following setsockopt() path, it should be taken in this place. Corresponding in{,6}_delmulti() already acquire kernel lock around (*if_ioctl)(). Problem reported and diff tested by weerd@ ok kn@ bluhm@
2022-12-06_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in m88k code. ok aoyama@
2022-12-06Implement support for shared interrupts.Mark Kettenis
ok patrick@
2022-12-06For write operations, wait until the transaction completes just like weMark Kettenis
do after sending the command for a read operation. Fixes issues with doing multiple operations back-to-back. ok patrick@
2022-12-06i386: switch to clockintrScott Soule Cheloha
In lapic timer mode: - Rip out lapic_delay(). We can't use the lapic timer to delay(9) when it's running in one-shot mode. - Add a randomized statclock(), stathz = hz. - Add profiling support, profhz = stathz * 10. - Wire up lapic_intrclock. In i8254-mode: - i8254's clockintr() does not have a monopoly on hardclock(9). - mc146818's rtcintr() does not have a monopoly on statclock(). - In profiling mode, the statclock() will drift very slightly because (profhz = 1024) does not divide into 1 billion. Need to consider how best to fix this. ACPI suspend/resume tested by mlarkin@ via ESXi. Tons of testing by Scott Bennett on a Pentium 4 machine; APM suspend/resume confirmed to work there, too. Link: https://marc.info/?l=openbsd-tech&m=166776370803446&w=2 ok mlarkin@
2022-12-06sh, landisk: switch to clockintrScott Soule Cheloha
Patch review and testing by miod@. Link: https://marc.info/?l=openbsd-tech&m=166776412003652&w=2 ok mlarkin@, probably ok miod@
2022-12-06m88k, luna88k: switch to clockintrScott Soule Cheloha
- Initialize tick_nsec during cpu_initclocks() We have no control over the interrupt clock on luna88k, so this switch is trivial. Bringup help and testing from aoyama@ and miod@. Link: https://marc.info/?l=openbsd-tech&m=166776371203450&w=2 ok aoyama@ mlarkin@
2022-12-06hppa: switch to clockintrScott Soule Cheloha
- Remove hppa-specific clock interrupt scheduling bits from cpu_info. - Rename cpu_hardclock() to itmr_intr(); it doesn't exclusively run hardclock(9) anymore. - Wire up itmr_intrclock. hppa now has a randomized statclock(), stathz = hz. Patch help, testing, and review from kettenis@ (B2000) and miod@ (C3650). MP testing from guenther@ (dual-core J6700). ok mlarkin@ kettenis@, "Ship it?" guenther@
2022-12-06Print SBI vendor, version and implemented spec versionJeremie Courreges-Anglas
On my Unmatched: SBI: OpenSBI v0.9, SBI Specification Version 0.2 ok mlarkin@
2022-12-06Drop unused WEAK_REFERENCE macroJeremie Courreges-Anglas
Probably coming from FreeBSD. We already have WEAK_ALIAS a few lines above. ok mlarkin@ guenther@
2022-12-05zap a pile of dangling tabsTheo de Raadt
2022-12-05Use evcount_percpu() with mips64 clock and ipi interrupt counters.Visa Hankala
OK jca@ cheloha@
2022-12-05Avoid event counter re-insert in evcount_percpu()Visa Hankala
This fixes evcount_list corruption that happened when evcount_percpu() was called after evcount_init_percpu(). OK jca@ cheloha@ jmatthew@
2022-12-05Add support for the Backlight connector property like we already have forMark Kettenis
inteldrm(4). This makes xbacklight(1) work when using the Xorg modesetting driver. The Xorg amdgpu driver needs a small change for this that should land soon. ok jsg@
2022-12-05Trigger a kevent when we change the backlight. This gives the XorgMark Kettenis
drivers a chance to notice the update of the Backlight connector property when we change it behind its back. ok jsg@
2022-12-05Calculate the bit clock based on number of channels, bytes/sample andMark Kettenis
sample rate instead of relying on the "mclk-fs" property. This property is no longer present in upstream device trees. ok ratchov@
2022-12-04regenJonathan Gray
2022-12-04add Intel DG1, DG2, ATS-M idsJonathan Gray
from linux 6.1 i915_pciids.h, Mesa 22.3 iris_pci_ids.h Intel Iris Xe MAX Graphics Open Source Programmer's Reference Manual Volume 4: Configurations
2022-12-03Use evcount_percpu(9) for clock interruptsJeremie Courreges-Anglas
ok cheloha@
2022-12-03Add ENTRY_NB() and use it for brk.S and sbrk.S on riscv64Jeremie Courreges-Anglas
NB for "No Binding". This gets us rid of clang-13 warnings about a global symbol redefined as weak. Mostly a copy of what guenther@ already implemented on other archs. ok guenther@ tb@
2022-12-03Rework the RTKit code such that we don't spin forever if for some reasonMark Kettenis
we don't get the expected replies from the firmware on the other side. ok patrick@
2022-12-03The device tree bindings for aplcpu(4) changed once more, recycling theMark Kettenis
"apple,cluster-cpufreq" compatible that was used for the first version. Add support for the "new new" binding while retaining support for the "old new" binding. Hopefully nobody is using the "old" binding anymore now that we update the m1n1+u-boot+dtb "boot firmware" automatically on sysupgrade. ok patrick@, tobhe@
2022-12-03Modify vmt to use the buffer allocated in pvbus directly instead ofYASUOKA Masahiko
the buffer in the vmt softc when doing RPC for PVBUSIOC_KV{READ|WRITE} ioctl. ok asou
2022-12-03regenJonathan Gray
2022-12-03add AMD family 19h model 61h (Raphael) idsJonathan Gray
initial diff from Laurence Tratt; ok mlarkin@
2022-12-03drm/i915: fix TLB invalidation for Gen12 video and compute enginesJonathan Gray
From Andrzej Hajda ee2d04f23bbb16208045c3de545c6127aaa1ed0e in linux 5.15.y/5.15.81 04aa64375f48a5d430b5550d9271f8428883e550 in mainline linux
2022-12-02Remove constant basereachable and retrans members from struct nd_ifinfoKlemens Nanni
Both are initalised with compile-time constants and never written to. They are part of the Neighbour Discovery machinery and only surface through the single-user SIOCGIFINFO_IN6: $ ndp -i lo0 basereachable=30s0ms, reachable=39s, retrans=1s0ms These values are read-only since 2017 sys/netinet6/nd6.c r1.217 usr.sbin/ndp/ndp.c r1.85 Remove knob and always do neighbor unreachable detection Inline the macros (to keep meaningful names), shrink the per-interface allocated struct nd_ifinfo to what is actually needed and inline nd6_dad_starttimer()'s constant `msec' argument. Nothing else in base, incl. regress, uses SIOCGIFINFO_IN6 or `ndp -i'. OK bluhm
2022-12-02Remove useless variable, simplify codeKlemens Nanni
Using a local `duplicate' variable to defer the actual checks by a few lines, interleaved with comments (saying the same thing but negated), is harder to follow that neccessary. Fold the logic and merge comments (remove the last obvious one missing a negation) to save 20 LOC. OK bluhm
2022-12-02Unlock in6_ioctl_get() aka. SIOCGIF{DSTADDR,NETMASK,AFLAG,ALIFETIME}_IN6Klemens Nanni
First the right address is picked from the net lock protected if_addrlist. Then all ioctls just copy out the address, nothing requires the kernel lock. SIOCGIFDSTADDR_IN6 checks the net lock protected if_flags, SIOCGIFALIFETIME_IN6 computes lifetimes which only need the address. This removes the last kernel lock from IPv6 read ioctls (multicast being the untouched exception here). Users of these ioctl(2)s are route6d(8), rad(8), slaacd(8), isakmpd(8) and of course ifconfig(8). OK mvs
2022-12-02Drop _C_LABEL() uses in riscv64-specific codeJeremie Courreges-Anglas
_C_LABEL() was useful in the a.out->ELF transition days, way before RISC-V was a thing. Also drop uses of _ASM_LABEL() while here, suggested by guenther@ ok guenther@
2022-12-02regenJonathan Gray
2022-12-02add Intel Optane SSD DC P5800XJonathan Gray
from Andreas Bartelt
2022-12-01_C_LABEL() is no longer useful in the "everything is ELF" world.Philip Guenther
Start eliminating it. ok mpi@ mlarkin@ krw@
2022-11-30Unlock nd6_ioctl(), push kernel lock into in6_ioctl_{get,change_ifaddr}()Klemens Nanni
Neighbour Discovery information is protected by the net lock, as documented in nd6.h struct nd_ifinfo. ndp(8) is the only SIOCGIFINFO_IN6 and SIOCGNBRINFO_IN6 user in base. nd6_lookup(), also used in ICMP6 input and IPv6 forwarding, only needs the net lock. OK mvs
2022-11-30Use shared socket/net lock for IP socketsKlemens Nanni
so{,un}lock_shared() take the shared net lock for PF_INET and PF_INET6 while sticking to the exclusive rwlock elsewhere. getsockopt(2), getsockname(2) and getpeername(2) (all UNLOCK) do not write, so the exclusive net lock is overkill here. OK mvs
2022-11-30regenVitaliy Makkoveev
2022-11-30Unlock getsockopt(2) and setsockopt(2). Unlock them both because atVitaliy Makkoveev
protocol layer they follow the same (*pr_ctloutput)() handlers. At sockets layer we touch only per-socket data, which is solock() protected. At protocol layer, udp(4), unix(4) and key management sockets have no (*pr_ctloutput)() handlers. route_ctloutput() touches only per socket data, which is solock() protected. inet{,6} globals are protected by netlock, which is solock() backend for corresponding sockets. ok bluhm@