]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
9 years agopc, pc64: make mtrr() callable from interrupt context and before mpinit
cinap_lenrek [Tue, 21 Oct 2014 04:03:03 +0000 (06:03 +0200)]
pc, pc64: make mtrr() callable from interrupt context and before mpinit

to make it possible to mark the bootscreen framebuffer
as write combining in early initialization, mtrr() is
changed not not to error() but to return an error string.

as bootscreen() is used before multiprocessor initialization,
we have to synchronize the mtrr's for every processor as
it comes online. for this, a new mtrrsync() function is
provided that is called from cpuidentify() if mtrr support
is indicated.

the boot processor runs mtrrsync() which snarfs the
registers. later, mtrrsync() is run again from the
application processors which apply the values from the
boot processor.

checkmtrr() from mp.c was removed as its task is also
done by mtrrsync() now.

9 years ago9boot(8): document efi booting
cinap_lenrek [Sun, 19 Oct 2014 19:55:19 +0000 (21:55 +0200)]
9boot(8): document efi booting

9 years agoinst: ignore *bootscreen= variable when generating plan9.ini
cinap_lenrek [Sun, 19 Oct 2014 19:17:08 +0000 (21:17 +0200)]
inst: ignore *bootscreen= variable when generating plan9.ini

9 years agopc, pc64: lookup pci device for bootscreen() and maximize framebuffer aperture so...
cinap_lenrek [Sun, 19 Oct 2014 19:00:34 +0000 (21:00 +0200)]
pc, pc64: lookup pci device for bootscreen() and maximize framebuffer aperture so can change screen resolution

9 years agoefi: use LocateHandle() and HandleProtocol() to check for multiple gop protocols...
cinap_lenrek [Sun, 19 Oct 2014 17:55:45 +0000 (19:55 +0200)]
efi: use LocateHandle() and HandleProtocol() to check for multiple gop protocols to find a usable one

the gop returned by LocateProtocol() is not usable on thinkpad x230,
so iterate over all handles to find a usable one.

9 years agoefi: fix compiler warnings, remove indicator prints in readn()
cinap_lenrek [Sun, 19 Oct 2014 20:01:13 +0000 (22:01 +0200)]
efi: fix compiler warnings, remove indicator prints in readn()

9 years agoefi: simplify bootscreen code
cinap_lenrek [Sat, 18 Oct 2014 17:15:53 +0000 (19:15 +0200)]
efi: simplify bootscreen code

9 years agogames/gba: add state saving
aiju [Sat, 18 Oct 2014 17:08:38 +0000 (19:08 +0200)]
games/gba: add state saving

9 years agoefi: convert pixel format to bootscreen color channel
cinap_lenrek [Sat, 18 Oct 2014 16:48:56 +0000 (18:48 +0200)]
efi: convert pixel format to bootscreen color channel

9 years agoefi: make clean target virtual
cinap_lenrek [Sat, 18 Oct 2014 00:15:40 +0000 (02:15 +0200)]
efi: make clean target virtual

9 years agoefi: add experimental efi bootloader
cinap_lenrek [Sat, 18 Oct 2014 00:13:02 +0000 (02:13 +0200)]
efi: add experimental efi bootloader

this is basically a port of 9boot to EFI. theres
support for IA32 (386) and X64 (amd64).

has been tested only under qemu with OVMF so far.

9 years agopc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early bootscreeninit...
cinap_lenrek [Sat, 18 Oct 2014 00:01:58 +0000 (02:01 +0200)]
pc, pc64: allow passing RSDT pointer in *acpi= boot parameter, early bootscreeninit(), fix rampage() usage

rampage() cannot be used after meminit(), so test for
conf.mem[0].npage != 0 and use xalloc()/mallocalign()
instead. this allows us to use vmap() early before
mmuinit() which is needed for bootscreeninit() and
acpi.

to get memory for page tables, pc64 needs a lowraminit().

with EFI, the RSDT pointer is passed in *acpi= parameter
from the efi loader. as the RSDT is ususally at the end of
the physical address space (and not to be found in
bios areas), we cannot KMAP() it so we need to vmap().

9 years agosysupdate/psfax/play: fix unquoted brackets causing rc to perform unnecessary file...
BurnZeZ [Wed, 15 Oct 2014 19:57:51 +0000 (15:57 -0400)]
sysupdate/psfax/play: fix unquoted brackets causing rc to perform unnecessary file lookups

