Home | History | Annotate | Download | only in include
History log of /src/sys/arch/usermode/include/thunk.h
RevisionDateAuthorComments
 1.67  08-May-2019  isaki Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
 1.66  01-Aug-2018  reinoud branches: 1.66.2;
Add headers for support functions for kgdb
 1.65  04-Jun-2018  reinoud branches: 1.65.2;
Enhance the NetBSD/usermode thunk interface
 1.64  01-Jun-2018  reinoud Pretend we already included the <types.h>
 1.63  18-May-2018  reinoud Include OUR types.h and not the machine's. A small step to allow for
crosscompilation.
 1.62  06-Feb-2015  prlw1 branches: 1.62.16;
Take procfs_machdep.c rev 1.4 one step further and adjust signature of
thunk_getcpuinfo().
 1.61  03-Mar-2012  reinoud branches: 1.61.2; 1.61.16;
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!
 1.60  21-Jan-2012  reinoud branches: 1.60.2;
Add the complement to sigemptyset(), sigfillset()!
 1.59  11-Jan-2012  reinoud Add thunk_close()
 1.58  10-Jan-2012  reinoud Add thunk_madvise() for memory access hints to the host kernel.
 1.57  06-Jan-2012  jmcneill support disk images >= 2GB
 1.56  05-Jan-2012  jmcneill Get rid of MAP_NOSYSCALLS usage; now this relies on a separate kmod that
you can get here: http://www.netbsd.org/~jmcneill/syscallemu.tar
 1.55  03-Jan-2012  reinoud Rename the debug printf's to use a thunk_ prefix to avoid confusion.
 1.54  31-Dec-2011  christos Adjust prototypes.
 1.53  30-Dec-2011  jmcneill report rfb pointer events
 1.52  30-Dec-2011  jmcneill add a barrier before copyrows(), and add an RRE based fillrect functino,
use it for eraserows and erasecols
 1.51  30-Dec-2011  jmcneill support wskbd bell
 1.50  30-Dec-2011  reinoud Use the encoding values of the VNC spec and add a copyrect (not used yet)
 1.49  30-Dec-2011  reinoud Add RFB type flag to indicate what kind of request is waiting
 1.48  30-Dec-2011  jmcneill optimize rfb updates by allowing queueing of multiple update messages,
dropping duplicates, and transmitting them in batches
 1.47  29-Dec-2011  jmcneill 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
 1.46  26-Dec-2011  jmcneill add vaudio(4) audio device driver
 1.45  26-Dec-2011  jmcneill first cut at networking support for usermode, doesn't fully work yet but
enough to get an address with dhcp and answer arps
 1.44  20-Dec-2011  jmcneill on second thought, set machine and machine_arch both from the host and
override module_machine
 1.43  20-Dec-2011  jmcneill set machine_arch to that of the host
 1.42  20-Dec-2011  reinoud Use to the MAP_NOSYSCALLS argument to mmap() to allow for NetBSD/usermode to
execute bog-standard native programs.
 1.41  15-Dec-2011  jmcneill 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.
 1.40  15-Dec-2011  jmcneill implement /proc/cpuinfo
 1.39  15-Dec-2011  jmcneill use write instead of putchar putchar putchar putchar putchar ... for console output
 1.38  15-Dec-2011  jmcneill implement cpu idle via sigsuspend
 1.37  12-Dec-2011  jmcneill make sure to set O_ASYNC on stdin to enable ttycons "interrupts"
 1.36  11-Dec-2011  jmcneill add thunk_pollchar
 1.35  27-Nov-2011  reinoud branches: 1.35.2;
Add thunk_sigprocmask()
 1.34  15-Sep-2011  reinoud branches: 1.34.2;
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!
 1.33  14-Sep-2011  reinoud Provide thunk fuction to return the host machine's VM_MIN_ADDRESS
 1.32  09-Sep-2011  reinoud Sanitise thunk_makecontext() allowing upto 3 random arguments
 1.31  09-Sep-2011  reinoud Streamline makecontext() calls to really only specify the number of arguments
to prevent side-effects
 1.30  05-Sep-2011  reinoud Implement thunk_sigemptyset()
 1.29  05-Sep-2011  reinoud Add thunk_sigaddset()
 1.28  04-Sep-2011  jmcneill implement splraise/spllower
 1.27  04-Sep-2011  reinoud Implement thunk_seterrno()
 1.26  04-Sep-2011  reinoud -thunk_makecontext_trapframe2go(ucontext_t *ucp, void *func, void *trapframe)
+thunk_makecontext_1(ucontext_t *ucp, void *func, void *arg)
 1.25  03-Sep-2011  jmcneill Let NetBSD/usermode build & link on a Linux host:
- Need to add options CPU_HOST=i386 or CPU_HOST=amd64 for membar & atomic_ops
- Don't use MAP_* and PROT_* with thunk API since the kernel and host
might not be the same; add THUNK_MAP_* and THUNK_PROT_* and translate them
- Add thunk_posix_memalign
- allocate mem_uvm with thunk_posix_memalign instead of thunk_malloc
- Fix thunk_mmap callers to always pass either THUNK_MAP_PRIVATE or
THUNK_MAP_SHARED
- mkstemp on Linux requires exactly 6 "X" characters at the end of the
template string, so add an X
 1.24  03-Sep-2011  jmcneill Get this compiling (but not quite linking yet) on Linux
 1.23  02-Sep-2011  reinoud Revert
 1.22  02-Sep-2011  reinoud -thunk_makecontext_trapframe2go(ucontext_t *ucp, void *func, void *trapframe)
