Commit graph

2984 commits

Author SHA1 Message Date
cinap_lenrek 505bc9b491 lib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler issue 2013-10-02 01:36:05 +02:00
cinap_lenrek da2d0ee780 audiohda: allow manual pin routing, more verbose audiostat, initial mute of al widgets
the automatic routing from jack to dac/adc sometimes gets us
a path thats not audible. manually specifying a route path
gets us arround these. the syntax is just a comma separated
list of node ids in the "pin" and "inpin" audioctl commands
instead of a single pin node id.

to find alternative paths, audiostat now lists all the widgets;
not just the pins; and ther input connections.

initially mute all pins and amps of all function groups.
connectpath() and disconnectpath() will mute and unmute
the widgets as required later.
2013-09-29 15:44:26 +02:00
stanley lieber 82362507f7 pkg/list: handle more directory listings 2013-09-28 01:57:31 -04:00
cinap_lenrek c9bbe34bf6 pc kernel: make syscall() return thru forkret() to handle exceptions
forkret() labels the instructions that can raise exceptions
so they can be handled in trap(). this can happen when
segment descriptors get invalidated.
2013-09-27 19:24:45 +02:00
stanley lieber 64f44612f2 fortunes: I gave up, back to 9front. -- Aram 2013-09-26 12:22:09 -04:00
cinap_lenrek d9ca084282 tcs: eleminate ambigous html entity runes. 2013-09-26 15:16:12 +02:00
cinap_lenrek 81f726b2b4 audioac97: remove i/o bar magic, fix ac97mixreset busywait-forever timeout
the standard is i/o bar 0 is the mixer and bar 1 is status/control.
the magic with the bar sizes made it fail in qemu. so removing it
for now as all devices seen so far comply to the standard.

if we ever see a sis7012 where this might be swaped uncomment the i=0;

the busywait timeout is too long in ac97mixreset() because rd/wr
have a timeout on ther own. just remove the busy looping and do
a one second delay after mixer reset. (tested with t23)
2013-09-26 23:34:06 +02:00
cinap_lenrek 7265a09524 merge 2013-09-25 20:27:34 +02:00
cinap_lenrek cdc2c30e99 reverting semaphore lock changes from sources (r41ccd6d221da, rb28756e5ba29)
semaphore locks have much higher overhead than initially presented
in the "Semaphores in Plan9" paper. until the reason for it has been
found out i will revert the changes.
2013-09-26 22:24:31 +02:00
jpathy cafcffb1dc fix null dereference crash in mothra 2013-09-24 15:50:35 -07:00
cinap_lenrek 62b3eea271 syssem*: eleminate redundant validaddr() checks
validaddr looks up the segments for an address range
and checks the flags and if the address range lies
within bounds on the segments.

as we'r going to lookup the segment in the syssem*
syscalls anyway, we can do the checks ourselfs avoiding
the double segment array lookups.

the implication of this tho is that now a semaphore cannot
span multiple segments. but this would be highly unusual
given that segments are page aligned.
2013-09-24 01:52:20 +02:00
cinap_lenrek 365fd745d6 9bootfat: only check for fat at block 0 on floppy drives (thanks aap)
smart boot manager has a "FAT" signature in its mbr causing
9bootfat to "detect" it as a fat filesystem and then fails
to find plan9.ini.

there shouldnt be a fat filesystem on harddrives at block 0, only
on floppy drives. but some bioses use floppy drive numbers
for usb harddrives so still check for a partition table.

thanks aap for debugging this.
2013-09-23 21:12:41 +02:00
cinap_lenrek b4cdfc6c55 devproc: check for p->dot == nil, run closeproc with up->dot = up->slash
p->dot can be nil when process exits (see pexit())

set closeprocs dot to up->slash so it will show up
right in devproc.
2013-09-22 19:49:59 +02:00
cinap_lenrek 99167104f9 audiohda: vmware support (thanks dreadlorde) 2013-09-22 18:26:52 +02:00
cinap_lenrek e4942b78fd mkfs(8): also list -U option in table 2013-09-22 03:30:04 +02:00
cinap_lenrek d3b8ded315 rootstub: create directories for mips 2013-09-21 21:21:18 +02:00
cinap_lenrek 4fc4033611 merge 2013-09-21 20:06:53 +02:00
cinap_lenrek f811708ffc ape: change tas/sleep locks to cas/semacquire/semrelease locks (from sources) 2013-09-21 19:55:52 +02:00
cinap_lenrek 3d05e77ca1 libc: change tas/sleep locks to cas/semacquire/semrelease locks (from sources)
spinlocks have been changed to use the new semacquire/semrelease
syscalls in combination with atomic compare and swap operations.
2013-09-21 19:53:27 +02:00
cinap_lenrek 041e4852d2 tcs: add html5 rune entities 2013-09-21 22:17:40 +02:00
cinap_lenrek 0d41eadd03 hget(1): usage for webpaste 2013-09-20 17:46:25 +02:00
cinap_lenrek 65653a1840 pushssl(2), pushtls(2): clarify filedescriptor closing 2013-09-20 17:44:14 +02:00
cinap_lenrek 4e015eb5c7 merge 2013-09-20 17:41:51 +02:00
cinap_lenrek 91ce0a07ca hpost: dont emit /bin/hpost but just hpost
just emiting "hpost" makes it simpler to override it as a
rc function.
2013-09-20 17:39:33 +02:00
stanley lieber 565a4d478e rename /rc/bin/ok to /rc/bin/webpaste 2013-09-20 11:32:42 -04:00
cinap_lenrek 5e2478ccbb acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
go seems to accidently creates ridiculous long symbol names
causing acid to crash.
2013-09-20 16:02:10 +02:00
cinap_lenrek 9c2fb9602d merge 2013-09-20 15:00:49 +02:00
cinap_lenrek 539fe6990f 5c: apply richard millers 5c-nan-cmp patch (from sources)
On ARM, it turns out that comparisons with NaN can be made to do the
right thing with no code penalty, by a more careful selection of
condition code values in the subsequent conditional branch.  The
meaning of the CC bits in the PSR is subtly different when they've
been copied from the floating point status register.

