summaryrefslogtreecommitdiff
path: root/sys/src/9
AgeCommit message (Collapse)Author
2023-05-22WIP qemu virt platform kernelJaume Delclòs Coll
2023-05-20devip: provide large buffer for ipifc->local() generatorcinap_lenrek
The ipifc->local generator is the big exception, dumping the whole link structure of the interface.
2023-05-19devip: don't leak temporary buffers on errorcinap_lenrek
when reading the status files from a conversation, ipread() allocates a temporary buffer and calls the protocols generator to fill the buffer and the calls readstr() to handle the read request. if the generator or readstr() erors, we must free the temporary buffer. also, allocate a more reasonable size for the "local" and "remote" strings. allocating and zeroing 32K big buffers for them is excessive.
2023-05-19devip: rlock ifc before accessing interface parameters in ipifcstate()cinap_lenrek
2023-05-18libaml: tow eisaid inside the environmentmia soweli
2023-05-16devip: address some ipv6 issues on pkt interfacecinap_lenrek
relax the maclen check as v6 neighbour disicovery might give bigger buffers as the medium uses for the mac address size, as the packet does not contain exact byte count but rounds all the options to multiples of 8. drop neighbour discovery packets coming from interfaces with zero-length maclen. when dialing icmpv6 protocol with link-local address for the local ip address, filter any packets to it that come from a different interface. otherwise ipconfig would see router advertisements from other interfaces. fix the locking for ipifc ctl messages: properly acquire the wlock and check that the interface is still bound for every ctl messages touching the interface. make add6 ipifc ctl message work for media with zero-length maclen by using the interface identier from pre-existing link-local address when available.
2023-05-15devip: maintain packet counters for pktmediumcinap_lenrek
2023-05-13bcm64: move fpon()/fpoff() into l.scinap_lenrek
avoid dynamic code generating syswr() in the hot path...
2023-05-13imx8: move fpon()/fpoff() into l.scinap_lenrek
avoid the dynamic code generating syswr() in the hot path...
2023-05-11zynq: fix plcopy() source pointer incrementcinap_lenrek
2023-05-01usbxhci: add some robustness checkscinap_lenrek
Add some checks in the interrupt handler to ensure that the slot and ring referred to by the event have been initialized. Also add a check in ctlrcmd() just in case we mess up the recovery and someone issues a ctlrcmd() after a failed xhciinit().
2023-05-01usbxhci: fix command ring wrap crashcinap_lenrek
When a ring wraps around, we need to program a wrap around td with the base address. To get the base, we need to call Ctlr.dmaaddr() and we used the slot->ctlr pointer to get to it. But the command ring has no slot associated to it so we would crash as soon as we tried to submit more than 256 controller commands. The solution is to put a ctlr pointer into the Ring structure, which also allows us to simplify resetring() and waittd() as they now can get the controller implicitely thru the ring pointer.
2023-04-24etherwpi: accept pci device id 4222 (thanks oliver simmons)cinap_lenrek
2023-04-24portmkfile: cleanup dependencies for wifi.$O and etheriwl.$Ocinap_lenrek
2023-04-24imx8: provide PCIWINDOW constant, use PCIWADDR() for MSI_TARGET_ADDRcinap_lenrek
2023-04-24sdnvme: remove unused mptr argument to qcmd()cinap_lenrek
2023-04-24imx8: add vpu clocks and irq indices, correct a typo (no functional change)Sigrid Solveig Haflínudóttir
2023-04-19imx8: make etheriwl work on MNT Reform, move it to port/ (thanks cinap); ↵Sigrid Solveig Haflínudóttir
tested with 6205
2023-04-15ip: generalize Rproxy route handling, allowing non point-to-point arp proxycinap_lenrek
Generalize the arp proxy code, so one can create specific routes for ip ranges that we want to arp proxy for, not just for point-to-point interface routes. as we have source specific routes, this also gives some control over which requester we will reply to. one example for this is a vps where we booked another ip address on the ethernet, that we want to route into a vpn tunnel. the new ip is in subnet of the public ethernet interface, so all we now need todo is add a route for that ip into the vpn tunnel and set the proxy flag "y", and we will respond to arp for that ip on the public ethernet interface.
2023-04-08kernel: Clear secrets on rebootcinap_lenrek
The idea is that when we reboot, we zero out memory written by processes that have the private flag set (such as factotum and keyfs), and also clear the secrmem pool, which contains TLS keys and the state of the random number generator. This is so the newly booted kernel or firmware will not find these secret keys in memory.
2023-03-30removing tos from fpimipsadventuresin9
2023-03-30removing tos from fpimipsadventuresin9
2023-03-08mt7688 kerneladventuresin9
2023-03-07sys/src/9/port/sysproc.c: add spim magicadventuresin9
2023-02-22etherbcm: support for newer BCM5717 series cards.james palmer
talk to the right phy for cards with many ports. fix pci ids.
2023-02-17devproc: Fix a double-free reading note file (thanks Josiah Frentsos)cinap_lenrek
Oversight, was using free() instead of freenote(), which handles the refcounting for gorup notes.
2023-02-10reform: put default "console=0" in #eccinap_lenrek
The default configuration for "console=0" should go into CONFADDR when using /dev/reboot.
2023-02-06reform: move SAI iomux/clock initialization into probe()cinap_lenrek
2023-01-29nusb/ether: support for asix ax88179 (thanks Aidan K. Wiggins)cinap_lenrek
Tested with tp-link UE305, works well. From all other sources it seems this should also work for the 88178a, but I didn't have one on hand.
2023-01-15sdmmc: implement boot partition access for emmccinap_lenrek
We expose the boot partitions as separate units, such as sdM0 is the user data partition and sdM1 is the first boot partition and sdM2 is the second boot partition. On access, we automatically switch the BOOT_PARTITOIN_ACCESS bits in the EXT_CSD. Also, the units ctl file contains "boot enabled" or "boot disabled" if that unit is the active or inactive boot partition.
2023-01-15devsd: fix wrong range check for subunit numbercinap_lenrek
2023-01-06devdraw: coding style (from drawterm)cinap_lenrek
2023-01-06> the retunnel logic in the gre code is wrong.cinap_lenrek
> It gets applied to any protocol type that is not pptp > but should only process encapsulated ip4 packets.
2023-01-05devusb: provide usb hub device number instead of address in /dev/usb/ctlcinap_lenrek
The hub address is only usefull for the host controller driver, while userspace really cares about the device number.
2023-01-03devip: actually put igmp in ip sectioncinap_lenrek
2023-01-03devip: add igmp protocol support to all kernelscinap_lenrek
2023-01-01mouse: Make /dev/mousein readable to get mouse status without blockingcinap_lenrek
There is currently no way to get the current mouse position and button states without blocking.
2022-12-30sdmmc: switch argument must be integercinap_lenrek
2022-12-30tcp: only create new translation when SYN packetcinap_lenrek
2022-12-30icmp: only forward EchoRequest, Timestamp(request), InfoRequest and ↵cinap_lenrek
AddrMaskRequest
2022-12-29sdmmc: actually implement mmc supportcinap_lenrek
- pass the correct ocr value for SEND_OP_COND (advertise Hcs and 3.3v) - disambiguate SEND_RELATIVE_ADDRESS/SET_RELATIVE_ADDRESS - detect the MMC version from CSD structure - detect the capacity according to spec for MMC - implement SWITCH command to set highspeed frequency and bus width - rename Ctlr to Card (thats really what we keep track of here)
2022-12-29reform/usdhc: fix debug print, R1b response handled by controllercinap_lenrek
The debug print contidion was wrong and would always result in a debug print, even if the command just timed out. The R1b response seems to be handled internally by the controller, so we do not need to wait for datadone interrupt.
2022-12-27sdmmc: new interface for SDiocinap_lenrek
We want to support the internal emmc device on the reform, which has a different initialization sequence from SDcard. The problem is, all mmc controller drivers where using the command index to derive the command properties. The command index's interpretation depends on the command set. And MMC has different commands then SD. Also, there are the APP_CMD escaped commands which drivers then tried to recover the state... All of this is total nonsense... The controller drivers should not care and the command properties should be maintained by port/sdmmc.c. So we pass the command as a struct SDiocmd, which has all the properties (command index, response type, data transfer mode... and even a string for debugging). The controller just converts this into register values and just executes the commands. Next, the controller drivers shouldnt snoop on the commands and then try to apply bus and frequency switching on their own. This is now made explicit by having SDio.bus(io, width, speed) function.
2022-12-25devsrv: Various fixes.cinap_lenrek
Make global variables static to avoid symbol clashes. Order Link fields more compactly for 64-bit archs. Add a common freelink() function for freeing Boards and Srvs. Chain all Boards in a circular doubly-linked list, so srvrename() can actually change the owners of *all* the boards instead of just the root. We cannot use recursion here as that could potentially blow the kernel stack. srvname() was also only processing the root. Instead, we add a srvname field to Chan and set it to the original path of the srv file that was used to post the channel. Call openmode() at the beginning of srvopen(). The reason is if omode has invalid bits it can error and leave stuff in a inconsistent state. Prevent srvwstat() to rename a file to "clone", it is reserved. Get rid of "lease expired" error message, just use Eshutdown.
2022-12-23bootrc: bind devcap and devtls, make /root mount consistent with speccinap_lenrek
2022-12-19ethervgbe: reduce console spam (thanks Arne Meyer)Ori Bernstein
this patch turns "no Tx entry available" messages into an ifstats counter to reduce console spam. While here, remove tx/rx offloading from the todo list to not give people ideas.
2022-12-18devgpio/bcm: (Raspberry Pi3/4, revision 2, bcm scheme) (thans Matt!)cinap_lenrek
Submitted by Matt: *Explain the problem that your change solves. Explain why your change solves the problem well.* The problem is that when using 9front on an Rpi3/Rpi4, on a revision 2 board, in bcm scheme, you cannot use GPIO5 nor GPIO6. If you look at the pinout, https://pinout.xyz/pinout/, you can see GPIO5 and GPIO6 are both GPIO pins - so, you should be able to use them. As you can see in the patch, "5" and "6" were both missing from the bcmtableR2 definition. The changes noted above fix this issue by adding GPIO5 ("5") and GPIO6 ("6") to the bcmtableR2 definition. I specifically only addressed r2 boards b/c I don't have an r1 board and don't want to make any speculations. * If applicable, explain how you tested the patch, and give us a way of reproducing the issue.* I tested this / you can reproduce this by: - Trying using GPIO5 and GPIO6 without the patch. You can do this by: bind -a '#G' /dev cd /dev/gpio echo 'scheme bcm' > ctl echo 'function out 5' > ctl echo 'function out 6' > ctl read -c 1 5 read -c 1 6 - Note that the `read` command above reads '0' from file 5 and from file 6. - Now try to change the GPIO pins from 0 (off) to 1 (on) echo '1' > 5 echo '1' > 6 read -c 1 5 read -c 1 6 - Note that the pins still read '0' - Now, apply the patch and repeat the steps above. Except, after you `echo '1' > 5` and `echo '1' > 6`, and then read files "5" and "6", you will see that the pins now read "1" as intended. Thanks, Matt
2022-12-18devip: fix icmp bugscinap_lenrek
icmpdontfrag() was not working properly, need to pass the gating source interface. in fact, we now always pass the source interface to all icmp*() functions, which is used to determine source ip address of the icmp reply. also dont generate a icmp response for packets going to non-unicast addresses (such as broadcast). increase the amount of icmp response payload, but keep icmp responses below the minimum ipv4 mtu (68 bytes). regularize icmpv6 function names. move icmp unreachable codes to icmpv6.c. provide the mtu value for icmppkttoobig6(). dont advise announced udp connections. avoid code duplication in icmp.c and icmpv6.c, by having single send function with type, code and arg parameters. maintain statistics for sent ipv4 icmp types. avoid route lookup in ipout*() by passing Routehint* to icmpnohost*(). iladvise()... more like ill advice.
2022-12-13devip: tcpmssclamp() to minimum of source and destination interface MTUcinap_lenrek
We used to only clamp to the MTU of the destination interface, but this is wrong. We have to clamp to the minimum of both source and destination. For this, we change the gating argument type of ipoput4() and ipoput6() from int to Ipifc* to pass the source interface.
2022-12-12devip: Fix transfoward() iphash collisioncinap_lenrek
We falsely confused locally listening connections as existing translation entires. Fix it.