Commit graph

1639 commits

Author SHA1 Message Date
cinap_lenrek 8962551055 devip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium 2018-04-22 18:50:11 +02:00
cinap_lenrek dbf13129a7 devip: cleanup rudp.c 2018-04-22 18:49:01 +02:00
cinap_lenrek 9860172fce devip: cleanup tcp.c 2018-04-22 18:48:32 +02:00
cinap_lenrek c5c613357e devip: cleanup udp.c 2018-04-22 18:48:08 +02:00
cinap_lenrek 26aca332bb devip: various icmp stuff
no need to rlock ifc in targetttype() as we are called from icmpiput6(),
which the ifc rlocked.

for icmpadvise, the lport, destination *AND* source have to match.

a connection gets a packet when the packets destination matches the source
*OR* the packets source matches the destination.
2018-04-22 18:47:19 +02:00
cinap_lenrek 575398eb9b devip: verify ifcid on routehint check, check Route.ref for free'd routes
v4lookup() and v6lookup() do not acquire the routelock, so it is
possible to hit routes that are on the freelist. to detect these,
we set ref to 0 and check for this case, avoiding overriding the ifc.

re-evaluate routes when the ifcid on the route hint doesnt match.
2018-04-22 18:42:22 +02:00
cinap_lenrek 638b4a1ec1 devip: add "reflect" ctl message, fix memory leaks in icmpv6, fix source address for icmpttlexceeded, cleanup 2018-04-19 01:08:51 +02:00
kremlin 8666ec6b55 add missing ethermii.h dependencies. patch from cinap_lenrek 2018-04-12 17:50:10 -04:00
cinap_lenrek 874701d193 devip: make v4 ifc broadcast and multicast routes specific to address
this allows one to access the same network via multiple interfaces,
the local address then determines which interface is used.
2018-04-11 22:56:25 +02:00
cinap_lenrek 829a451c2b devip: properly initialize the connection ignoreadvice and tos flags 2018-04-10 20:02:03 +02:00
cinap_lenrek c2dd9b1da7 devip: implement source specific routing 2018-04-08 21:15:00 +02:00
cinap_lenrek 547f60b4c5 devip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup
rfc4861 7.2.2:

If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation.

this change adds ndbsendsol() which handles the source address selection
and also handles the arp table locking; avoiding access to the arp entry
after the arp table is unlocked.

cleanups:

- use ipmove() instead of memmove().
- useless extern qualifiers
2018-03-19 01:11:08 +01:00
cinap_lenrek 71f807873b devip: more v6 improvements
ipv4local() and ipv6local() now take remote address argument,
returning the closest local address to the source. this
implements the standartized source address selection rules
instead of just returning the first local v4 or v6 address.

the source address selection was broken for esp, rudp an udp,
blindly assuming ifc->lifc->local being a valid v4 address.
use ipv6local() instead.

the v6 routing code used to lookup source address route to
decide to drop the packet instead of checking the interface
on the destination route.

factor out the route hint from Conv and put it in Routehint
structure. avoiding stack bloat in v4 routing. implement the
same trick for v6 avoiding second route lookup in ipoput6.

fix memory leak in icmpv6 router solicitation handling.

remove old unfinished handling of multiple v6 routers. should
implement source specific routes instead.

avoid duplication, use common convipvers() function.