9 years agopc: add *bootscreen= variable to pass pre-initialized framebuffer info to kernel
cinap_lenrek [Mon, 13 Oct 2014 21:02:53 +0000 (23:02 +0200)]
pc: add *bootscreen= variable to pass pre-initialized framebuffer info to kernel

EFI system has no cga or vesa anymore, so it becomes neccesary to
pass GOP framebuffer info to the kernel to get some output on the
screen.

9 years agopc: sanity check bda value in lowraminit() to avoid overflow with efi
cinap_lenrek [Sun, 12 Oct 2014 18:18:59 +0000 (20:18 +0200)]
pc: sanity check bda value in lowraminit() to avoid overflow with efi

9 years agopkg: change default repo to http://9front.org/pkg/386
stanley lieber [Sun, 12 Oct 2014 17:27:53 +0000 (13:27 -0400)]
pkg: change default repo to http://9front.org/pkg/386

9 years agorio: fix "-cd dir" in mountspec being ignored
BurnZeZ [Sat, 11 Oct 2014 15:47:38 +0000 (11:47 -0400)]
rio: fix "-cd dir" in mountspec being ignored

9 years agofortunes: You have an agenda.
stanley lieber [Tue, 7 Oct 2014 01:17:26 +0000 (21:17 -0400)]
fortunes: You have an agenda.

9 years agogames/gba: new faster ppu code, audio support
aiju [Fri, 3 Oct 2014 14:52:56 +0000 (16:52 +0200)]
games/gba: new faster ppu code, audio support

9 years agoadded gbatype
aiju [Tue, 30 Sep 2014 18:46:13 +0000 (20:46 +0200)]
added gbatype

9 years agogames/gba: fix dma repeat bit and eeprom addresses
aiju [Tue, 30 Sep 2014 13:48:32 +0000 (15:48 +0200)]
games/gba: fix dma repeat bit and eeprom addresses

9 years agoadded crc32
aiju [Tue, 30 Sep 2014 11:07:36 +0000 (13:07 +0200)]
added crc32

9 years agohgfs: make data files with meta headers having the right size after open
cinap_lenrek [Mon, 29 Sep 2014 19:01:51 +0000 (21:01 +0200)]
hgfs: make data files with meta headers having the right size after open

to get the right data size of a file, the revlog needs to have been
opened and the metaheader parsed. as an optimization, we used to
open revlog only on the first read resulting revlogs with metaheaders
having the wrong size returned by fstat() until the first read().

tar relies on fstat() giving the correct file size, so just open
the revlog on open. reading directories can still yield the wrong
size but it is not that critical.

9 years agosnap: change ulong return of stackptr() to uvlong for amd64
cinap_lenrek [Mon, 29 Sep 2014 18:11:58 +0000 (20:11 +0200)]
snap: change ulong return of stackptr() to uvlong for amd64

9 years agogames/gba: small fixes
aiju [Sun, 28 Sep 2014 17:41:52 +0000 (19:41 +0200)]
games/gba: small fixes

9 years agoapply ps2mouse corruption fix to omap
cinap_lenrek [Sun, 28 Sep 2014 17:02:25 +0000 (19:02 +0200)]
apply ps2mouse corruption fix to omap

the omap ps2mouse driver is currently unused, but
in case of being finished at some point, apply the
fix from the pc driver.

9 years agomerge
cinap_lenrek [Sun, 28 Sep 2014 16:29:41 +0000 (18:29 +0200)]
merge

9 years agopc/pc64: fix ps2mouse memory corruption race
cinap_lenrek [Sun, 28 Sep 2014 16:28:38 +0000 (18:28 +0200)]
pc/pc64: fix ps2mouse memory corruption race

there was a memory corruption bug caused by us enabling the
ps2mouseputc() handler *before* initializing packetsize.

once we enabled the handler, mouse interrupts could come
in and advance the packet buffer index (nb) beyond the
buffer boundaries.

as ps2mouseputc() only checked for ++nb == packetsize, once
nb was advanced beyond the packetsize, it would continue writing
beyond the buffer and corrupt memory with each mouse packet byte.

solution is to initialize packetsize *before* enabling the
handler, and also do a >= check in ps2mouseputc() in case the
packetsize gets changed to a smaller value at runtime.

