Commit graph

3981 commits

Author SHA1 Message Date
aiju 52ab0d1534 games/gb: fix gbc dma 2015-04-01 19:27:52 +02:00
aiju 66c98fab71 games/gb: fix -2/-3 2015-04-01 19:02:03 +02:00
aiju edfdc4ac07 new games/gb: better emulation and gbc support 2015-04-01 16:17:17 +02:00
cinap_lenrek 0b001e265c ether8169: fix Macv45 2015-04-01 15:22:37 +02:00
cinap_lenrek 0f785af644 ether8169: add 8168GU mac id (thanks qeed) 2015-04-01 14:58:29 +02:00
aiju 86bfd0331d games/c64: writes to I/O area do not affect underlying memory (documentation lied) 2015-04-01 12:49:59 +02:00
cinap_lenrek 2d0088598b devkbd: remove kbdputc() unused definition. 2015-04-01 12:21:11 +02:00
cinap_lenrek 736df3bd6c devkbd: remove unused constants 2015-04-01 12:15:54 +02:00
cinap_lenrek 3b08fd0769 merge 2015-04-01 01:32:37 +02:00
aiju 277185b51d games/gba: remove debugging print 2015-04-01 22:16:52 +02:00
cinap_lenrek b7ad532993 sgi: very primitive newport graphics driver for indy 2015-04-01 01:31:31 +02:00
cinap_lenrek ebf85fb7b7 vl: prevent stack altering instructions to be hoisted above loads
fixes bug with libmemdraw where the linker would hoist
the final ADD $const, SP at the end over loads from the
stack causing the front to fall off once a interrupt hits.
2015-04-01 01:30:16 +02:00
cinap_lenrek 1769b00b91 nintendo(1): add SOURCE entry for games/gba 2015-03-30 15:55:50 +02:00
cinap_lenrek e9e45e17eb sgi: preserve R27 in setregisters(), use setregisters() in noted()
GEVector() saves the exception return PC in Ureg.r27 which needs
to be preserved.

there should be no reason for the user to change the status
register from noted() eigther, so we now just use setregisters()
in noted() to restore previous general purpose registers. this
means that CU1 will always be off after noted() because notify()
has disabled the FPU on entry and set fpstatus to FPinactive
if it was on. once user starts using FPU again, it will trap and
restore fpu registers.
2015-03-30 00:26:33 +02:00
cinap_lenrek 2c9b1c6b53 etherseeq: reset the card when it gets stuck (dma timeouts) 2015-03-30 23:45:09 +02:00
cinap_lenrek eff2a40c16 merge 2015-03-28 14:12:35 +01:00
cinap_lenrek feb92fedb1 sgi: new approach for etherseeq
touching transmit descriptors while dma is running causes the
front to fall off. new approach keeps a counter of free
descriptors in the Ring structure that is incremented
by txintr() when transmit completed.

txintr() will clean descriptors once dma has stopped and
restart dma when there are more descrtors in the chain.
2015-03-28 14:11:17 +01:00
aiju 5a34ad16cd games/gba: very subtle timer bug fixed 2015-03-28 10:20:52 +01:00
cinap_lenrek 177cbace73 sgi: work in progress kernel for sgi mips machines (only tested with r5k indy)
this provides basic console support using the ARC bios routines
theu uartarcs driver. and has native seeq ethernet driver which
was written by reading the 2ed devseq driver as i have no
documentation on the hardware. mmu and trap code is based on the
routerboard kernel.
2015-03-28 05:15:40 +01:00
ethan 9fd3e3f239 mothra: remove unused confirmcurs; move confirmcursor up with the other cursors. 2015-03-27 01:57:46 +00:00
stanley lieber 791545f28f fortunes: TED, day 1: I want to believe -- WIRED magazine 2015-03-26 20:43:41 -04:00
cinap_lenrek bf365ac50e pc, pc64: state dependency to usbehci.h in mkfiles 2015-03-25 17:42:51 +01:00
cinap_lenrek fbe78d4687 mpdigdiv.s: aaaaand its gone! 2015-03-25 14:19:05 +01:00
cinap_lenrek 1cff9ab4e8 ape: fix main9 for mips 2015-03-25 13:56:04 +01:00
cinap_lenrek a7925e3ecb libmp: use portable mpdigdiv routines for mips (causes invalid instruction trap on indy) 2015-03-25 13:55:37 +01:00
cinap_lenrek cabf90e4ee ape: fix lockinit() for mips 2015-03-25 08:33:11 +01:00
cinap_lenrek 4687e196cc zynq: fix out of bounds access in etherprobe()
calling etherprobe() with -1 cardno will rereference
and call cards[-1].reset() which is wrong. don't do that!
2015-03-25 03:03:24 +01:00
cinap_lenrek 0bc9ad781f boot: allow alternative proto files per kernel and kernel config for bootfs.paq
bootmkfile will now looks for the following proto files in order
and pick the first one it finds to build the bootfs.paq file:

