*#ident	"@(#)kern-port:master.d/mem	10.2"
*#ident	"$Revision: 3.25 $"
*
* MEM
*
*FLAG	PREFIX	SOFT	#DEV	DEPENDENCIES
orcs	mm	1

$$$

#include <sys/cpu.h>
#include <sys/mman.h>

/*
 * This array defines the device addresses
 * that may be mapped by /dev/mmem.
 * Note: addresses MUST BE kernel virtual addresses,
 * not physical addresses.
 */
struct {
	unsigned long m_size;
	unsigned long m_addr;
	int m_prot;
} mmmap_addrs[] = {
#if IP4 || IP5 || IP17
	{ NBPP, SOUND_DAT_ADDR, PROT_ALL },	/* sound chip and friends */
#endif
#if IP12 || IP20
	{ 0x20000, PHYS_TO_K1(HPC1MEMORY), PROT_ALL },	/* DSP, etc. */
	/* HPC registers, in particular HPC1MISCSR */
	{ NBPP, PHYS_TO_K1(HPC_0_ID_ADDR), PROT_READ },
#endif
#if IP20 || IP22
	{ NBPP, PHYS_TO_K1(RPSS_CTR)&~POFFMASK, PROT_READ },
#endif
#if IP26
	{ NBPP, PHYS_TO_K1(TCC_COUNT)&~POFFMASK, PROT_READ },
	{ NBPP, PHYS_TO_K1(TCC_PREFETCH)&~POFFMASK, PROT_READ },
#endif
#if IP5 || IP17
	{ 0x80000, LOGRAM_ADDR, PROT_ALL },	/* ECC logging RAM */
	{ NBPP, IOTIMER_ADDR, PROT_ALL },	/* free running timer on IO3 */

/* Sirius Video */
	{ 0x1000, 0xb7c03000, PROT_ALL },
#endif
#if EVEREST
	{ NBPP, EV_RTC, PROT_ALL },	/* free running timer on Everest */
#if DEBUG
	{ 0x1000, SBUS_TO_KVU(0x00000000), PROT_ALL },	/* Allow user to map page for HW trigger */
#endif
#endif
#if IP30
#if NBPP > 65536
#error HEART_COUNT only 64K aligned.
#endif
	{ NBPP, PHYS_TO_K1(HEART_COUNT), PROT_READ },
#endif
	{ 0, 0, 0 } ,	/* NULL ENTRY TERMINATES THIS LIST! */
};
