Pu Yongming wrote:
> "The kernel, however, must logically execute at the *top* of virtual
> address space, i.e. at a high address. This is because the kernel shares
> the virtual address space with the currently running process, and
> constraining user processes to be linked (i.e. execute) at a certain
> minimal address, also bounding kernel size and kernel virtual address space
> usage, is unacceptable."
>
> does it mean like linux, kernel runs in 3G-4G address space, processes run
> in 0G ~ 3G address space?
For i386 Minix 3.2.1 and up, yes this is correct, besides the small
difference that only 256MiB is reserved to the kernel, so the upper
limit for processes is 3.75GiB.
Also, unlike the standard System V ELF-based memory layout, in MINIX the
stack is not in the 128Ki below the 0x08040800 address, but rather above
the end of bss segment of the main image.
For ARM, a quick inspection of kernel.lds is blurred by misleading
comments (0x80200000 is *NOT* 4M-aligned :-) )
_kern_phys_base = 0x80200000;
/* phys 4MB aligned for convenient remapping */
but the same basic scheme seems to apply.
Antoine