Commit graph

3696 commits

Author SHA1 Message Date
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