9 years agondb/dns: request recursion only for local dns servers
cinap_lenrek [Sun, 28 Sep 2014 03:15:25 +0000 (05:15 +0200)]
ndb/dns: request recursion only for local dns servers

we used to set RD flag in requests unconditionally, which
is fine by the standard but some dns server administrators
seem to use it as a denial of service indicator (for ther
non recursive authoritative nameservers) and ignore the
request.

so only set the RD flag when talking to local dns servers.

9 years agodevcons: avoid division by zero reading Qsysstat
cinap_lenrek [Sun, 28 Sep 2014 00:42:33 +0000 (02:42 +0200)]
devcons: avoid division by zero reading Qsysstat

alexchandel got the kernel to crash with divide error
on qemu 2.1.2/macosx at this location. probably
caused by perfticks()/tsc being wrong or accounttime()
not having been called yet from timer interrupt yet for
some reason.

9 years agogames/gba: remove bogus file
aiju [Sun, 28 Sep 2014 20:42:11 +0000 (22:42 +0200)]
games/gba: remove bogus file

9 years agomerge
aiju [Sat, 27 Sep 2014 18:51:00 +0000 (20:51 +0200)]
merge

9 years agogames/gba: slowly working (no pun intended)
aiju [Sat, 27 Sep 2014 18:50:20 +0000 (20:50 +0200)]
games/gba: slowly working (no pun intended)

9 years agohgignore: ignore amd64 kernel and init
mischief [Sat, 27 Sep 2014 08:35:06 +0000 (01:35 -0700)]
hgignore: ignore amd64 kernel and init

9 years agopc64: enable rtl8169 driver (thanks awabimakoto for testing)
mischief [Wed, 24 Sep 2014 21:19:22 +0000 (14:19 -0700)]
pc64: enable rtl8169 driver (thanks awabimakoto for testing)

9 years ago6c/8c: eleminate moves by swaping source and destination operands in peephole pass
cinap_lenrek [Wed, 24 Sep 2014 18:45:16 +0000 (20:45 +0200)]
6c/8c: eleminate moves by swaping source and destination operands in peephole pass

9 years agoacid: fix sysr1() stack corruption
cinap_lenrek [Mon, 22 Sep 2014 21:07:59 +0000 (23:07 +0200)]
acid: fix sysr1() stack corruption

the syscall stubs (for amd64) currently have a unconditional
spill of the first (register) argument to the stack.

sysr1 (and _nsec) are exceptional in that they do not
take any arguments, so the stub is writing unconditionally
to ther first argument slot on the stack.

i could avoid emiting the spill in the syscall stubs for
sysr1 but that would also break truss which assumes fixed
instruction sequence from stub start to the syscall number.

i'm not going to complicate the syscall stubs just for
sysr1 (_nsec is not used in 9front), but just add a dummy
argument to sysr1 definition that can receive the bogus
argument spill.

9 years agodevip: sanity check Nchan in Fsproto()
cinap_lenrek [Sun, 21 Sep 2014 17:24:38 +0000 (19:24 +0200)]
devip: sanity check Nchan in Fsproto()

devip can only handle Maskconv+1 conversations per
protocol depending on how many bits it uses in the
qid to encode the conversation number.

we check this when the protocol gets registered.

if we do not do this, the kernel will mysteriously
panic when the conversaion numbers collide which
took some time to debug.

9 years agosysinfo: relax regex for start of kernel boot messages
cinap_lenrek [Sun, 21 Sep 2014 16:28:35 +0000 (18:28 +0200)]
sysinfo: relax regex for start of kernel boot messages

we used to look for /^Plan 9$/ for the start of kernel
boot messages in /dev/kmesg. but the xen kernel prints
Plan 9 (.....) on boot. so just look for line starting
with /^Plan 9/ for now.

9 years agodevip: print protocol name in garbage collection notification
cinap_lenrek [Sun, 21 Sep 2014 16:02:53 +0000 (18:02 +0200)]
devip: print protocol name in garbage collection notification

9 years agopc64: print "Plan 9" on boot, cleanup pccpu64 files
cinap_lenrek [Sun, 21 Sep 2014 14:06:25 +0000 (16:06 +0200)]
pc64: print "Plan 9" on boot, cleanup pccpu64 files

9 years agostats: handle /dev/sysstat 32bit overflow in delta calculation
cinap_lenrek [Sat, 20 Sep 2014 16:06:59 +0000 (18:06 +0200)]
stats: handle /dev/sysstat 32bit overflow in delta calculation

