]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
10 years agopc64: fix note handling
cinap_lenrek [Thu, 6 Feb 2014 21:43:33 +0000 (22:43 +0100)]
pc64: fix note handling

10 years agopc64: fix kmap()
cinap_lenrek [Thu, 6 Feb 2014 21:41:42 +0000 (22:41 +0100)]
pc64: fix kmap()

kmapindex has to be per process, not per mach, as the process
can be switched to another processor while the mapping is
established.

to bootstrap the first process, we have to temporarily set up
so the kmap MMU's can be attached to the process. previously
we assumed that the first two pages for the initial process
where below 2GB and could be accessed with KADDR() directly.
with 16GB machine, all the 2GB above KZERO are dedicated to
the kernel so the user pages returned by newpage() need to
be mapped.

10 years agohave to use NULL instead of nil for ape programs...
cinap_lenrek [Wed, 5 Feb 2014 18:52:09 +0000 (19:52 +0100)]
have to use NULL instead of nil for ape programs...

10 years agopc64: dont 4 byte align stack pointer for amd64 in sysexec()
cinap_lenrek [Wed, 5 Feb 2014 18:48:36 +0000 (19:48 +0100)]
pc64: dont 4 byte align stack pointer for amd64 in sysexec()

10 years agofix wrong type for terminating nil argument for execl()
cinap_lenrek [Wed, 5 Feb 2014 18:25:24 +0000 (19:25 +0100)]
fix wrong type for terminating nil argument for execl()

we have to use (void*)0 instead of (int)0 otherwise the
upper bits are uninitialized on amd64.

10 years agolibpanel: remove pointless pointer casts
mischief [Tue, 4 Feb 2014 08:16:36 +0000 (00:16 -0800)]
libpanel: remove pointless pointer casts

10 years agomerge
cinap_lenrek [Wed, 5 Feb 2014 07:58:53 +0000 (08:58 +0100)]
merge

10 years agomothra: better handling of malformed search regex
cinap_lenrek [Wed, 5 Feb 2014 07:43:31 +0000 (08:43 +0100)]
mothra: better handling of malformed search regex

10 years agolibpanel: fix pointer casts and format strings
mischief [Wed, 5 Feb 2014 07:34:19 +0000 (23:34 -0800)]
libpanel: fix pointer casts and format strings

10 years agomothra: dont panic on invalid regular expression in searchbox
cinap_lenrek [Wed, 5 Feb 2014 07:25:01 +0000 (08:25 +0100)]
mothra: dont panic on invalid regular expression in searchbox

10 years ago/lib/face/48x48x4/.dict: fix typos
stanley lieber [Tue, 4 Feb 2014 04:55:20 +0000 (23:55 -0500)]
/lib/face/48x48x4/.dict: fix typos

10 years agopc64: fix up pointer calculations and enable sdvirtio disk driver
mischief [Mon, 3 Feb 2014 09:22:26 +0000 (01:22 -0800)]
pc64: fix up pointer calculations and enable sdvirtio disk driver

10 years agopc64: remove cinaps cga screen interrupt debugger, was experiment...
cinap_lenrek [Tue, 4 Feb 2014 01:08:26 +0000 (02:08 +0100)]
pc64: remove cinaps cga screen interrupt debugger, was experiment...

10 years agopc64: dont dump user registers on exception, was experiment...
cinap_lenrek [Tue, 4 Feb 2014 01:06:11 +0000 (02:06 +0100)]
pc64: dont dump user registers on exception, was experiment...

10 years agohjfs: fix wrong channel size for syncb (fixes amd64 crash)
cinap_lenrek [Tue, 4 Feb 2014 00:58:17 +0000 (01:58 +0100)]
hjfs: fix wrong channel size for syncb (fixes amd64 crash)

10 years agodoom: port to amd64
cinap_lenrek [Tue, 4 Feb 2014 00:09:46 +0000 (01:09 +0100)]
doom: port to amd64

10 years agorealemu: cleanup opidiv
cinap_lenrek [Mon, 3 Feb 2014 21:55:45 +0000 (22:55 +0100)]
realemu: cleanup opidiv

no need for switch here, just calculate the values. also fixes
6l warning about uninitialized min/max (compiler assumes none
of the case statements could match).

