summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-06rio: goodrect: clarify minimal height and actually use the smallest ↵Sigrid
reasonable value
2020-12-06rio: allow windows as small as one line of text, still scrollableSigrid
2020-12-06aux/status^(bar msg): few small fixes (thanks umbraticus)Sigrid
2020-12-06cwfs: fix interpretation of startdump argumentAlex Musolino
2020-12-05pc/dma, pc/sdide: use uintptr for physical address instead of ulongcinap_lenrek
2020-12-05pc, pc64: allocate dma bounce buffer right after xinit()cinap_lenrek
2020-12-05pc, pc64: exclude memory regions with unusual MTRR cache attributescinap_lenrek
Use the MTRR registers to exclude memory ranges that do not have the expected cache attributes: RAM -> writeback UMB -> uncached UPA -> uncached
2020-12-04faces: add -c option to remove faces with button 1 click (thanks sirjofri)Sigrid
2020-12-02mergecinap_lenrek
2020-12-02libdraw: do not force flushimage() on freescreen()cinap_lenrek
This causes visual flashes of white in rio. If it is really needed (it is rare) it should be done by the caller.
2020-12-02rio: properly restore the windows contents on /dev/mouse closecinap_lenrek
The previous resize optimization now means that the wfill() is skipped on resize for libdraw programs. So do it once /dev/mouse is closed and the window processes the Refresh message.
2020-12-01/lib/keyboard: Anführungszeichen uten (danke sirjofri)Sigrid
2020-12-01/lib/keyboard: add fingers and more arrows (thanks umbraticus)Sigrid
2020-11-30proof: don't confuse ""(1) (thanks Stuart Morrow)Ori Bernstein
"" looks for patterns in the form 'prompt;' or 'prompt%', and gets confused when proof emits 'illegal;'. This change replaces the ';' with a ':', which both matches other conventional error outputs and prevents "" from getting confused.
2020-11-30tmdate(2): remove liesOri Bernstein
Initially the code tried to guess the date format. This turned out to be a bit too magical, so the feature was removed, but the manpage still documented the nonfeature.
2020-11-29rio: avoid redrawing window text on resize for programs using libdrawcinap_lenrek
As long as the client as the mouse file open and maintains reading the winname file of the window after a resize we will avoid drawing the text frame on a resize as it will be overdrawn by the client. This reduces flicker on resize somewhat for slow systems.
2020-11-29pc, pc64, xen: rewrite interrupt handling codecinap_lenrek
This implements proper intrdisable() support for all interrupt controllers. For enable, (*arch->intrassign)(Vctl*) fills in the Vctl.enable and Vctl.disable pointers with the appropriate routines and returns the assigned vector number. Once the Vctl struct has been linked to its vector chain, Vctl.enable(Vctl*, shared) gets called with a flag if the vector has been already enabled (shared). This order is important here as enabling the interrupt on the controller before we have linked the chain can cause spurious interrupts, expecially on mp system where the interrupt can target a different cpu than the caller of intrenable(). The intrdisable() case is the other way around. We first disable the interrupt on the controller and after that unlink the Vctl from the chain. On a multiprocessor, the xfree() of the Vctl struct is delayed to avoid freeing it while it is still in use by another cpu. The xen port now also uses pc/irq.c which has been made generic enougth to handle xen's irq scheme. Also, archgeneric is now a separate file to avoid pulling in dependencies from the 8259 interrupt controller code.
2020-11-28games/mix: fix decoding of shift instructionsAlex Musolino
2020-11-28games/mix: fix SLAX and SRAX instructions (thanks nicolagi)Alex Musolino
MIX shift instructions shift by bytes not bits.
2020-11-27fplot: add hyperbolic functionsSigrid
2020-11-27fplot(1): use abs()Sigrid
2020-11-27fplot: add absSigrid
2020-11-27mergeAlex Musolino
2020-11-27games/mix: fix implementation of MOVE instruction (thanks nicolagi)Alex Musolino
Plan 9 memcpy(2) uses the same implementation as memmove(2) to handle overlapping ranges. Hovewer, the MIX MOVE instruction, as described in TAOCP, specifically does not do this. It copies words one at a time starting from the lowest address. This change also expands the address validation to check that all addresses within the source and destination ranges are valid before proceeding.
2020-11-26kbmap/neo2: add support for neo2 kbmak (thanks jstsmthrgk)Ori Bernstein
2020-11-25upas: fix mk nukeAlex Musolino
2020-11-22g: fix typo in last commitOri Bernstein
2020-11-22upas/*: fix mkfile issues (thanks amavect)Ori Bernstein
Fixes 3 issues in our upas mkfiles: - mk/mkfile and send/mkfile were rebuilding only the rfc822.tab.$O, even though the header also needed to be rebuilt. - CLEANFILES had a pattern that would not get expanded. - Third, ../upas/mkfile was being included in the wrong place and making the wrong rule default.
2020-11-22pc, pc64: move common irq handling code out of trap.ccinap_lenrek
Move the common irq handling code out of trap.c into pc/irq.c so that it can be shared between 386 and amd64 ports.
2020-11-21g: filter directory argumentsOri Bernstein
When searching directories recursively, it's still desirable to filter the contents by the file pattern, so that 'g foo /sys/src' doesn't end up searching for foo within .$O files. Files passed explicitly are still searched, so for the old behavior, just use walk: g foo `{walk -f $dir}
2020-11-219boot(8): update manual to reflect efi loader search order changesmischief
the efi loader now looks for plan9.ini and the kernel in the ESP first, before looking elsewhere.
2020-11-21efi: prefer plan9.ini from ESP we loaded frommischief
currently the EFI loader's behavior is to search all disks in a firmware-defined order. we search the list returned by the firmware in reverse order in the hopes of searching the first 9FAT instead of the ESP, but this results in unintuitive behavior when there are multiple FAT partitions (possibly in multiple disks), such as loading a plan9.ini and kernel from a different disk than the one you executed the EFI loader from. to resolve this, we change the EFI loader to instead prefer read plan9.ini and the kernel from the same disk as the EFI loader was read from, and then fall back to the old behavior, since the old behavior is relied on by current installations.
2020-11-21dc: fix crashes with : operator (thanks istvan bak)Ori Bernstein
dc crashes because a Blk* sometimes ends getting double freed. To make it crash, any of these lines will do: (each line is a separate input to dc): 1 sa 2 :a le d sa v :a 1 sa 2 :a le d sa :a 1 sa 2 :a le d sa c Fix by assigning p to sptr->val before EMTPY causes a jump. Additionally, dcgetwd() can return 0. all other uses check for 0 ptr; Also fix a buffer overflow.
2020-11-21upas: make 'all' the default targetOri Bernstein
When consolidating the duplicated targets, the one that actually got built ended up arbitrary. Put in a 'default' target that runs 'mk all'.
2020-11-21pc, pc64: fix grub multibootcinap_lenrek
It appears that our IDT overlaps with the data structures passed from grub in multiboot load. So defer setup of the interrupt table after the multiboot parameters have been processed.
2020-11-21mergecinap_lenrek
2020-11-21ether8169: fix interrupt panic before init, defer initialization until attachcinap_lenrek
The driver used to register the interrupt handler just after reset, tho the Ctlr struct, including the buffer descriptor arrays where only allocated on attach. This moves most of the reset/init out of pnp function and into attach. This also means we can error out and even retry on the next attach. The logic of the reseter kproc has been changed: now it is only started once the first initialization completely succeeded. This avoids the strange qlock passing. Implement a shutdown function so the device gets halted for /dev/reboot. Assume 64 bit physical addresses for dma. Check that pci bar0 is actually I/O.
2020-11-21pc, pc64: implement disabling of msi interruptscinap_lenrek
2020-11-21nusb/kb, nusb/joy: dont try to set protocol on nonboot devicesmischief
the hid 1.11 specification says that for hid devices which arent in the boot subclass (subclass 1), it is only optional to support the set protocol command. for my devices, trying to set protocol results in a stall error and unusable devices. fixes my Tex Shinobi keyboard and Playstation 4 controller.
2020-11-21pc, pc64: new MTRR code supporting AMD TOM2 MSR and fixed mtrr rangescinap_lenrek
The new MTRR code handles overlapping ranges and supports AMD specific TOM2 MSR. The format in /dev/archctl now only shows the effective cache ranges only, without exposing the low level registers.
2020-11-21pc, pc64: disable all pci devices for /dev/rebootcinap_lenrek
Make sure all pci busmaster activity is disabled, including MSI/MSI-X interrupts, before switching control to the new kernel.
2020-11-21pc, pc64: disable all pci devices in pcicfginit()cinap_lenrek
Make sure all pci busmaster activity is disabled, including MSI/MSI-X interrupts. Drivers will later reenable once taking control of a device.
2020-11-21kernel: add portable pcimsienable()/pcimsidisable(), disable MSI/MSI-X on ↵cinap_lenrek
pcidisable()/pcireset() This avoids some duplication in the pci support code and allows pcireset() to diable MSI and MSI-X interrupts when disabling or reseting a device.
2020-11-21etherm10g: remove duplicated pci capability enumcinap_lenrek
2020-11-21kernel: remove unused pcinextcap() functioncinap_lenrek
2020-11-21pc/l.s: remove unsued m0gdtptr/m0idtptr structscinap_lenrek
2020-11-19awk: fix truncated input after fflushAnthony Martin
Before the "native" awk work, a call to the fflush function resulted in one or more calls to the APE fflush(2). Calling fflush on a stream open for reading has different behavior based on the environment: within APE, it's a no-op¹; on OpenBSD, it's an error²; in musl, it depends on whether or not the underlying file descriptor is seekable³; etc. I'm sure glibc is subtly different. Now that awk uses libbio, things are different: calling Bflush(2) on a file open for reading simply discards any data in the buffer. This explains why we're seeing truncated input. When awk attempts to read in the next record, there's nothing in the buffer and no more data to read so it gets EOF and exits normally. Note that this behavior is not documented in bio(2). It was added in the second edition but I haven't figured out why or what depends on it. The simple fix is to have awk only call Bflush on files that were opened for writing. You could argue that this is the only correct behavior according to the awk(1) manual and it is, in fact, how GNU awk behaves⁴. 1. /sys/src/ape/lib/ap/stdio/fflush.c 2. https://cvsweb.openbsd.org/src/lib/libc/stdio/fflush.c?rev=1.9 3. https://git.musl-libc.org/cgit/musl/tree/src/stdio/fflush.c 4. https://git.savannah.gnu.org/cgit/gawk.git/tree/io.c#n1492
2020-11-18tmdate(2): failed to (p)arseSigrid
2020-11-18ctime(2): add tmdate(2) to "see also"Sigrid
2020-11-17upas/*: cleanup mkfiles (thanks amavect)Ori Bernstein
Changeset 50ad211fb12f broke the libcommon rule in mkupas. Deleting the 'mk clean' in the recipe fixes this. Cleanup includes deleting UPDATE vars from all mkfiles, reorganization of vars in TARG,LIB,OFILE,HFILE order, and deletion of extra vars used for UPDATE.