summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-21mp(2): fix spellingcinap_lenrek
2018-11-21mp(2): clarify mptoa() and mpfmt() default basecinap_lenrek
2018-11-21upas/fs: rework the refcounting, use 64bit qid path, add checkscinap_lenrek
add function to check the refcounts for Mailbox and Message on a fid use the full 64 bit of the qid.path, so we can use the full 32 bit for the id instead of only maintaining refcount for the top message, msgincref() now adds a reference to all its parent messages including self and top message. then we can check in recursive delmessage() that all the parts have a zero refcount. remove the Fid.mtop field, it was never used. make sure deletion and flag changes only affect the top message. cachefree(): only look for top message in lru. sub-parts are never added to the cache. use the nparts field when reading sub-part of existing message, so that we parse the index right in case the number of parts somehow changed. messages marked as Deleted but still in inbox should be written to the index.
2018-11-20games/md: fix mkfileaiju
2018-11-20games/md: use cpu.c from blitaiju
2018-11-20games/blit: clean up cpu.c and make it pass testsaiju
2018-11-19pc, pc64: park application processors in rebootcode with mmu offcinap_lenrek
instead of having application processors spin in mpshutdown() with mmu on, and be subject to reboot() overriding kernel text and modifying page tables, park the application processors in rebootcode idle loop with the mmu off.
2018-11-18vt(1): vt doesnt exit when the host process exits as claimed (thanks driusan)cinap_lenrek
2018-11-18cc: fix wrong "useless or misleading comparison" warningcinap_lenrek
to reproduce: u8int x, y; x = 0xff; y = 0xc0; if((s8int)(x & y) >= 0) print("help\n"); compiles correctly but prints a warning warning: test.c:11 useless or misleading comparison: UINT >= 0 the issue is that compar() unconditionally skipped over all left casts ignoring the case when a cast would sign extend the value. the new code only skips over the cast when the original type with is smaller than the cast result or when they are equal width and types have same signedness. so the effective left hand side type is the last truncation or sign extension.
2018-11-18rc: implement $"x in terms of Xdol() and new Xqw() instructioncinap_lenrek
to get $"1 right, remove Xqdol() and instead implement it in terms of Xdol() instruction and use the new Xqw() instruction to quote the resulting list.
2018-11-18devip: fix swapped tcp snd.scale and recv.scale in tcpstate() format (thanks ↵cinap_lenrek
joe9)
2018-11-18libdraw: avoid deadlock for mouse ioproc sending on resizeccinap_lenrek
a deadlock has been observed with samterm (thanks burnzez), that shows the mouse ioproc being stuck in sending on the resize channel, while the mouse consumer is stuck in a readmouse() loop wanting a rectangle to be drawn by the user: recv(v=0x42df50)+0x28 /sys/src/libthread/channel.c:321 readmouse(mc=0x42df50)+0x54 /sys/src/libdraw/mouse.c:34 getrect(.ret=0x41bce0,but=0x4,mc=0x42df50)+0x62 /sys/src/libdraw/getrect.c:49 r=0x41bc70 rc=0x41bc70 getr(rp=0x41bce0)+0x24 /sys/src/cmd/samterm/main.c:244 p=0x6b000004f6 r=0x2 sweeptext(new=0x0,tag=0x2d)+0x12 /sys/src/cmd/samterm/menu.c:208 r=0x2 t=0x42df50 inmesg(type=0x2,count=0x2)+0x1ab /sys/src/cmd/samterm/mesg.c:136 m=0x10000002d l=0x2d00001b00 i=0x43829000000001 t=0x438290 lp=0x42e050 rcv()+0x7a /sys/src/cmd/samterm/mesg.c:77 threadmain(argv=0x7ffffeffef90)+0x173 /sys/src/cmd/samterm/main.c:63 so avoid blocking in the mouse ioproc by using nbsend() instead of send() for writing to the resize channel.
2018-11-17devbridge: fix runt packets going through the bridge (thanks cinap)mischief
linux will send small, unpadded arp packets which may arrive over wifi, so allow small packets into the bridge and pad any packets that are too small when going out.
2018-11-17games/c64: make keyboard table more readableaiju
2018-11-14ether82563: ignore i82753 checksums, fixes T60 ethernetmischief
2018-11-14nusb/kb: multitouch support (touchscreens, stylus)cinap_lenrek
touchscreens signal multiple contact points (X/Y) in the hid descriptor separated by being nested in separate collections. the contact point is identified by a optional contact id. if omited, we use the collection index and report id. so we collect all the items (X/Y, buttons, wheel) from separate collections in Hidslot structures and in the end combine all the slots together. buttons are or'ed together while absolute X/Y is applied when it changed. relative X/Y deltas get added together. thanks to kivik and Glats for testing.
2018-11-13rcpu: fix pvar to initialize empty variables (thanks mycroftiv)cinap_lenrek
2018-11-13nusb/kb: revert multitouch, breaks some mice...cinap_lenrek
2018-11-12upa/imap4d: ignore messages without digest infocinap_lenrek
2018-11-12disk/mkfs: remove unused cputype variable (thanks kvik)cinap_lenrek
2018-11-12mergecinap_lenrek
2018-11-12nusb/kb: lilu dallas multitouchcinap_lenrek
2018-11-11add dtracy to mkfileaiju
2018-11-10add dtracy.haiju
2018-11-10dtracy: missing break in dteverifyaiju
2018-11-10adding dtracy (crude early version)aiju
2018-11-08ssh: handle unknown MSG_CHANNE_REQUEST messagescinap_lenrek
2018-11-08ssh: handle MSG_GOBAL_REQUESTcinap_lenrek
respond to MSG_GLOBAL_REQUEST with MSG_REQUEST_FAILURE as stated by rfc4254 when server wants a reply. failing todo so breaks some proprietary keep-alive schemes.
2018-11-08ip/dhcpd: Add swap server support in dhcpd (thanks k0ga)cinap_lenrek
2018-11-08bcm: intrenable() can happen from any cpu in case of dma interruptscinap_lenrek
2018-11-08libdraw: cannot happencinap_lenrek
2018-11-07libdraw: fix gengetwindow()cinap_lenrek
- fix fd leak in winname read() <= 0 case - avoid freeing d->image (was by freeimage((*scrp)->image)) - dont leak screen and window in fullscreen mode
2018-11-07bcm: cleanup timer codecinap_lenrek
- calculate hardcoded constants for more clarity - avoid unneccesary modification of cntpns ctl register - revert enabling IRQcntpns for cpu0 - remove unused Localintpending register offset constant
2018-11-07bcm: simplify irq handling by having per cpu Vctl chaincinap_lenrek
2018-11-07bcm: speed up co-processor operations by avoiding i+d cache flush on each ↵cinap_lenrek
operation coproc.c generated the instrucitons anew each time, requiering a i+d cache flush for each operation. instead, we can speed this up like this: given that the coprocessor registers are per cpu, we can assume that interrupts have already been disabled by the caller to prevent a process switch to another cpu. we cache the instructions generated in a static append only buffer and maintain separate end pointers for each cpu. the cache flushes only need to be done when new operations have been added to the buffer.
2018-11-06nusb/serial: fix wrong guard statement (thanks deuteron)aiju
2018-11-06mergecinap_lenrek
2018-11-06dnstcp: temporarily switch on resolver mode so we can resolve the dnsslaves ↵cinap_lenrek
for axfr check
2018-11-05sed: only dollars as first address are a problem for -uaiju
2018-11-04rio(1): fix typomischief
2018-11-04mp(2): document mpfactorialmischief
2018-11-04libmp: declare mpfactorialmischief
2018-11-04mergecinap_lenrek
2018-11-04libaml: allow amlmapio() to re-enter the interpreter (can happen by pciadd() ↵cinap_lenrek
-> amleval()) - make frame base pointer variable - in rwreg(), save/restore the interpreter state and allocate a Frame* on the stack - add overflow checks for frame base pointer to xec() and amleval() - gc() scans the whole stack from FP to the *real* bottom F0
2018-11-04devvmx: remove bogus . direntryaiju
2018-11-04bcm: fix mysterious core clock resets under SMP (thanks richard miller)cinap_lenrek
reference: https://github.com/raspberrypi/firmware/issues/542 procsave(Proc* p) { uvlong t; cycles(&t); p->pcycles += t; // TODO: save and restore VFPv3 FP state once 5[cal] know the new registers. fpuprocsave(p); /* * Prevent the following scenario: * pX sleeps on cpuA, leaving its page tables in mmul1 * pX wakes up on cpuB, and exits, freeing its page tables * pY on cpuB allocates a freed page table page and overwrites with data * cpuA takes an interrupt, and is now running with bad page tables * In theory this shouldn't hurt because only user address space tables * are affected, and mmuswitch will clear mmul1 before a user process is * dispatched. But empirically it correlates with weird problems, eg * resetting of the core clock at 0x4000001C which confuses local timers. */ if(conf.nmach > 1) mmuswitch(nil); }
2018-11-01bcm: fix mistake in mkfilecinap_lenrek
2018-10-31bcm: fix /dev/reboot text/data corruption (thanks richard miller)cinap_lenrek
- clean dcache before turning off caches and mmu (rebootcode.s) - use WFE and inter-core mailboxes for cpu startup (rebootcode.s) - disable SMP during dcache invalidation before enabling caches and mmu (in armv7.s)
2018-10-31awk(1): fix append operator to avoid truncating fileAlex Musolino
2018-10-28bcm: provide /dev/cputemp in a format stats can understandcinap_lenrek