10 years agolibmach: change mach pgsize back from 4K to 2MB for amd64
cinap_lenrek [Mon, 3 Feb 2014 21:39:07 +0000 (22:39 +0100)]
libmach: change mach pgsize back from 4K to 2MB for amd64

the Mach page size is used to calculate segment alignment. its
not the real effective page size used by the kernel.

this fixes acid.

10 years agoipmux: fix 6c complaints
cinap_lenrek [Mon, 3 Feb 2014 19:14:19 +0000 (20:14 +0100)]
ipmux: fix 6c complaints

10 years agomerge
cinap_lenrek [Mon, 3 Feb 2014 19:06:12 +0000 (20:06 +0100)]
merge

10 years agokernel: dont double ptemap size in newseg()
cinap_lenrek [Mon, 3 Feb 2014 19:04:43 +0000 (20:04 +0100)]
kernel: dont double ptemap size in newseg()

this doubling affects all segment types, not just bss.
(tho text/data are usually small...)

and theres no telling if the segment will actually
grow in the future justifying the reduction of memmove
overhead in ibrk().

some ape programs are approaching the 16mb ssegmap size
so that code might trigger.

removing the smarts...

10 years agopc/pc64: move common code to pc/devarch.c
cinap_lenrek [Mon, 3 Feb 2014 05:24:31 +0000 (06:24 +0100)]
pc/pc64: move common code to pc/devarch.c

10 years agopc64: implement shutdown and idlehands
cinap_lenrek [Mon, 3 Feb 2014 04:29:53 +0000 (05:29 +0100)]
pc64: implement shutdown and idlehands

just copies from pc kernel. should refactor into common
pc code.

10 years agomerge
mischief [Sun, 2 Feb 2014 15:41:56 +0000 (07:41 -0800)]
merge

10 years agopc64: enable sdide driver
mischief [Sun, 2 Feb 2014 15:34:54 +0000 (07:34 -0800)]
pc64: enable sdide driver

10 years agoacid: fix memory leak in fundefs (from 9atom)
mischief [Sun, 2 Feb 2014 11:17:48 +0000 (03:17 -0800)]
acid: fix memory leak in fundefs (from 9atom)

10 years agolibdraw: fix typo: 0xfffff -> 0xffff
cinap_lenrek [Mon, 3 Feb 2014 02:56:01 +0000 (03:56 +0100)]
libdraw: fix typo: 0xfffff -> 0xffff

10 years agolibdraw: work arround devdraw truncating screenid as 16bit
cinap_lenrek [Mon, 3 Feb 2014 02:53:18 +0000 (03:53 +0100)]
libdraw: work arround devdraw truncating screenid as 16bit

10 years agodevdraw: screenid is BGLONG, not BGSHORT
cinap_lenrek [Mon, 3 Feb 2014 02:52:27 +0000 (03:52 +0100)]
devdraw: screenid is BGLONG, not BGSHORT

10 years agopc64: track per process kmap page tables in separate MMU list.
cinap_lenrek [Sun, 2 Feb 2014 17:01:13 +0000 (18:01 +0100)]
pc64: track per process kmap page tables in separate MMU list.

we have to keep kmap page tables in ther own list
because user tables are subject to (virtual) tlb flushing.

we never free kmap page tables except in mmurelease()
where we just link the kmap mmu list in front of the user
mmus and call mmufree() which will free all the mmu's
of the process.

10 years agomalloctag: only store lower 32bit of malloc tag, fix getrealloctag
cinap_lenrek [Sun, 2 Feb 2014 15:03:59 +0000 (16:03 +0100)]
malloctag: only store lower 32bit of malloc tag, fix getrealloctag

as erik quanstro suggests, theres not much of a point in
storing the full 64bit pc as one cannot get a code segment
bigger than 4G and amd64 makes it hard to use a pc that
isnt 64bit sign extension of 32bit.

instead, we only store ulong (as originally), but sign
extend back when returning in getmalloctag() and
getrealloctag().

getrealloctag() used to be broken. its now fixed.

10 years agokernel: fix bogus free in sysexec.
cinap_lenrek [Sun, 2 Feb 2014 14:11:19 +0000 (15:11 +0100)]
kernel: fix bogus free in sysexec.

we free the wrong pointer in the waserror() block.

