summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-10-25rwindow32 is gone and won't be coming back. ok miod@Philip Guenther
2022-10-24uvm_unmap_remove() traverses the entries in the start,end range scanningTheo de Raadt
for IMMUTABLE, before traversing for unmap. I didn't copy enough traversal code for the scan, and thus MAP_FIXED was subtly broken. test help from tb, ok kettenis miod
2022-10-24regenJonathan Gray
2022-10-24add AMD Mendocino/Radeon 610M graphics idJonathan Gray
family 17h model A0h, Ryzen and Athlon 7020 Series: Ryzen 5 7520U Ryzen 3 7320U Athlon Gold 7220U Athlon Silver 7120U gfx1037/GC 10.3.7/DCN 3.1.6 ?
2022-10-24regenJonathan Gray
2022-10-24include "600 Series" in 600 Series stringsJonathan Gray
missed in rev 1.1980
2022-10-24enable snooping on Intel 700 SeriesJonathan Gray
2022-10-24match on Intel 700 SeriesJonathan Gray
2022-10-24regenJonathan Gray
2022-10-24add Intel 700 Series PCH idsJonathan Gray
from: Intel 700 Series Chipset Family Platform Controller Hub Datasheet, Volume 1 of 2. Doc. No.: 743835
2022-10-24match AMD family 17h model 90h CCPJonathan Gray
tested by and ok bentley@
2022-10-24regenJonathan Gray
2022-10-24add AMD family 17h model 90h (Van Gogh) idsJonathan Gray
based on bentley's Steam Deck dmesg; can't find any documentation ok bentley@
2022-10-24Fix comment; sconds -> secondsMarcus Glocker
2022-10-24tsc: AMD Family 17h, 19h: compute frequency from Core::X86::Msr:PStateDefScott Soule Cheloha
Compute the TSC frequency on AMD family 17h and 19h CPUs using the PStateDef MSRs. Link 1: https://marc.info/?l=openbsd-tech&m=166394236029484&w=2 Link 2: https://marc.info/?l=openbsd-tech&m=166446065916283&w=2 Test list: https://marc.info/?l=openbsd-tech&m=166646389821326&w=2 Reviewed by kettenis@ using the AMD documents cited in the comments. Maybe reviewed by mlarkin@? I can't remember. He seemed supportive of the idea at least. ok kettenis@
2022-10-23Fix a misleading commentPhilip Guenther
ok miod@ kettenis@
2022-10-23Make sure driver is attached before allocating a channel. Fixes a crash onTobias Heider
M2 Macbook Air with a newer device tree where aplaudio tries to allocate a channel after apldma_attach() failed. ok kettenis@
2022-10-23bzero(disklabel) or memset(disklabel,0) should be enough forKenneth R Westerback
anyone. No need to also set d_flags to 0.
2022-10-23Initial apm/sensor driver for the PiJuice HAT UPS, to feedback batteryMarcus Glocker
status information. ok deraadt@
2022-10-23bzero(disklabel) or memset(disklabel,0) should be enough forKenneth R Westerback
anyone. No need to also set d_flags to 0.
2022-10-23Bump tsleep timeout. For some reason the first attempt to load the firmwareMark Kettenis
sometimes fails. This happens more often on M2 laptops that also need to load the touchpad firmware. Smells like we have some sort of thundering herd at mountroot time which makes this take more time. ok patrick@
2022-10-23Constify send/receive command tablesKlemens Nanni
Both only used for printf calls. OK gkoehler
2022-10-23Drop RCS ids in upstream zlib sourceTheo Buehler
We're not maintaining a this as a fork, it's upstream source with a handful of patches. Thus, the RCS ids aren't particularly useful or important. They are a bit of a maintenance burden and generate noise in diffs. ok kn, no objection millert, "kill" guess who
2022-10-23Connect macppc's power button and lid to the SUSPEND stubsGeorge Koehler
A kernel with option SUSPEND now calls gosleep() if I run zzz(8), press the power button (when machdep.pwraction=2), or close the lid (when machdep.lidaction=1). Because gosleep() is an empty stub, the macppc does not really suspend; it only suspends some devices and immediately resumes. The interrupt from the power button or the lid needs some thread (other than systq) to call sleep_state(). Use taskq_create(9) to create another thread. Add a call to device_register_wakeup(). Without this call, sleep_state() does nothing. ok kettenis@ deraadt@
2022-10-23A better workaround for mips64 mimmutable problem. The problem is theTheo de Raadt
DT_DEBUG word is inside a R LOAD that gets marked immutable, but ld.so does a mprotect RW + adjustment + mprotect R. DT_DEBUG is specified as being inside the DYNAMIC range, solet's do all the immutables and then, on mips64 only, turn around and make DYNAMIC mutable. That gives us time to see if we can move DT_DEBUG or change what ld.so is doing. discussed at length with kettenis
2022-10-22Put struct rwindow back in reg.h, pcb.h depends on this.Miod Vallat
2022-10-22automatic immutable for base executable is not ready on mipsTheo de Raadt
because DT_DEBUG isn't in the right place
2022-10-22AltiVec assist for subnormal floats in vectorsGeorge Koehler
The old CPU in a macppc traps AltiVec instructions when they encounter denormal or subnormal floats. Emulate most of them. They operate on vectors of 4 single-precision floats. The emulations either use scalar operations (so vmaddfp becomes 4 of fmadds) or a formula (like vrsqrtefp's 1 / sqrt(b) = 1 / sqrt(b * 2**126) * 2**63). I am forgetting to emulate some instructions (at least vrfin, vrfiz, vrfip, vrfim). If I don't emulate it, it will still cause SIGFPE. Mac OS never emulated these instructions, but set AltiVec's "non-Java" NJ bit (which changes all subnormal floats to zero). FreeBSD also sets NJ; NetBSD does SIGFPE; Linux emulates them. The POWER9 running OpenBSD/powerpc64 does them in hardware (without trapping). ok kettenis@ miod@
2022-10-21hw.power, machdep.lidaction, machdep.pwraction for macppcGeorge Koehler
I can now use the power button to power off my macppcs running OpenBSD. The new sysctls machdep.lidaction and machdep.pwraction act like acpibtn(4), but we are missing code to suspend or hibernate a macppc. Small kernels (bsd.rd) continue to ignore the power button. adb(4) sends an environment interrupt when I unplug my PowerBook's AC or close its lid. Rename PMU_INT_WAKEUP to PMU_INT_ENVIRONMENT like other BSDs and Linux. Handle PMU_ENV_LID_CLOSED as a lid sensor and PMU_ENV_AC_POWER by setting sysctl hw.power. Power buttons can either use PMU_ENV_POWER_BUTTON or go through akbd(4); handle both kinds of power buttons in the same way. Other models of macppc, with different power buttons or lids, might not work yet. The lid sensor looks like, $ sysctl hw.sensors hw.sensors.adb0.indicator0=On (lid open) kettenis@ warned against calling prsignal() from interrupt context, and pointed me to task_add(9).
2022-10-21Change len in syncicache(_, len) from int to size_tGeorge Koehler
The powerpc64 part is under #if 0, so this change affects only macppc. Simplify powerpc64's __syncicache (which had size_t len) and copy it to macppc's syncicache (which had int len). macppc was looping while ((l -= CACHELINESIZE) > 0). The loop would be infinite if l became an unsigned type like size_t. It is simpler to set size_t i = 0, do i += by, and loop while (i < len). It helps that dcbst and icbi can add 2 registers, from + i.
2022-10-21uvm_map_immutable() takes start,end, not start,endTheo de Raadt
I juggled my trees incorrectly.
2022-10-21Recent chrome renderers try to change some immutable RW region to R.Theo de Raadt
I really want immutable to not allow such transitions either, because it will help bring code up to the highest standard. For now, allow this for all processes, until we find out the underlying reason.
2022-10-21the debug "name" parameter to uvm_map_immutable() is no longer neededTheo de Raadt
2022-10-21Remove vestigial bits of 32-bit binaries support; drop the `64' suffix inMiod Vallat
struct names when the matching `32' flavour got removed. Joint work with cheloha@, all bugs mine.
2022-10-21constify quirks tableKlemens Nanni
Not that big now, but quirks are likely to grow in the feature and there is no reason to keep them writable. OK and tested by mglocker
2022-10-21sigaltstack() was adapted to work on mimmutable regions (an unfortunateTheo de Raadt
compromise...), but it means the stack can be marked immutable again. ok kettenis
2022-10-21automatically mark immutable certain regions in program&ld.so LOADs.Theo de Raadt
The large commented block in elf_load_psection explains the sitaution. ok kettenis.
2022-10-21constify global identity tablesKlemens Nanni
ah{c,d}_find_pci_device() already return their members as const. OK krw
2022-10-21Grab the non-exclusive net lock to read-only traverse the interface listKlemens Nanni
Destroying lo(4) interfaces checks for other interfaces in the same rdomain(4) first which does not modify anything, so allow other readers. All interface ioctl(2)s currently run with the kernel lock held, so this should not make a real difference... OK mvs
2022-10-20Add the hooks to disable and enable GPIO interrupts. Should fix potentialMark Kettenis
interrupt storms related to level-triggered interrupts. ok mglocker@
2022-10-20Add RK3568 support.Mark Kettenis
ok jmatthew@
2022-10-20Don't attempt to use EFI runtime services on UEFI versions before 2.1.Mark Kettenis
The Dell Precision T1600 has a UEFI 2.0 implementation where calling GetTime() accesses memory that isn't covered by a runtime mapping. And frankly UEFI 2.0 is so ancient that we don't really want to use it anyway. This also adds the check to the arm64 version even though UEFI versions before 2.4 don't have arm64 support. But for now I want to keep amd64 and arm64 code as similar as possible. ok kn@
2022-10-20Constify global product tableKlemens Nanni
Looking for .rodata candidates in /bsd .data symbols, this one popped up: ffffffff82281b70 l O .data 0000000000001688 asmc_prods OK jung
2022-10-20Sync sys libz with baseTheo Buehler
2022-10-20Access to `u_flags' should be serialized by the `vmobjlock'.Martin Pieuchot
This complete previous fix from gnezdo@. The uvm_vnp_sync() still requires some love and isn't addressed by this diff. Document which lock is protecting vnode variables. ok gnezdo@
2022-10-20Remove the single part string for DS1339, since that is only required onMarcus Glocker
sparc64 because OpenFirmware doesn't support the <vendor>,<part> compatible pattern. We don't expect this chip to turn up on sparc64. Suggested and ok kettenis@
2022-10-19Remove unused setfd member from struct audio_hw_ifKlemens Nanni
All consumers now use C99 struct init and none of them sets `.setfd'. OK ratchov miod
2022-10-19Use C99 struct init for struct audio_hw_ifKlemens Nanni
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style. Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64. macppc and alpha build-tested by miod OK ratchov miod
2022-10-19Remove audio(9) setfd() stubKlemens Nanni
necsb(4/luna88k) is the only driver that "implements" it... through EIO. Remove it so setfd can be removed from struct audio_hw_if. Prodded by ratchov OK aoyama
2022-10-19Constify global tables only used in lookups, OK ratchovKlemens Nanni