Commit graph

2922 commits

Author SHA1 Message Date
cinap_lenrek 152c9d525b aux/cpuid: hack for amd64 2014-02-17 19:50:02 +01:00
cinap_lenrek 2c5c784255 prof: properly save and restore RARG for amd64
amd64 passes first argument in RARG (BP) register
which has the be preserved duing _profin() and
_profout() calls. to handle this we introduce
_saveret() and _savearg(). _saveret() returns
AX, _savearg() returns RARG (BP). for archs other
and amd64, _saveret() and _savearg() are the
same function, doing nothing.

restoing works with dummy function:

uintptr
_restore(uintptr, uintptr ret)
{
	return ret;
}

...

ret = _saveret();
arg = _savearg();
...
return _restore(arg, ret);

as we pass arg as the first argument, RARG (BP) is
restored.
2014-02-17 13:25:24 +01:00
cinap_lenrek 87fcb107ef games/nes: add mapper 7 support 2014-02-16 21:40:33 +01:00
aap cd27c0cca2 xd: changed -s option to switch to little-endian units 2014-02-16 21:32:14 +01:00
aiju 1225ebec71 added games/nes 2014-02-16 20:51:11 +01:00
cinap_lenrek ae41f49f09 mothra: remove unused local variables from pl_nextc() 2014-02-16 19:40:50 +01:00
cinap_lenrek 3df2b18398 truss: use A instead of X as address format for data dump 2014-02-16 19:20:57 +01:00
cinap_lenrek c44cbf3165 truss: fix syscall address formats 2014-02-16 19:08:49 +01:00
cinap_lenrek 218e1b4b3e mothra: fix unicode rendering for plaintext
we did the utf-8 to unicode conversion in pl_nextc(),
but the plaintext handler uses pl_readc() which only
translates newlines but otherwise returns bytes.

move unicode conversion in pl_readc() fixes it.
2014-02-16 18:50:30 +01:00
Matthew Veety c54271a588 documented usbwait in plan9.ini(8) 2014-02-15 17:18:58 -05:00
cinap_lenrek e42981dfcf factotum/authsrv: fix padding for mschap on amd64, use constants for structure sizes 2014-02-15 19:57:13 +01:00
cinap_lenrek 240ba73770 pc64: fix mistake 2014-02-15 16:58:35 +01:00
cinap_lenrek 25189924db pc64: simplify mmuwalk by factoring out mmu page table creation into separate function 2014-02-15 16:43:55 +01:00
cinap_lenrek c6f6396faa merge 2014-02-15 06:19:25 +01:00
cinap_lenrek ebeb501cff pc64: support for vmware PCnet ethernet 2014-02-15 06:17:38 +01:00
cinap_lenrek 32604cd830 pc64: move VMAP into its own PDP (for vmware)
modifying the kernel pdp (CPU0PDP) hangs vmware. so
we initialize the pdp with KZERO and KZERO+1GB map
in l.s and never change it. (except when removing
the zero double map which seems to work).

VMAP has its own pdp now allowing to map 512GB of
physical address space. this simplifies the code
a bit and gives nice virtual addresses.
2014-02-15 06:17:05 +01:00
Matthew Veety 1d64be1984 added in a way to make net.rc wait for the network hardware to come up before running ip/ipconfig. This fixes the issue with the Raspberry Pi where ip/ipconfig tried running prior to /net/etherU3 exists 2014-02-14 22:05:25 -05:00
cinap_lenrek de4aec9fbd libc: remove malloc.acid and pool.acid 2014-02-14 15:20:34 +01:00
cinap_lenrek 14770ad188 page: fix compiler warning 2014-02-14 15:01:14 +01:00
cinap_lenrek 82cec6f585 socksd: close inside udp server one we get a connection (udprelay) 2014-02-14 14:57:05 +01:00
cinap_lenrek 81ea3f24fa cifsd: fix compiler warning 2014-02-14 14:21:07 +01:00
cinap_lenrek fc78640118 nusb/ether: fix pointer truncation 2014-02-14 14:18:09 +01:00
cinap_lenrek dd4a487b0e webfs: fix compiler warning 2014-02-14 14:14:17 +01:00
cinap_lenrek 80deec0a7b ip/torrent: remove unneeded assignment 2014-02-14 14:12:02 +01:00
cinap_lenrek 38c35d6195 acid: add semacquire/semrelease/tsemacquire syscalls, handle _seek hack for amd64 (thanks erik) 2014-02-14 14:02:33 +01:00
Matthew Veety 3f9d92c1a8 similar to my last commit, but combined the two waits for the usb devices. still configurable, but with usbwait. If usbwait is not defined then it defaults to the original 2 seconds. 2014-02-14 00:11:11 -05:00
mischief 7d73312def pc64: add ahci.h to PCHEADERS so it will be removed on mk clean 2014-02-12 03:02:23 -08:00
mischief 6edd7255c7 pc64: remove ethermii.h and copy it from pc instead 2014-02-12 03:00:12 -08:00
Matthew Veety 6a12aef885 added pccpu64 for cpuservers. also enabled etherigbe in pc64 and pccpu64 2014-02-12 21:05:04 -05:00
cinap_lenrek b7b68668cf acid: fix acid/network, fix address formats from X to A 2014-02-12 20:04:07 +01:00
cinap_lenrek cd17077749 truss: support for amd64 2014-02-12 19:27:08 +01:00
cinap_lenrek ad38f0eb1c pool(2): fix ulong -> uintptr 2014-02-12 18:53:03 +01:00
cinap_lenrek 872f83cebe ramfs: remove mainmem pool limit when called with -u flag 2014-02-10 04:04:51 +01:00
cinap_lenrek 7f73792ef9 pc64: limit memory of per processor mmu freelist to 1MB 2014-02-10 02:37:45 +01:00
cinap_lenrek e37ff43eb6 acid: remove objchar, prefering foobar.$objtype.acid
acid already sets up objtype for us.
2014-02-10 01:53:26 +01:00
cinap_lenrek c4679d743a pc64: return up in RUSER (BP) for devproc kregs file 2014-02-10 23:12:52 +01:00
cinap_lenrek 37de63aec3 cc: emit right acid format for address
we could use 'A' here but then it would require the new acid.
2014-02-10 23:10:47 +01:00
cinap_lenrek de356dd855 acid: update acid libraries for amd64 2014-02-10 23:07:37 +01:00
cinap_lenrek 16acf605e2 acid: make 'a' and 'A' format to have the same size as mach->szaddr
to make it easier to write portable acid code, we
introduce 'A' format in the same meaning as in db(1):

