Commit graph

3981 commits

Author SHA1 Message Date
khm e3ddbf12bd restore balance to reality 2015-02-20 15:09:25 -05:00
stanley lieber c9785a08ff io(1), seg(1): add HISTORY section to man pages (thanks, jpm_) 2015-02-20 14:28:56 -05:00
cinap_lenrek 6f1787adcb devusb: check for nil hp->dump and hp->seprintep 2015-02-20 18:56:22 +01:00
cinap_lenrek c6069e28ac pc, pc64: simplify intrdisable() 2015-02-20 18:43:32 +01:00
cinap_lenrek 173bafd800 devusb: fix debug ctl nil crash 2015-02-20 18:42:24 +01:00
cinap_lenrek 0b016a77e4 gs: backport aes support for pdf-1.6 2015-02-20 00:21:45 +01:00
cinap_lenrek 13508a99a8 gs: work arround broken xref table pdfs
rebuilding the xref table does not work for pdfs with
compressed object streams. as a work arround, we skip
xref table verification and ignore wrong xref gen #
for gen 0 objects.
2015-02-19 11:44:16 +01:00
cinap_lenrek 581f3852fe pc, pc64: fix intrdisable() MaxIrqLAPIC -> MaxVectorAPIC (thanks mischief) 2015-02-18 06:30:01 +01:00
cinap_lenrek 0037c93433 6c: eleminate more MOV instructions
convert:

x = B || W
MOVxLZX a, r; MOVxQZX r, b -> MOVxQZX a, r; MOVQ r, b
MOVxLSX a, r; MOVxQSX r, r -> MOVxQSX a, r; MOVQ r, r

the MOVQ can then be eleminated by copy propagation.

improve subprop() by accepting other mov and lea
instructions as the source op.
2015-02-18 23:34:33 +01:00
cinap_lenrek 8210f857f1 6l: no need to emit rex.w prefix for MOVBQZX and MOVWQZX
as with 32 bit operand size, the upper bits 63:32 are
automatically zeroed in 64bit mode. this gives a shoter
instruction encoding.
2015-02-17 22:25:55 +01:00
cinap_lenrek eec5799f4c nusb/usbd: fix typo in debug prints, dont use %U format as its not installed 2015-02-17 22:17:30 +01:00
cinap_lenrek 5c84044f51 vc: eleminate strcpy in multab code 2015-02-17 22:16:02 +01:00
cinap_lenrek 03feba8cc1 [125678kqv][cl]: fix sprint() and strcpy() buffer overflows 2015-02-17 22:13:35 +01:00
cinap_lenrek fdeea811b7 tlssrv: produce meaningfull error message when unable to read certificate 2015-02-17 07:05:54 +01:00
cinap_lenrek ebeb158a08 tlssrv: fix usage, dont cat 2015-02-17 06:59:55 +01:00
cinap_lenrek a55c2b2b81 tlssrv: fix this mess (thanks burnzez for reporting the issue)
tlsServer() closes the passed in fd, in our case fd=1 leaving it
with no std output which got occupied by pipe() filedescriptor
which it then closed after duping... a classic.

delete all this mess. theres no reason to fork() and copy traffic
on a pipe at all as tlsServer() gives us a perfectly valid filedescriptor.
just dup() and exec() and we'r done.
2015-02-17 06:54:19 +01:00
cinap_lenrek d99a4ed1b8 wc: flags dont need to be uvlong 2015-02-15 06:26:49 +01:00
cinap_lenrek 94d3d64c88 wc: bring back old wc but extended for 21 bit runes
the imported wc from sources is arround 8 times slower
than our old one. it is common to run wc on large log files
to count lines. so i think the implementation complexity
is justified. (just like with grep)
2015-02-15 06:22:19 +01:00
cinap_lenrek b06a35ba56 wc: import new wc from sources 2015-02-14 16:20:40 +01:00
cinap_lenrek 995379e388 usbehci: initial support for usb on zynq, remove uncached.h
the following hooks have been added to the ehci Ctlr
structore to handle cache coherency (on arm):

	void*	(*tdalloc)(ulong,int,ulong);
	void*	(*dmaalloc)(ulong);
	void	(*dmafree)(void*);
	void	(*dmaflush)(int,void*,ulong);

tdalloc() is used to allocate descriptors and the periodic
frame schedule array. on arm, this needs to return uncached
memory. tdalloc()ed memory is never freed.

dmaalloc()/dmafree() is used for io buffers. this can return
cached memory when when hardware maintains cache coherency (pc)
or dmaflush() is provided to flush/invalidate the cache (zynq),
otherwise needs to return uncached memory.

dmaflush() is used to flush/invalidate the cache. the first
argument tells us if we need to flush (non zero) or
invalidate (zero).

uncached.h is gone now. this change makes the handling explicit.
2015-02-14 03:00:31 +01:00
cinap_lenrek 6b2d1f0186 zynq: do fixed mapping for ocm memory on boot and make kaddr() and paddr() work with it
map the whole ocm memory on boot so we can translate physical to
virtual addresses and back for uncached memory using KADDR() and
PADDR().

replace ualloc() with ucalloc() returning virtual address. physical
address can be acquired with PADDR() now.

as ocm is now always mapped, use KADDR() instead of tmpmap() for
mp bootstrap.
2015-02-14 02:44:19 +01:00
cinap_lenrek 3805e56edc ircrc(1): remove auth/userpasswd complaint from BUGS section 2015-02-12 18:24:41 +01:00
cinap_lenrek 92602d08d6 build and document auth/userpasswd 2015-02-12 18:18:34 +01:00
cinap_lenrek 8b57e59ea9 libc: check name in getvent()/putenv()
passing "", "." or ".." as name caused a crash in
getenv() as it would open the directory; then seek()
to determine the file size would fail and return -1.

now checking for these special names and set
error string when its bad.

doing a single read() will not work when /env has a
9p fileserver mounted onto it and the file size is bigger
than the i/o unit. so doing incremental reads until
we get eof.
2015-02-11 23:54:28 +01:00
cinap_lenrek 21570a4719 igfx: displayport support for ivy bridge 2015-02-09 19:17:04 +01:00
stanley lieber 20f2add592 mothra: add side scrolling, controlled by left and right buttons on the keyboard. if desired, x-scrollbar can be set visible via the visxbar variable in mothra.c. (thanks, jpm_) 2015-02-08 13:19:47 -05:00
stanley lieber b2c2d1ed2a vga/igfx: add 0x2a02 for GM965/GL960/X3100; comment vid/did with name of chipset 2015-02-07 01:12:46 -05:00
stanley lieber cab445eb62 pc64: enable uartisa in default config 2015-02-07 01:01:11 -05:00
aiju dc506ad17e games/c64: map : to \ key 2015-02-07 18:55:03 +01:00
aiju 0ac099e6b4 games/c64: fix -2/-3 2015-02-07 18:28:55 +01:00
aiju be3db32338 games/mkfile: add c64 2015-02-07 18:12:06 +01:00
aiju cca3ad2453 games/c64: oops 2015-02-07 18:11:19 +01:00
aiju f6eacf471e added games/c64 2015-02-07 18:03:17 +01:00
cinap_lenrek 8ac5227a36 zynq: fix print format warning in screeninit() 2015-02-07 03:24:07 +01:00
cinap_lenrek e8760ba636 kernel: make pagereclaim() a bit less stupid
put recently used pages at the head of ther image hash
chains, and reclaim pages from the tail first.
2015-02-07 03:01:59 +01:00
cinap_lenrek b8cf3cb879 kernel: reduce Page structure size by changing Page.cachectl[]
there are no kernels currently that do page coloring,
so the only use of cachectl[] is flushing the icache
(on arm and ppc).

