Commit graph

3905 commits

Author SHA1 Message Date
stanley lieber e9b6f349b8 termrc, cpurc: clarify comments by removing lies 2014-06-12 15:56:54 -04:00
cinap_lenrek 63ac70281a libstdio: avoid issues with aliasing in dtoa() on amd64 (from 9atom, thanks to erik and charles) 2014-06-12 20:14:12 +02:00
cinap_lenrek d4e66accaa libsec: use u32int instead of uint when we need 32 bit (thanks erik) 2014-06-12 14:05:10 +02:00
cinap_lenrek fa09758a73 samterm: use 4K stacks for amd64 (thanks burnzez)
we got a stack overflow on the hostproc on amd64 overflowing
by arround 200 byte. so just use 4K stacks for everything.
2014-06-11 19:31:14 +02:00
cinap_lenrek 3a5b2189ed revert ramfs example
the code was correct. erealloc9p() terminates the process
on error, but the code was handling realloc() error explicitely
and responded the request with Enomem error.
2014-06-11 18:01:20 +02:00
ftrvxmtrx b4c3726381 libsec: fix dsagen 64-bit bug (thanks rsc) 2014-06-11 17:35:05 +02:00
ftrvxmtrx 6dd3cf4c40 lib9p: ramfs example: s/realloc/erealloc9p/ 2014-06-11 17:22:32 +02:00
mischief 4afbc988ca pool: declare pooldump in pool.h. the manual says it is public. 2014-06-09 12:17:45 -07:00
ftrvxmtrx f6a7c62823 audiohda: add Intel 8 Series/C220 Series support 2014-06-09 21:53:40 +02:00
ftrvxmtrx 52174db958 ether8169: support for RTL8168G 2014-06-09 21:06:22 +02:00
mischief 906cc83c35 mkpaqfs: english 2014-06-09 05:05:59 -07:00
mischief ca5cc6519d pc: clip rectangles before sending them to the hardware in flushmemscreen
the vmware svga video card emulated by qemu (qemu -vga vmware) complains and eventually causes a panic if the rectangles aren't clipped.

messages like the following can be observed from qemu before the kernel panics:
vmsvga_update_rect: update h was < 0 (-20000)
vmsvga_update_rect: update height too large y: 10000, h: 0
vmsvga_update_rect: update w was < 0 (-20000)
vmsvga_update_rect: update width too large x: 10000, w: 0

i could only reproduce this in qemu 2.0.50 on the master branch, when using the ui and had selected 'Zoom To Fit' from the View menu.
2014-06-09 00:22:11 -07:00
cinap_lenrek 858d3e39ab ether79c970: fix mistake
fix bug introduced by amd64 support:

forgot to update ring index i on receive. surprisingly
this was working until there where more than one packet
to process. sorry.

ilock the controller while processing rings. this should
be fixed and use kprocs instead.
2014-06-09 07:21:36 +02:00
cinap_lenrek 01b5ac1402 iostats: add -C flag to enable mount cache 2014-06-08 18:54:36 +02:00
cinap_lenrek 3d12f4f408 iostats: dont sysfatal on 9p read error due to program termination
the note mechanism is racy and can lead to the fs terminating
iostats because it gets "i/o on hugup channel" (namespace closed).
2014-06-08 18:27:39 +02:00
cinap_lenrek 1b8fb4fec3 swap: make sure swap address sticks arround until page is written to swap
we have to make sure the *swap address* doesnt go away,
after putting the swap address in the segment pte.

after we unlock the segment, the process could be
killed or fault which would cause the swap address to
be freed *before* we write the page to disk when it
pulls the page from the cache and putswap() swap pte.

keeping a reference to the page is no good. we have
to hold on the swap address. this also has the advantage
that we can now test if the swap address is still
referenced and can avoid writing to disk.
2014-06-08 17:39:40 +02:00
cinap_lenrek fcfa74a1cf pc64: use pc/pcrandom.$O instead of port/random.$O for RDRAND instruction support 2014-06-08 04:40:18 +02:00
cinap_lenrek 72ba3571a3 kernel: remove _xinc()/_xdec()
as with the Block refcount changes, _xinc() and _xdec() arent
used anymore, so remove them.

architecure can still define ainc()/adec() when it needs them.
2014-06-08 01:35:22 +02:00
cinap_lenrek 0a2b418535 pc, pc64: fix missed qunlock, use Ref with incref()/decref() instead of _xinc()/_xdec() 2014-06-08 01:33:15 +02:00
cinap_lenrek ce38380b8f omap: move syscall.$O target from config to mkfile 2014-06-08 00:26:39 +02:00
cinap_lenrek 3d20da3f8b omap: remove Block refcounting 2014-06-08 00:26:23 +02:00
cinap_lenrek be3a5a6dc3 kernel: remove Block refcounting (thanks erik) 2014-06-08 00:19:33 +02:00
cinap_lenrek 9ee3095553 teg2: move syscall.$O and syscallfmt.$O targets from config to mkfile 2014-06-08 00:15:53 +02:00
cinap_lenrek 9e63895e80 kw: move syscall.$O target from config to mkfile 2014-06-08 00:14:31 +02:00
cinap_lenrek 07f7c46d37 omap4: update for new syscall interface and syscallfmt 2014-06-08 00:13:10 +02:00
stanley lieber 314e23b709 dougfacts: remove html corruption and end file with newline 2014-06-07 15:16:24 -04:00
cinap_lenrek 865368f604 pc64: remove unneeded parens in pmap() 2014-06-07 09:43:37 +02:00
cinap_lenrek 3cc15d2301 merge 2014-06-07 09:28:33 +02:00
cinap_lenrek 7bc8f4d993 pc64: implement checkmmu() debug function 2014-06-07 09:26:57 +02:00
cinap_lenrek 2e713acc2c sdvirtio: experimental support for virtio-scsi 2014-06-07 02:13:57 +02:00
ftrvxmtrx 2739c6514a file: djvu 2014-06-07 23:16:34 +02:00
stanley lieber 20b2f7a38e fortunes: i believe any successful Plan 9 distro will need to provide some transparency in the change review process. -- Skip Tavakkolian 2014-06-06 00:58:36 -04:00
cinap_lenrek 524720a58d file: detect NES and SEGA rom files, fix newline 2014-06-06 01:29:14 +02:00
cinap_lenrek 1b51d46717 merge 2014-06-05 21:56:01 +02:00
cinap_lenrek 91614f582f kernel: dont use atomic increment for Proc.nlocks, maintain Lock.m for lock(), use uintptr intstead of long for pc values
change Proc.nlocks from Ref to int and just use normal increment and decrelemt
as done in erik quanstros 9atom.