A    Print the value of dot in hexadecimal.  Dot is
     unaffected.

both 'a' (symbolic) and 'A' will both have 64 or 32 bit
size depending on the mach, so pointer array indexing
works the same.
2014-02-09 22:43:09 +01:00
cinap_lenrek 9bdf602ebb pc64: pass Ureg* argument in BP to userspace note handler 2014-02-09 02:23:33 +01:00
cinap_lenrek 9d8f5a1466 acid: fix memory corruption due to gc
we cannot call gc() in execute() because it will gc
anonyous intermediate results which happens when we
construct a list and the elements are calculated by
calling a function thru ocall() which calls execute().

also, the _thiscmd symbol; which is used to keep
a reference to a statement so it wont get garbage
collected; does not work as yyparse() is recursive
(include statements).

we add execrec() function which *only* gets called from
yyparse() when evaluating a statement. it will
keep a stack on the _thiscmd symbol handling the yyparse()
recursion.

we also only call gc() in execrec() before calling
execute(). so execute() will never gc() while evaluating
a statement which prevents the intermediate results
from getting collected.
2014-02-09 01:37:05 +01:00
cinap_lenrek 6b146c70c2 pc64: handle negative file offsets when accessing kernel memory with devproc
file offset is 64 bit signed integer, negative offsets
are invalid and rejected by the kernel. to still access
kernel memory on amd64, we unconditionally clear the sign
bit of the 64 bit offset in libmach and devproc sign
extends the offset back to a 64 bit address.
2014-02-08 03:50:41 +01:00
cinap_lenrek 43212f6432 mtrr: fix mistake 2014-02-08 03:40:17 +01:00
cinap_lenrek 7af85b9e74 jpg: center image in screen
when using the jpg(1) programs interactively, draw the
image in the center of it. this avoids wasting space
with always on borders on small windows and looks better
when used in fullscreen.
2014-02-08 02:33:29 +01:00
cinap_lenrek b3df8945bd reuse mtrr slots with default memory type 2014-02-08 01:01:26 +01:00
cinap_lenrek 9c99675c1c aux/vga: fix format string error with 6c 2014-02-08 00:29:06 +01:00
cinap_lenrek eaafcf2187 pc64: bump segment limit to 64GB 2014-02-08 00:23:18 +01:00
cinap_lenrek 2b4706b662 pc64: dont reuse mtrr slots that are above 4GB
we used to override/reuse mtrr slots over 4GB as the
kernel wasnt able to use that memory. pc64 can.
2014-02-07 20:04:19 +01:00
mischief fc7f6f8e99 pc64: ensure user pc is never set to a non-canonical address through setregisters
on intel processors, a general protection exception is fired if a non-canonical address is loaded into PC during SYSRET. this will cause the kernel to panic.

see http://www.kb.cert.org/vuls/id/649219 and the intel software developer manual for more information.
2014-02-06 18:03:17 -08:00
cinap_lenrek 0fdb1578ef pc64: fix devcons format strings for memory sizes 2014-02-07 23:35:27 +01:00