on pc64, cachectl consumes 32 bytes in each page resulting
in over 200 megabytes of overhead for 32gb of ram with 4K
pages.

this change removes cachectl[] and adds txtflush ulong
that is set to ~0 by pio() to instruct putmmu() to flush
the icache.
2015-02-07 02:52:23 +01:00
cinap_lenrek f215b660b3 fplot: add modulus % operator 2015-02-05 19:55:46 +01:00
cinap_lenrek 6409684518 libsec: add TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA client cipher suit support 2015-02-05 04:29:28 +01:00
cinap_lenrek 30871030f5 aux/vga: remove vbs/vbe from mode, use shs/ehs when sync is ment, prefer detailed timing in edid
vbs/vbe members in Mode was only used in the vesadb
and cannot be changed from vgadb.

use shs/ehs in drivers when refering to the horizontal
sync pulse. clarify the matter in a comment.

link detailed timing modes at the head of the edid
modelist. these are the modes we'r interested in,
not the ones from vesadb.
2015-02-05 23:08:46 +01:00
stanley lieber b41ca13526 fortunes: The NTP codebase is larger than the SSH codebase. 2015-02-02 21:30:07 -05:00
cinap_lenrek 01762349bd aux/vga: fix mistale :-) 2015-02-02 03:05:56 +01:00
cinap_lenrek 8067368e10 aux/vga: use optional edid information to determine mode when vgadb fails
igfx and vesa can determine monitor timing information from ddc
and store the edid info for connected monitors in vga->edid[].
when monitor type cannot be found in vgadb, we consult the edid
information and make a mode based on the edid info.

this avoids having to maintain a vgadb entry for each monitor.

monitor can be set to "[width]x[height]@[freq]Hz" for a specific
edid setting. when not found, a mode is searched based on the
size.

so the following should work:

aux/vga -m 1366x768@60Hz -l 1366x768x32
aux/vga -m auto -l 1366x768x32
2015-02-02 02:58:59 +01:00
cinap_lenrek e34fa15921 aux/vga: cleanup vesa code
dbvesamode() modified the passed in size string in the process
of option parsing. this is a no-go because the string might be
constant in the read only section. provide cracksize() function
for the parsing and make a static copy.

do the vendor specific monitor detection in vbesnarf() instead
of vbecheck(). vbecheck()'s purpose is to check if vesa bios
service is avialable, not snarf graphics card state.

nvidiascale() was a no-op because it missed the vbecall() at
the end of the function. this means it was never tested so i
add the missing vbecall(), but disable nvidiascale for now
until someone tests this.

keep fancy stuff out of the Vbe structure. it is just there for
making bios calls, not keep state about the graphics card.
2015-02-01 19:28:24 +01:00
cinap_lenrek 7fbed4d635 mothra: people do not like it. reverting 2015-01-31 20:18:45 +01:00
cinap_lenrek 3ce514ca0a mothra: wrap long text and images to fit 2015-01-31 20:01:24 +01:00
cinap_lenrek b76b5901ff kernel: increase size of palloc.mem[] user page bank array
we'r hitting the limit of user page banks on some asrock mainboard,
so doubling the size of the array twice to make running out unlikely.
2015-01-30 14:50:28 +01:00
cinap_lenrek d21af17367 wifi: fix recvbeacon()
we used to read beyond the boundaries of the becon because of
the end pointer was offset by the beacon header. this is
also what caused the double entries.
2015-01-30 13:41:23 +01:00
cinap_lenrek 18b931dde7 wifi: ignore truncated tlv in beacon/probes 2015-01-30 02:00:07 +01:00
cinap_lenrek 0c7d5168c3 factotum(4): fix typo 2015-01-29 14:11:43 +01:00
cinap_lenrek 4442e0e1d5 factotum(4): document mschapv2 and wpapsk protocols 2015-01-29 13:57:27 +01:00
cinap_lenrek bb3db0d568 tftpfs(8): fix manpage reference dhcp(8) -> dhcpd(8) 2015-01-29 13:21:12 +01:00
cinap_lenrek 9532b43d32 ircrc(1): tlsclient(8) -> tlssrv(8) 2015-01-29 13:17:34 +01:00
cinap_lenrek 6f9d8697f6 6in4(8): document ayiya 2015-01-29 13:16:08 +01:00
cinap_lenrek a535870669 ircrc(8), ndb(8): fix manpage reference 2015-01-29 12:36:14 +01:00
cinap_lenrek e823ddb3b0 devmnt: handle rpc buffer exhaustion on mntflushalloc()
this bug happens when the kernel runs out of mount rpc
buffers when allocating a flush rpc. in this case, mntflushalloc()
will errorjump out of mountio() leaving the currently in
flight rpc in the mount. the caller of mountrpc()/mountio()
frees the rpc thats still queued in the mount leaving
to interesting results.

for the fix, we add a waserror() arround mntflushalloc() and
handle the error case like a mount rpc failure which will
properly dequeue the rpc's in flight.
2015-01-27 22:14:26 +01:00
cinap_lenrek 72be22cd3a wpa: fix password avp padding, recognize wpa1 authentication oui
we have to padd the data portion in the password avp,
not add padding after the avp.
2015-01-27 14:09:24 +01:00
cinap_lenrek a342e5ac5d wpa: do not forward alert tls records, close connection 2015-01-27 10:56:56 +01:00
mischief 3440516e04 pc, efi loaders: erase characters when backspace is pressed 2015-01-25 17:21:07 -08:00
cinap_lenrek 5fc2f6af6c wpa: cleanup, pad eap-ttls/pap password, zero passwords and key material after use 2015-01-26 01:26:42 +01:00
cinap_lenrek 5a0c34e9fb wpa: experimental wpa2 enterprise support
this adds support for eap-peap/mschapv2 and eap-ttls/pap.

