summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2022-08-03Add aplaudio(4) and aplmca(4). The aplmca(4) driver controls the hardwareMark Kettenis
block that takes data from apldma(4), serializes it and sends it out on the i2s ports. The aplaudio(4) driver ties together aplmca(4) and various codecs to present an audio(4) interface to the system. This is still WIP, but good enough to play back audio on the speaker in the M1 mini. ok patrick@
2022-08-03Clear active state when we attach.Mark Kettenis
ok patrick@
2022-08-03Bug was reported by Chriss Cappucio. It has turned out my earlier changeAlexandr Nedvedicky
to pf_lb.c was not complete. We must add a test to determine number of addresses defined by pool, so we don't treat pool definition 172.16.0.0/16 as a single IP address in pool. If pool is defined as 172.16.0.0/16, then we don't want to fall back to PF_POOL_NONE. Missing this measure in pf_map_addr() may cause pf_get_sport() to enter infinite loop when source ports translation become depleted for the first address found in pool (like 172.16.0.1), because the bug prevents pf_map_addr() to move to next address in pool (like 172.16.0.2). while investigating issue I've also noticed an oddity for small random pools such as 192.168.1.32/28. One would expect the addresses for nat will be randomly picked from range .32 - .47 in this case. however the random selection yield significantly more (like 20%) addresses ending by .32 In order to fix it we make random pool to use arc4random_uniform(~mask + 1) instead of current arc4random(). feedback by claudio@ tested by hrvoje@
2022-08-03recognise IDT 92HD95/92HD95B now sold as TSI 92HD95BJonathan Gray
https://frame.work/blog/solving-for-silicon-shortages
2022-08-03drm/i915/adlp: Fix register corruption after DDI clock enablingJonathan Gray
From Imre Deak 59207e63801fbcd39ca68df6e2ba5ae90f76c0c3 in mainline linux
2022-08-02Correctly detect xmem operations faulting on missing pages on 88110.Miod Vallat
These must be handled as write faults rather than read faults, since xmem performs both a read and a write, and unlike on 88100, we don't have an easy bit to check. This solves libcrypto spinning on its locks on 88110.
2022-08-02Bring back the direct map optimization when PMAP_PREFER isn't defined.Martin Pieuchot
PMAP_PREFER is checked to prevent cache aliasing issues when the physical page is mapped at different virtual addresses. This speeds up file-based mmap faults. ok kettenis@
2022-08-02some ports bootstraps, and go internals, need a bit more time to adaptTheo de Raadt
to the padded syscalls going away.
2022-08-02match on Intel 600 Series LPJonathan Gray
2022-08-02regenJonathan Gray
2022-08-02add more Intel Alder Lake / 600 Series LP idsJonathan Gray
from: 12th Generation Intel Core Processors Datasheet, Volume 1 of 2, Doc. No.: 655258, Rev.: 008 Intel 600 Series Chipset Family On-Package Platform Controller Hub Datasheet, Volume 1 of 2, Doc. No.: 691222, Rev.: 002 and SanDisk SN850 while here
2022-08-01Allocate memory for collection translation tables for hardware that needsMark Kettenis
it. ok patrick@
2022-08-01Fix bogus indent. NFCMiod Vallat
2022-08-01drm/amd/display: Fix wrong format specifier in amdgpu_dm.cJonathan Gray
From Hayden Goodfellow c6e4817ab622f526d6afe9e02c6d85b177b3e846 in linux 5.15.y/5.15.58 655c167edc8c260b6df08bdcfaca8afde0efbeb6 in mainline linux
2022-08-01drm/amdgpu: Off by one in dm_dmub_outbox1_low_irq()Jonathan Gray
From Dan Carpenter ec9ec3bc08b18c5b1b2feafd306ea7c348013898 in linux 5.15.y/5.15.58 a35faec3db0e13aac8ea720bc1a3503081dd5a3d in mainline linux
2022-08-01drm/amd/display: invalid parameter check in dmub_hpd_callbackJonathan Gray
From Jose Exposito f85a6046f7718f11c6ad015a0ba25d897194b1ac in linux 5.15.y/5.15.58 978ffac878fd64039f95798b15b430032d2d89d5 in mainline linux
2022-08-01drm/amd/display: Don't lock connection_mutex for DMUB HPDJonathan Gray
From Nicholas Kazlauskas 760fe32034931a8c97c773edef2f1b7c7346f43a in linux 5.15.y/5.15.58 d82b3266ef88dc10fe0e7031b2bd8ba7eedb7e59 in mainline linux
2022-08-01drm/amd/display: Fix surface optimization regression on CarrizoJonathan Gray
From Nicholas Kazlauskas c2b484d784c8dfc3eb62fd4f9ff11515b6e78e19 in linux 5.15.y/5.15.58 62e5a7e2333a9f5395f6a9db766b7b06c949fe7a in mainline linux
2022-08-01drm/amd/display: Optimize bandwidth on following fast updateJonathan Gray
From Nicholas Kazlauskas 9581511948582a0ed8da03fb91d2ab658087283d in linux 5.15.y/5.15.58 34316c1e561db0b24e341029f04a5a5bead9a7bc in mainline linux
2022-08-01drm/amd/display: Reset DMCUB before HW initJonathan Gray
From Nicholas Kazlauskas b3f16976b9ed7afafa2caf12ef5539fafc34d48d in linux 5.15.y/5.15.58 791255ca9fbe38042cfd55df5deb116dc11fef18 in mainline linux
2022-08-01drm/amd/display: Ignore First MST Sideband Message Return ErrorJonathan Gray
From Fangzhi Zuo c7720f23bb93628f30f16d033eaefbe2540f1b5e in linux 5.15.y/5.15.58 acea108fa067d140bd155161a79b1fcd967f4137 in mainline linux
2022-08-01drm/amdgpu/display: add quirk handling for stutter modeJonathan Gray
From Alex Deucher 8bae037b0fb429466fed1585440f337396d72efa in linux 5.15.y/5.15.58 3ce51649cdf23ab463494df2bd6d1e9529ebdc6a in mainline linux
2022-08-01drm/amd/display: Fork thread to offload work of hpd_rx_irqJonathan Gray
From Wayne Lin e980e1d978e0eb4c0399cff37f175779237db53b in linux 5.15.y/5.15.58 8e794421bc981586d0af4e959ec76d668c793a55 in mainline linux
2022-08-01drm/amd/display: Add option to defer works of hpd_rx_irqJonathan Gray
From Wayne Lin 54740bc4b182c2522c6570c3fb0b96a912982bf3 in linux 5.15.y/5.15.58 410ad92d7fecd30de7456c19e326e272c2153ff2 in mainline linux
2022-08-01drm/amd/display: Support for DMUB HPD interrupt handlingJonathan Gray
From Jude Shih 734d5ce02cb069cccedc993d8f1dc0ea41cfa3dd in linux 5.15.y/5.15.58 e27c41d5b0681c597ac1894f4e02cf626e062250 in mainline linux
2022-08-01syncTheo de Raadt
2022-08-01some ports bootstraps, and go internals, need a bit more time to adaptTheo de Raadt
to the padded syscalls going away.
2022-08-01Introduce and use uvm_pagewait() where PG_WANTED is set.Martin Pieuchot
No change in behavior. ok kn@, semarie@, kettenis@
2022-08-01KNFMark Kettenis
2022-07-31Replace selwakeup() with KNOTE() in audio(4)Visa Hankala
KNOTE() is safe to use at IPL_AUDIO. Remove the now-unnecessary deferring that uses soft interrupts. Remove selwakeup() calls from audio_detach() because klist_invalidate() wakes up any remaining kevent/poll/select waiters. OK mpi@
2022-07-30Now that we have proper .text and .data sections we need to move dt_blob toPatrick Wildt
.data. dt_blob is a basic device tree that is populated from ACPI tables when booting with ACPI instead of DT. Since we're modifying its content we need to put it somewhere writeable. Found and proposed by mlarkin@ ok kettenis@ mlarkin@
2022-07-30Kill virtual address randomization for the EFI runtime. It was a neat ideaMark Kettenis
but it appears to be too fragile and now that we are using a 48-bit VA space for the EFI runtime we no longer need to call SetVirtualAddressMap() to make address fit into our pmap. Unbreaks the x13s. ok mlarkin@, patrick@
2022-07-30Fix build without intagpKlemens Nanni
Pull inteldrm_refcnt out of NINTAGP > 0, otherwise it remains undefined but still used in inteldrm_attachhook(). OK jsg
2022-07-29Give to PE/COFF file proper .text and .data sections, and fill in theMark Kettenis
characteristics field in the COFF header. Makes our bootloader work in the x13s. With help from mlarkin@. ok mlarkin@
2022-07-29Replace the swap extent(9) usage by a blist data structure.Sebastien Marie
It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't really scale with gigabytes of swap. Based on initial work from mpi@ The blist implementation comes from DragonFlyBSD. The diff adds also a ddb(4) 'show swap' command to show the blist and help debugging, and fix some off-by-one in size printed during hibernate. ok mpi@
2022-07-29Allocate if_index before queue initVisa Hankala
Allocate the index of a new network interface early so that the index is available when the interface's queues are set up. This avoids unintended concentration on net_tq(0). Replace the kernel lock with an rwlock to serialize index map updates. The kernel lock is not reliable here because the memory allocation can sleep. Also, correct the "too many interfaces" condition because the valid index range is from 1 to USHRT_MAX. OK bluhm@
2022-07-28In the kernel exist functions to print routes, but they were notAlexander Bluhm
accessible from ddb. Implement "show all routes" to print routing tables, and "show route 0xfffffd807e9b0000" for a single route entry. Note that the rtable id is not part of a route entry, so it makes no sense to print it there. OK deraadt@
2022-07-28Checking the fragment flags of an incoming IP packet does not needAlexander Bluhm
the mutex for the fragment list. Move this code before the critical section. Use ISSET() to make clear which flags are checked. OK mvs@
2022-07-28Zap prototypes for nonexistent nd6_setmtu() and in6_ifdel()Klemens Nanni
Removed in 2015 and 2002, respectively. OK claudio
2022-07-28Zap outdated nd6_free() comment about staticKlemens Nanni
Added in 2002 r1.48 "sync with latest KAME [...]" along the attribute, but nd6_free() became a global void function in 2017 r1.212. Afaik static kernel functions are avoided to aid ddb'ugging and I presume the "significant changes in the kernel" bits of the comment stem from something 20 years ago no longer holding true today. Afterall, this change has been safe for five years. OK claudio
2022-07-28Release PF und NET lock before calling copyin for DIOCXCOMMIT.Moritz Buhl
OK sashan, bluhm
2022-07-28Remove bogus mtw_read_cfg.Kevin Lo
ok hastings@
2022-07-27Postpone calling the EFI SetVirtualAddressMap() interface until efi(4)Mark Kettenis
attaches. This prevents us from having to map the various EFI memory regions early on. These early mappings use 1G blocks. On Apple M1 systems, these blocks may overlap memory that isn't accessable. The CPU may speculatively access this inaccessable memory which will result in SError exceptions. ok deraadt@
2022-07-27Support "empty" phandles in interrups-extended properties. This is neededMark Kettenis
to support the device tree binding for the "apple,admac" controller. ok visa@, patrick@
2022-07-27Partially catch up with device tree bindings in mainline Linux.Mark Kettenis
Initialize the burst size register such that DMA channels that haven't been initialized by Apple's bootloader also work. ok patrick@
2022-07-27Fix reconstructed softraid bootlineKlemens Nanni
With softraid, OBP's boot-file variable aka. bootline may contain the sofraid volume name and kernel file name delimited by a double colon, e.g. "sr0", "sr0a", "sr0:", "sr0a:", "sr0:/bsd" or "sr0a:/bsd". ofwboot parses this string, may fill in optional partition number ("a") and/or optional kernel file name ("/bsd") and always prints the fully qualified string reconstructed from parts as "Booting <bootline>": {0} ok boot my-devalias sr0 [...] Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0 [...] Booting sr0:a/bsd [...] {0} ok boot my-devalias sr0a:/bsd [...] Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0a:/bsd [...] Booting sr0:a/bsd [...] Swap partition and delimiter to fix the reconstructed string, making it suitable for copy/paste: Booting sr0a:/bsd This has not been an issue since the reconstructed string is only printed and not (re)used anywhere. OK kettenis
2022-07-27now that llist is fixed enable more of i915 __notify_execute_cb()Jonathan Gray
this path is called when running the intel xorg driver on broadwell
2022-07-27fix llist_for_each_entry*Jonathan Gray
enabling more of __notify_execute_cb() and running the intel xorg driver on broadwell would fault in __notify_execute_cb() on movq 0x38(%rsi),%r12 offsetof(struct execute_cb, work.node.llist) 0x38 llist_entry(NULL must not return NULL, it needs to wrap around and return NULL minus the offset the iterators stop when the offset added back to the result of llist_entry() is NULL they test that the first node is not NULL or that the next pointer stored in a previous iteration of the loop is not NULL
2022-07-27Enumerate and shift PHY mode bits.James Hastings
ok stsp@, jmatthew@, kevlo@
2022-07-27retire Rise CPU identification codeDaniel Dickman
The Rise mp6 was an x86 compatible CPU that was available for about a year from 1998 to 1999. Only the Kirin core was ever available while the Lynx core did not make it to market. Shortly after this CPU was released, SiS acquired Rise's technology and integrated it into their SiS55x SoC which used a different vendor string. Given how uncommon Rise CPUs are and given that we don't do anything if we detect such a CPU, remove the small amount of code used to identify them. OpenBSD should continue to run on these CPUs, they just won't be recognized as Rise CPUs explicitly. It is suspected that in the current code, a Rise CPU would not show CX8 in the dmesg despite supporting the CMPXCHG8B instruction. The Rise datasheet says that this cpuid feature bit is set to 0 to "circumvent a reported bug in Windows NT". This is only a cosmetic issue though as our kernel does not use CMPXCHG8B and our toolchain assumes it exists (we default to -march=i586). An interesting writeup on this topic is available here: https://www.geoffchappell.com/studies/windows/km/cpu/cx8.htm ok mlarkin@, deraadt@, jsg@