MFC r256911, r256936

MFP4: 223121 (PIC portion), 225861, 227822, 229692 (PIC only), 229693,
230523, 1123614

Implement a driver for Robert Norton's PIC as an FDT interrupt
controller.  Devices whose interrupt-parent property points to a beripic

device will have their interrupt allocation, activation, and setup
operations routed through the IC rather than down the traditional bus
hierarchy.

This driver largely abstracts the underlying CPU away allowing the
PIC to be implemented on CPU's other than BERI.  Due to insufficient
abstractions a small amount of MIPS specific code is currently required
in fdt_mips.c and to implement counters.

Sponsored by:	DARPA/AFRL
Approved by:	re (gjb)
MFC r256934, r256963, r256972, r257017

MFP4:
Change 221534 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/01/27
16:05:30

	FreeBSD/mips stores page-table entries in a near-identical format
	to MIPS TLB entries -- only it overrides certain "reserved" bits
	in the MIPS-defined EntryLo register to hold software-defined bits
	(swbits) to avoid significantly increasing the page table memory
	footprint.  On n32 and n64, these bits were (a) colliding with
	MIPS64r2 physical memory extensions and (b) being improperly
	cleared.

	Attempt to fix both of these problems by pushing swbits further
	along 64-bit EntryLo registers into the reserved space, and
	improving consistency between C-based and assembly-based clearing
	of swbits -- in particular, to use the same definition.  This
	should stop swbits from leaking into TLB entries -- while ignored
	by most current MIPS hardware, this would cause a problem with
	(much) larger physical memory sizes, and also leads to confusing
	hardware-level tracing as physical addresses contain unexpected
	(and inconsistent) higher bits.

	Discussed with: imp, jmallett

Change 1187301 by brooks@brooks_zenith on 2013/10/23 14:40:10
	Loop back the initial commit of 221534 to HEAD.  Correct its
	implementation for mips32.

Sponsored by:	DARPA/AFRL
Approved by:	re (gjb)
MFC r256753

MFP4: 1136252

Add an option ATSE_CFI_HACK to allow memory mapped CFI devices to have
their address range allocated sharable so that atse(4) can find it's
Ethernet address in the expected location.

We intend to remove this hack once the BERI platform has a loader.

Sponsored by:	DARPA/AFRL
Approved by:	re (gjb)