This is a first cut at publishing heavily WIP work to port FreeBSD
64bit to run as a XEN paravirtualised kernel.

It is very early days and therefore only has a guarantee of
compilability on the branch. The following have been deferred for
later review:

 - style nits.
 - comments

What would be really helpful for review would be:
 - design errors
 - bugs
 - file organisation, API use etc.

The primary focus of the branch at this point is functionality.

We use a config(5) option:
options	 	NATIVE

to indicate "baremetal" support. The intent of this option is to
exclude files from the PV kernel that only the "baremetal" kernel
needs. This is similar to how the i386 port implements this. An
alternative method is needed before merge to -current

Reviewed by: attilio, gibbs

Approved by: gibbs
Set descriptor limit from limit variable, not base
Reload the tls registers after the new GDT has been loaded.

Approved by:	gibbs (implicit)
MFC
Map in the xen shared_info page into kernel virtual memory.

Approved by:	gibbs (implicit)
PV kernels cannot use the cli/sti privileged opcodes to
mask/unmask interrupts (known as "events" in xenspeak).

We mask/unmask interrupts by notifying the hypervisor via the
shared_info page.

Approved by:	gibbs (implicit)
pmap_xen_bootpages() doesn't require the vm system to be initialised
since we "steal" and waste the pages from early boot physfree.

Remove incorrect asserts and related comment.

Approved by:	gibbs (implicit)
Initialise the base pointer to the actual base of the boottime stack.

Modify comments to reflect this.

Approved by:	gibbs (implicit)
This API is an attempt to abstract the MMU state in an MI fashion. It is heavily wip and may or may not go away, from amd64/ depending on how things go with the direct mapped implementation
Bring in more very early thread0 startup code from native

Approved by:	gibbs (implicit)
The following changes go into this diff:

i) Add copyright information from the native file
ii) Rename some variables to be more accurately descriptive of their function.
iii) Add a boottime implementation of pmap_kenter() which uses mmu_map.h

Please note that this is heavily wip and therefore probably very broken.
The idea behind this commit is to publish the changes so that the branch can be
pulled up to HEAD, and progress noted.

The ideal way to get pmap operating would be to use 2MB or greater page sized
pages to direct map all the physical/machine pages and use direct map. This is
slightly more complicated by the fact that xen disallows write access to pages
that are part of the page table hierarchy and therefore the native implementation
of dmap will not work directly.

Approved by:	gibbs (implicit)
MFC
Remove options duplication.
Enable the event channel callback code. Events are now routed via the xen/evtchn/evtchn.c:evtchn_do_upcall() callback.

Also initialise the "failsafe" callback.

Approved by:	gibbs (implicit)
Xen's "pseudo-physical" "ram" space is a fragmented by virtue of its bootstrap
sequence. vm requires this #define to stitching up the pieces into the
kva while booting up. See: vm_page.c:vm_page_startup()

Approved by:	gibbs (implicit)
- Fine tune the pages that are added to the crashdump.
- Enable the msgbufp initialisation. Note: console is not ready yet.
- Further pmap tweaks to make boot progress.

Approved by:	gibbs (implicit)
Map in the console shared page, which the xen domU console driver uses
to communicate with the hypervisor for console i/o.

While at it, enable the boot to progress a bit more with temporary
shims in pmap.c

Approved by:	gibbs (implicit)
Map in the console page using pmap_kenter(), since the backing table
hierarchy is easiest setup this way.

Approved by:	gibbs(implicit)
Add more Xen interface primitives to privileged ops (eg: cli, load_cr3 etc )

Approved by:	gibbs (implicit)
Exclude dump pages for the moment. They should be mapped into the
kernel virtual address area before they can really work.