the numbers from /dev/sysstat overflow on 32bit, so have
to do subtraction modulo 2^32 as we calculate with 64bit
integers.

thanks mischief for reporting this.

9 years agopc64: syscallfmt for nsec syscall
cinap_lenrek [Fri, 19 Sep 2014 23:37:11 +0000 (01:37 +0200)]
pc64: syscallfmt for nsec syscall

9 years agopc64: put return value of nsec syscall in register on amd64
cinap_lenrek [Fri, 19 Sep 2014 23:07:46 +0000 (01:07 +0200)]
pc64: put return value of nsec syscall in register on amd64

WHAT WHERE THEY *THINKING*??!?!

unlike seek, the (new) nsec syscall (not used in 9front libc)
returns the time value in register (from nix), so do the same
for compatibility.

9 years agolibmemdraw: fix byte ordering in memfillcolor()
cinap_lenrek [Fri, 19 Sep 2014 15:49:48 +0000 (17:49 +0200)]
libmemdraw: fix byte ordering in memfillcolor()

memfillcolor() used to write longs in host byte
order which is wrong. have to always use little
endian.

to simplify, moved little endian conversion into
memsetl() and memsets() avoiding code duplication.

9 years agolib9p: fix nil dereference crash in remove for directory permission check
cinap_lenrek [Fri, 19 Sep 2014 03:22:26 +0000 (05:22 +0200)]
lib9p: fix nil dereference crash in remove for directory permission check

file->parent can be nil when the file has been previously removed.
removefile() deals with this, so skip the permission check in
that case and let removefile() error out.

9 years agoteg2: fix wrong l2 setshift address in wholecache() (from sources)
cinap_lenrek [Wed, 17 Sep 2014 14:34:30 +0000 (16:34 +0200)]
teg2: fix wrong l2 setshift address in wholecache() (from sources)

9 years agooggdec: recognize "begin of stream" packets and restart decoding
cinap_lenrek [Tue, 16 Sep 2014 18:25:01 +0000 (20:25 +0200)]
oggdec: recognize "begin of stream" packets and restart decoding

9 years agomerge
cinap_lenrek [Tue, 16 Sep 2014 14:42:16 +0000 (16:42 +0200)]
merge

9 years agolibauthsrv: allow multiple auth= attributes for backup auth servers, authdial() tries...
cinap_lenrek [Tue, 16 Sep 2014 14:41:05 +0000 (16:41 +0200)]
libauthsrv: allow multiple auth= attributes for backup auth servers, authdial() tries each one in order

some of us run auth servers from home that are used by multiple
servers on the internet. when the home authserver becomes unreachable,
services on the outside servers stop working. so we thought about
specifing a secondary auth servers for backup when the primary
server is not reachable.

this changes authdial() to consult multiple auth= entries in
the authdom= or dom= tuples, trying each one in order until
dial() succeeds.

9 years agoramfs: allow changing mtime in wstats
mischief [Mon, 15 Sep 2014 22:49:39 +0000 (15:49 -0700)]
ramfs: allow changing mtime in wstats

9 years agohg: make intermediate directories like newer hg does
mischief [Mon, 15 Sep 2014 20:42:54 +0000 (13:42 -0700)]
hg: make intermediate directories like newer hg does

9 years agoramfs: fix directory check in wstat() (thanks mischief)
cinap_lenrek [Tue, 16 Sep 2014 20:33:27 +0000 (22:33 +0200)]
ramfs: fix directory check in wstat() (thanks mischief)

9 years agodevtls: fix typo in debug print
cinap_lenrek [Mon, 15 Sep 2014 06:19:51 +0000 (08:19 +0200)]
devtls: fix typo in debug print

9 years agotelnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa)
cinap_lenrek [Sun, 14 Sep 2014 19:20:13 +0000 (21:20 +0200)]
telnetd: let the kernel place the shared segment in segattach() (thanks kenji arisawa)

9 years agolibmemdraw: update drawtest to use same rounding in alpha calculation as libmemdraw
cinap_lenrek [Sun, 14 Sep 2014 15:03:56 +0000 (17:03 +0200)]
libmemdraw: update drawtest to use same rounding in alpha calculation as libmemdraw

9 years agokernel: fix segattach() rounding of va+len (thanks kenji arisawa)
cinap_lenrek [Sun, 14 Sep 2014 14:04:22 +0000 (16:04 +0200)]
kernel: fix segattach() rounding of va+len (thanks kenji arisawa)