Suggested patch is 5c-nan-cmp (works on both vfp and emulated arm7500).
2013-09-20 14:58:43 +02:00
stanley lieber 8aeb7a926e rc-httpd(8): fix typo (thanks, _trav) 2013-09-20 03:09:40 -04:00
stanley lieber 25e5507c57 pkg(1): fix for plan9.bell-labs.com; update repository list 2013-09-18 15:25:18 -04:00
stanley lieber 4d9ce0fb3c add /rc/bin/ok, tool for okturing.com pastebin 2013-09-18 15:03:50 -04:00
cinap_lenrek 171aafcc22 faces: fix callerpc for realloctag in erealloc (thanks qrstuv) 2013-09-18 09:53:20 +02:00
cinap_lenrek 8556b8dae1 libevent: drop queued mouse events
the changeset r541ead66e8af:

"libdraw: make ebread() return buffer immidiately if available"

makes mouse sluggish when the program cant keep up as mouse
events queue up. this more or less restores the original
behaviour but only for mouse events.
2013-09-18 01:54:22 +02:00
cinap_lenrek 34cd9dc4c4 kernel: reset up->setargs on sysexec(), fix race with devproc
up->setargs wasnt reset in sysexec(). also, up->args should only
be exchanged/freed under up->debug qlock. otherwise double free
could happen.
2013-09-18 01:07:06 +02:00
cinap_lenrek 8a7a6f778d ether8169, etherdp83820, ethervt6102: fix snprint READSTR bugs (thanks pap)
should probably use seprint() instead.
2013-09-17 03:08:32 +02:00
cinap_lenrek ad993a2618 rio: translate window when scaling results in bad window rect on screen resize
when the screen is resized, we scale the windows to
match the new screen size. when the screen is too
small tho, the scaled down window rect might result
in a bad window rect. before, we kept the window
in its original position and size making it possible
to move a window out of the screen by resizing its
outer rio.

now, if we get a bad rectangle after scaling, we
just tralslate position to the new scaled r.min
point but preserve its orginal size. this keeps
the window always accessible.
2013-09-17 01:30:35 +02:00
cinap_lenrek 2fd6c5e0f6 faces: fix minor image memory leak 2013-09-17 00:45:11 +02:00
cinap_lenrek 29f4de5f53 rio: fix Xfidwrite memory leak on flush 2013-09-16 17:28:49 +02:00
cinap_lenrek 15c7d856bc apm: fix wrong segment load, zero segment registers
we loaded APMDSEG instead of APMDSEL into DS. (ouch!)

its not really clear why we loaded DS (wong) in the
first place as bios is supposed to do this. for the
machines where this worked it could have no effect
anyway because it was wrong so removing the DS load
and just zero all segment registers.
2013-09-16 16:23:51 +02:00
cinap_lenrek b5aab82488 libauth: add sanity check for auth_proxy write size 2013-09-16 03:56:53 +02:00
cinap_lenrek eee51d7720 aux/statusbar, aux/statusmsg: dont fork in background for window, cleanup 2013-09-16 02:10:18 +02:00
cinap_lenrek c24dd620f9 e820: handle duplicate and overlapping e820 entries, handle overflows
new algorithm:

sort entries by top address first. then for each entry we use:

base = max(base, last)

so we'll never map the same addresses twice.
2013-09-16 23:36:06 +02:00
cinap_lenrek c3a8711d12 kbdfs: set exit status 2013-09-15 16:22:21 +02:00
cinap_lenrek f8cbd5d12f nusb/serial: set exit status 2013-09-15 16:21:43 +02:00
cinap_lenrek 319bb17e1c vncs: fix cmdpid fork bug
we cannot do:

cmdpid = rfork(... RFMEM);

because cmdpid is a global variable in the data segment
and hence shared between parent and child process. use a
temporary variable on the stack.
2013-09-15 16:04:32 +02:00
cinap_lenrek e220636fd3 vncv: fix missing free for window label 2013-09-15 15:14:12 +02:00
cinap_lenrek 474c2c8a2c upas/fs: fix potential filedescriptor leaks 2013-09-15 14:45:57 +02:00
cinap_lenrek 1d4fff69c6 pmmc: add support for Ricoh 5U23 SD/MMC controller 2013-09-15 01:24:08 +02:00
cinap_lenrek 56836bfdbd tls: fix various tlsClient()/tlsServer() related bugs
- TLSconn structure on stack but not initialized (zeroed)
- original filedescriptor double closed in error case
- original filedescriptor leaked in success case
- leaked TLSconn.sessionID and TLSconn.cert
- clarify in pushtls(2) and pushssl(2)
2013-09-14 19:19:08 +02:00
cinap_lenrek be5992955d acme: use threadexitsall() to tear down mouse and keyboard procs on error 2013-09-11 21:23:45 +02:00