It is not clear why we used atomic increment in the fist place as even if we
get preempted by interrupt and scheduled before we write back the incremented
value, it shouldnt be a problem and we'll just continue where we left off as
our process is the only one that can write to it.

Yoann Padioleau found that the Mach pointer Lock.m wasnt maintained
consistently for lock() vs canlock() and ilock(). Fixed.

Use uintptr instead of ulong for maxlockpc, maxilockpc and ilockpc debug variables.
2014-06-05 21:54:32 +02:00
ftrvxmtrx f815f7273a g: add *.cpp 2014-06-05 12:10:43 +02:00
cinap_lenrek 76db435e3c pc64: dont trap _xinc()/_xdec() overflow/underflow, delete unused atomic functions 2014-06-05 07:57:23 +02:00
cinap_lenrek 863a459691 webfs: explicitely unmount old /mnt/web (thanks BurnZeZ)
webfs forks the namespace to isolate itself from its mount
point which has the side effect that it captures the mount
of previous instances of webfs mounted on /mnt/web.

explicitely unmount the mountpoint in our namespace copy
to drop the reference.
2014-06-04 17:45:08 +02:00
cinap_lenrek 972f60a794 nusbrc: dont fork usb drivers into background
probing needs to run synchronous to avoid races with other
readers of /dev/usbevent.
2014-06-04 23:59:17 +02:00
cinap_lenrek 93d0474f77 nusb/usbd: cleanup 2014-06-03 21:40:30 +02:00
cinap_lenrek 0aa3af0934 kernel: remove wrong and needles mapsize check in newseg() (thanks Yoann Padioleau) 2014-06-03 07:47:09 +02:00
cinap_lenrek 5ab9f9c621 nusb/usbd: serialize /dev/usbevent processing
when there are multiple readers of /dev/usbevent, we have to
serialize the processing to make sure that only one driver
is opening the devices control endpoint at a time.

to do this, we assume the device is busy after reading the
event file until the next read or clunk on the same fid.

to mark a device busy, we set the dev->aux pointer to the
fid processing a event. And the Event structure takes a
reference to the device producing the event.

the problem arised from cdc ethernet and nusb/serial sharing
the same device class, and we need to run the particular driver
to figure out if the device can be used. doing this concurrently
fails because devusb allows only one open per endpoint.
2014-06-03 07:21:48 +02:00
cinap_lenrek 1427ba3126 pc64: fix for unsigned comparsion of (top - base) >= size
the rounding of base can make it above top, so have to
use signed comparsion.
2014-06-01 06:54:55 +02:00
cinap_lenrek fb97665a14 pc64: use 2MB pages for preallocpages() 2014-06-01 06:31:50 +02:00
cinap_lenrek c9f91d5015 pc64: allocate palloc.pages from upages
the palloc.pages array takes arround 5% of the upages which
gives us:

16GB = ~0.8GB
32GB = ~1.6GB
64GB = ~3.2GB

we only have 2GB of address space above KZERO so this will not
work for long.

instead, pageinit() was altered to accept a preallocated memory
in palloc.pages. and preallocpages() in pc64/main.c allocates the
in upages memory, mapping it in the VMAP area (which has 512GB).

the drawback is that we cannot poke at Page structures now from
/proc/n/mem as the VMAP area is not accessible from it.
2014-06-01 03:13:58 +02:00
ftrvxmtrx 8061f30e55 games/nes: support Battle City two players mode with joypads 2014-06-01 01:21:00 +02:00
Aram Hăvărneanu bf0d5c8abb 6a, 6c, 6l: fix copy propagation
Without an explicit signal for a truncation, copy propagation will
sometimes propagate a 32-bit truncation and end up overwriting uses of
the original 64-bit value.

This was independently discovered and fixed in Go. See:
	http://golang.org/issue/1315
	https://codereview.appspot.com/6002043/

Thanks Charles Forsyth for tips and advice.
2014-05-30 12:28:01 +02:00
cinap_lenrek 17d0dea87c we look for strings.c, it is broken, this strings.c will make us go. 2014-05-30 04:05:18 +02:00
cinap_lenrek 5246416621 pc, pc64: simplify reboot code
as we do system reset and reboot only from boot processor cpu0 now,
theres no need for active.rebooting conditional variable.
mpshutdown() will unconditionally park application processors and
and cpu0 boots the new kernel or calls mpshutdown() causing system
reset.
2014-05-29 18:50:52 +02:00
cinap_lenrek 215f6cc64a pc: initiate machine reset only from boot processors in mpshutdown()
in vmware, mpshutdown() used to hang in i8042reset() when not
called from the boot processor, so instead of reseting from first
cpu that acquires the shutdown lock, we park all application
processors and let the boot processor do the reset.
2014-05-29 18:24:40 +02:00