lib: make con_putstr() a weak symbol
testbench: add the forkserv binary

It isn't loaded by anything, though starting it on its own instead of
testbench causes a "unknown IPC label" report from sigma0. This means it
works.
testbench: move old tests into legacy.c

These should become actual tests or test suites. At some point.

There's also a couple of tests in thread.c; these should be reworked into some
sort of a self-test of testbench's runtime support.
import <l4/bootinfo.h> from L4Ka::Pistachio

Though it was changed to remove L4_INLINE and add __attribute__((packed)) to
struct definitions. Also, L4_BootInfo() was added to <l4/kip.h>, and it is
one of the least useful functions in those header files.
mbiloader: add BootInfo, BootRec entries for MBI modules

Those that aren't loaded separately per the L4.X2 spec, anyway.
testbench: add "forkserv"

It's a service that's supposed to let the testbench process fork itself via
copy-on-write. That's the easiest interface to testing with multiple address
spaces, and it might also have a use in isolating tests from one another.
mapdb: rewrite mapdb_add_map()

The old version had a bug where e.g. a two-page entry would be truncated to
become a one-page entry when its first page was remapped. This no longer
occurs.
space: actually invalidate page table entries

This should've occurred when @page_id is given as 0. It does now.
ipc: alter page tables after GrantItem unmap

Well, sort of. This changeset's version removes all privileges (and even the
page's presence!) even if only write access was granted. While that way
_works_, it causes some unnecessary invisible page faults in the partial grant
case when the vanished entries are accessed for the first time afterward.
testbench: add pager function to forkserv

This changeset also adds the bits that're required to make testbench work
under forkserv's care: transfer_to_forkserv(), use of FORKSERV_SBRK in heap.c
(but not from within forkserv itself, as heap.c is linked to both testbench
and forkserv), informing forkserv about new threads it should associate with
address spaces, and so forth.

The result is that poke_peek_fault_test() no longer works. In fact it breaks
the whole unit test process.
test: rewrite poke_peek_fault_test() to work with forkserv

I.e. it must allocate some fresh address space with sbrk() in order to get
proper faults. It could also use Unmap to remove that memory to ensure faults,
but as Unmap isn't implemented, this works as well -- and ends up testing just
one mechanism instead of two.

This changeset also updates the legacy thread test to add its threads to
forkserv paging, which is very necessary for thread stacks.
add FIXME to the trace_enable() boneyard

And also the boneyard itself, as it turns out. Splitting up big WIP changesets
sure is funny.
testbench: add stubs & selftests for process management

I.e. fork/wait/exit, and simple tests for them.
add L4_Stop(), L4_Stop_SpIpFlags() to <l4/thread.h>
implement the "d" bit in ExchangeRegisters

Mostly untested.
lib: add hook mechanism

This is intended to first replace the post-exception function pointer hack,
and then perhaps spread its tentacles over other IoC-ish parts of the kernel
proper.
rework the thread API

Previously it confused the concepts of starting, stopping, resuming, going to
sleep, waking up, and IPC cancellation. No more.

Plenty of callsites were updated. A common theme is to assert that @t->state
== TS_STOPPED after calling thread_halt(t); this requires that the thread
wasn't in an IPC sleep before, which is what the old thread_stop() would break
if it was the case. The assert ensures that the old callsite was translated
correctly.

With this changeset, ExchangeRegisters should properly break, or not-break, a
waiting IPC. However the tests hit a failing assert() with regard to the
post-exception callback mechanism, which is hugely ugly and will be replaced
in about two changesets' time.
add abort of waiting IPC to deleting ThreadControl

Waiting partners are now errored back into userspace with "non-existing
partner", which seems like the proper reason for why the IPC operation can no
longer complete at all.
ipc: transition R_RECV->RECV_WAIT prior to thread_wake()

Also update the scheduling queue when a thread goes into R_RECV due to
ipc_send_half() .
don't set the "d" bit in L4_Stop() ExchangeRegisters

There's no use for the readouts, so don't ask for them.