1)	$CONF.boofs.proto		(config specific)
2)	bootfs.proto			(kernel specific)
3)	$BOOTDIR/bootfs.proto	(default generic)
2015-03-25 00:11:54 +01:00
cinap_lenrek 8ab9c6d388 vc: fix coffsect.lnno overflow into nreloc
the coffsect.lnno field is 16 bit and can overflow into
the nreloc field confusing arc firmware on load. just
mask it to prevent overflow.
2015-03-24 22:54:26 +01:00
cinap_lenrek 3f4b45c4f1 boot: bind #c to /dev with MREPL instead of MBEFORE to avoid double entries 2015-03-23 03:15:58 +01:00
cinap_lenrek 8caec8564d vl, libmach, kernel: mips has 16K alignment for segments (for bigpages) 2015-03-22 17:49:28 +01:00
cinap_lenrek 80658d6ccf merge 2015-03-22 17:42:31 +01:00
cinap_lenrek 8e61a0036d usbohci: ensure Ed and Td alignment, fix for amd64 2015-03-22 17:41:35 +01:00
cinap_lenrek f2716ab227 merge 2015-03-19 11:45:50 +01:00
cinap_lenrek c86561f625 db: fix unicode support (thanks giacomo)
from the unicode-db patch readme:

command() receives a char* that is assigned to lp, which is a Rune*,
and lp is incremented later in readchar(), so each read consumed 4 bytes.
The only time command() is called is in runpcs() with bkpt->comm,
which is a char* built in subpcs through a char*, so the string stored in
bkpt->comm was not a Rune string. A way to test the bug is:

db program
main:b argv/X
:r
2015-03-19 11:44:26 +01:00
stanley lieber 3b5c56561c pushtls(2): tls.h -> libsec.h (thanks, pr) 2015-03-18 18:33:34 -04:00
cinap_lenrek 4d0343c9d2 dhcpd: ignore ";" filename from sgi arcs bootp(); command 2015-03-18 19:52:31 +01:00
cinap_lenrek dbbe430ec7 libmach: use #pragma pack to force 4 byte alignment of bootexec.h structures for amd64 2015-03-18 19:31:51 +01:00
cinap_lenrek 3889ada959 ape: silence compiler "no return at end of function" for mips lock.c 2015-03-18 19:30:12 +01:00
cinap_lenrek aac6784fce merge 2015-03-17 16:13:25 +01:00
cinap_lenrek f5f9ecdcfa 6c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, r
eleminate MOVLQXZ instructions after MOVL as MOVL implicitely
zero extends the result.
2015-03-17 16:12:01 +01:00
stanley lieber 17ae0ea757 mp(2) man page: mpinvert, not mpinverse (thanks, pr) 2015-03-16 23:34:37 -04:00
cinap_lenrek 972cd5e3fc kernel: get rid of auxpage() and preserve cache index bits in Page.va in mount cache
the mount cache uses Page.va to store cached range offset and
limit, but mips kernel uses cache index bits from Page.va to
maintain page coloring. Page.va was not initialized by auxpage().

this change removes auxpage() which was primarily used only
by the mount cache and use newpage() with cache file offset
page as va so we will get a page of the right color.