+thunk_makecontext_1(ucontext_t *ucp, void (*func)(void), void *arg)

Create a more general prototype for makecontext() with one variable.
 1.21  01-Sep-2011  reinoud Implement thunk_sigaltstack() so an alternative signal stack can be used
 1.20  28-Aug-2011  jmcneill add thunk_tcgetattr and thunk_tcsetattr
 1.19  28-Aug-2011  reinoud Add thunk_makecontext_trapframe2go()
 1.18  27-Aug-2011  reinoud Add a thunk_atexit() so ucontext() ends can be dealt with as they should
 1.17  25-Aug-2011  jmcneill - build thunk code with warnings
- add option SDL which pulls in thunk_sdl code and links the kernel to libSDL
- add an experimental framebuffer driver based on thunk_sdl, enable with:
options SDL
genfb* at mainbus?
wsdisplay* at genfb?
options WS_KERNEL_FG=WSCOL_GREEN
options WSEMUL_VT100
- reserve a major # for wsdisplay
- add thunk_getenv()
 1.16  24-Aug-2011  reinoud Implement thunk_malloc() and think_free()
 1.15  23-Aug-2011  jmcneill add a wrapper for signal(3)
 1.14  23-Aug-2011  jmcneill struct stat also has time_t in it, so we can't use that in the thunk api either
 1.13  23-Aug-2011  jmcneill more time_t fixes
 1.12  23-Aug-2011  jmcneill unlink pmap backing file immediately after opening it, so we don't leave
a bunch of 128MB turds sitting around in /tmp
 1.11  23-Aug-2011  jmcneill more host vs. userkernel time_t fixes
 1.10  23-Aug-2011  jmcneill host and userkernel timespec might differ in size (because of time_t) so
instead of thunk_clock_getres() filling in a timespec, use instead
thunk_clock_getres_monotonic() that returns the resolution as a long
 1.9  22-Aug-2011  reinoud Add thunk_munmap() to NetBSD/usermode's thunk
 1.8  21-Aug-2011  reinoud Fix thunk_mkstemp() prototype and add thunk_mprotect()
 1.7  21-Aug-2011  reinoud Add mmap() reachover call in thunk for NetBSD/usermode
 1.6  20-Aug-2011  reinoud Create mkstemp() and sbrk() prototypes to NetBSD/usermode's thunk
 1.5  13-Aug-2011  jmcneill - replace the gettimeofday timecounter with one based on CLOCK_MONOTONIC
- use gettimeofday for TODR clock
 1.4  13-Aug-2011  jmcneill try to use aio_read/aio_write instead of pread/pwrite
 1.3  12-Aug-2011  jmcneill add a simple disk driver, pass the path to the disk image on the kernel command line:

soundwave$ ./netbsd /tmp/test.fs
NetBSD/usermode startup
[...]
ld0 at mainbus0: /tmp/test.fs (33554432)
ld0: 32768 KB, 8322 cyl, 64 head, 63 sec, 1 bytes/sect x 33554432 sectors
boot device: ld0
root on ld0a dumps on ld0b
 1.2  12-Aug-2011  jmcneill implement reboot using execv
 1.1  12-Aug-2011  jmcneill Clean up extern mess by adding an API for kernel components to call libc
functions. thunk.c is built with special cflags that makes it compile
against standard system headers instead of kernel ones.
 1.34.2.1  17-Apr-2012  yamt sync with head
 1.35.2.4  06-Mar-2012  mrg sync to -current
 1.35.2.3  06-Mar-2012  mrg sync to -current
 1.35.2.2  04-Mar-2012  mrg sync to latest -current.
 1.35.2.1  18-Feb-2012  mrg merge to -current.
 1.60.2.1  07-Mar-2012  riz Pull up following revision(s) (requested by reinoud in ticket #89):
sys/arch/usermode/usermode/thunk.c: revision 1.81
sys/arch/usermode/target/i386/cpu_i386.c: revision 1.4
sys/arch/usermode/include/thunk.h: revision 1.61
sys/arch/usermode/include/intr.h: revision 1.9
sys/arch/usermode/dev/cpu.c: revision 1.70
sys/arch/usermode/dev/ttycons.c: revision 1.19
sys/arch/usermode/usermode/trap.c: revision 1.64
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!
 1.61.16.1  06-Apr-2015  skrll Sync with HEAD
 1.61.2.1  03-Dec-2017  jdolecek update from HEAD
 1.62.16.3  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.62.16.2  25-Jun-2018  pgoyette Sync with HEAD
 1.62.16.1  21-May-2018  pgoyette Sync with HEAD
 1.65.2.1  10-Jun-2019  christos Sync with HEAD
 1.66.2.1  27-Apr-2019  isaki Adapt to audio2.

RSS XML Feed