Common Device Memory Map

From LinuxMIPS
Jump to: navigation, search

Common Device Memory Map (CDMM) is an optional feature in release 2 of the MIPS architecture. It exposes a CPU-local region of up to 32KB of physical memory, containing registers for a discoverable set of devices.

CDMM Devices

Each device in the Common Device Memory Map region is identified by an 8-bit device type and has a number of 64-byte device register blocks (DRBs) containing device registers.

CDMM Device Types
Device Type Device Description
0xFD Fast Debug Channel (FDC) 16 data streams (channels) to and from debugger via EJTAG probe

Linux Support

Linux support for CDMM is implemented as a bus in the Linux driver model. The patches have been merged for v4.1.

Enabling in New Platforms

Currently platforms which need the CDMM need to implement the weak function mips_cdmm_phys_base() (see arch/mips/include/asm/cdmm.h). This is necessary so that the CDMM bus driver knows where in physical memory to map the CDMM region, although it will inherit the configuration of the bootloader if it has been left enabled.

If your hardware supports CDMM you should see messages during boot listing the devices discovered on each CPU's CDMM bus, for example:

cdmm0 discovery (3 blocks)
cdmm0-0: @0 (0x0..0xbf), type 0xfd, rev 0
cdmm1 discovery (3 blocks)
cdmm1-0: @0 (0x0..0xbf), type 0xfd, rev 0
cdmm2 discovery (3 blocks)
cdmm2-0: @0 (0x0..0xbf), type 0xfd, rev 0
cdmm3 discovery (3 blocks)
cdmm3-0: @0 (0x0..0xbf), type 0xfd, rev 0

Cores with CDMM

The following cores are known to support Common Device Memory Map:

See Also