10 years agonewuser: dont bark when we cannot bind $home/bin/$objtype after /bin, create $home...
cinap_lenrek [Sun, 2 Feb 2014 09:59:05 +0000 (10:59 +0100)]
newuser: dont bark when we cannot bind $home/bin/$objtype after /bin, create $home/bin/amd64

10 years agokernel: do not pass user address of fd[2] array to newfd2()
cinap_lenrek [Sun, 2 Feb 2014 09:41:51 +0000 (10:41 +0100)]
kernel: do not pass user address of fd[2] array to newfd2()

access to user memory can pagefault and newfd2() holds
fgrp spinlock while writing to it. make temporary copy
on the stack in syspipe().

10 years agokernel: use uintptr when appropriate in syssegflush()
cinap_lenrek [Sun, 2 Feb 2014 08:59:54 +0000 (09:59 +0100)]
kernel: use uintptr when appropriate in syssegflush()

10 years agopc64: dont dump registers for user process on pagefault error, was experiment
cinap_lenrek [Sun, 2 Feb 2014 08:39:58 +0000 (09:39 +0100)]
pc64: dont dump registers for user process on pagefault error, was experiment

10 years agopc64: no need to flush tlb in kunmap(), was experiment
cinap_lenrek [Sun, 2 Feb 2014 08:22:23 +0000 (09:22 +0100)]
pc64: no need to flush tlb in kunmap(), was experiment

10 years agoadd acid library for amd64
cinap_lenrek [Sun, 2 Feb 2014 07:41:13 +0000 (08:41 +0100)]
add acid library for amd64

10 years agopc64: fix mmu structure leakage, implement global pool
cinap_lenrek [Sun, 2 Feb 2014 07:12:08 +0000 (08:12 +0100)]
pc64: fix mmu structure leakage, implement global pool

10 years agopc64: print only 8 hex chars dumpstack sp/pc
cinap_lenrek [Sun, 2 Feb 2014 04:49:30 +0000 (05:49 +0100)]
pc64: print only 8 hex chars dumpstack sp/pc

kernel addresses are sign extended to 64 bit. upper bits
are not really helpfull.

10 years agomallocalign: make sure alignptr offset is modulo align when -offset > align
cinap_lenrek [Sun, 2 Feb 2014 04:47:13 +0000 (05:47 +0100)]
mallocalign: make sure alignptr offset is modulo align when -offset > align

10 years agopc64: fix vmap
cinap_lenrek [Sun, 2 Feb 2014 04:10:58 +0000 (05:10 +0100)]
pc64: fix vmap

VMAP address calculation was all wrong resulting
in vmaps get mapped into KZERO map.

10 years agopc64: enable iahci support
cinap_lenrek [Sat, 1 Feb 2014 19:27:54 +0000 (20:27 +0100)]
pc64: enable iahci support

10 years agocwfs: use pragma pack for on disk structures for amd64
cinap_lenrek [Sat, 1 Feb 2014 19:26:36 +0000 (20:26 +0100)]
cwfs: use pragma pack for on disk structures for amd64

10 years agorootstub: create amd64 directories for acme
cinap_lenrek [Sat, 1 Feb 2014 19:19:06 +0000 (20:19 +0100)]
rootstub: create amd64 directories for acme

10 years agorealemu: actually mark 0xE0000 writeable
mischief [Sat, 1 Feb 2014 20:56:59 +0000 (12:56 -0800)]
realemu: actually mark 0xE0000 writeable

10 years agorealemu: implement IDIV, mark 0xE0000 writeable, fix DIV overfow trap
mischief [Sat, 1 Feb 2014 20:27:07 +0000 (12:27 -0800)]
realemu: implement IDIV, mark 0xE0000 writeable, fix DIV overfow trap

10 years agoacid: use correct print flags and casts for shorts in fmt
mischief [Sat, 1 Feb 2014 20:14:30 +0000 (12:14 -0800)]
acid: use correct print flags and casts for shorts in fmt

10 years agoip/torrent: print tracker errors/warnings in debug mode and allow setting peerid
mischief [Sat, 1 Feb 2014 20:04:30 +0000 (12:04 -0800)]
ip/torrent: print tracker errors/warnings in debug mode and allow setting peerid

10 years agolibc and ape support for amd64
cinap_lenrek [Sat, 1 Feb 2014 09:31:41 +0000 (10:31 +0100)]
libc and ape support for amd64