mount cache keeps the index bits intact by only using the top
and buttom PGSHIFT bits of Page.va for the range offset/limit.
2015-03-16 05:46:08 +01:00
cinap_lenrek d0b1db98bc kernel: avoid repeated calls to reclaim(), dont miss last page in Pte
when we are skipping a process because we could not acquire
its segment lock, dont call reclaim() again (which is pointless
as we didnt pageout any pages), instead try the next process.

the Pte.last pointer is inclusive, so don't miss the last page
in pageout().
2015-03-16 05:23:38 +01:00
cinap_lenrek c1717aebf7 rsa(8): recommend secstore(1) for Plan 9 RSA private key storage 2015-03-15 21:24:03 +01:00
cinap_lenrek 9b7c978793 mothra: <del>, <ins>, <wbr> 2015-03-15 18:01:06 +01:00
cinap_lenrek 6411efcde8 mothra: add <strike> support 2015-03-15 17:05:24 +01:00
cinap_lenrek e451804a75 boot: disable group/other permission checking in bootfs paqfs
when building bootfs in d770 mode directory, the other permissions
in bootfs paq are masked off which results in boot to fail. theres
no point in checking group/other permissions on boot, so just disable
permissin checking in paqfs with the -a flag.
2015-03-15 15:27:56 +01:00
cinap_lenrek b821edbcab doom: print correct version number on mismatch (thanks qu7uux) 2015-03-14 22:23:39 +01:00
cinap_lenrek 2443d46a9e webfs: do not send credentials in automatic referer url 2015-03-14 01:09:37 +01:00
cinap_lenrek 060e69b15a httpauth: little helper for rc-httpd to do http basic authentication with plan9 auth server 2015-03-14 01:00:26 +01:00
cinap_lenrek 85cab72ea0 hg, python: remove proto files 2015-03-13 18:45:58 +01:00
cinap_lenrek e74d851d69 hg: install hgweb templates 2015-03-13 18:30:59 +01:00
cinap_lenrek e437b1b289 pemencode: handle base64 input length < 3, fix bogus zero termination 2015-03-12 17:44:33 +01:00
cinap_lenrek 757354dac6 imap4d: simplify auth code using encodefmt(), use readn() to get multiple of 3*18 in base64 input buffer 2015-03-12 17:29:17 +01:00
cinap_lenrek 7e7cc2c8d7 webfs: simplify http basic auth code by using encodefmt() 2015-03-12 17:26:49 +01:00
cinap_lenrek 69af2676b0 upas/marshal: deduplicate cistrcmp()/cistrncmp()/enc64()
use the libc versions of these routines avoiding
code duplication.
2015-03-12 17:23:56 +01:00
cinap_lenrek 6eba362810 ndb/dns: reduce sencodefmt() to not link in enc32()/enc64() encoders
the special sencodefmt() in ndb/dn.c is only used with %H format for
hexadecimal printing for binary strings. removing the unused
calls to enc32() and enc64() reduces the code size by arround 4K.
(this is usefull for ndb/getip which gets linked into the kernel).
2015-03-11 18:09:48 +01:00
cinap_lenrek 9babf6a347 encode(2): clarify lim argument to enc*(), add SOURCE reference for encodefmt() 2015-03-11 17:48:24 +01:00
cinap_lenrek 8c11b62af9 smtp, smtpd: fix use of enc64(), fix memory leaks in doauth()
the approximation of n*2 to calculate the number of output bytes
for enc64() fails for inputs of size < 3. this is fixed by using
encodefmt() which gets the calculation right and also simplifies
the code avoiding the allocation and freeing of intermediate string
buffers.
2015-03-11 17:14:56 +01:00
cinap_lenrek a44a1dbd19 gif: fix color table clipping (for cb5.gif) 2015-03-11 12:59:19 +01:00
cinap_lenrek a6f7507661 factotum: remove unused extern declarations of invoker and authdom from header 2015-03-11 11:56:02 +01:00
cinap_lenrek 4d211fdd48 kernel: fix integer overflow in syssegflush(), segment code cleanup
mcountseg(), mfreeseg():
use Pte.first/last pointers when possible and avoid constructs
like s->map[i]->pages[j].

freepte():
do not zero entries in freepte(), the segment is going away and
here is no point in zeroing page pointers. hoist common code at
the top avoiding duplication.

