The MIPS32® 4GB virtual address space is partitioned into five fixed-size segments with traditional names; different things happen according to the virtual memory area an address lies in, as follows:
KUSEG: 0x00000000-0x7FFFFFFF (low 2GB) :
These are the addresses permitted in User mode (see Modes of Operation). In machines with a memory management unit (MMU), they will always be mapped. You should not attempt to use these addresses unless the MMU is set up. On PIC32MX, this region is also cacheable.
KSEG0: 0x80000000-0x9FFFFFFF (512MB) :
These addresses are translated directly into physical addresses by stripping off the MSB and mapping them contiguously into the low 512MB of physical memory (0x00000000 - 0x1FFFFFFF). Since this is a "trivial" translation, these addresses are often called "unmapped". On PIC32MX, this region is also cacheable, and is the default space for application code.
KSEG1: 0xA0000000-0xBFFFFFFF (512MB):
These addresses are mapped into physical addresses by stripping off the leading 3-bits, giving a duplicate mapping into the low 512MB of physical memory (0x00000000 - 0x1FFFFFFF). But this time, access will not use the cache.
KSEG1 is the only memory region that can be used at reset because the prefetch cache must be configured by the boot code before it can be used. Therefore your boot code must be placed in KSEG1.
KSEG2: 0xC0000000-0xDFFFFFFF (512MB) & KSEG3: 0xE0000000-0xFFFFFFFF (512MB) :
These areas are only accessible in Kernel mode. On PIC32MX devices, these regions are not translated to any physical memory resources. Segment KSEG3 contains the debug segment (DSEG), which is available to the EJTAG probe debugger or monitor.