Commit Graph

148 Commits

Author SHA1 Message Date
mlelstv
8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
reinoud
67d81114c7 Implement dummy `cpu_mcontext_validate' to make it compile again. This
function needs to be implemented in the target secton one day for extra
security.
2012-06-25 14:43:54 +00:00
reinoud
8caa187077 Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program
devides by zero!
2012-03-03 21:15:15 +00:00
reinoud
1ea95bd622 Complete rewrite of the signal and spl framework for NetBSD/usermode
Signals are now moved from the sigaltstack ASAP and stacked on a replacement
stack for each processes.

Preemption now works though could be enhanced a bit more
2012-01-21 22:09:56 +00:00
reinoud
20157f98bc Create an atomic switchto() that has SIGALRM and SIGIO signals blocked that
might otherwise disrupt the setting of curlwp to match the lwp context.
2012-01-18 19:17:02 +00:00
jmcneill
bf48f3f746 close file descriptors at shutdown 2012-01-15 10:51:12 +00:00
jmcneill
bd720a636c sync disks and unmount at shutdown, and run shutdownhooks + pmf shutdown
handlers
2012-01-15 10:45:03 +00:00
jmcneill
a60846ba16 allow specifing the root device with 'root=ldN' parameter 2012-01-15 10:18:58 +00:00
reinoud
7752740c40 Reimplement userret() to also include AST for preemption.
Note it would be nice if we could do the check "are we going to userland?" in
a less intrusive way.
2012-01-14 21:45:28 +00:00
reinoud
367a9d86d8 Revert back to IPL_SOFTCLOCK so its lower than IPL_SHED 2012-01-14 21:42:51 +00:00
reinoud
4d50950c67 Cleanup clock.c removing unneeded function 2012-01-14 21:24:52 +00:00
reinoud
cd980be679 Revamp the NetBSD/usermode pagefault and illegal instruction handing. It now
can handle recursive entry and is a lot more memory tight compared to the old
implementation. Performance wise:

* slightly less number of syscalls/sec possible though could be optimized
* a lot faster context creation / destruction making overall operation faster.
2012-01-14 17:42:51 +00:00
reinoud
b56977fe32 Remove old comment about space not being freed; it is now done correctly so
remove it to avoid confusion later.
2012-01-12 13:28:54 +00:00
reinoud
d74ce82ce1 Re-implement aio for ld_thunkbus. It seems to work fine though its not set by
default; define LD_USE_AIO or uncomment its setting at the top of the
sourcefile to enable it.
2012-01-09 21:01:31 +00:00
reinoud
8b9e5ff328 Don't directly call softint_shedule() when we might be in an SPL level too
high.
2012-01-09 20:39:39 +00:00
reinoud
453f61bbf1 sizeof_t is allways >=0 and the check for >=0 thus allways is true and amd64
complains about this. This might explain the odd write errors that could
sometimes be reported. Those are/were probably a side effect of this.
2012-01-09 14:56:35 +00:00
jmcneill
01a67a2dc9 support multiple disk images (pass multiple disk=<path> parameters on the
command-line). while changing command-line params, rename tap= option to
net=
2012-01-07 18:10:18 +00:00
reinoud
f4334c5283 Enhance debugging printfs to also report the functionname 2012-01-06 20:40:51 +00:00
jmcneill
bd08415c40 support disk images >= 2GB 2012-01-06 14:11:55 +00:00
reinoud
ee9d19b7a5 Cleanup stack allocation and freeing. This means the memory leak on lwp
destruction ought to be solved.
2012-01-06 12:54:59 +00:00
reinoud
f7656de71f No reason why to have a larger pagefault stackframe for lwp0 2012-01-04 15:18:57 +00:00
reinoud
3a3d6c42df Zero the memory we claim for the stacks 2012-01-04 15:14:57 +00:00
jmcneill
e51725528c implement cngetc and cnpollc 2012-01-04 14:53:57 +00:00
reinoud
afa1fedea0 Use M_WAITOK instead of M_NOWAIT for the stack allocations 2012-01-03 12:10:04 +00:00
reinoud
cc21223919 Rename the debug printf's to use a thunk_ prefix to avoid confusion. 2012-01-03 12:05:00 +00:00
jmcneill
31469ba145 fix range check for mmap 2012-01-02 00:20:30 +00:00
jmcneill
e3b27f0cbb add wsmouse support 2011-12-30 20:08:36 +00:00
jmcneill
45276cf976 add mmap support 2011-12-30 19:32:32 +00:00
jmcneill
869f56b4be no need to poll for pending drawing ops if no client is connected 2011-12-30 14:22:41 +00:00
jmcneill
32f706ab6b add a barrier before copyrows(), and add an RRE based fillrect functino,
use it for eraserows and erasecols
2011-12-30 14:20:33 +00:00
reinoud
4b4a4e64bb Implement VNC's copyrect sending and let the copyrows use the new
vncfb_copyrecs()
2011-12-30 13:08:30 +00:00
jmcneill
b5566174ca support wskbd bell 2011-12-30 12:54:41 +00:00
jmcneill
3daf26f92f map Fn keys, make vt switching work 2011-12-30 12:14:44 +00:00
jmcneill
fc3088ac6d use O_ASYNC + SIGIO instead of polling for input 2011-12-30 11:06:18 +00:00
jmcneill
e11aac04f7 take nrows into account when calculating the update rectangle in vncfb_copyrows 2011-12-30 09:31:44 +00:00
jmcneill
a91f77bb0a send framebuffer updates for cursor changes too 2011-12-30 08:49:53 +00:00
jmcneill
4f5a27ac46 Replace the SDL based genfb driver with a wsdisplay and wskbd driver that
implements the VNC (RFB) protocol.

To enable the VNC server, add 'vnc=640x480,5900' to the kernel command line
(where 640x480 is the desired fb resolution and 5900 is the TCP port).

Screenshot of it here: http://www.netbsd.org/~jmcneill/usermode.tiff
2011-12-29 21:22:49 +00:00
jmcneill
450153a325 support ^Z 2011-12-27 20:59:45 +00:00
reinoud
0c0ccce6e1 Implement physio() for NetBSD/usermode the right way! 2011-12-27 14:55:31 +00:00
jmcneill
d3e0e08d05 mark vaudio callout and softint handler as mpsafe 2011-12-26 23:50:43 +00:00
jmcneill
51fb3691cb add vaudio(4) audio device driver 2011-12-26 21:06:42 +00:00
jmcneill
8fa8427ad9 veth_start: copy data from mbuf into a buffer and pass that to thunk_write(),
now this driver works as expected
2011-12-26 14:51:20 +00:00
jmcneill
89596f3be7 first cut at networking support for usermode, doesn't fully work yet but
enough to get an address with dhcp and answer arps
2011-12-26 12:39:19 +00:00
jmcneill
b3696fb542 add sigio_intr_establish so more than one driver can register a SIGIO handler 2011-12-26 12:29:38 +00:00
reinoud
4225654626 Implement cpu_getmcontext() and cpu_setmcontext() 2011-12-24 12:23:24 +00:00
jmcneill
5fa13b905b move the (now 1024 byte) printing buffer off the stack 2011-12-21 11:53:07 +00:00
reinoud
8a3ba0c33c Increase printing buffer of ttycons from 80 to 1024 significantly increasing
console output on large dumps.
2011-12-21 10:02:45 +00:00
jmcneill
a4ead07a0f check return value of write, make sure we send the whole buffer to stdout 2011-12-20 21:35:16 +00:00
jmcneill
d27fbb9f42 Improve usermode timecounter. It's unreasonable to assume that we'll get
100 "SIGALRM" per second with an ITIMER_REAL at 100Hz on a HZ=100 host as
the timer may expire before a pending signal has been delivered.

Instead of setitimer, use timer_create + timer_settime and from our
intr handler use timer_getoverrun to determine how many ticks we have
missed.
2011-12-15 03:42:32 +00:00
jmcneill
e5e5128877 allocate msgbuf with kmem_zalloc instead of thunk_malloc, now dmesg works 2011-12-15 02:09:15 +00:00