code has only been tested with freeradius and a cheap
access point, not tested with actual eduroam network.
2015-01-25 07:58:20 +01:00
cinap_lenrek 5649042bff factotum: implement proto=mschapv2 client role
this is used for wpa2 enterprise peap/mschapv2. server role
is not implemented as that would require changing the
wire format on the auth server.

the naming is unfortunate as we already have proto=mschap2 which
really refers to ntlmv2.
2015-01-25 07:49:50 +01:00
cinap_lenrek 91d3af942a auth(2): fix prototype for auth_getinfo() in manual page 2015-01-25 07:40:52 +01:00
cinap_lenrek 3d4d594049 pc: dont handle pending floating point exception in fpsave thru FPOFF
the FPOFF macro that follows the FXSAVE/FSAVE instructions in l.s
used to execute WAIT instruction when the TS flag was not set. this
is wrong and causes pending exceptions to be raised from fpsave which
is called from provsave() which holds up->rlock making it deadlock
when matherror() tries to postnote() to itself.

so making FPOFF non-waiting (just set TS flag).

we handle pending exception when restoring the context.
2015-01-23 14:01:56 +01:00
cinap_lenrek 8b95dad208 libdraw: fix broken eenter()
eenter would go into a endless loop in the redraw avoidance case
because the label was misplaced.
2015-01-18 10:34:05 +01:00
cinap_lenrek c4170c5052 igfx: remove hardware cursor support for X60t, does not work 2015-01-17 05:14:23 +01:00
cinap_lenrek 0c91d121f0 igfx: fix wrong cursor position register address 2015-01-17 04:00:36 +01:00
cinap_lenrek 66d0bb89a4 iwl: add "reset" ctl message to software tigger device reset 2015-01-17 01:52:24 +01:00
cinap_lenrek 22d15f98ba igfx: determine amount of preallocated stolen graphics memory for hw cursor
allocate the hardware cursor plane at the end of
preallocated stolen graphics memory.
2015-01-16 13:38:52 +01:00
cinap_lenrek 5e50b13d34 devvga: use uintptr for VGAscr.paddr and VGAscr.storage
some vga drivers use virtual addresses in VGAscr.storage,
so has to be uintptr sized for amd64.
2015-01-16 11:36:11 +01:00
cinap_lenrek 6afce2e422 igfx: support for X60t with 1400x1050 panel
program secret plane size and position registers described as "reserved"
in g45_vol_3_register_0_0.pdf that was found by inspecting vesa bios
port traces.

also, we have to set 18:19 (Cursor/Dispaly/Overlay Planes Off) in
PIPExCONF while programming the planes on this card. this is what
vesa bios does on modeset.
2015-01-16 07:55:38 +01:00
cinap_lenrek 511cee2f22 webcookies: only sync the jar when dirty on clunk
avoid sync the jar file when fids get clunked.
the only reason to sync the jar on clunk is when it has
been marked dirty (cookies added or deleted) and we
want to flush the changes to disk.
2015-01-16 04:46:52 +01:00
cinap_lenrek e41faad5a6 webcookies: avoid rereading and rewriting the cookie jar file all the time, dont return deleted cookies on search
- rewrite when jar->dirty != 0 (caller modified the in memory jar)
- reread when the jar->qid != stat(jar->file)->qid (on disk file changed)
- ignore deleted cookies in cookiesearch()
2015-01-16 04:04:55 +01:00
cinap_lenrek d115bd0e20 igfx: cursor/plane pipe assign is G45 only, add magic dsp a toggle from enable sequence 2015-01-13 18:04:33 +01:00
cinap_lenrek 9f11d4f689 kbfds: delete autogenerated latin1.h file when mklatin fails 2015-01-13 00:19:18 +01:00
stanley lieber fff822849f plan9.ini(8) man page: update links to iwn and ral firmware blobs 2015-01-12 14:23:32 -05:00
cinap_lenrek 140f7b7fef igfx: set the display/overlay/cursor plane override disbale bits for G45 (like bios) 2015-01-12 16:52:49 +01:00
cinap_lenrek 54a1db15dc igfx: fix typo, initialize more lvds bits for G45, T60 testing 2015-01-12 16:40:02 +01:00
cinap_lenrek 24d693348a igfx: reverting previous change, pci id is for the second graphics controller pci device 2015-01-12 04:07:16 +01:00
cinap_lenrek ce69208641 igfx: support for X200 (thanks bigato) 2015-01-12 03:09:58 +01:00
cinap_lenrek 90c1959fc4 igfx: properly turn vga monitor off 2015-01-12 02:10:00 +01:00
cinap_lenrek 34f2e1eaf6 igfx: aaand vga support for x200s :-) 2015-01-12 02:04:13 +01:00
cinap_lenrek 9b28b2d97b igfx: vga support on x230, fix fdi link setup, LG Flatron L1730P vgadb entry 2015-01-12 01:51:51 +01:00
cinap_lenrek 773f1c5f6a fix missing games/gba target in mkfile (thanks qu7uux) 2015-01-12 00:02:15 +01:00
cinap_lenrek 01a1d96315 igfx: only use mmio... left from debugging 2015-01-11 04:03:14 +01:00
cinap_lenrek 21b0bafd10 igfx: cleanup 2015-01-11 03:44:56 +01:00
cinap_lenrek b4fcd2d68f merge 2015-01-11 03:37:07 +01:00
cinap_lenrek 2cdadb1b2f igfx: get edid information from lvds 2015-01-11 03:35:30 +01:00
mischief a4650bdf83 ip/ipconfig: set ndb database file with -f argument 2015-01-10 11:27:45 -08:00
stanley lieber 4dfcb4791b xargs(1) man page: rewritten -> implemented 2015-01-10 13:48:18 -05:00
stanley lieber cbca753f00 xargs(1) man page: add HISTORY (thanks, jpm_) 2015-01-10 13:46:47 -05:00
cinap_lenrek 6e67b04a1f igfx: use mmio to access registers instead of pio, fix wrong igfxmmio segment size
initially, pio was used to access registers so i didnt need
a kernel driver for initial testing.

pio does not work under efi, so use mmio to access registers.
2015-01-10 03:07:29 +01:00
cinap_lenrek 7c3736a16a merge 2015-01-10 02:16:50 +01:00
cinap_lenrek 8d8935618c igfx: perserve frame start delay "magic" bits 27:28 in pipe conf register
it turns out, the "magic" bits 27:28 are the frame start
delay setting that need to be preserved.
2015-01-10 02:15:30 +01:00
mischief f6a9db1bd9 libdraw: don't redraw input box in enter/eenter when mouse is moved outside the rectangle
prevents some flickering when devdraw is used over a high latency connection.

Fixes issue 236
2015-01-09 15:41:00 -08:00
cinap_lenrek 15590e39c6 igfx: implement hardware cursor
this can even be used with the vesa driver, just
enable the cursor after mode switch like:

