Commit Graph

284 Commits

Author SHA1 Message Date
reinoud
5458c3911e Small cleanups on memory initialisation by using munmap() instead of mapping
unaccessible anon memory that we're never going to use anyway!
2011-09-19 12:52:32 +00:00
reinoud
3de6efb873 Transform the clock signal to a sigaction so we have the info i.e. the
context! and thus a good definition for a clockframe!
2011-09-17 21:38:15 +00:00
reinoud
5da488838d Remove the blockage of SIGALRM here too 2011-09-16 16:30:51 +00:00
reinoud
f99c069b55 Reduce the size of the memory base of the testmachine even more! 2011-09-16 16:29:47 +00:00
reinoud
c9c81fefa4 Move the debug printf's to the new dprintf_debug() and disable the SIGALRM
blocking since we queue them now.
2011-09-16 16:29:11 +00:00
reinoud
7d70ede9ed Print out the memory information on verbose booting too, its too handy to have
around without all the goo of debug printouts
2011-09-16 16:27:39 +00:00
reinoud
8e95c015a7 Split the two debug sections 2011-09-16 16:26:19 +00:00
reinoud
9923cc8437 Allthough in normal practice at most two are queued, with all the debug info
spounting outi, a lot can get queued in the first phase of kernel startup.
especially the clock.
2011-09-16 16:25:44 +00:00
reinoud
609efbfe19 Like the others, let the clock signal restart calls 2011-09-16 16:24:01 +00:00
jmcneill
d4bcf1a5bb push TEXTADDR option into kernel makefile 2011-09-16 11:28:36 +00:00
reinoud
568419374b Reduce the amount of memory needed to run by default 2011-09-16 11:05:42 +00:00
reinoud
4e15406e15 Use vfprintf() to make it compile under 5.1 again 2011-09-15 20:25:23 +00:00
reinoud
970d3494e4 Check reentry to prevent double use of the aiocb structure 2011-09-15 19:32:28 +00:00
reinoud
5ee4952c26 Re-implement pmap_zero_page() and pmap_copy_page() by using
mmap + memset/memcpy + munmap.
2011-09-15 17:44:13 +00:00
reinoud
12cc391547 Implement pmap_copy_page()! That was missing a long time! 2011-09-15 15:34:19 +00:00
reinoud
6f2183f037 Clarify pmap_copy's function as a dummy 2011-09-15 15:24:39 +00:00
reinoud
76f29c38b1 Cleanup pmap_extract(); no functional change 2011-09-15 15:20:17 +00:00
reinoud
6c2ee61718 Implement pmap_unwire(); not seen it called yet though 2011-09-15 15:08:51 +00:00
reinoud
f52cc8bb37 Remove temporary the optimalization code of pmap_remove_all() until the
suspected pmap problems are fixed/found.
2011-09-15 15:02:35 +00:00
reinoud
d0843f465d On entering an entry to pmap, activate the entry directly if adding to an
already active pmap.
2011-09-15 14:55:23 +00:00
reinoud
e9b623c601 Only activate pages that are in active pmaps 2011-09-15 14:45:22 +00:00
reinoud
ac407d69d7 Adjust default parameters 2011-09-15 12:28:24 +00:00
reinoud
6a2055af55 Move to dprintf_debug() too 2011-09-15 12:26:51 +00:00
reinoud
8fb07d9b54 Move to dprintf_debug() 2011-09-15 12:25:25 +00:00
reinoud
c077611cdc Implement a dprintf_debug() analog to aprint_debug() but printing it to stderr
using vdprintf() to bypass the kernel buffer. It is currently printing only on
the -x boot flag but might get a more specific one since its quite verbose!
2011-09-15 12:23:51 +00:00
reinoud
89e01a7315 Code audit revealed missing brackets and a silly old constant of 1024
lingering around. Fixed with the right values.
2011-09-14 19:45:27 +00:00
reinoud
a353dd16f3 Make stacksize of newly spawn lwp's bigger than one page. Actually use the
variable stack_size now
2011-09-14 18:30:13 +00:00
reinoud
fa8df51a50 Implement in-place execution for binaries! No more MKPIE/MKPIC for userland
anymore!
2011-09-14 18:28:36 +00:00
reinoud
d48a18a7e3 Provide thunk fuction to return the host machine's VM_MIN_ADDRESS 2011-09-14 18:26:24 +00:00
reinoud
515a85d45d Add missing processor status flag file i forgot to add 2011-09-13 11:22:07 +00:00
reinoud
fed9a7ba09 Forgot the clock 2011-09-13 10:42:34 +00:00
reinoud
1b737a9a66 Remove excess signal stack declarations and remove the clock and ld signals
from the signal stack since they are only issued shortly.
2011-09-13 10:40:26 +00:00
reinoud
cfcb954ea9 Implement pmap_protect() and pmap_remove_all() 2011-09-13 10:38:48 +00:00
reinoud
ada358e9e2 Keep processing since we *might* have missed one during execution 2011-09-13 10:38:04 +00:00
reinoud
4b103e4fc6 Move the clock device and the ld device to the new spl interrupt PIC 2011-09-12 12:25:45 +00:00
reinoud
4c1ac21f06 Implement spl level based priority interrupt controller in software 2011-09-12 12:24:34 +00:00
reinoud
52976d256a Make cpu_lwp_trampo only jump once and make successive jumps go to the func
only
2011-09-10 10:37:06 +00:00
reinoud
de98cb6774 The illegal instruction handler can exist on the usermodes stack and the
stackframe will disappear when its switched back.
2011-09-10 10:29:39 +00:00
reinoud
2041dd27bc Make the trampoline only jump once!
All next calls are directed directly to the func specified.
2011-09-09 20:14:33 +00:00
reinoud
a1730aac72 Use the new thunk_makecontext() scheme with function and upto 3 aguments 2011-09-09 20:06:04 +00:00
reinoud
ed2801c109 Sanitise thunk_makecontext() allowing upto 3 random arguments 2011-09-09 20:04:43 +00:00
reinoud
c37f580072 Streamline makecontext() calls to really only specify the number of arguments
to prevent side-effects
2011-09-09 18:41:16 +00:00
reinoud
772c2c0c6d Clean up cpu_trampoline and link the context so we dont have to manually do
that.
2011-09-09 16:24:44 +00:00
reinoud
6efc43af66 machdep.c: Cleanup the machine dependent code and set the carry flag on error
out. While here also clean up register printing.

syscall.c: Add debug syscall printing code to track basic syscalls being
taken.
2011-09-09 12:44:27 +00:00
reinoud
4d72a86db6 Make pmap.c not so chatty unless we've enabled debug and verbose 2011-09-09 12:41:12 +00:00
reinoud
8058f19f87 Implement TBL functionality by remembering if its mapped in or not before
guessing and adjusting access types.

While here, when we hit a read-access fault and reference the page, also mark
it for executable when its permissions permit it. Distinguising between the
two is neigh impossible as we need to guess/derive the access the process
tried to have to the memory: we dont know if its a read/write/exec try.

Also clean up some debug messages.
2011-09-09 12:28:05 +00:00
reinoud
f0de0f3104 Be more verbose in trap.c on what address should be passed to userland. Also
detail about what function goes into recurse
2011-09-09 12:21:57 +00:00
reinoud
cf0d0b43fb Implement a working(!) syscall! well, it can call a number of syscalls without
dying ;)
2011-09-08 19:38:59 +00:00
reinoud
71ec3c5abe Remove not used variable from the pcb.h 2011-09-08 19:37:01 +00:00
reinoud
dde6f9699b Use the machdep.h and now use the md_check_syscall_opcode() 2011-09-08 15:13:27 +00:00