use isv4() instead of memcmp v4prefix.
2018-03-18 07:50:48 +01:00
cinap_lenrek c96fb5471a devusb: fix format print warnings for ep->ntds and ep->uframes 2018-03-17 21:55:39 +01:00
cinap_lenrek 2c1415277f pc64: fix _intrr(), avoid the linker moving _intrr() arround 2018-03-17 18:25:12 +01:00
cinap_lenrek 108063bc3a pc64: add magic _intrr() symbol for ktrace (thanks mischief) 2018-03-17 17:19:42 +01:00
qwx 199f090b6a devfs: revert commit 4000
induces a kernel panic under normal circumstances
2018-03-17 11:25:27 +02:00
qwx 372d359e28 kernel: let /rc/bin/diskparts attach #k after #S partitions are loaded up 2018-03-17 01:04:31 +02:00
qwx 14cd988a48 devfs: only set configed flag if config was read successfully
this is just to retry reading the configuration at least once after an error
2018-03-17 01:00:51 +02:00
aiju 56405e0919 usbehci: catch interrupt in tsleep 2018-03-07 08:45:06 +00:00
aiju 9226caf2a3 usbehci: add uframes control request to return uframes one at a time 2018-03-06 17:18:48 +00:00
cinap_lenrek 6f70699aec usbehci: fix medium- to low quality highspeed isochronous transfers
everything was broken. strting with hsinit not even chaining
the itd's into a ring. followed by broken buffer pointer pages.
finally, the interrupt handler's read transaction length
calculation was completely bugged, using the *FRAME* index
to access descriptors csw[] fields and not reseting tdi->ndata
thru the loop.

minor stuff:

iso->data needs to be freed with ctlr->dmafree()

put ival in iso->ival so ctl message cannot override the endpoints
pollival and screw up deallocation.
2018-03-05 06:09:31 +01:00
cinap_lenrek 6728a5ec23 devloopback: reassign device letter from #X to #λ to avoid collision with devvmx 2018-02-25 19:06:37 +01:00
cinap_lenrek b2d7992025 kernel: properly handle bad attach specifiers
- only accept decimal for numeric device id's
- exclude negative device id's
- device id's out of range yield Enodev
2018-02-25 17:11:18 +01:00
cinap_lenrek f0a314605f devether: remove (unimplemented) detach, allow device creation on attach
we allow devether to create ethernet cards on attach. this is useull
for virtual cards like the sink driver, so we can create a sink
by simply: bind -a '#l2:sink ea=112233445566' /net

the detach routine was never called, so remove it from the few drivers
that attempted to implement it.
2018-02-25 03:42:38 +01:00
cinap_lenrek 5560efb3db devip: fix crash on negative dev id on attach 2018-02-25 03:32:29 +01:00
cinap_lenrek 05cd5cb200 ns, devproc: quote path and spec arguments for /proc/$pid/ns, namespace(6) does support quoting 2018-02-25 03:24:31 +01:00
cinap_lenrek 729c9c39d9 devether: mux bridges, portable netconsole 2018-02-18 19:56:01 +01:00
cinap_lenrek 120ab04dd2 kernel: fix missing header dependency for ethersink.$O 2018-02-18 02:05:22 +01:00
cinap_lenrek 5d6a11c387 audiohda: add device id for x260's Intel Sunrise Point-LP. (thanks rodri) 2018-02-16 21:04:38 +01:00
cinap_lenrek df6a30f3c0 if ether, then etherif.h 2018-02-12 19:05:01 +01:00
cinap_lenrek 57c53564b3 ethersink: after the experiment, the zeros get dismantled. and then destroyed. 2018-02-12 01:48:20 +01:00
cinap_lenrek 3d0f4da104 ethersink: provide promisc and multicast functions for v6, set out queue limit to 0 on attach, add to pc64 config 2018-02-11 19:51:23 +01:00
cinap_lenrek d6e0e9c402 kernel: move devether and wifi to port/
the only architecture dependence of devether was enabling interrupts,
which is now done at the end of the driver's reset() function now.

the wifi stack and dummy ethersink also go to port/.

do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not
every caller of intrenable() has to be aware of it.
2018-02-11 18:08:03 +01:00
aiju f113e2d6d5 zynq: fix 10BASE-T and 100BASE-TX support 2018-02-10 01:04:05 +00:00
cinap_lenrek 650e5db5a2 usbxhci: fix mistake in completering()
the td index "x" was incremented twice, once in for loop
and in the body expression. so r->rp only got updated
every second completion. this is wrong, but harmless.
2018-02-07 18:13:22 +01:00
cinap_lenrek 83d8a24215 pc64: fix kmap() and invlpg()
flushing tlb once the index wraps arround is not enougth
as in use pte's can be speculatively loaded. so instead
use invlpg() and explicitely invalidate the tlb of the
page mapped.