echo hwgc igfxhwgc >/dev/vgactl
2015-01-09 22:23:25 +01:00
cinap_lenrek cf76346b37 igfx: fix some comments 2015-01-09 03:18:44 +01:00
cinap_lenrek 35ad5c9136 igfx: aaaand the kernel part :( 2015-01-09 03:03:23 +01:00
cinap_lenrek ce8db466ba igfx: just kidding, heres the code :) 2015-01-09 02:58:14 +01:00
cinap_lenrek 6fe180657f igfx: work in progress intel graphics driver
this driver can modeset lvds on x200s and x230.
everything else is completely untested.
no hardware cursor implemented.
no vgadb entries are provided.
2015-01-09 02:55:12 +01:00
cinap_lenrek 212db4135d merge 2015-01-09 02:45:14 +01:00
mischief 97d6d9ddaa vncs: add -A for no auth to usage 2015-01-06 20:13:16 -08:00
mischief 1bd467fc0e vncs: turn off auth with -A, do not require -c for -x 2015-01-05 20:21:40 -08:00
mischief 654450bc1d vnc: put newlines in verbose messages 2015-01-05 20:02:01 -08:00
cinap_lenrek ef9c5b4cc7 pool: more strict checktree() for poolcheck
check that Free.next and Free.prev pointers are not nil.

check that Free.left and Free.right are Poison in non-tree nodes.

check that Free.left and Free.right are *not* Poison in tree nodes.

change Poison to 0xffffffffcafebabe for 64bit machines.
2015-01-05 14:23:01 +01:00
cinap_lenrek 384d4d2d62 sdide: add vid/did for 82801IIH Intel Q35 IDE controller (thanks kenji) 2015-01-04 12:49:44 +01:00
cinap_lenrek 5b24195a0a sdiahci: sanitize ahci pci bar
make sure the ahci pci bar is not in i/o space and has
the right size. also make sure Aport registers are within
the ahci bar range.
2015-01-04 04:26:58 +01:00
cinap_lenrek b5008f3b56 devvga: disable hardware blanking when switching drivers, check softscreen
we have to reset hwblank when switching drivers to
prevent the generic vgablank() to be called by
blankscreen().

remove code setting hwblank from vga drivers as
devvga will always force hwblank to be 1 or 0
depending on if the driver provides a native blanking
routine.

set hwaccel to 1 when the driver provides native fill
and scroll routines independent of softscreen being
disabled. this allows hw acceleration to be used when
softscreen gets switched off.
2015-01-03 18:33:35 +01:00
mischief 1b4b4e89aa bin(2): fix tab formatting 2014-12-31 23:45:05 -08:00
ftrvxmtrx a053d902db aux/realemu: remove unused global 2015-01-02 19:07:40 +01:00
ftrvxmtrx 753bb6b87a aux/vga: revert vbegetmode 2015-01-02 19:07:01 +01:00
cinap_lenrek 68b8351f8c devdraw: remove broken color palette blanking
the code did not work as drawactive() was called with
the drawlock held. instead of fixing, the code for
palette blanking has been removed.
2015-01-02 18:48:22 +01:00
cinap_lenrek 6cb93914f2 devvga: better way to prevent blank hwaccel race
don't hold drawlock duing vga enable and disable, but just zero
the function pointers under drawlock *before* disabling the vga
device.

holding the drawlock while calling out into enable and disable
is not a good idea. with vgavesa, this might deadlock when
userspace realemu tries to print in a rio window with vgavesa.
2015-01-02 17:07:47 +01:00
cinap_lenrek 9aec87c46c vgavesa: get rid of the vesa kproc
in 9front, screen blanking is always initiated from process context,
so there is no need for a kproc anymore.

care has been taken for the race between vesadisable() and vesablank()
by acquiering the drawlock prior calling scr->dev->enable() and
scr->dev->disable(). this also has the side effect of accelerated
fills and scrolls not being called during device disable.
2015-01-02 15:29:15 +01:00
ftrvxmtrx 7848fe5970 aux/vga: do not set mode 3 unless connected 2015-01-02 13:29:58 +01:00
ftrvxmtrx 8b9badd6a6 aux/vga: fix switching with different mode
Prior to switching display, switch to text mode 3, which
is supported by anything, then set display, search for the
desired mode, load it if found. If not found, set the display
to the old one and switch to the old mode back.
2015-01-02 13:24:27 +01:00
cinap_lenrek 96595f5101 nedmail: do not recursively plumb email multipart attachments in print command 2015-01-02 12:05:35 +01:00
ftrvxmtrx c5da8810ee nusb/kb: fix alt/altgr being swapped for some reason 2015-01-01 22:53:17 +01:00
ftrvxmtrx f1b1e0d637 aux/vga: display switching for Intel adapters
Magic was discovered by abusing INT 10 on several machines
while switching cables back and forth and watching the end result.
2015-01-01 16:19:24 +01:00
cinap_lenrek 9e45c8bc9b zynq: differentiate various pagefault types in faultarm() 2015-01-01 11:32:00 +01:00
ftrvxmtrx 04efb3a4a3 tcs: update charsets. Fixes issue #214 2015-01-01 11:20:23 +01:00
cinap_lenrek 6adf8466a2 hjfs: fix missing superblock dirty mark when reaming 2015-01-01 23:18:07 +01:00
aiju 941912f5ff hjfs: make -m default 4 MB instead of 40 KB 2014-12-31 20:04:10 +01:00
cinap_lenrek cdf7520738 zynq: enable branch prediction 2014-12-30 15:49:44 +01:00
cinap_lenrek 080cc49f50 zynq: implement µs() 2014-12-30 15:17:27 +01:00
cinap_lenrek ed294a65cb zynq: enable prefetch hints and drop-prefetch 2014-12-30 15:16:46 +01:00
cinap_lenrek 9f880e595c libmemdraw: never point Buffer.alpha to nil (thanks mischief)
the boolcopy optimization doesnt doesnt use Buffer.alpha, tho
the debug function dumpbuf() still can dereference it. to keep
it simple, always have Buffer.alpha point to the channel or
&ones when not used.
2014-12-30 12:44:42 +01:00
ftrvxmtrx 5935eeb6de aux/vga: scale only if mode was set successfully 2014-12-29 16:43:33 +01:00
cinap_lenrek 11b5e0ac14 merge 2014-12-29 16:06:57 +01:00
cinap_lenrek cb2103879e zymq: lilu dallas, multicore
implement multiprocessor support.
2014-12-29 16:02:57 +01:00
cinap_lenrek e08cc06517 add games/md to /sys/src/games/mkfile 2014-12-29 11:55:51 +01:00
ftrvxmtrx 774065caaa aux/vga: rescale after loading new mode
Intel VBIOS seem to not update its state unless in graphical
mode, so set the scaling mode after loading new graphical mode.
2014-12-29 10:06:29 +01:00
mischief fa06413db4 libdraw: don't deference nil display in freefont 2014-12-28 23:11:21 -08:00
mischief f188158f1c libmemdraw: fix fd leak in openmemsubfont and memory leak in freememsubfont 2014-12-28 22:46:39 -08:00
mischief ba47daaab3 memlayer(2): fix memdraw signature 2014-12-28 12:14:24 -08:00
stanley lieber 21647f97e6 fortunes: no. -- ftrvxmtrx 2014-12-28 15:08:41 -05:00
ftrvxmtrx d908aff72f aux/vga: remove -s option, move scaling to the size string itself 2014-12-28 17:42:38 +01:00
mischief 31e1c15d44 ircrc: use aux/trampoline or tlsclient for connections, add -T flag for tls
previously ircrc dialed through /net itself and resolved ips on its own. this prevented the use of an ip address, and also prevented use of ipv6. now you can use an ip, or a dns name that resolves to ipv6. the -T flag is also added to use tlsclient for encrypted connections.
2014-12-27 23:38:21 -08:00
ftrvxmtrx 0d5b33a9e8 aux/vga: scaling modes for VESA 2014-12-26 17:01:58 +01:00
ftrvxmtrx 04ec990b67 vga, vesa: revert. this needs to be in aux/vga instead 2014-12-26 16:10:45 +01:00
ftrvxmtrx 2cc7c72f8e vga, vesa: scaling modes
At least on some NVIDIA cards the default scaling mode makes
black borders visible on all sides, even on native resolution.
This patch adds a generic "scaling MODE" command to vgactl
and adds support for it on VESA through NVIDIA VBE OEM extension.
It hasn't been tested on any other video cards, but shouldn't
break anything as the scaling mode is only set on write to vgactl.
2014-12-26 15:40:06 +01:00
cinap_lenrek 7f5f69ebb5 socksd: revert back, previous commit broke UdpAssociate request
should probably figure out a better way to get public ip
address on a interface.
2014-12-26 11:41:53 +01:00
cinap_lenrek 7a54873252 libip: skip ipv6 loopback address (thanks mischief) 2014-12-26 09:34:30 +01:00
cinap_lenrek de349cf9b0 socksd: dont use myipaddr() for announcing address 2014-12-26 09:11:04 +01:00
cinap_lenrek 2ab042f11e getfcr: change getfcr/setfcr to use VFP 2014-12-25 17:44:49 +01:00
cinap_lenrek ed5c9fd00a zynq: only tmpmap() while splhi(), remove unneeded coherence() after tmpunmap(), splhi() in l2free()
we have to call tmpmap() with interrupts disabled as the map
is a per cpu and a interrupt can preempt us while we where
commited to use a entry but *before* we wrote it!