from segattach(2):

          Va and len specify the position of the segment in the
          process's address space.  Va is rounded down to the nearest
          page boundary and va+len is rounded up.  The system does not
          permit segments to overlap.  If va is zero, the system will
          choose a suitable address.

just rounding up len isnt enougth. we have to round up va+len
instead of just len so that the span [va, va+len) is covered
even if va is not page aligned.

kenjis example:

print("%p\n",ap); // 206cb0
ap = segattach(0, "shared", ap, 1024);
print("%p\n",ap); // 206000

term% cat /proc/612768/segment
Stack     defff000 dffff000    1
Text   R      1000     6000    1
Data          6000     7000    1
Bss           7000     7000    1
Shared      206000   207000    1
term%

note that 0x206cb0 + 0x400 > 0x20700.

9 years agohgignore: ignore intermediate object files for amd64
mischief [Sat, 13 Sep 2014 13:23:41 +0000 (06:23 -0700)]
hgignore: ignore intermediate object files for amd64

9 years agohgignore: ignore mips binaries
mischief [Sat, 13 Sep 2014 13:14:39 +0000 (06:14 -0700)]
hgignore: ignore mips binaries

9 years agovi: implement _nsec syscall
mischief [Sat, 13 Sep 2014 13:07:57 +0000 (06:07 -0700)]
vi: implement _nsec syscall

9 years agolibsec: experimental DHE client support for tls and cleanups
cinap_lenrek [Sun, 14 Sep 2014 00:30:46 +0000 (02:30 +0200)]
libsec: experimental DHE client support for tls and cleanups

9 years agolibsec: add diffie-hellman functions
cinap_lenrek [Sun, 14 Sep 2014 00:29:18 +0000 (02:29 +0200)]
libsec: add diffie-hellman functions

9 years agolibsec: fix hmac for keys bigger then 64 byte block size
cinap_lenrek [Sun, 14 Sep 2014 00:26:26 +0000 (02:26 +0200)]
libsec: fix hmac for keys bigger then 64 byte block size

RFC2104 defines HMAC for keys bigger than the 64 byte block
size as follows:

Applications that use keys longer than B (64) bytes will
first hash the key using H (the hash function) and then
use the resultant L byte string as the actual key to HMAC.

9 years agolibsec: ecgen() and ecdsasign() fix
aiju [Sat, 13 Sep 2014 17:46:41 +0000 (19:46 +0200)]
libsec: ecgen() and ecdsasign() fix

9 years agoacme: remove unused #include
BurnZeZ [Thu, 11 Sep 2014 16:47:04 +0000 (12:47 -0400)]
acme: remove unused #include

9 years agogames/gb: minor goof
aiju [Thu, 11 Sep 2014 09:36:35 +0000 (11:36 +0200)]
games/gb: minor goof

9 years agogames/nes: reduce volume, causes overflow and confuses ac97
aiju [Thu, 11 Sep 2014 09:20:57 +0000 (11:20 +0200)]
games/nes: reduce volume, causes overflow and confuses ac97

9 years ago/lib/rob: Just write the code.
stanley lieber [Sat, 6 Sep 2014 05:11:18 +0000 (01:11 -0400)]
/lib/rob: Just write the code.

9 years agoadd /lib/terry
stanley lieber [Sat, 6 Sep 2014 05:09:37 +0000 (01:09 -0400)]
add /lib/terry

9 years agoip/ayiya: experimental anything in anything tunnel protocol client
cinap_lenrek [Sat, 6 Sep 2014 20:59:58 +0000 (22:59 +0200)]
ip/ayiya: experimental anything in anything tunnel protocol client

this is a work in progress implementation of the ayiya (anything
in anything) protocol as used by sixxs.net. hiro tested it and it
worked for him, but progress has stalled as sixxs.net rejected my
request for an account and ignored my emails since.

9 years agodoom: fix alignment issues for arm
cinap_lenrek [Thu, 4 Sep 2014 21:02:37 +0000 (23:02 +0200)]
doom: fix alignment issues for arm

9 years ago5e: fix signed long multiply
cinap_lenrek [Thu, 4 Sep 2014 20:53:54 +0000 (22:53 +0200)]
5e: fix signed long multiply

