FreeBSD/sys/arm/freescale/imx/imx6_machdep.c
/*
 * Set up static device mappings.
 *
 * This attempts to cover the most-used devices with 1MB section mappings, which
 * is good for performance (uses fewer TLB entries for device access).
 *
 * ARMMP covers the interrupt controller, MPCore timers, global timer, and the
 * L2 cache controller.  Most of the 1MB range is unused reserved space.
 *
 * AIPS1/AIPS2 cover most of the on-chip devices such as uart, spi, i2c, etc.
 *
 * Notably not mapped right now are HDMI, GPU, and other devices below ARMMP in
 * the memory map.  When we get support for graphics it might make sense to
 * static map some of that area.  Be careful with other things in that area such
 * as OCRAM that probably shouldn't be mapped as VM_MEMATTR_DEVICE memory.
 */
Set up static device mappings.
This attempts to cover the most-used devices with 1MB section mappings, which
is good for performance (uses fewer TLB entries for device access).

ARMMP covers the interrupt controller, MPCore timers, global timer, and the
L2 cache controller.  Most of the 1MB range is unused reserved space.

AIPS1/AIPS2 cover most of the on-chip devices such as uart, spi, i2c, etc.

Notably not mapped right now are HDMI, GPU, and other devices below ARMMP in
the memory map.  When we get support for graphics it might make sense to
static map some of that area.  Be careful with other things in that area such
as OCRAM that probably shouldn't be mapped as VM_MEMATTR_DEVICE memory.
Set up static device mappings . This attempts to cover the most - used devices with 1MB section mappings which is good for performance ( uses fewer TLB entries for device access ) . ARMMP covers the interrupt controller MPCore timers global timer and the L2 cache controller . Most of the 1MB range is unused reserved space . AIPS1 / AIPS2 cover most of the on - chip devices such as uart spi i2c etc . Notably not mapped right now are HDMI GPU and other devices below ARMMP in the memory map . When we get support for graphics it might make sense to static map some of that area . Be careful with other things in that area such as OCRAM that probably shouldn ' t be mapped as VM_MEMATTR_DEVICE memory .
static int
imx6_devmap_init(platform_t plat)
{
	const uint32_t IMX6_ARMMP_PHYS = 0x00a00000;
	const uint32_t IMX6_ARMMP_SIZE = 0x00100000;
	const uint32_t IMX6_AIPS1_PHYS = 0x02000000;
	const uint32_t IMX6_AIPS1_SIZE = 0x00100000;
	const uint32_t IMX6_AIPS2_PHYS = 0x02100000;
	const uint32_t IMX6_AIPS2_SIZE = 0x00100000;
	devmap_add_entry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE);
	devmap_add_entry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE);
	devmap_add_entry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE);
	return (0);
}
static int imx6_devmap_init ( platform_t plat ) { const uint32_t IMX6_ARMMP_PHYS = 0x00a00000 ; const uint32_t IMX6_ARMMP_SIZE = 0x00100000 ; const uint32_t IMX6_AIPS1_PHYS = 0x02000000 ; const uint32_t IMX6_AIPS1_SIZE = 0x00100000 ; const uint32_t IMX6_AIPS2_PHYS = 0x02100000 ; const uint32_t IMX6_AIPS2_SIZE = 0x00100000 ; devmap_add_entry ( IMX6_ARMMP_PHYS , IMX6_ARMMP_SIZE ) ; devmap_add_entry ( IMX6_AIPS1_PHYS , IMX6_AIPS1_SIZE ) ; devmap_add_entry ( IMX6_AIPS2_PHYS , IMX6_AIPS2_SIZE ) ; return ( 0 ) ; }
Set up static device mappings.
Set up static device mappings .