Remove Xen specific hack to print to console. We do not need this anymore, and it corrupts the db> backtrace print buffer.

Approved by: gibbs (implicit)
Fix event mask handling.

Approved by: gibbs(implicit)
Fix event mask handling.

Missed out from r246898 by mistake.

Approved by: gibbs(implicit)
Revert 246899, which was committed by mistake.

Apologies for the noise.
'extern int db_active' is obsolete. Use kdb_active, instead.

Approved by: gibbs (implicit)
First cut at cpu_switch(9) for xen. This is still WIP\n
genassym.c: Generate required symbols in assembler scope\n
machdep.c: - init TLS related per-cpu fields
	   - enable further cpu initialisation
	   - remove redundate private functions for rflag manipulation
	   - add xen stack switch code for cpu_switch(9) support

Approved by: gibbs(implicit)
Add assembler for 64bit locked exchange.

Approved by: gibbs (implicit)
Miscellaneous "preview" commit. This consists of a few shims to get kernel boot to hobble along to the point where the init thread is fork()ed and in kernel mode. These are essential to get a functional debugger, for people who want to play around with the kernel and get involved with development at this point. The wiki page for the project will be suitably edited very soon.

Approved by: gibbs (implicit)
Modify the mmu_map_hold_va() to indicate if it had to allocate backing pages.
'const'ify memrchr() to reflect its level of access to datatypes.

Approved by: gibbs (implicit)
Add two functions to free and to find existing PV entries.
Do not use the DMAP va for pc allocation - it is read-only.

Approved by: gibbs (implicit)
Add a function to set a descriptor entry within a descriptor table.

Approved by: gibbs (implicit)
Implement DMAP using 4K pages.
This is a temporary shim until we figure out superpages.

Approved by: gibbs (implicit)