segpage(), fixfault():
avoid load after store for Pte** pointer.

fixfault():
return -1 in default case to avoid the "used but not set" warning
for mmuphys and get rid of the useless initialization.

syssegflush():
due to len being unsigned, the pe = PGROUND(pe) can make "chunk"
bigger than len causing a overflow. rewrite the function and deal
with page alignment and errors at the beginning.

syssegflush(), segpage(), fixfault(), putseg(), relocateseg(),
mcountseg(), mfreeseg():
keep naming consistent.
2015-03-10 18:16:08 +01:00
cinap_lenrek 5639d1e5fc wpa(8): the -p flag will also prompt for user/password on wpa enterprise 2015-03-10 00:44:17 +01:00
cinap_lenrek dfed1eb851 pushtls(2): fix signature to TLSconn.trace() 2015-03-10 00:41:46 +01:00
cinap_lenrek 482694b72a webfs: implement CONNECT method for https connections over proxy
when using a http proxy, establish secure tls connection to the
other end with the CONNECT method so the proxy.
2015-03-09 20:26:20 +01:00
cinap_lenrek b69556052e gs: fix bug 694539. Reading off the end of the cbuf when dash pattern len is max 2015-03-08 05:27:24 +01:00
cinap_lenrek fcc336b902 kernel: catch address overflow in syssegfree()
the "to" address can overflow in syssegfree() causing wrong
number of pages to be passed to mfreeseg(). with the current
implementation of mfreeseg() however, this doesnt cause any
data corruption but was just freeing an unexpected number of
pages.

this change checks for this condition in syssegfree() and
errors out instead. also mfreeseg() was changed to take
ulong argument for number of pages instead of int to keep
it consistent with other routines that work with page counts.
2015-03-07 18:59:06 +01:00
cinap_lenrek 0c705580ab snap: fix readseg() to cope with > 2gb segments 2015-03-07 15:21:01 +01:00
cinap_lenrek 7b7c7f4451 merge 2015-03-06 18:30:25 +01:00
cinap_lenrek dc6d81cc7e zynq: sdio support 2015-03-06 18:29:39 +01:00
cinap_lenrek 374d4ec2c1 devsd: always page align sd buffers
sdbio() tests if it can pass the buffer pointer directly to
the driver when it is already in kernel memory. we also need
to check if the buffer is properly aligned but alignment
requirement is handled in system specific sdmalloc() and
was not known to devsd.

to solve this, we *always* page align sd buffers and get rid
of the system specific sdmalloc() macro (was only used in bcm
kernel).
2015-03-06 16:16:45 +01:00
cinap_lenrek fadbb92afa zynq: do mpinit() early so cpu1 debug prints do not intermix 2015-03-06 14:31:51 +01:00
cinap_lenrek 4e259dffbb merge 2015-03-05 10:17:23 +01:00
cinap_lenrek aade4d9d8a set /mail/tmp permissions world writable in cdproto 2015-03-05 10:16:17 +01:00
cinap_lenrek 3cd7978a72 zynq: fix usb by implementing delay() and give proper port speed in portstatus 2015-03-05 23:48:23 +01:00
stanley lieber f7160e633c col(1): add SOURCE (thanks, qrstuv) 2015-03-04 19:23:34 -05:00
cinap_lenrek 07c7fa6716 libthread: get rid of chaninit() (thanks qrstuv)
chaninit() does not initialize Chan.qentry and Chan.nentry
and there is no way to get rid of such a channel. nobody is
using it, so removing the function to avoid confusion.
2015-03-04 10:20:31 +01:00
cinap_lenrek eaf91d0f8e kernel: fix physical segment handling
ignore physical segments in mcountseg() and mfreeseg(). physical
segments are not backed by user pages, and doing putpage() on
physical segment pages in mfreeseg() is an error.

do now allow physical segemnts to be resized. the segment size
is only checked in segattach() to be within the physical segment!

ignore physical segments in portcountpagerefs() as pagenumber()
does not work on the malloced page structures of a physical segment.