10 years agorename Ureg.ip to Ureg.pc
cinap_lenrek [Sat, 1 Feb 2014 09:30:08 +0000 (10:30 +0100)]
rename Ureg.ip to Ureg.pc

10 years agofixes for new setmalloctag() prototype
cinap_lenrek [Sat, 1 Feb 2014 09:29:14 +0000 (10:29 +0100)]
fixes for new setmalloctag() prototype

10 years agogs: amd64 support
cinap_lenrek [Sat, 1 Feb 2014 09:28:33 +0000 (10:28 +0100)]
gs: amd64 support

10 years agopython: amd64 support
cinap_lenrek [Sat, 1 Feb 2014 09:27:57 +0000 (10:27 +0100)]
python: amd64 support

10 years agoadd experimental pc64 kernel
cinap_lenrek [Sat, 1 Feb 2014 09:25:10 +0000 (10:25 +0100)]
add experimental pc64 kernel

10 years agopc kernel: split mpstartap() and squidboy into separate file... stuff for amd64
cinap_lenrek [Sat, 1 Feb 2014 09:23:17 +0000 (10:23 +0100)]
pc kernel: split mpstartap() and squidboy into separate file... stuff for amd64

10 years agokernel: usb fixes for amd64
cinap_lenrek [Sat, 1 Feb 2014 09:20:43 +0000 (10:20 +0100)]
kernel: usb fixes for amd64

10 years agokernel: fix pointer truncation in xspanalloc(), fix format prints
cinap_lenrek [Sat, 1 Feb 2014 09:17:53 +0000 (10:17 +0100)]
kernel: fix pointer truncation in xspanalloc(), fix format prints

10 years agokernel: handle amd64 40 byte headers in exec()
cinap_lenrek [Sat, 1 Feb 2014 09:16:55 +0000 (10:16 +0100)]
kernel: handle amd64 40 byte headers in exec()

10 years agovesa: explicitely use /386/include/ureg.h
cinap_lenrek [Sat, 1 Feb 2014 09:14:41 +0000 (10:14 +0100)]
vesa: explicitely use /386/include/ureg.h

10 years agolibmach: pc64 uses 4K pages, IP -> PC
cinap_lenrek [Sat, 1 Feb 2014 08:55:34 +0000 (09:55 +0100)]
libmach: pc64 uses 4K pages, IP -> PC

10 years agolibmemdraw: apply erik quanstros fix for sign preserving in byteaddr()
cinap_lenrek [Sat, 1 Feb 2014 08:54:09 +0000 (09:54 +0100)]
libmemdraw: apply erik quanstros fix for sign preserving in byteaddr()

10 years agolibdraw: use pid as initial screenid so one can have more than 25 windows.
cinap_lenrek [Sat, 1 Feb 2014 08:53:08 +0000 (09:53 +0100)]
libdraw: use pid as initial screenid so one can have more than 25 windows.

10 years ago6l: fix warning, setmalloctag declaration, missing header type cases
cinap_lenrek [Sat, 1 Feb 2014 08:52:06 +0000 (09:52 +0100)]
6l: fix warning, setmalloctag declaration, missing header type cases

10 years ago/lib/face: add some new faces
stanley lieber [Wed, 22 Jan 2014 06:20:40 +0000 (01:20 -0500)]
/lib/face: add some new faces

10 years agofortunes: undelete
stanley lieber [Wed, 22 Jan 2014 06:19:50 +0000 (01:19 -0500)]
fortunes: undelete

10 years agosdiahci: fix hardcoded 512 byte sector size
cinap_lenrek [Wed, 22 Jan 2014 19:12:19 +0000 (20:12 +0100)]
sdiahci: fix hardcoded 512 byte sector size

10 years agokernel: fix ulong abuse in xalloc
cinap_lenrek [Tue, 21 Jan 2014 21:12:25 +0000 (22:12 +0100)]
kernel: fix ulong abuse in xalloc

10 years agokernel: convert putmmu() to uintptr for va and pa
cinap_lenrek [Mon, 20 Jan 2014 02:17:55 +0000 (03:17 +0100)]
kernel: convert putmmu() to uintptr for va and pa

