views:

45

answers:

1

In ARM linux, the user-kernel virtual address range is divided in the ratio 3:1.

But in MIPS linux, this is usually 2:2

Does someone know what motivates this design difference ?

I have a faint idea that this has something to do with the fact that in MIPS, the TLB refill is managed in s/w and the kernel TLB entries are kind of hard-wired ensuring that they will never suffer a TLB miss.

A: 

This is a limitation of the MIPS 32-bit architecture. User mode is limited to 2GB on most MIPS CPUs.

Only the lower 2GB virtual addresses (0x0000_00000 to 0x7fff_ffff) are accessible in user mode. This part of the address space is called kuseg. Kuseg addresses are translated by the TLB. Whether TLB refills are done in software is irrelevant.

The kernel lives in the 512MB virtual space that extends from 0x8000_0000 to 9fff_ffff. This part of the address space is called kseg0. Kseg0 addresses are not translated by the TLB. These addresses are translated by removing the MSB (i.e. the virtual address range 0x8000_0000-9fff_ffff is hardwired to the physical address range 0x0000_0000-0x1fff_0000)

Refer to a MIPS manual for more details.

sigjuice