get rid of Physseg.pgalloc() and Physseg.pgfree() indirection as
this was never used and if theres a need to do more efficient
allocation, it should be done in a portable way.
2015-03-03 13:08:29 +01:00
cinap_lenrek 2259f3fb9a libdraw: font->display->defaultsubfont vs. display->defaultsubfont, dead code, malloc erros
it is possible to have fonts belong to different or no display, so the
check for defaultsubfont has to be against font->display, not the global
display variable.

remove unused freeup() routine.

handle strdup() error in allocsubfont() and realloc() error in buildfont().
2015-03-02 11:01:12 +01:00
cinap_lenrek fc1ff7705b devmnt: remove unused mntstats fields from Mntrpc 2015-03-01 18:56:45 +01:00
cinap_lenrek 3f869a6894 factotum: cleanup getnvramkey()
- remove secstore password code, it is not used anymore.
- zero the Nvrsafe structure on the stack before returning.
- use smprint(), can't overflow.
2015-03-01 11:17:21 +01:00
cinap_lenrek 0467b41972 libdraw: use multiple read() calls in openfont() to read .font file
font files might be bigger than the i/o unit, so do multiple reads
until eof to read it.
2015-03-01 05:45:22 +01:00
cinap_lenrek e725771b5d libdraw: use readn() to read headers and Fontchar array
the Fontchar array might be bigger than the i/o unit,
so we have to use readn() to properly read it.
2015-03-01 05:39:45 +01:00
cinap_lenrek 7cdc13accc 6c: fix missing memset in Bconv() 2015-03-01 05:33:41 +01:00
cinap_lenrek 692e32caf4 thread(2): remove another instance of /mnt/temp 2015-02-28 13:27:00 +01:00
cinap_lenrek 95565d289e libthread: remove unused internal functions and old xinc assembler files 2015-02-28 13:26:38 +01:00
cinap_lenrek 45d1d31847 libthread: use devdup instead of mounting pipe to /mnt/temp for close-on-exec in procexec()
the namespace might be shared by other processes. instead, we
create a anonymous pipe with pipe() and use devdup to open one
end close-on-exec. this is shorter and avoids the race condition.

do not touch Execargs after writing the error message as the
process might be gone after the write. this was to manually
close the fd which isnt neccesary as the kernel will do it
for us on the following exit.
2015-02-28 12:50:17 +01:00
cinap_lenrek 1d2ce3583e leak: report alloc size mismatch 2015-02-26 22:33:03 +01:00
cinap_lenrek 098884981d pool: maintain Pool.curalloc for poolallocalign() and blockgrow()
blockgrow() and poolallocalign() change the size of
allocated blocks which needs to be accounted for
in Pool.curalloc.
2015-02-26 22:22:07 +01:00
stanley lieber 244d5ab76b fortunes: My recent incompetence is humbling. I should quit the industry. 2015-02-25 19:22:47 -05:00
cinap_lenrek 5866bd5ada aux/vga: dont error when vesa setscale fails after modeset (thanks rx9p for reporting) 2015-02-26 00:54:23 +01:00
cinap_lenrek 1e14429f47 kbdfs: work arround qemu
qemu does not send e0 escape for gray (arrow) keys, no matter
the numlock state. as a work arround, we assume gray key when
numlock is not active.
2015-02-24 14:21:47 +01:00
cinap_lenrek 4235556c16 libdraw: check fontchar count in openmemsubfont() and readsubfont() 2015-02-24 03:30:21 +01:00
cinap_lenrek 5f8cacd2de libdraw: cleanup getsubfont() 2015-02-24 03:25:26 +01:00
cinap_lenrek cc77058aea webfs: check $httpproxy and error when its bogus
the httpproxy environment variable needs to be a url as stated
in the manpage, so give an error when it isnt.
2015-02-23 07:27:19 +01:00
cinap_lenrek 60fd51b9b7 merge 2015-02-23 01:23:31 +01:00
cinap_lenrek d7a4fdee99 jpg: handle progressive non-interleaved mode 2015-02-23 01:20:42 +01:00
cinap_lenrek cd34655642 merge 2015-02-21 10:56:32 +01:00
cinap_lenrek ccb624e2bb gs: backport 16MB string support 2015-02-21 10:55:09 +01:00
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