this fixes wired mount cache corruption for reads approaching
2MB which is the size of the KMAP window.

invlpg() was broken, using wrong operand type.
2018-01-29 08:26:42 +01:00
cinap_lenrek 6a23ef917b kernel: initialize cyclefreq for machno > 0 in guesscpuhz() 2018-01-27 19:58:48 +01:00
cinap_lenrek 950e22be67 ip: make pkt interfaces unbind on close (from inferno) 2018-01-22 21:33:22 +01:00
cinap_lenrek 9840c50a3e gre: don't drop pptp packets when smaller than v4 header 2018-01-20 15:13:11 +01:00
cinap_lenrek ccf72da47d set router R-flag when sendra is active for neighbor advertisement
windows 7 just drops the default router when it tries to
probe for router reachability but gets a neighbor avertisement
from the router with the router bit clear.

so set the R-flag when sendra is active, which implies that
we are a router.
2018-01-16 20:42:01 +01:00
cinap_lenrek 7b5cf8de2d ether79c970: dont disable promisc mode when multicast table is not empty 2018-01-13 11:41:37 +01:00
cinap_lenrek ad36593a99 ether82557: don't turn off promisc mode when mcast table is not empty
the driver doesnt implement multicast filter, but just turns
on promiscuous mode when a multicast address is added. but this
breaks when one actually enables and then disables promiscuous
mode with say, running snoopy.

we have to keep promisc mode active as long as multicast table
is not empty.
2018-01-13 07:16:17 +01:00
cinap_lenrek ba87e58876 wifi: learn target ip address from neighbor advertisements in dmat proxy 2018-01-12 18:28:50 +01:00
cinap_lenrek 2088f8c991 wifi: filter out loopback traffic from myself
broadcast traffic was received back on the wire causing
duplicate address detection to break with dmat proy as
the rewritten broadcasts where observable.

the fix is to just ignore packets from ourselfs received
from the air. devether already handles loopback.
2018-01-12 08:01:15 +01:00
cinap_lenrek acb206859d ether8169: deal with kernel memory exhaution
when kernel memory is exhausted, rtl8169replenish() can fail
to plant more receive descriptors and rtl8169receive() would
run over the receive tail and crash on the nil ctlr->rb[x].

