summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-10-06turn off vmm(4) debug modeMike Larkin
2016-10-06add a debug function that was useful in finding the previousMike Larkin
broadwell/skylake bug.
2016-10-06Remove reference to non existing font.Frederic Cambus
Include file with font data (courier11x18.h) was removed from NetBSD due to licensing concerns before wsfont was imported into OpenBSD. Cookie values have been renumbered for consistency.
2016-10-06Fix the condition used to decide whether to automatically start theAlexandre Ratchov
device, and factor it into a single function. Without this fix, if the device is open in full-duplex mode, it could start with empty play buffer.
2016-10-06In pledge_namei_wlpath() if resolvpath() errors out early it will notJonathan Gray
set variables that will be later used as the size argument to free(NULL calls. This should be harmless as free returns early if the address is NULL without checking the size. Initialise these variables before the call to ensure they are never passed to another function uninitialised. ok tedu@ millert@ deraadt@
2016-10-05Make imxdog(4) set cpuresetfn, and remove all the imx platform that is noMark Kettenis
longer needed, including the imx board IDs. ok patrick@, jsg@
2016-10-05Hide wpi(4) fatal firmware error details inside #ifdef WPI_DEBUG.Stefan Sperling
ok sthen tb deraadt
2016-10-05Set the USE_RTS flag in the right place. Error introduced in if_iwm.c r1.139.Stefan Sperling
2016-10-05Make the sgi boot blocks read the real OpenBSD disklabel instead ofVisa Hankala
assuming that the 'a' partition starts at the same location as the volume header partition #0. Diff from Miod Vallat
2016-10-05rt_timer_timer() needs a process context because it messes with theMartin Pieuchot
routing table. Found the hardway by Chris Jackman.
2016-10-05Add a missing flush; this appears to fix the broadwell/skylake "failed toMike Larkin
launch with valid vmcs" issue some people have been seeing when launching vmm(4) VMs. tested by reyk@
2016-10-05Some device trees use 64-bit intermediate virtual addresses. ThisPatrick Wildt
means that even though the hardware in the end never leaves the 32-bit address space, some addresses used solely in the device tree can be bigger than 32-bit. As bus_space_map(9) takes addresses of size bus_addr_t, which is 32-bit on ARMv7, we cannot pass those virtual addresses to the parent bus, even though it will be mapped back into a 32-bit address in the end. To work around this, make bus_space_map(9) take a 64-bit address. Since this is implemented as a macro and function pointer we can safely do that without harming any other architecture. ok kettenis@ deraadt@
2016-10-05Introduce a global function pointer to reset the CPU akin to amd64 andPatrick Wildt
i386. As newer ARMs where we use device tree from the get go don't necessarily have a 'platform', this will allow drivers to hook themselves as a way to reset the CPU. ok jsg@ kettenis@ tom@
2016-10-05Display the process's PID with p->p_p->ps_pid, not p->p_pid.Philip Guenther
Use a local variable struct process *pr to simplify expressions ok deraadt@
2016-10-05Display/test/use the process PID, not the thread's TID, in a few places.Philip Guenther
ok mpi@ mikeb@
2016-10-04At acpithinkpad attach time determine the value of the mute, and deferTheo de Raadt
telling the audio subsystem about this later on in boot. (Mute state is maintained by the BIOS over a suspend, hibernate, reboot, etc -- this may be last missing piece of the puzzle we tore our hair out in Brisbane) diagnosis and code by Anton Lindqvist, ok ratchov
2016-10-04Don't use padding for ofp_action_header when building the table propertyRafael Zalamena
response thus respecting what the OpenFlow 1.3.5 spec says. ok reyk@
2016-10-04Let the stack perform DMA synchronization instead of doing it (partially)Martin Pieuchot
in HC drivers. Only ehci(4) was performing pre & post synchronization completly. Now pre-synchronization is done in usbd_transfer() and post-synchronization in usbd_transfer_complete(). This will allow us to remove the partial synchronization primitives from the pipe handlers. This is similar to what FreeBSD did in r158998, r164519 and r176203. From Marius Strobl. ok kettenis@
2016-10-04Correct the flag checks inside rt_ifa_addlocal(9) and rt_ifa_dellocal(9).Martin Pieuchot
There's no need to insert an RTF_LOCAL route if it is already there, not if a route with the same destination exist. This fixes a KASSERT() triggered by adding an alias for an address already present in the ARP cache as reported by weerd@ and Peter J. Philipp. This should also fix a KASSERT() triggered by a NDP change reported by Sebastien Marie. ok bluhm@
2016-10-04One more timeout_set_proc(9) conversion.Martin Pieuchot
Found by Chris Jackman, thanks!
2016-10-04Convert timeouts that need a process context to timeout_set_proc(9).Martin Pieuchot
The current reason is that rtalloc_mpath(9) inside ip_output() might end up inserting a RTF_CLONED route and that require a write lock. ok kettenis@, bluhm@
2016-10-04Use "%s" in vm_rpc_send_rpci_tx() call. Avoids a "format string is not aMark Kettenis
string literal" warning from clang. ok jca@
2016-10-04Check the actual pointer returned by km_alloc(9) instead of the array. TheMark Kettenis
latter will always be non-NULL, and therefore the test will always be false. Caught by clang. ok jca@, mikeb@, jsg@
2016-10-04The new thread's userspace v0, a3, and a4 registers are updated inPhilip Guenther
child_return() like on other archs, so cpu_fork() doesn't need to touch them. ok kettenis@ deraadt@
2016-10-03Use detach hook to notify bridge(4) about span port removals.Rafael Zalamena
ok mpi@
2016-10-03Fix some bus_dmamap_sync(9) calls.Martin Pieuchot
Do not fold multiple DMA synchronizations into one when chaining TRBs as the ring might wrap. Add missing "READ" transfer direction from the HC to host when applicable. From Marius Strobl.
2016-10-03Convert some of the remaining usages of time_second to time_uptime.Martin Pieuchot
time_second is unix time so it can be affected by clock changes. time_uptime is monotonic so it isnt affected by clock changes. that in turn means route expiries wont jump with clock changes if set against time_uptime. the expiry is translated into unix time for export to userland though. Should fix mismatch between route timers that were already converted and ND default routers that were still using time_second. Tested by matthieu@ and sthen@ ok sthen@, dlg@
2016-10-03Use detach hook to notify bridge of interface removal instead of addingRafael Zalamena
code to if.c. ok mpi@
2016-10-03avoid holding timeout_mutex while interacting with the scheduler.David Gwynne
as noted by haesbaert, this is necessary to avoid deadlocks because the scheduler can call back into the timeout subsystem while its holding its own locks. this happened in two places. firstly, in softclock() it would take timeout_mutex to find pending work. if that pending work needs a process context, it would queue the work for the thread and call wakeup, which enters the scheduler locks. if another cpu is trying to tsleep (or msleep) with a timeout specified, the sleep code would be holding the sched lock and call timeout_add, which takes timeout_mutex. this is solved by deferring the wakeup to after timeout_mutex is left. this also has the benefit of mitigating the number of wakeups done per softclock tick. secondly, the timeout worker thread takes timeout_mutex and calls msleep when there's no work to do (ie, the queue is empty). msleep will take the sched locks. again, if another cpu does a tsleep with a timeout, you get a deadlock. to solve this im using sleep_setup and sleep_finish to sleep on an empty queue, which is safe to do outside the lock as it is comparisons of the queue head pointers, not derefs of the contents of the queue. as long as the sleeps and wakeups are ordered correctly with the enqueue and dequeue operations under the mutex, this all works. you can think of the queue as a single descriptor ring, and the wakeup as an interrupt. the second deadlock was identified by guenther@ ok tedu@ mpi@
2016-10-03disable PAT and MTRR in guest VMsMike Larkin
2016-10-03Disable sitaracm and add a new ompinmux driver for omap pin muxing/padJonathan Gray
configuration that attaches with the fdt and writes values to registers based on the pinctrl data in the fdt. Handles 16 bit values (OMAP3/OMAP4) and 32 bit values (AM335x/AM57xx). Feedback from and ok kettenis@ tom@ on an earlier version.
2016-10-02Set IFCAP_VLAN_MTU capability in cpsw(4). AvoidsJonathan Gray
"ifconfig: SIOCSETVLAN: No buffer space available" when creating vlan interfaces without first lowering the mtu. Reported by Steven Chamberlain, diagnosed by mikeb@, patch from Brad. ok bmercer@
2016-10-02Add va_nlink information to struct kinfo_file (so bump the shlib minor)Philip Guenther
from Sebastien Marie
2016-10-02The userspace TCB_GET() shouldn't take an argumentPhilip Guenther
ok deraadt@ tom@ patrick@
2016-10-02Some HABs reset parts of AHCI_PREG_CMD when AHCI_PREG_SCTL_DET_INITPatrick Wildt
gets set. Therefore, ahci_port_softreset() restores the sate of the former register once the device detection sequence is finished. The device detection code in ahci_pmp_port_portreset() does not restore AHCI_PREG_CMD afterwards, so let it catch up. Apparently, this part was an oversight as ahci_pmp_port_portreset() did not otherwise use "cmd". From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Some HBAs report NCQ capability despite only supporting one commandPatrick Wildt
slot. Thus, extend the check whether NCQ actually should be enabled accordingly. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Given that ahci_port_alloc() grabs one CCB for use during NCQ errorPatrick Wildt
recovery from the CCB pool sized based on the NCS capability, i. e. number of command slots reported by the controller, it is necessary to pretend at least 2 slots in sc->sc_ncmds for devices without NCQ support. That way, also at least 1 available slot is made available for atascsi(4). Otherwise, controllers having only a single command slot will trigger "no free xfers on a new port" in atascsi(4). Note that pretending 2 command slots is also fine with the abuse of the NCQ error recovery CCB in ahci_port_softreset(). From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Contrary to e. g. the xHCI specification, the AHCI rev. 1.3 specPatrick Wildt
does not say anything about which type (snoopable/uncached etc.) of bus transactions are issued by HBAs on accesses to the descriptors. Thus, the right assumption would be "classical" concurrent accesses by both CPU/driver as well as hardware to the descriptors and their DMA memory backings respectively, which is also confirmed by actual testing. Consequently, switch to BUS_DMA_COHERENT mappings for said DMA memory as otherwise corruption of descriptors is seen. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02add integer and float encoding macrosJasper Lievisse Adriaanse
ok mpi@
2016-10-02Save and restore the (non-standard) USBMODE register around a reset of theMark Kettenis
controller. This register controls whether the controller is in device or host mode on many dual role controllers and gets reset during a reset of the controller, placing the controller in (non-functional) idle mode. By saving and restoring it, we keep the controller in host mode. Since this is a non-standard register, add a new EHCIF_USBMODE flag and only do the save and restore if it has been set. Makes the upper "OTG" port of the Cubox-i work. ok mpi@, jsg@
2016-09-30sync ofp.h from switchd, add missing commentsReyk Floeter
2016-09-30Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboardMark Kettenis
encodings. ok deraadt@, jca@
2016-09-30Drop a now unneeded variable initialization; spotted by bluhm@Jeremie Courreges-Anglas
2016-09-30Make read(2) return EISDIR on directories.Jeremie Courreges-Anglas
Years ago Theo made read(2) return 0 on directories, instead of dumping the directory content. Another behavior is allowed as an extension by POSIX, returning an EISDIR error, as used on a few other systems. This behavior is deemed more useful as it helps spotting errors. This implies that it might break some setups. Ports bulk builds by ajacoutot@ and naddy@, ok millert@ bluhm@ naddy@ deraadt@
2016-09-30Accept a packet smaller than ETHERMIN.YASUOKA Masahiko
ok reyk
2016-09-30Compute CR3 target count. Needed for upcoming debugging diff.Mike Larkin
2016-09-30Revert sending router solicitations when a prefix expires and go backFlorian Obser
to previous behaviour of starting quick, exponentially backing off and settling on every 60 seconds. sthen@ noticed that this broke the backing off when we don't receive an advertisment and so we would hammer the network every second which is particularly bad on wifi networks. OK sthen@
2016-09-29typo: send ofp messages instead of massages.Reyk Floeter
2016-09-29Make set-field action about tunneling work with bridge_tunneltag.YASUOKA Masahiko
input goda, ok reyk goda
2016-09-29Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoidReyk Floeter
confusion about the tunnel endpoints when responding to the peer. OK yasuoka@