Commit graph

4036 commits

Author SHA1 Message Date
cinap_lenrek d75f5a24ba bootrc: preserve #ec/fs (thanks _sl) 2014-12-10 03:16:36 +01: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
mischief 250e120400 astro: fix typo 2014-11-26 18:56:00 -08:00
cinap_lenrek 97e7b5f71d games/md: fix interlace at scale 2 2014-11-22 20:35:28 +01:00
aiju 41ef4524ab games/md: interlacing, sort of 2014-11-22 19:40:36 +01:00
cinap_lenrek f55c43fe8d audio(1): add mixfs to NAME section 2014-11-22 18:17:06 +01:00
cinap_lenrek af8657b8da pc, pc64: more conservative pcirouting
when we hit a conflict where the pci INTL register gives us
a different irq than we get from southbridge irq router, dont
just change the router setting to the bios assigned irq (that
was previously known as the BIOS workarround), but assume the
southbridge setting to be valid and change the pci INTL register
on the device to it.

only when the router link doesnt seem to be configured or
disabled, then program the router to the irq that bios asisgned
in the INTL register.

the reason is that changing the router setting changes the
irq routing for *all* devices on the same link and changing
it breaks previously checked and valid interrupt routings.
(so happend with virtualbox where the last device on the bus
is some powermanagement device that has wrong INTL setting
and changing the routing breaks the ethernet interrupts)

this change shouldnt affect modern machines which use ioapic
and mp tables or acpi for pci interrupt routing.
2014-11-22 17:23:46 +01:00
cinap_lenrek 529082d34d pc, pc64: preserve last KB of conventional memory (might contain bios tables)
we add new function convmemsize() that returns the size of
*usable* conventional memory that does some sanity checking
and reserves the last KB below the top of memory pointer.

this avoids lowraminit() overriding potential bios tables
and sigsearch() going off the rails looking for tables
at above 640K.
2014-11-20 19:05:43 +01:00
cinap_lenrek 5a6131ea09 games/snes: do message display in screenproc
do the message drawing from the screenproc so there are no
race conditions with libdraw.
2014-11-20 01:26:31 +01:00
cinap_lenrek dc2c8dca5b games/md, games/snes: fix memory leak on resize 2014-11-19 21:01:36 +01:00
cinap_lenrek a1066aa992 hjfs(8): theres no chown in plan9, link to chgrp(1) manpage. 2014-11-19 01:31:20 +01:00
cinap_lenrek a28263f7b2 games/snes: fix extern pic declaration to match reality 2014-11-18 17:03:45 +01:00
cinap_lenrek e15d0126ad games/md: apply same screen flush changes from games/snes 2014-11-18 17:00:44 +01:00
cinap_lenrek 763231588c games/snes: flush screen in parallel to audio (fixes buffer underruns on x200s)
the x200s is too slow on a single core to keep up without
audio buffer underruns, so the idea is to flush screen
in parallel to witing audio samples in a separate process.

with the proc, we also can keep updating the screen on resize
when paused.
2014-11-18 16:07:34 +01:00
aiju 844612fcb8 games/snes: save more audio state 2014-11-17 17:00:41 +01:00
cinap_lenrek dbb320ca90 audiohda: add pci ids for Intel 8 Series Lynx Point (thanks quux)
Based on OpenBSD driver:
- /sys/dev/pci/azalia.c rev 1.209
- /sys/dev/pci/pcidevs rev 1.1689
- only tested on amd64; machine is an Acer V5-573G
    exact model: V5-573G-74518G1Takk
2014-11-17 10:12:29 +01:00
cinap_lenrek fbdaa03d84 wpa: handle essid: with whitespaces from ether ifstats file 2014-11-17 00:53:02 +01:00
cinap_lenrek 2310258d57 wpa: fix quoting for essid with spaces 2014-11-17 00:12:55 +01:00
BurnZeZ 73eea8402b abaco: cleanup, handle image/x-icon, don't use backspace as a hotkey, and remove urlconvience()/related functions 2014-11-16 09:58:21 -05:00
aiju 170913631b nintendo(1): NTSC only 2014-11-16 15:17:34 +01:00
cinap_lenrek 2e802acf34 hpost: break up tags with newlines to avoid sed line buffer limit 2014-11-16 01:59:29 +01:00
cinap_lenrek 242007de7c sed: fix error handling for "Output line too long" and other stuff
sed just continued writing past genbuf when it should stop
with "Output line too long".

quit when we get unspecified options.

stupid casts from long to char* for no reason.

some 0 vs nil cleanup.
2014-11-16 01:48:18 +01:00
cinap_lenrek d069c9b486 pc: get rid of fixed 8MB memory map (now dynamically between 4 to 16 MB depending on kernel size)
we now do mapping of KZERO to ROUND(end, 4*MB) where
end needs not to be above 16MB. this allows for bigger
kernels.
2014-11-15 15:21:24 +01:00
cinap_lenrek 4e00cf6b17 pc64: get rid of fixed 8MB INIMAP and dynamically map KZERO-end in l.s
traditionally, the pc kernel mapped the first 8MB of physical
address space. when the kernel size grows beyond that memory mapping,
it will crash on boot and theres no checking in the build process
making sure it fits.

with the pc64 kernel, it is not hard to always map the whole
kernel memory image from KZERO to end[], so that the kernel will
always fit into the initial mapping.
2014-11-15 11:43:05 +01:00
cinap_lenrek 4cd03abefe hpost: fix multipart/form variable name mangeling when field value contains newlines
com='MH3U
pic unrelated
' hpost -u ... -m post com:$com

resulted in wrong field name like:

--HJBOUNDARY
 Content-Disposition: form-data; name="com pic unrelated"

 MH3U
 pic unrelated
2014-11-15 23:51:01 +01:00
stanley lieber 62f5818481 fortunes: (no plan9 to hand) 2014-11-14 12:11:42 -05:00
cinap_lenrek 9841f7f3f5 upas/fs: handle ramfs and hjfs "file locked" error 2014-11-14 10:09:29 +01:00
cinap_lenrek 52c1f712ec upas/fs: handle cwfs "file is locked" error message 2014-11-14 23:36:18 +01:00
cinap_lenrek f51f73bdca ip: implement "hangup" ctl for udp protocol 2014-11-13 16:47:19 +01:00
cinap_lenrek 9840ce91cf kernel: make use of nil vs 0 consistent in qio.c (sorry) 2014-11-13 16:46:41 +01:00
cinap_lenrek 402140675f rootstub: create /sys/src/pkg and /sys/lib/pkg directories 2014-11-13 10:23:53 +01:00