10 years agokernel: various cleanups
cinap_lenrek [Mon, 20 Jan 2014 01:16:42 +0000 (02:16 +0100)]
kernel: various cleanups

10 years agomalloc(2): update alloctag types
cinap_lenrek [Sun, 19 Jan 2014 23:54:36 +0000 (00:54 +0100)]
malloc(2): update alloctag types

10 years agokernel: apply uintptr for ulong when a pointer is stored
cinap_lenrek [Sun, 19 Jan 2014 23:47:55 +0000 (00:47 +0100)]
kernel: apply uintptr for ulong when a pointer is stored

this change is in preparation for amd64. the systab calling
convention was also changed to return uintptr (as segattach
returns a pointer) and the arguments are now passed as
va_list which handles amd64 arguments properly (all arguments
are passed in 64bit quantities on the stack, tho the upper
part will not be initialized when the element is smaller
than 8 bytes).

this is partial. xalloc needs to be converted in the future.

10 years agomalloc: change malloc and realloc tag types to uintptr
cinap_lenrek [Sun, 19 Jan 2014 23:09:53 +0000 (00:09 +0100)]
malloc: change malloc and realloc tag types to uintptr

10 years agoape: remove local copy of memccpy()
cinap_lenrek [Sun, 19 Jan 2014 23:05:19 +0000 (00:05 +0100)]
ape: remove local copy of memccpy()

10 years agokernel: fix declaration of getcallerpc()
cinap_lenrek [Sun, 19 Jan 2014 02:32:50 +0000 (03:32 +0100)]
kernel: fix declaration of getcallerpc()

10 years agokernel: replace BY2WD in scanline width calculation to sizeof(ulong) like libmemdraw
cinap_lenrek [Sun, 19 Jan 2014 02:29:52 +0000 (03:29 +0100)]
kernel: replace BY2WD in scanline width calculation to sizeof(ulong) like libmemdraw

10 years agolibmach: fix wrong operand order of MOVLQSX instruction disassembly
cinap_lenrek [Fri, 17 Jan 2014 20:09:17 +0000 (21:09 +0100)]
libmach: fix wrong operand order of MOVLQSX instruction disassembly

10 years agoCorrected some man pages.
aap [Fri, 17 Jan 2014 18:15:24 +0000 (19:15 +0100)]
Corrected some man pages.

10 years agodevdraw: fix memory corruption reading draw ctl file
cinap_lenrek [Mon, 13 Jan 2014 23:22:13 +0000 (00:22 +0100)]
devdraw: fix memory corruption reading draw ctl file

when user does read of exactly 12*12 bytes on draw
ctl file, the snprint() adds one more \0 byte writing
beyond the user buffer and corrupting memory.

fix this by not snprint()ing the final space and add
it manually.

10 years agomerge
mischief [Tue, 14 Jan 2014 02:06:58 +0000 (18:06 -0800)]
merge

10 years agohpost: fix Content-Type parameter separator for multipart/form-data POSTs
mischief [Tue, 14 Jan 2014 01:57:45 +0000 (17:57 -0800)]
hpost: fix Content-Type parameter separator for multipart/form-data POSTs

10 years agoadd /lib/uriel; delete fortunes
stanley lieber [Sun, 12 Jan 2014 18:00:02 +0000 (13:00 -0500)]
add /lib/uriel; delete fortunes

10 years agoadded a segment for segattach(2) that gives access to the raspberry pi's gpio header.
Matthew Veety [Sun, 12 Jan 2014 16:00:38 +0000 (11:00 -0500)]
added a segment for segattach(2) that gives access to the raspberry pi's gpio header.

10 years agoetheryuk: fix lockups (thanks burnzez for testing)
cinap_lenrek [Sun, 12 Jan 2014 11:08:10 +0000 (12:08 +0100)]
etheryuk: fix lockups (thanks burnzez for testing)

according to a comment in linux driver, reading Isrc2
register caused interrupts to be disabled. we used
to read Isrc2 in ifstat() and it was confirmed that
reading ifstat locks up ethernet. removing the Isrc2
read in ifstats, and also reenable interrupts after
reading Isrc2 when the interrupt was not for us.
(this is from the linux driver)

in replenish(), set ring software write pointer (Sring.wp)
*before* the hardware write index register. otherwise
rx() could get status notification for completed
receive but wont find the rx descriptor in the ring.