9 years ago5e: push ERRMAX for note message on stack avoiding unaligned stack pointer
cinap_lenrek [Wed, 3 Sep 2014 17:23:55 +0000 (19:23 +0200)]
5e: push ERRMAX for note message on stack avoiding unaligned stack pointer

9 years agoether8139: fix pointer to smaller int tuncation warning on amd64
cinap_lenrek [Tue, 2 Sep 2014 14:20:43 +0000 (16:20 +0200)]
ether8139: fix pointer to smaller int tuncation warning on amd64

9 years ago/sys/lib/dist/ndb/common: add auth=fs.stanleylieber.com authdom=inri
stanley lieber [Fri, 29 Aug 2014 00:46:56 +0000 (20:46 -0400)]
/sys/lib/dist/ndb/common: add auth=fs.stanleylieber.com authdom=inri

9 years agofortunes: $75K Prosthetic Arm Is Bricked When Paired iPod Is Stolen
stanley lieber [Wed, 27 Aug 2014 05:13:11 +0000 (01:13 -0400)]
fortunes: $75K Prosthetic Arm Is Bricked When Paired iPod Is Stolen

9 years agoipconfig: remove sleep() left over from debug :-)
cinap_lenrek [Tue, 26 Aug 2014 23:41:02 +0000 (01:41 +0200)]
ipconfig: remove sleep() left over from debug :-)

9 years agoipconfig: fix readipifc() memory leaks in recvra6 and sendra6 processes
cinap_lenrek [Tue, 26 Aug 2014 23:12:42 +0000 (01:12 +0200)]
ipconfig: fix readipifc() memory leaks in recvra6 and sendra6 processes

to avoid continuously leaking memory in recvra6 and sendra6
processes, pass the previous Ipifc* pointer to readipifc().

9 years agoip: set arp entry for own v6 address when not tentative
cinap_lenrek [Tue, 26 Aug 2014 19:29:37 +0000 (21:29 +0200)]
ip: set arp entry for own v6 address when not tentative

after running ip/ipconfig -6, we are unable to ping our
own link-local address and the arp daemon sends out useless
neighbor solicitation requests to itself. this change
adds an arp entry for our ipv6 address. however, this
must not be done for tentative interface configuration.

9 years agoipconfig: cleanup code duplication in ip6cfg()
cinap_lenrek [Tue, 26 Aug 2014 19:09:57 +0000 (21:09 +0200)]
ipconfig: cleanup code duplication in ip6cfg()

9 years agoping: don't spin when we get error reading icmp connection, print error and sleep
cinap_lenrek [Tue, 26 Aug 2014 19:07:59 +0000 (21:07 +0200)]
ping: don't spin when we get error reading icmp connection, print error and sleep

9 years agopc64: enable ether8139 in kernel config (thanks hiro)
cinap_lenrek [Thu, 21 Aug 2014 22:00:06 +0000 (00:00 +0200)]
pc64: enable ether8139 in kernel config (thanks hiro)

9 years agoether8139: fix pointer truncation by ulong cast, use mallocalign()
cinap_lenrek [Thu, 21 Aug 2014 08:56:15 +0000 (10:56 +0200)]
ether8139: fix pointer truncation by ulong cast, use mallocalign()

9 years agosecstore: improve error messages, newSConn() can't fail
cinap_lenrek [Wed, 20 Aug 2014 23:18:36 +0000 (01:18 +0200)]
secstore: improve error messages, newSConn() can't fail

9 years agoip: fix memory leak in ipicadd6()
cinap_lenrek [Wed, 20 Aug 2014 22:30:13 +0000 (00:30 +0200)]
ip: fix memory leak in ipicadd6()

allocate the Iplifc structure on the stack instead.
i assuming that it was allocated on heap in fear of
causing stack oveflow. on 386, this adds arround
88 bytes on the stack but it doesnt seem to cause
any trouble. (checked with poolcheck after ctl write)

9 years agopc, pc64: fix off by one error in _multibootentry
cinap_lenrek [Mon, 18 Aug 2014 01:16:11 +0000 (03:16 +0200)]
pc, pc64: fix off by one error in _multibootentry

9 years agoboot: dont print errors if ethernet has no ifstats file, can happen with usb ethernet
cinap_lenrek [Sun, 17 Aug 2014 04:08:06 +0000 (06:08 +0200)]
boot: dont print errors if ethernet has no ifstats file, can happen with usb ethernet

