Ok now I dont have the fosdem plague I have been working on
"frankenlibc". The original idea of this was to tidy up the messy
implementation of rumprun-posix (or at least one of them), but I think
it might be more useful.

The idea is to make a stub libc that has enough functionality to allow
you to compile the upstream fiber version of rumpuser. This provides
standard libc functions that are used, eg string.h, and the malloc
implementation that we use in baremetal, and some other functions that
are needed. It also provides an assembler implementation of the
swapcontext functions that are used for threading.

This then leaves a very minimal number of per platform functions that
need to be implemented, many of which are optional:

clock_gettime
clock_nanosleep
exit
getrandom - optional random numbers
mmap - to allocate pages (maybe with alignment requirements)
munmap
raise - mainly used for abort
putchar - console
getenv

Plus platform initialisation code.

Initially I am doing a Linux implementation which does direct
syscalls, which was the original idea so you need not link in host
libc. However it should be quite simple to add support for baremetal
and Xen as it basically just needs init and the page allocation to be
done. This has the advantage that the platforms will be much more
similar.

I have written most of it now except the init code and a build script,
so hoping to have something working in a day or so to demonstrate this
is a sane way of doing it.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to