handle uint wrap arround when calculating ring fill
count and remaining count.

10 years agonetif: fix wrong qid in 3rd level stats/ifstats files (thanks burnzez)
cinap_lenrek [Sat, 11 Jan 2014 15:07:35 +0000 (16:07 +0100)]
netif: fix wrong qid in 3rd level stats/ifstats files (thanks burnzez)

the stats and ifstats files in the 3rd level of a netif
are not per connection, but for the interface.

this made fstat fail for /net/ether0/N/*stats where N > 0
as the NETID() bits in the qid didnt compare.

10 years agorio: properly handle initial wrap arround in wlook()
cinap_lenrek [Sat, 11 Jan 2014 09:46:07 +0000 (10:46 +0100)]
rio: properly handle initial wrap arround in wlook()

10 years agorio: implement "look" (thanks lf94)
cinap_lenrek [Sat, 11 Jan 2014 09:14:35 +0000 (10:14 +0100)]
rio: implement "look" (thanks lf94)

10 years agokernel: fix fairshare formula in comment (thanks erik)
cinap_lenrek [Fri, 10 Jan 2014 14:12:28 +0000 (15:12 +0100)]
kernel: fix fairshare formula in comment (thanks erik)

10 years agomixfs: make mixbuffer addition atomic
cinap_lenrek [Fri, 10 Jan 2014 13:51:29 +0000 (14:51 +0100)]
mixfs: make mixbuffer addition atomic

serialize mixing with spinlock to make the addition
on the mixbuffer samples atomic.

10 years agomerge
cinap_lenrek [Fri, 10 Jan 2014 00:20:24 +0000 (01:20 +0100)]
merge

10 years agolibdraw: cleanup string() and stringwidth()
cinap_lenrek [Fri, 10 Jan 2014 00:19:14 +0000 (01:19 +0100)]
libdraw: cleanup string() and stringwidth()

getting rid of the goto at the end of the while
loop by moving the if(subfontnae) case before
the cachechars() call.

10 years agowinwatch: this is not about sanity. rows might be negative
mischief [Thu, 9 Jan 2014 05:32:27 +0000 (21:32 -0800)]
winwatch: this is not about sanity. rows might be negative

10 years agowinwatch: prevent divide by zero if the window height is too small
mischief [Thu, 9 Jan 2014 04:52:40 +0000 (20:52 -0800)]
winwatch: prevent divide by zero if the window height is too small

10 years agomothra: remove version
cinap_lenrek [Tue, 7 Jan 2014 01:57:39 +0000 (02:57 +0100)]
mothra: remove version

10 years agolibframe: fix _frcanfit() for zero width runes, simplify chopframe()
cinap_lenrek [Tue, 7 Jan 2014 01:24:16 +0000 (02:24 +0100)]
libframe: fix _frcanfit() for zero width runes, simplify chopframe()

10 years agoweather: trim garbage from output
stanley lieber [Mon, 6 Jan 2014 19:55:42 +0000 (14:55 -0500)]
weather: trim garbage from output

10 years agolibframe: avoid _frcanfit() call in frdelete()
cinap_lenrek [Mon, 6 Jan 2014 02:56:45 +0000 (03:56 +0100)]
libframe: avoid _frcanfit() call in frdelete()

no need to calculate number of runes to fit in
box when box contains no runes.

10 years agolibdraw: fix stringwidth problems
cinap_lenrek [Mon, 6 Jan 2014 02:49:14 +0000 (03:49 +0100)]
libdraw: fix stringwidth problems

cachechars() used to skip over characters on its own when
loadchar() could not find the character or a PJW replacement.
this resulted in wrong width calculation. now we just return
and handle the case inside _string and _stringwidth.

fix subfont leak in stringwidth()

remove annoying prints in stringwidth()

10 years agomerge
cinap_lenrek [Sun, 5 Jan 2014 01:39:23 +0000 (02:39 +0100)]
merge

10 years agorio: make scrollwheel handling consistent with sam
cinap_lenrek [Sun, 5 Jan 2014 01:37:42 +0000 (02:37 +0100)]
rio: make scrollwheel handling consistent with sam

scrollwheel now works proportional to y mouse position.
special case is when shift is hold down. then scrollwheel
will work like before and scroll one line up or down.