summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-03mergecinap_lenrek
2020-11-03pc, pc64: allocate i/o port space for unassigned pci bars, move ioalloc() to ↵cinap_lenrek
port/iomap.c With some newer UEFI firmware, not all pci bars get programmed and we have to assign them ourselfs. This was already done for memory bars. This change adds the same for i/o port space, by providing a ioreservewin() function which can be used to allocate port space within the parent pci-pci bridge window. Also, the pci code now allocates the pci config space i/o ports 0xCF8/0xCFC so userspace needs to use devpnp to access pci config space now. (see latest realemu change). Also, this moves the ioalloc()/iofree() code out of devarch into port/iomap.c as it can be shared with the ppc mtx kernel.
2020-11-02upas/common: delete library on 'mk clean'Ori Bernstein
libcommon.a$O doesn't end with a .a, so mk doesn't know how to look inside it in order to check if the files are up to date. This means that when 'mk clean' is run, libcommon.a$O looks up to date: % mk clean ... % mk mk: 'default' is up to date Deleting the library works around this problem.
2020-11-02mtx: fix pci access routines (see changeset 8012:78891f472fbf)cinap_lenrek
2020-11-02profile: don't create $wsys if it doesn't existOri Bernstein
When $wsys doesn't exist (eg, drawterm -G, or rcpu from a text console), the profile would create an empty $wsys variable, and sessions started in this environment would fail with a null list in concatenation. This change tests if /mnt/term/env/wsys exists before assigning it.
2020-11-02audio/wavdec: add -s optionSigrid
2020-11-02aux/realemu: use #$/pci/B.D.Fraw to access pci config spacecinap_lenrek
This prevents VESA bios from accessing the pci CONFIG_ADDRESS/CONFIG_DATA registers (0xCF8/0xCFC) directly to access pci config space. This makes sure the access to pci config space is properly serialized by the kernel.
2020-11-02vmx: mask out bits 0:2 and 24:30 of pci CONFIG_ADDRESS on readcinap_lenrek
These bits are reserved, and by the specification, must return zero on read. This is also used by plan 9 for detecting config mode #1.
2020-11-01rc: show line numbers on errorOri Bernstein
This change provides a location for errors like 'null list in concatenation'.
2020-11-01libbio: add aux pointer to bioOri Bernstein
This allows us to attach additional context to the biobuf so can read from some sort of data structure without a global variable.
2020-11-01libc: recurse on smaller half of arrayOri Bernstein
Our qsort has an optimization to recurse on one half of the array, and do a tail call on the other half. Unfortunately, the condition deciding which half of the array to recurse on was wrong, so we were recursing on the larger half of the array and iterating on the smaller half. This meant that if we picked the partition poorly, we were pessimizing our stack usage instead of optimizing it. This change reduces our stack usage from O(n) to O(log(n)) for poorly chosen pivots.
2020-10-31jpg: treat EOF as EOI markerAlex Musolino
Some jpegs, rightly or wrongly, do not contain an EOI marker. This causes jpg(1) to bail out even after correctly parsing the entire image.
2020-10-30vt: improve behavior of chordingOri Bernstein
vt chording behaves slightly differently from other applications: a chord must be fully released before the next chord can be applied. This makes any change in chord apply the action.
2020-10-29ip/cifsd: fix missing int return type for vpack() (thanks pr)cinap_lenrek
2020-10-29aux/cpuid: decode leaf 7; extend leaf 13 decodingSigrid
2020-10-27audiohda: make it work with qemu (thanks mischief)cinap_lenrek
the driver was not using irb interrupts and was just polling the irb write pointer to wait for command completion. this is not supported by qemu. qemu requires the use of irb interrupt handshake and it refuses to accept the next command until we acknowledge the irb interrupt.
2020-10-25ip/tinc: fix reportedge()cinap_lenrek
supplying a non-ip address in ADD_EDGE crashes the unix tincd. the reason was that we where misreporting ADD_EDGE messages; ignoring the information from our peers; and always supplying the Address string from our configuration instead of the connections ip address. now we just report the edge information as is.
2020-10-24mp(2): correct documentation of error handling (thanks LordCreepity)Ori Bernstein
The documentation for mp(2) claimed we'd return nil on error, when we actually sysfatal. This corrects the documentation to match our actual behavior.
2020-10-25kbmap: add latvian keymap (thanks freddy)cinap_lenrek
2020-10-25kbmap: add croatian kbmap (thanks skerbergs)cinap_lenrek
2020-10-23newuser(8): fix reference to incorrect file server console commandAlex Musolino
2020-10-23vmx/vga: fix allocimage leaksSigrid
2020-10-22upas/fs/mbox.c: fix cosmetic typokhm
2020-10-21libaml: add (nop) "signal" opSigrid
2020-10-18vncv: pick an auth type that we supportOri Bernstein
We used to pick the highest auth type regardless of whether we supported it. Now we filter down to types that we support.
2020-10-19sdiahci: accept AHCI controllers from ASMedia vendor id (thanks mischief)cinap_lenrek
2020-10-18pc, pc64: remove mystery "type" bits in pcicfgrw*raw() (fixes qemu, thanks ↵cinap_lenrek
mischief) the access functions for pci config space in config mode #1 used to set bit 0 in the register offset if the access was to a device on any bus different from 0. it is completely unclear why this was done and i can't find any documentation on this. but for sure, this breaks all pci config spacess access to pci devices behind a bridge on qemu. with -trace pci* it was discovered that all config space register offsets on devies behind pci brige where off by one. on real hardware, setting bit 0 in the offset doesnt appear to be an issue. thanks mischief for reporting and providing a qemu demo configuration to reproduce the problem.
2020-10-18sdnvme: use PCIWADDR() instead of PADDR()cinap_lenrek
2020-10-18etherbcm: handle 64-bit host addresses, use PCIWADDR() instead of PADDR()cinap_lenrek
2020-10-18audiohda: use PCIWADDR() instead of PADDR(), handle 64-bit dma addressescinap_lenrek
2020-10-18etheriwl: delay before crystal calibrationOri Bernstein
On my 6235 card, if we calibrate the crystal immediately after disabling wimax, the the firmware gets unhappy. A short nap before sending the command prevents the command from timing out.
2020-10-17nusb/serial: add ids for FT230X (thanks mischief)Ori Bernstein
2020-10-17mergeOri Bernstein
2020-10-17upas: fix appendfolder timestamps (thanks umbraticus)Ori Bernstein
When moving messages between folders, mbappend, deliver, and nedmail were trying to parse the timestamp ouut of the message. They were doing it incorrectly, trying to include the user name as part of the date format. Change to pass just the date to the date parser.
2020-10-18etheriwl: don't break controller on command flush timeoutcinap_lenrek
ori and echoline are reporting regression on some 6000 cards; which sometimes time out on crystal calibration command; which is expected by the driver. but the new code used to force a device reset on any command timeout. reverting to old behaviour until for now until we have a chance investigating.
2020-10-18sdnvme: handle machines with more cpu's than submit queues (thanks mischief)cinap_lenrek
We used to assume a 1:1 pairing of processors to submit queues. With recent machines, we now got more cpu cores than what some nvme drives support so we need to distribute the queues across these cpu's which requires locking on command submission. There is a feature get/set command to probe the number of submit and completion queues, but we decided to just handling submission queue create command error gracefully as it is simpler and has less chance of regression with existing setups. Thanks to mischief for investigating and writing the code.
2020-10-17mergecinap_lenrek
2020-10-17ndb/dnsdebug: add -c flag to debug caching dns server behaviourcinap_lenrek
2020-10-17ndb/dns: mark ns record authoritative when in our area for delegationcinap_lenrek
I have the problem that i need to delegate a subdomain to another name server that is confused about its own zone (and its own name) returning unusable ns records. With this, one can make up a nameserver entry in ndb that is authoritative and owned by us for that nameserver, and then put it in the soa=delegated ns entry. This promotes the ns record in the soa=delegated to Authoritative, which avoids overriding the ns rr's from the confused server for the delegated zone.
2020-10-15games/nes: workaround for truncated chrSigrid
2020-10-12ip/torrent: try harder allocating portscinap_lenrek
we used to only allocate ports from 6881 to 6890, which limits the maximum of parallel torrents to 9. this change make it go up to 9000, which gives us at best 2120 ports, which is overkill but ports might be randomly occupied by other connections.
2020-10-11upas/fs: fix truncation of plumb datecinap_lenrek
the new date format introduced by the previous commit; using numeric timezone offsets; needs one character more, so increase the date format buffer to 31 characters.
2020-10-09kernel: get rid of unused ucallocbcinap_lenrek
the whole idea of a ucallocb() is bad, as even access to the metadata header would be in uncached memory. also, it tuns out that it was never used by anyone.
2020-10-09vmx: add Kmod4Sigrid
2020-10-05etheriwl: add Wireless 8260 cardOri Bernstein
After the latest tweaks to the order of operations, the card works.
2020-10-05mergecinap_lenrek
2020-10-05etheriwl: remove stations *after* disabling binding quotas, drain all queues ↵cinap_lenrek
in rxoff7000()
2020-10-04rio: move the code for 'send' into a functionkvik
Makes the code a bit nicer and allows reusing wsend() in patches.
2020-10-04etheriwl: add for Intel Wireless-AC 9260cinap_lenrek
the 9000 series uses a new receive descriptor format wich appears to reqire 4k aligned buffers. the old format "halfworks" and just makes the firmware not respond to any commands after the enable paging command. the smartfifo command appears to causes problems. but apparently not issuing it at all seems to work fine on both the 8265 and 9260. so removing the code for now. issuing the bindingquota command before associated makes association impossible. but enabling afterwards works fine. (tested in 8265 and 9260). the prph access functions now mask the address with 0xfffff. it is unclear why linux and openbsd drivers specify addresses beyond that in ther register constants. the timeevent change is interesting. the timeevent needs to be restarted when it has stoped to make sure probing/association packets are sent during the evnet.
2020-10-01bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber)kvik