rtl8169receive() is called on "Receive Descriptor Unavailable"
and "Packet Underrun" so we will try to replenish descriptors
in the beginning first in case memory was exhausted and memory
is available again and make sure not to run over the tail.
2018-01-08 00:23:26 +01:00
cinap_lenrek b437065950 stats: show amount of reclaimable pages (add -r flag)
reclaimable pages are user pages that are used for
caches like the image cache, mount cache and swap cache.
2018-01-05 00:52:14 +01:00
cinap_lenrek d3e54ff2d9 pc kernel: fix wrong simd exception mask (fixes go bootstrap) 2018-01-04 04:38:31 +01:00
cinap_lenrek ee89c82dd3 wifi: get rid of custom hextob() routine, use dec16(), avoid copies in parsekey() 2017-12-31 01:49:58 +01:00
cinap_lenrek ce2211b08c usbxhci: add missing pexit() in xhcirecover proc (thanks sam-d) 2017-12-29 06:10:25 +01:00
cinap_lenrek a021f054b0 wifi: revert rate adoption divider, breaks arpunks wifi 2017-12-29 03:41:32 +01:00
cinap_lenrek 8040a878de devtls, devssl: avoid ~0UL comparsion (from drawterm) 2017-12-28 19:13:53 +01:00
cinap_lenrek 80185daba9 devmnt: use u32int for tagmask, simplify alloctag() 2017-12-28 18:25:15 +01:00
cinap_lenrek b9d2a9efd5 wifi: don't implicitely update lastseen timestamp on nodelookup()
in case we continue to send traffic (like ping) with the ap gone,
the sending would keep updating bss->lastseen which prevents the
timeout to happen to switch bss.
2017-12-28 04:34:03 +01:00
cinap_lenrek d13142b3da etheriwl, etherwpi: limit transmit queue buffer bloat to 48k (at 22Mbit ≅ 20ms) 2017-12-28 01:24:38 +01:00
cinap_lenrek ce9cc8a358 wifi: don't assume Wifi.rates[] is sorted, return net data rate for mbps (50% theoretical) 2017-12-28 01:19:14 +01:00
cinap_lenrek 96eb90fba1 devvga: removing #v/vgabios, use /dev/realmodemem instead 2017-12-23 04:26:50 +01:00
cinap_lenrek 50bea0348c kernel: convert textmode cga screen contents to kmesg only once
screeninit() might be called again by devvga when switching
to textmode, so only convert the text framebuffer to kmesg
the first time.
2017-12-23 03:56:12 +01:00
cinap_lenrek 02b6831fa5 kernel: remove Ipifc.mbps, unused. 2017-12-23 02:58:47 +01:00
cinap_lenrek 417bdbb869 ether8169: add Macv45 for RTL8111HN, rename Macv45 -> Macv42 (thanks qeed, sam-d) 2017-12-19 00:03:54 +01:00
cinap_lenrek c1eb4b8d68 devether: dont forward loopback packets on bridges 2017-12-18 20:47:55 +01:00
cinap_lenrek 1f80d31f41 devbridge: disable write blocking on ethernets 2017-12-18 20:44:53 +01:00
cinap_lenrek 3e48a66665 pc, pc64: add devbridge to kernel configuration 2017-12-17 20:33:39 +01:00
cinap_lenrek 520c938f0b devbridge: fix mss clamping
- use protocol constants from ip/ip.h and ip/ipv6.h
- support mss clamping for ipv6
- fix padding bug on 64 bit machines (can't use sizeof(Tcphdr))
2017-12-17 20:30:24 +01:00
cinap_lenrek 15ff38e818 wifi: use protocol constants from ip/ip.h and ip/ipv6.h for dmatproxy() 2017-12-17 17:17:26 +01:00
cinap_lenrek 070a9ef753 wifi: matt damon wifi bridging support 2017-12-16 21:43:47 +01:00
cinap_lenrek 9fd8894fec ether: allow spoofing of source mac address for bridges; used by vmx
to implement layer 2 bridges in userspace, we disable to auto filling
of the source mac address when bridge mode is enabled on the
connection.
2017-12-15 22:22:29 +01:00
cinap_lenrek 35bc3ac573 devether: remove duplicated parseether() implementation (pull from libip) 2017-12-09 22:07:32 +01:00
cinap_lenrek 65566dda8e devvga: properly handle physical screen size and panning
- remove arbitrary limits on screen size, just check with badrect()
- post resize when physgscreenr is changed (actualsize ctl command)
- preserve physgscreenr across softscreen flag toggle
- honor panning flag on resize
- fix nil dereference in panning ctl command when scr->gscreen == nil
- use clipr when drawing vga plan 9 console (vgascreenwin())
2017-12-03 18:54:25 +01:00
cinap_lenrek 4898050282 cga: capture cga console contents on boot, make sure cgapos is in range
to capture bios and bootloader messages, convert the contents
on the screen to kmesg.

on machines without legacy cga, the cga registers read out as
0xFF, resuting in out of bounds cgapos. so set cgapos to 0 in
that case.
2017-11-26 17:11:01 +01:00
cinap_lenrek af20ba6746 devvga: re-render text from kmesg after resize 2017-11-26 04:49:30 +01:00
cinap_lenrek e3736b8887 kernel: make isaconfig() consistent, not inplace tokenizing the conf string 2017-11-19 17:17:04 +01:00
cinap_lenrek 435a9a150e 9pc64: handle special case in fpurestore() for procexec()/procsetup()
when a process does an exec, it calls procsetup() which
unconditionally sets the sets the TS flag and fpstate=FPinit
and fpurestore() should not revert the fpstate.
2017-11-16 23:15:08 +01:00
cinap_lenrek 753f64a877 pc64: fix mistake fpurestore() mistake
cannot just reenable the fpu in FPactive case as we might have
been procsaved() an rescheduled on another cpu. what was i thinking...
thanks qu7uux for reproducing the problem.
2017-11-14 00:16:21 +01:00
cinap_lenrek f4880742fd igfx: allocate backing memory for framebuffer and hw cursor when not done by bios (from qu7uux)
new approach to graphics memory management:

the kernel driver never really cared about the size of stolen memory
directly. that was only to figure out the maximum allocation
to place the hardware cursor image somewhere at the end of the
allocation done by bios.

qu7uux's gm965 bios however wont steal enougth memory for his
native resolution so we have todo it manually.

the userspace igfx driver will figure out how much the bios
allocated by looking at the gtt only. then extend the memory by
creating a "fixed" physical segment.

the kernel driver allocates the memory for the cursor image
from normal kernel memory, and just maps it into the gtt at the
end of the virtual kernel framebuffer aperture.

thanks to qu7uux for the patch.
2017-11-13 00:48:46 +01:00
cinap_lenrek 4f27f6a04f pc64: allow using the FPU in syscall and pagefault handlers
The aim is to take advantage of SSE instructions such as AES-NI
in the kernel by lazily saving and restoring FPU state across
system calls and pagefaults. (everything can can do I/O)

This is accomplished by the functions fpusave() and fpurestore().

fpusave() remembers the current state and disables the FPU if it
was active by setting the TS flag. In case the FPU gets used,
the current state gets saved and a new PFPU.fpslot is allocated
by mathemu().

fpurestore() restores the previous FPU state, reenabling the FPU
if fpusave() disabled it.

In the most common case, when userspace is not using the FPU,
then fpusave()/fpurestore() just toggle the FPpush bit in
up->fpstate.

When the FPU was active, but we do not use the FPU, then nothing
needs to be saved or restored. We just switched the TS flag on
and off agaian.

Note, this is done for the amd64 kernel only.
2017-11-12 22:55:54 +01:00
cinap_lenrek 3ccd53549f pc64: set ts flag before schedinit() 2017-11-08 00:34:08 +01:00
cinap_lenrek 24057fd4f4 kernel: introduce per process FPU struct (PFPU) for more flexible machine specific fpu handling
introducing the PFPU structue which allows the machine specific
code some flexibility on how to handle the FPU process state.

for example, in the pc and pc64 kernel, the FPsave structure is
arround 512 bytes. with avx512, it could grow up to 2K. instead
of embedding that into the Proc strucutre, it is more effective
to allocate it on first use of the fpu, as most processes do not
use simd or floating point in the first place. also, the FPsave
structure has special 16 byte alignment constraint, which further
favours dynamic allocation.

this gets rid of the memmoves in pc/pc64 kernels for the aligment.

there is also devproc, which is now checking if the fpsave area
is actually valid before reading it, avoiding debuggers to see
garbage data.

the Notsave structure is gone now, as it was not used on any
machine.
2017-11-04 20:08:22 +01:00
cinap_lenrek 0e68b7551a kernel: pc/pc, fix comment line 2017-10-30 02:08:05 +01:00
cinap_lenrek 7e619e59e4 devcons: remove obsolete comment 2017-10-30 01:24:18 +01:00
cinap_lenrek 5a93b4fe2d kernel: track more header dependencies in port/portmkfile 2017-10-30 01:23:48 +01:00
cinap_lenrek b815eaca42 devswap: fix mistake 2017-10-29 23:24:42 +01:00
cinap_lenrek f3f9392517 kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryption 2017-10-29 23:09:54 +01:00
cinap_lenrek 93117262c2 devfs: rewrite cryptio()
adjust to new aes_xts routines.

allow optional offset in the 4th argument where the encrypted
sectors start instead of hardcoding the 64K header area for
cryptsetup.

avoid allocating temporary buffer for cryptio() reads, we can
just decrypt in place there.

use sdmalloc() to allocate the temporary buffer for cryptio()
writes so that devsd wont need to allocate and copy in case
it didnt like our alignment.

do not duplicate the error reporting code, just use io()
that is what it is for.

allow 2*256 bit keys in addition to 2*128 bit keys.
2017-10-29 22:01:58 +01:00
cinap_lenrek 87274893d8 pc64: add ether82598 driver to configuration 2017-09-27 14:13:58 +02:00
cinap_lenrek d9b37eff37 ether82598: support for T540-T1, use physical addresses for isaconf port
reading mac doesnt work yet, requires ea= option in isaconf.
2017-09-27 14:13:18 +02:00
cinap_lenrek 797952d065 sdnvme: identify namespace list fails on intel ssd, just assume nsid=[1] 2017-09-27 14:02:13 +02:00
cinap_lenrek 330e7ef39b kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work 2017-09-27 13:59:55 +02:00
cinap_lenrek dad00a77da kernel: get rid of 36 bit Paerange mask in mtrr (supporting machines with more than 64GB of memory) 2017-09-27 13:58:00 +02:00
cinap_lenrek 546046b46b xhci: do bounds checking in capability walking, check if controller vanished on init (thunderbolt unplug) 2017-09-22 12:55:26 +02:00
cinap_lenrek be7f3fb5e4 rename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update documentation
there isnt much of a point in keep maintaining separate
kernel configurations for terminal and cpu kernels as
the role can be switched with service=cpu boot parameter.

to make stuff cosistent, we will just have one "pc" kernel
and one "pc64" kernel configuration now.
2017-09-10 22:35:23 +02:00
BurnZeZ 9af1153451 audiohda: add pci id for nvidia GM204 2017-09-10 02:27:31 +00:00
BurnZeZ 1ab2fed7a4 audiohda: add pci id for Intel 9 Series 2017-09-10 02:21:31 +00:00
cinap_lenrek e6e745e776 audiohda: add pci id for ICH10 (thanks echoline) 2017-09-10 01:37:30 +02:00
aiju bd4513fe87 devvmx: call vmxshutdown from reboot() function manually 2017-09-02 10:43:37 +00:00
cinap_lenrek e44bf536af ether82563: make the ethernet of thinkpad p50 work (thanks sam-d) 2017-08-29 19:38:29 +02:00
cinap_lenrek b41bd1b007 audiohda: Intel Sunrise Point-H support (thanks sam-d) 2017-08-29 19:37:26 +02:00
cinap_lenrek 30ea7ad58a sdnvme: pass 0 instead of 0xffffffff as NSID for identify controller and create completion/submission queue commands (thanks Ori_B)
Samsung SSD 960 EVO fails with invalid namespace error otherwise...
2017-08-29 09:52:53 +02:00
cinap_lenrek c4e51c5678 devdup: remove useless OCEXEC check, handled by namec() 2017-08-28 19:45:49 +02:00
cinap_lenrek 6fa983a5b9 merge 2017-08-28 19:42:19 +02:00
cinap_lenrek c492a8009a devsegment: handle ORCLOSE on segment directory correctly, fix wrong qid, missing COPEN flag for segmentcreate() 2017-08-28 19:40:53 +02:00
aiju e5d3aaf1aa devvmx, vmx: lilu dallas multivm 2017-08-28 17:27:41 +00:00
cinap_lenrek 543ccb37f4 sdiahci: Intel 200 Series Chipset Family PCH support (thanks aiju)
we used to tweak arround in the ICH registers for all intel controllers,
which is wrong, as the 200 series has different magic registes. see
the datasheet:

https://www.intel.com/content/www/us/en/chipsets/200-series-chipset-pch-datasheet-vol-2.html

this caused the clocks to be disabled for the 6th port causing a full
machine lockup touching the 6th port registers.

the next problem was that aiju's bios disabled the unused ports somehow
but didnt clear ther PI bits, so that they would stay in Sbist status even
after a port reset. so the port would get stuck in the Dportreset state
forever. the fix for this was to use a one second timeout for the
port reset procedure.
2017-08-27 21:20:20 +02:00
aiju 9616f61872 devvmx: more efficient data structure for memory map; simplified (more reliable) step function 2017-08-24 07:53:10 +00:00
qwx eeb8007e60 igfx: add did for x220 2017-08-20 13:52:52 +03:00
cinap_lenrek c78d4c4ce7 ether82563: add more pci ids for i210 and i354 from 9atom / openbsd 2017-08-13 15:26:24 +02:00
cinap_lenrek b3d581752b ether82563: support for i211 with iNVM. (thanks mfny and brennan for testing) 2017-08-12 23:36:24 +02:00
cinap_lenrek 6b999263ae kernel: double READSTR buffer size to 8000 bytes for devusb 2017-08-11 01:32:24 +02:00
cinap_lenrek 7dab492324 devusb: superspeed bandwidth allocation handled by controller, skip usbload() calculation
with xhci, bandwidth allocations are handled by the controller
and there are various speed settings possible that currently
not exposed in the Udev. so just keep usbload() as it is for
usb2 and keep ep->load as zero for superspeed.
2017-08-11 01:08:13 +02:00
cinap_lenrek e0474599dd usbxhci: implement recovery from host controller errors 2017-08-07 01:59:54 +02:00
cinap_lenrek bb625cebfc etheriwl: add pci id for Intel Centrino Advanced-N 6200 on x201 tablet (thanks arpunk) 2017-08-03 23:15:58 +02:00
cinap_lenrek 83b87729d9 usbxhci: handle out of memory in controller initialization 2017-08-02 21:17:50 +02:00
cinap_lenrek 1ea109345b usbxhci: abandon multiple requests per endpoint, cleanup
more conservative approach: only one transaction in flight
per endpoint (except iso). also serialize controller commands.
no driver currently uses this and i doubt it is usefull.

create constants for common TRB flags and remove bogus 1<<16
flag on TR_NORMAL.
2017-08-02 20:25:19 +02:00
cinap_lenrek 8ed13fe664 usbxhci: have to serialize and set read pointer for endpoint stop command 2017-08-02 01:45:30 +02:00
cinap_lenrek 5f23d78f06 usbohci, usbehci, usbxhci: save mmio base address in ctlr, cant PADDR() on 386... 2017-07-31 17:36:56 +02:00
cinap_lenrek 48352be825 usbxhci: provide shutdown function to halt the controller 2017-07-31 16:05:58 +02:00
cinap_lenrek 6e65596827 xhci: experimental usb3 support 2017-07-31 03:22:23 +02:00
cinap_lenrek d46099e3af usbehci: fix crash in cancelisoio() for highspeed device due to wrong pollival 2017-07-31 03:07:14 +02:00
cinap_lenrek adfb0e9371 pc, pc64: enable usbxhci in the configuration 2017-07-29 01:15:05 +02:00
cinap_lenrek cd108e2f0b usbxhci: simplify xecp() 2017-07-29 01:12:32 +02:00
cinap_lenrek c74538a67e usbxhci: implement controller handoff, ignore usb3.0 ports, honor pollival for isochronous endpoints 2017-07-29 01:02:23 +02:00
cinap_lenrek aaf6d7c558 usbxhci: basic iso write support (usb soundcard playback) 2017-07-24 23:48:50 +02:00
cinap_lenrek a397bfd48c usb: fix wrong pollival calculation in setmaxpkt() 2017-07-24 23:47:55 +02:00
cinap_lenrek 0b4ace02c4 usbxhci: handle changing maxpkt on control endpoint by reevaluating endpoint context
while endpoints != 0 are opend after the device descriptor has been
parsed and the endpoint properties like maxpkt have been set, the
control endpoint is opend with a guessed maxpkt value. once the first
8 bytes of the descriptor have been read by usbd, maxpkt gets set and
we need to reevaluate the control endpoint 0 context to update the value.
2017-07-22 19:35:32 +02:00
cinap_lenrek f72bcce2c7 usbxhci: use physical register addresses for matcing controllers and printing. simplify endpoint slot initialization. 2017-07-22 16:37:05 +02:00
cinap_lenrek f0217d2c3f usbohci, usbuhci, usbehci: use physical address of registers for matching controllers and printing 2017-07-22 16:35:13 +02:00
cinap_lenrek ffb28698bf kernel: fix bounds check in screenputc() 2017-07-20 21:03:00 +02:00
cinap_lenrek 4fd68773e2 usbxhci: implement command timeouts and aborts, serialize unstall 2017-07-20 19:57:14 +02:00
cinap_lenrek 40dc39bf7d usbxhci: better approach to unstalling endpoint and fixup td ring
instead of guessing where the controllers dequeue pointer went,
stop the endpoint and then explicitely set te dequeue pointer to
the next write td position. that way we do not need to fix the cycle
bit in the td's and dont need to rely on if the controller
advanced the dequeue pointer after a stall or not.

add ctx and slot back pointers to ring.
2017-07-17 21:10:25 +02:00
cinap_lenrek e7e18aac7f pc kernel: mkfile target usbehcipc.$O needs ../port/usb.h, add usbxhci.$O 2017-07-16 22:33:24 +02:00
cinap_lenrek 5e6f1b5769 usbxhci: commit work in progress xhci driver, no config yet 2017-07-16 22:29:29 +02:00
cinap_lenrek f58706f2cf zynq: simplify initcode stack setup (just do it in init0 when the stack is mapped) 2017-06-28 18:57:13 +02:00
cinap_lenrek befdd7d755 kernel: pass bootargs also in multiboot command line, retire the bootline mechanism to pass arguments to /boot/boot 2017-06-28 18:56:16 +02:00
cinap_lenrek 63b8965b42 devvmx: add support for SG_STICKY segments 2017-06-25 22:57:47 +02:00
cinap_lenrek aab4e32ce0 pc, pc64: support for multiboot framebuffer, common bootargs and multiboot code 2017-06-25 22:22:58 +02:00
aiju cabfa4e916 devvmx: add support for extrap command to configure halting on exceptions 2017-06-21 22:19:14 +00:00
aiju 37b9ab5a04 devvmx: error handling in clearmeminfo 2017-06-21 09:59:32 +00:00
aiju 779f6cb3b8 devvmx: remember segment names and free segments properly 2017-06-21 09:16:43 +00:00
cinap_lenrek 2723c9fc77 kernel: add support for sticky segments (cached, preallocated, never paged) 2017-06-20 21:53:45 +02:00
aiju becb89bae5 pc, pc64: adapt devvmx to work on pc64 2017-06-20 15:10:08 +00:00
aiju ed040d676a devvmx: fix CR0/CR4 readout; also don't exit on PAUSE instruction 2017-06-18 22:13:20 +00:00
aiju 2bb65c40ab devvmx: support debug registers; simplify assembly 2017-06-17 22:38:16 +00:00
aiju 74241e31aa devvmx: support pat and efer registers 2017-06-14 17:38:01 +00:00
aiju 8029c3d8c4 pc: add vmx device 2017-06-13 14:15:09 +00:00
aiju 13869bab11 pc/pc64: keep shadow copy of DR7 in Mach and use that to check whether we need to reset DR7 in procsave(); remove superfluous reset of DR7 in mmurelease() 2017-06-13 00:10:36 +00:00
aiju e8082c1d1f remove accidentally committed reference to devvmx 2017-06-12 23:03:40 +00:00
aiju dea6bc51bc pc/pc64: debugexc: ignore exception if in kernel mode and can't get hold of up->debug 2017-06-12 22:58:25 +00:00
aiju 3844090f39 pc/pc64: reset DR7 in mmurelease 2017-06-12 19:46:25 +00:00
aiju cd1f44b5c0 kernel: reset nwatchpt in pexit 2017-06-12 19:19:05 +00:00
aiju 773be02aa1 kernel: add support for hardware watchpoints 2017-06-12 19:03:07 +00:00