9 years ago5a: revert MOVM .S and .W are exclusive (broke bcm build)
cinap_lenrek [Sun, 17 Aug 2014 02:26:28 +0000 (04:26 +0200)]
5a: revert MOVM .S and .W are exclusive (broke bcm build)

9 years agokernel: make noswap flag exclude processes from killbig() if not eve, reset noswap...
cinap_lenrek [Sat, 16 Aug 2014 22:50:20 +0000 (00:50 +0200)]
kernel: make noswap flag exclude processes from killbig() if not eve, reset noswap flag on exec

9 years agoFix acme crash: Get D in a new window with D being an existing directory
iru [Sat, 16 Aug 2014 21:50:42 +0000 (18:50 -0300)]
Fix acme crash: Get D in a new window with D being an existing directory

9 years agokernel: fix todfix() race
cinap_lenrek [Sat, 16 Aug 2014 19:04:41 +0000 (21:04 +0200)]
kernel: fix todfix() race

we have to recheck the condition under tod lock, otherwise
another process can come in and updated tod.last and
tod.off and once we have the lock, we would make time
jump backwards.

9 years agokernel: xinit() use ulong for page counts, cleanup
cinap_lenrek [Sat, 16 Aug 2014 15:26:12 +0000 (17:26 +0200)]
kernel: xinit() use ulong for page counts, cleanup

9 years agonusb/kb: delete code for keyboard boot protocol handling, just use hid parser
cinap_lenrek [Sat, 16 Aug 2014 21:34:28 +0000 (23:34 +0200)]
nusb/kb: delete code for keyboard boot protocol handling, just use hid parser

unify the keyboard and mouse readers into one using the hid
report parser for both. remove the keyboard protocol handling,
as it is now handled by hid parser and all we get is a sequence
of keycodes in Hiddev.k[] which we diff for up/down and translate
to pc scancodes.

9 years agospred: command window improvements
aiju [Thu, 14 Aug 2014 08:42:39 +0000 (10:42 +0200)]
spred: command window improvements

9 years agoimport: make aan (-p flag) work in ``backwards mode'' (-B)
cinap_lenrek [Wed, 13 Aug 2014 22:11:14 +0000 (00:11 +0200)]
import: make aan (-p flag) work in ``backwards mode'' (-B)

in backwards mode, the roles of the aan filters need to be
reversed. add "-n address" option to import to override the
announce address for the aan server part (default tcp!*!0).

9 years agonusb/ptp: do maxpkt reads to avoid babble error with usb 2.0 devices (thanks mischief!)
cinap_lenrek [Tue, 12 Aug 2014 23:10:59 +0000 (01:10 +0200)]
nusb/ptp: do maxpkt reads to avoid babble error with usb 2.0 devices (thanks mischief!)

mischief got babble error with his mobile phone as we used to
read at max 64 bytes for the data response phase. his device
has 512 byte packet size.

thans to mischief for the patience.

9 years agodevenv: prevent non-hostowner from creating or removing variables in '#ec', cleanup
cinap_lenrek [Wed, 13 Aug 2014 21:09:47 +0000 (23:09 +0200)]
devenv: prevent non-hostowner from creating or removing variables in '#ec', cleanup

9 years agoip: fix missed unlocks and waserror handlers
cinap_lenrek [Tue, 12 Aug 2014 19:35:31 +0000 (21:35 +0200)]
ip: fix missed unlocks and waserror handlers

ipifcunbind() could error out from ipifcremlifc() and Medium.unbind()
*after* decrementing ifc->conv->inuse! move the decrement after
calling these functions.

make ipifcremlifc() never raise error but return error string.
the only places where it could error is when it calls into
medium functions like Medium.remroute() and Medium.remmulti().
Ignore these errors as they could happen when the ethernet driver
crashed (think imported ethernet device or usb ethernet
in userspace), so we will be able to unbind.

add waserror() handlers as neccesary to deal with errors from
Medium.addmulti(), Medium.areg() and arpenter() to properly
unlock the data structures.

9 years agoaux/8prefix: fix usage
mischief [Tue, 12 Aug 2014 17:33:47 +0000 (10:33 -0700)]
aux/8prefix: fix usage

9 years agosecstore(1): clarify how the server is dialed and add new $secstore environment variable
mischief [Mon, 11 Aug 2014 03:38:59 +0000 (20:38 -0700)]
secstore(1): clarify how the server is dialed and add new $secstore environment variable