tmpunmap() already calls coherence() before flushpg() so it
is not needed after tmpunmap().

splhi() in l2free() isnt needed as l2free() is always called
with interrupts disabled from mmuswitch() and mmurelease().
2014-12-25 11:30:29 +01:00
cinap_lenrek 9b5387fbde zynq: dont do install target by default in the mkfile 2014-12-25 11:12:31 +01:00
cinap_lenrek 77e0feb67c zynq: fpsave() and fpclear() both need to disable the fpu
fpsave needs to disable the fpu! otherwise we won't catch
the mathtrap() in the kernel or when context switching to
another process that will attempt to use it.
2014-12-24 20:53:58 +01:00
cinap_lenrek 1c6daca577 zynq: active.machs = 1 2014-12-24 16:56:48 +01:00
cinap_lenrek aca053c18a zynq: set mainmem->maxsize so kernel malloc() wont fail after 4MB 2014-12-24 13:37:54 +01:00
cinap_lenrek 4e94094e94 5l: remove -f flag and add -F flag to disable VFP code generation
almost nobody uses FPA anymore, so make VFP the default but
provide -F flag to disable it.
2014-12-24 11:38:44 +01:00
cinap_lenrek 2ef69f42d8 zynq: fix kernel configuration so it builds 2014-12-24 11:20:40 +01:00
cinap_lenrek d1799f65ca nusb/serial: fix nusb/serial hang with ftdi
have to create process, not a thread in ftdi code so main
process can exit after posting fs service.
2014-12-24 11:04:18 +01:00
aiju 7a3f0998a0 added zynq kernel 2014-12-24 10:21:51 +01:00
stanley lieber 6dafa42480 fortunes: if(~ $i (seek _nsec)) { # untested so far - geoff 2014-12-23 12:04:11 -05:00
stanley lieber 4581be5180 rc-httpd(8): add HISTORY to man page 2014-12-23 12:03:42 -05:00
cinap_lenrek 3ab80c9fe0 pc, pc64, xen: change return type of intrdisable() to void
intrdisable() will always be able to unregister the interrupt
now, so there is no reason to have it return an error value.

all drivers except uart8250 already assumed it to never fail
and theres no need to maintain that complexity.
2014-12-22 16:56:04 +01:00
cinap_lenrek c404fd9d6f sdvirtio: provide enable() and disable() functions so it can be switched off 2014-12-22 16:16:36 +01:00
cinap_lenrek e0c221eea6 pc, pc64: fix intrdisable() to remove the Vctl entry even tho we can't disable the interrupt on apic 2014-12-22 16:10:18 +01:00
cinap_lenrek b486d8871b sdvirtio: move common "queue i/o and wait" code into vqio() function, handle notify suppression 2014-12-22 12:17:48 +01:00
cinap_lenrek 515893dda6 pc, pc64, xen: simplify #P/irqalloc 2014-12-22 10:49:52 +01:00
cinap_lenrek f4c6dad8e1 pc, pc64: include PCArch.id in #P/archctl simplify #P/ioalloc read handler 2014-12-22 09:33:35 +01:00
cinap_lenrek a5b0b6ba2c ape: add fprint %z format (thanks Ori_B) 2014-12-22 09:18:18 +01:00
cinap_lenrek 1db9f19b62 ip: exclude "don't fragment" bit from ipv4 reassembly test
other operating systems always set the "don't fragment" bit
in ther outgoing ipv4 packets causing us to unnecesarily
call ip4reassemble() looking for a fragment reassembly queue.

the change excludes the "don't fragment" bit from the test
so we now call ip4reassemble() only when the "more fragmens"
bit is set or a fragment offset other than zero is given.

this optimization was discovered from akaros.
2014-12-21 17:25:55 +01:00
mischief bf049ebdb1 pci(8): document vid/did argument 2014-12-20 22:32:51 -08:00
mischief 3f4e84292c pci(8): fix usage 2014-12-20 21:56:06 -08:00
cinap_lenrek 127f8f0480 tee: get rid of openf[100] array and just dup() filedescriptors to 3+[0..n-1] 2014-12-21 05:12:56 +01:00
cinap_lenrek 468851cde6 merge 2014-12-21 04:48:29 +01:00
cinap_lenrek cb35d1a132 kernel: avoid inconsistent reads in /proc/#/fd and /proc/#/ns
to allow bytewise access to /proc/#/fd, the contents of the file where
recreated on each call. if fd's had been closed or reassigned between
the reads, the offset would be inconsistent and a read could start off
in the middle of a line. this happens when you cat /proc/#/fd file of
a busy process that mutates its filedescriptor table.

to fix this, we now return one line record at a time. if the line
fits in the read size, then this means the next read will always start
at the beginning of the next line record. we remember the consumed
byte count in Chan.mrock and the current record in Chan.nrock. (these
fields are free to usefor non-directory files)

if a read comes in and the offset is the same as c->mrock, we do not
need to regenerate the file and just render the next c->nrock's record.

for reads smaller than the line count, we have to regenerate the content
up to the offset and the race is still possible, but this should not
be the common case.

the same algorithm is now used for /proc/#/ns file, allowing a simpler
reimplementation and getting rid of Mntwalk state strcture.
2014-12-21 04:46:22 +01:00
ftrvxmtrx a11fe1959d merge 2014-12-21 01:30:36 +01:00
ftrvxmtrx 758496ecaa sam: '^' and '_' cmds; same as '<' and '|' except that stdout goes to the command window 2014-12-21 01:28:14 +01:00
cinap_lenrek 8ac28ac11c flate: fix wrong adler32() length calculation (thanks qrstuv) 2014-12-20 03:34:40 +01:00
cinap_lenrek ffe862c543 vblade: fix code so #pragma pack isnt needed 2014-12-19 03:57:27 +01:00
cinap_lenrek 6379939642 add erik quanstros vblade utility 2014-12-19 02:50:22 +01:00
cinap_lenrek e93cd703a2 pc64: enable devaoe and sdloop in kernel configuration 2014-12-19 02:40:45 +01:00
cinap_lenrek e3a77e594f sdloop: hardcode Enotup[] string to avoid devaoe dependency 2014-12-19 02:38:36 +01:00
cinap_lenrek 9df9a3625c sdaoe: allow aoedev= shorthand for id!lun -> id!#æ/aoe/lun
we cannot type æ character in the bootloader console, so allow
the shorthand syntax id!lun which gets translated to id!#æ/aoe/lun.
2014-12-19 02:37:40 +01:00
cinap_lenrek 2d06aac2ab pc, pc64: adjust mpshutdown() comment to reflect the current state 2014-12-19 23:57:43 +01:00
cinap_lenrek 7523131e78 pc, pc64: untangle acpireset() from mpshutdown()
mpshutdown() used to call acpireset() making it impossible to build
a kernel without archacpi. now, mpshutdown() is a helper function
that only shuts down the application processors that gets used from
mpreset() and acpireset().

the generic machine reset code in exported by devarch's archreset()
function that is called by mpreset() and from acpireset() as a fallback.
so the code duplication that was in mpshutdown() is avoided.
2014-12-19 23:34:43 +01:00
stanley lieber d94dc3314d hgfs(4): add SOURCE to man page (thanks, spew) 2014-12-18 16:11:12 -05:00
stanley lieber ba25b6cd7f fortunes: oh really. 2014-12-18 16:07:17 -05:00
stanley lieber 725c77211a hgfs(4): add HISTORY to man page 2014-12-18 16:06:25 -05:00
cinap_lenrek 06f6b1c9e2 xen: remove segmentation constants, not used on xen. 2014-12-18 02:53:49 +01:00
cinap_lenrek b7e7e5ef3f pc: remove mmuinit0()
all mmuinit0() does is initialize m->gdt, but this isnt neccesary
as this is done by mmuinit() anyway before loading the gdt.
2014-12-18 02:04:42 +01:00
cinap_lenrek 3e7d181191 merge 2014-12-18 23:55:00 +01:00
cinap_lenrek d9c4637a5f kernel: remove "checked xxx page table entries" print from checkpages()
the purpose of checkpages() is to verify consitency of the hardware mmu state,
not to notify on the console that a program faulted. a program could also
continue after handling the note. (this seems to be the case in go programs)
2014-12-18 23:53:32 +01:00
cinap_lenrek f52e85826f kernel: print addresses in hex and sizes in decimal in xallocsummary 2014-12-18 23:06:39 +01:00
mischief 84f45a4491 acme: allow typing '\n' in window tags 2014-12-17 14:27:31 -08:00
cinap_lenrek 476a47b15c pc, pc64: cleanup devarch
- shorten cpuidprnt so it doesnt have to break line
- addarchfile: complain when running out of entries
- fix range check in rmemrw() (harmless)
- use nil instead of 0 for pointers
2014-12-17 22:49:51 +01:00
cinap_lenrek 35df6c32a2 fstype(1): cleanup 2014-12-17 21:43:54 +01:00
cinap_lenrek b9f23248c5 boot(8): the method!server notation isnt usefull anymore...
- in 9front, the bootargs are in the form: method!device args
- remove redundant and wrong paragraphs regarding tcp booting
- document il boot method
- fix boot and bootrc confusions
2014-12-17 11:18:05 +01:00
cinap_lenrek 13c4b57c0c teg2, xen: remove unused bootdisk[] and fix conf.nswppo factor in kernel memory size calculation 2014-12-17 10:03:45 +01:00
cinap_lenrek 0e2ff6fb1f pc: remove unused bootdisk[] variable 2014-12-17 09:45:50 +01:00
cinap_lenrek 06e6115044 pc, pc64: remove old B.COM command line parsing and just pass tokenized BOOTLINE to /boot/boot as argv[]
this change allows command line passing to /boot/boot from qemu like:
qemu -kernel 9pcf -append "-u glenda tcp"
2014-12-17 09:23:21 +01:00
cinap_lenrek 0e03a5f9fd kernel: replace ulong with uintptr in ucallocb() and fix unneeded parentheses 2014-12-16 09:41:05 +01:00
cinap_lenrek 5c29603f50 kernel: remove obsolete comment regarding Mntcache size in */main.c 2014-12-16 08:11:21 +01:00
cinap_lenrek 8309f15c36 kernel: new mount cache
this is a new more simple version of the mount cache
that does not require dynamic allocations for extends.

the Mntcache structure now contains a page bitmap
that is used for quick page invalidation. the size
of the bitmap is proportional to MAXCACHE.

instead of keeping track of cached range in the
Extend data structure, we keep all the information
in the Page itself. the offset from the page where
the cache range starts is in the low PGSHIT bits and
the end in the top bits of Page.va.

we choose Page.daddr to map 1:1 the Mountcache number
and page number (pn) in the Mountcache. to find a page,
we first check the bitmap if the page is there and then
do a pagelookup() with the daddr key.
2014-12-16 05:41:20 +01:00
cinap_lenrek bc97fa79b1 audio/flacdec: fix pcmconv pipeline race (thanks mischief and henesy) 2014-12-15 07:26:03 +01:00
cinap_lenrek 523c33bb6f kernel: minor changes to mount cache
change page cache ids (bid) to uintptr so we use the full
address space of Page.daddr.

make maxcache offset check consistent in cread().

use consistent types in cupdate() and simplify with goto.

make internal functions static.

use nil instead of 0 for pointers.
2014-12-15 06:28:27 +01:00
cinap_lenrek c8ed49da60 xen: fix cross build 2014-12-15 01:43:31 +01:00
cinap_lenrek 07a776fad9 kernel: use new disk/mkfs -o option to get proper source filename list for bootfs.proto 2014-12-15 01:04:05 +01:00
cinap_lenrek 5c1803e1ad disk/mkfs: add -o flag to list source files 2014-12-15 00:52:22 +01:00
cinap_lenrek 2e94406e7f merge 2014-12-14 22:27:06 +01:00
cinap_lenrek 8d6171f1ae kernel: remove *.acid files in nuke target instead of $CONF.clean target 2014-12-14 22:25:15 +01:00
ftrvxmtrx 0dc1929379 png: fail on invalid bpc 2014-12-14 22:20:06 +01:00
cinap_lenrek 67bed722f2 kernel: get rid of /boot/boot parametrization
there is no use for "bootdisk" variable parametrization
of /boot/boot and no point for the boot section with its
boot methods in the kernel configuration anymore. so
mkboot and boot$CONF.out are gone.

move the rules for bootfs.paq creation in 9/boot/bootmkfile.
location of bootfs.proto is now in 9/boot/bootfs.proto.
our /boot/boot target is now just "boot".
2014-12-14 22:10:34 +01:00
cinap_lenrek 1d674abe9c xen: fix mtrr dummy functions 2014-12-14 21:58:02 +01:00
cinap_lenrek 035aacf6f5 bio: add Bfdopen() from plan9port 2014-12-14 20:21:42 +01:00
cinap_lenrek 4afb56f570 kernel: evaluate dependencies of bootfs.proto files for bootfs.paq
expand the list of files specified in bootfs.proto and use them
as dependencies to bootfs.paq rule. this way, bootfs.paq is
regenerated when the to be included files have been modified.
2014-12-14 00:00:59 +01:00
ftrvxmtrx 96525edaae various cmds: replace magic numbers with Kdel/Keof, etc 2014-12-13 21:58:49 +01:00
cinap_lenrek feb7702c9e kernel: correct dependency for printstub.$O instead of print.$O 2014-12-13 21:44:51 +01:00
mischief ff4daa7e93 stats: handle 'q' to close
a side effect of this is keys typed other than q/Del no longer get drawn on top of the window.
2014-12-13 11:28:16 -08:00
cinap_lenrek 25a9cc3adb pc, pc64: untangle embedded controller (ec) dependency from devarch 2014-12-13 06:23:23 +01:00
cinap_lenrek 6a3b9012d5 kernel: generate dummy bootscreeninit() function when building without vga device 2014-12-13 05:29:51 +01:00
cinap_lenrek 9be64bcb8d ndb/cs: fix spelling (thanks mischief) 2014-12-13 23:16:04 +01:00
stanley lieber 00334c0407 fortunes: UX-wise (and generally speaking, for most common uses of a computer these days), Plan9 is, sadly, almost useless. 2014-12-11 14:45:51 -05:00
stanley lieber e14d624974 qmail: call mail instead of smtp with the wrong path 2014-12-11 14:45:16 -05:00
cinap_lenrek 651fa5bd50 cfs: change default mountpoint to /mnt/cfs and fix the manual (thanks mischief) 2014-12-11 20:38:04 +01:00
cinap_lenrek 854d028db9 acme: fix buffer overrun in xfidutfread() and xfidruneread(), cleanup
the utf8 buffers b1 where allocated from fbufalloc() which gives
us BUFSIZE bytes, but Xfid->count can be bigger than that. so just
emalloc() the requested number of bytes.

when converting from Runes to utf-8, we have to account for the
terminating '\0' byte snprint() places, so fix the maxrune number
calculation instead of using BUFSIZE+1 as buffer size.
2014-12-11 20:20:47 +01:00
cinap_lenrek 86e63c36ed kbmap: fix sprint() buffer overflow (thanks silasm)
A buffer can be overflowed in the init function of kbmap.c by using a filename of more than 112 characters.

sample output:
% cd /sys/lib/kbmap
% touch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
% kbmap
kbmap 1974: suicide: sys: trap: fault write addr=0xa6a96510 pc=0x000011df
offending code is most likely the call to sprint in the init function of /sys/src/cmd/kbmap.c,
which in this case writes /sys/lib/kbmap/$file to a 128-bit buffer.
I'm willing to submit a patch for this myself along with a few minor improvements/fixes to kbmap
if I can figure out the nuances of doing so.

--silasm
2014-12-11 18:32:50 +01:00
cinap_lenrek ffa761beae plan9.ini(8): fix typo (thanks ftrvxmtrx) 2014-12-11 17:03:01 +01:00
cinap_lenrek 5ae58296a9 plan9.ini(8): etheryuk 2014-12-10 19:38:44 +01:00
cinap_lenrek ec495f37ec plan9.ini(8): document bcm and virtio ethernet and hda and ac97 audio. 2014-12-10 19:29:46 +01:00
cinap_lenrek 6357ff0e7b plan9.ini(8): remove factotumopts= (not implemented), add secstore=, clarify domain name use for fs= and auth= 2014-12-10 18:34:08 +01:00
cinap_lenrek aa2422b5eb bootrc: keep original address when ndb/dnsgetip fails and let dial complain 2014-12-10 18:02:41 +01:00
cinap_lenrek d4076731f1 bootrc: use "address" instead "ip" in wording netboot questions, as we domain names are allowed now. 2014-12-10 17:37:53 +01:00
cinap_lenrek b305ea4a3d merge 2014-12-10 03:24:21 +01:00
cinap_lenrek ba6cd37412 bootfs: remove disk/kfs fileserver, nobody uses it 2014-12-10 03:22:59 +01:00
cinap_lenrek 23b3407663 bootrc: add ndb/dnsgetip resolver to bootfs so domain names can be used for fs=, auth= and secstore= (thanks mischief) 2014-12-10 03:22:14 +01:00
cinap_lenrek d75f5a24ba bootrc: preserve #ec/fs (thanks _sl) 2014-12-10 03:16:36 +01:00
mischief 23d6c796cd ndb(8): document ndb/dnsgetip 2014-12-09 17:33:09 -08:00
cinap_lenrek 1985bebbdd dnsgetip: filter negative answers, remove -f flag, use dnsgetip logfile 2014-12-10 02:30:25 +01:00
mischief 230cee347f ndb: add dnsgetip program to resolve A and AAAA records during bootstrapping 2014-12-09 16:18:08 -08:00
cinap_lenrek 665f0c8e3e bootrc: handle multiple fs and auth addresses in netboot, always set auth= in /net/ndb 2014-12-10 00:30:07 +01:00
cinap_lenrek 17566b4dd3 bootrc: do not pass authserver with -a flag to factotum, handle multiple secstore addresses
factotum is started in bootrc before the network is setup
(as we need it to negotiate wpa key for wifi). once, the network
is setup, the bootstrap authservers are passed in /net/ndb,
which factotum reads when doing bootstrap authdial. it does
this only when no authserver was specified earlier! but we
want net.rc to select the proper bootstrap authserver...

the $secstore variable takes precedence over $auth. as
there is no connection server yet, we have to select the set
of servers here and pass them to secstore with -s flag.
note that this will work if multiple addresses where
specified.
2014-12-09 22:26:30 +01:00
cinap_lenrek f9d379974a factotum: accept multiple bootstrap auth servers in /net/ndb and -a arguments
we might have to deal with multiple bootstrap auth server
ip addresses (ipv4 and ipv6) in the future, so deal with them.
2014-12-09 22:07:37 +01:00
cinap_lenrek ee6936365f secstore: allow multiple server addresses in $secstore and multiple -s arguments
on bootstrap, we might have to deal with multiple auth server ip
addresses (ipv4 and ipv6), so deal with it.
2014-12-09 21:53:07 +01:00
mischief 98645db9ab devsegment: fix segmentcreate function signature 2014-12-08 23:16:22 -08:00
cinap_lenrek 8ec06b6fc6 merge 2014-12-09 03:25:52 +01:00
cinap_lenrek a0bb446d75 ethervirtio: fix queue notifications and interrupt flags, avoid useless notifications
bug: Rnointerrupt was used on Vqueue.used.flags instead of
Vqueue.avail.flags.

introduce vqnotify() function that notifies the device
about available ring advancement.

avoid queue notifications there that can be slow by
checking Unonotify flag in Vqueue.used.flags.

keep track of the number of notifications in the queue.
2014-12-09 03:23:53 +01:00
cinap_lenrek 469a10f1d9 hgwebfs: add fake add_handler method for HTTPRangeHandler()
provide a add_handler() so code trying to add
byterange.HTTPRangeHandler will succeed. webfs
does handle "206 Partial Content" already.
2014-12-09 23:11:05 +01:00
mischief ee2d30984f ip/ipconfig: treat /32 mask as /0
some dhcp servers send a mask of 255.255.255.255 to indicate the gateway is directly routeable.

thanks to david du colombier for this patch.
2014-12-08 17:27:40 -08:00
cinap_lenrek c217da0b5b ethervirtio: feature negotiation, allow setting mac address, dont read isr from ifstatus, avoid indirection
- properly negotiate Fctrlrx feature bit for promisc and multicast.
- allow setting mac address with ea= option from plan9.ini
- dont read the isr register from ifstats() as it has the side effect of reseting isr status
- embedd the Vqueue array in the Ctlr structure avoiding indirection
- add a interrupt counter Vqueue.nintr for statistical purposes
- only read network status register if the feature has been negotiated
- change name to "virtio" as "ethervirtio" is kind of redundant
2014-12-08 19:19:53 +01:00
cinap_lenrek 501e69d010 ndb/dns: ignore terminating authoritative flag for no-answer when more nameservers are provided
continue recursing when we get empty but non-negative answer
from a (claimed) authoritative nameserer that provides more
nameservers.

this fixes wordpress dns:

63766.3: sending to 192.0.80.93/ns1.wordpress.com bossypally.files.wordpress.com ip
63766: rcvd OK from 192.0.80.93 (authoritative)
	Q:    bossypally.files.wordpress.com ip
	Auth: files.wordpress.com              5 min           ns   	mdns1.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns2.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns3.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns4.wordpress.com
	      files.wordpress.com              5 min           ns   	mdns5.wordpress.com
	Hint: mdns1.wordpress.com              4 hr            ip   	192.0.75.7
	      mdns2.wordpress.com              4 hr            ip   	198.181.117.7
	      mdns3.wordpress.com              4 hr            ip   	198.181.116.7
	      mdns4.wordpress.com              4 hr            ip   	198.181.118.7
	      mdns5.wordpress.com              4 hr            ip   	192.0.74.7


63766.4: sending to 192.0.75.7/mdns1.wordpress.com bossypally.files.wordpress.com ip
63766: rcvd OK from 192.0.75.7 (authoritative)
	Q:    bossypally.files.wordpress.com ip
	Ans:  bossypally.files.wordpress.com   5 min           ip   	192.0.72.2
	      bossypally.files.wordpress.com   5 min           ip   	192.0.72.3
----------------------------
answer bossypally.files.wordpress.com   5 min           ip   	192.0.72.2
answer bossypally.files.wordpress.com   5 min           ip   	192.0.72.3
----------------------------

note the authoritative flag in the first response from ns1.wordpress.com that
would otherwise terminate the search.
2014-12-08 01:26:07 +01:00
cinap_lenrek 887d02274d ethervirtio: fix missing */ 2014-12-07 18:20:47 +01:00
cinap_lenrek 6b5d69391c ethervirtio: implement promisc and multicast mode, cleanup
add vctlcmd() function to setup and comlete control commands.
handle Vctlq and implement promiscuous and multicast mode commands.
remove Vqueue.block[] and Vqueue.header. these are not properties
of the queue (Vctlq as no block array).

the block[] array only needs to be half the queue size as we use
two descriptors per packet.

fix broken shutdown() and remove useless ctl() function.
2014-12-07 17:58:51 +01:00
cinap_lenrek aff0dc5e67 ethervirtio: avoid dumping packets in txproc when ring gets full 2014-12-07 15:34:53 +01:00
cinap_lenrek 964dafbdf0 9boot(8): -from 2014-12-07 14:34:15 +01:00
cinap_lenrek 972577b61e strcat(2): fix strchr() and strrchr() function prototypes (thanks BurnZeZ) 2014-12-07 14:26:41 +01:00
mischief 1fe69754b6 pc, pc64: add and enable ethervirtio driver
many thanks to cinap_lenrek, erik quanstrom and david du colombier for feedback and testing.
2014-12-06 22:13:44 -08:00
mischief e584f7f374 resize: fix typo 2014-11-26 19:32:16 -08:00