*#ident	"@(#)kern-port:master.d/mem	10.2"
*#ident	"$Revision: 3.30 $"
*
* 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 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 || IP28
	/*  For NBPP == 16KB (IP28) user can read most of MC, but this is
	 * ok.  For really old binaries we may loose some compatability on
	 * IP28 as one has to correctly use the page offsets since the
	 * counter is on the second 4KB of the 16KB page.
	 */
	{ 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 EVEREST
#if DEBUG
	{ 0x1000, SBUS_TO_KVU(0x00000000), PROT_ALL },	/* Allow user to map page for HW trigger */
#endif /* DEBUG */
#endif /* EVEREST */
	{ 0, 0, 0 } ,	/* NULL ENTRY TERMINATES THIS LIST! */
};
