Memory Management¶
Physical Memory-Management¶
Virtual Memory-Management¶
Kernel Address Space¶
x86¶
| Begin |
End |
Description |
| 0x00000000 |
0x00100000 |
Only in the kernel address space (not in application address spaces) - the real mode IVT and AP startup code. |
| 0x00100000 |
0x50000000 |
Reserved for the userspace process sections (.text, .data, etc) |
| 0x50000000 |
0x70000000 |
Userspace process heap |
| 0x70000000 |
0xB0000000 |
Userspace stacks |
| 0xC0000000 |
0xD0000000 |
The kernel's heap |
| 0xD0000000 |
0xF0000000 |
Reserved for memory regions |
| 0xF0000000 |
0xF0400000 |
Reserved for the stack of free physical pages |
| 0xFA000000 |
0xFF3F6000 |
Kernel module load region |
| 0xFF3F7000 |
0xFF3FF000 |
The initial kernel stack (32kB) |
| 0xFF400000 |
0xFF7FF000 |
The kernel image (code, data, bss sections) |
| 0xFF7FF000 |
0xFF800000 |
The kernel virtual address space's page directory |
| 0xFFBFD000 |
0xFFBFF000 |
Temporary virtual address space (used to create other virtual address spaces) |
| 0xFFBFF000 |
0xFFC00000 |
This address space's page directory |
| 0xFFC00000 |
0x100000000 |
Reserved for this address space's page tables |
There should be something at 0xB0000000, but I can't remember what it is at this point. - Matt
x64¶
| Begin |
End |
Description |
| 0x0000000000000000 |
0x0000800000000000 |
Reserved for the userspace process |
| 0xFFFF800000000000 |
0xFFFFXXXXXXXXXXXX |
Physical memory |
| 0xFFFFFFFF7FC00000 |
0xFFFFFFFF80000000 |
Reserved for the stack of free physical pages (below 4GB) |
| 0xFFFFFFFF80000000 |
0xFFFFFFFF88000000 |
The kernel image (code, data, bss sections) |
| 0xFFFFFFFF88000000 |
0xFFFFFFFF90000000 |
The kernel's heap |
| 0xFFFFFFFF90000000 |
0xFFFFFFFFF0000000 |
Reserved for memory regions |
| 0xFFFFFFFFF0000000 |
0xFFFFFFFFF1000000 |
Kernel modules |
Mips32¶
| Begin |
End |
Description |
| 0x00000000 |
0x80000000 |
Reserved for the userspace process (KUSEG) |
| 0x80000000 |
0xA0000000 |
Kernel accessible area, windowed onto the first 512MB of physical RAM, Cached (KSEG0) |
| 0xA0000000 |
0xC0000000 |
Kernel accessible area, windowed onto the first 512MB of physical RAM, Uncached (KSEG1) |
| 0xC0000000 |
0xFFFFFFFF |
Kernel accessible area, paged (KSEG2) |
| 0x80000000 |
0x80100000 |
ROM Monitor |
| 0x80100000 |
0x80XXXXXX |
Kernel .code/.data/.bss |
| 0xC0000000 |
0xC0100000 |
Page table, covering 32-bits (1MB large) |
| 0xC0100000 |
0xCXXXXXXX |
Kernel heap |
It should be noted that the page table is located in the KSEG2 (paged) area. This is so that addresses can be patched up quickly without actually requiring 1MB of physical RAM. In the case where the translation entry for the page table is not itself in the TLB, a double fault is encountered and the kernel (running from KSEG0) loads the relevant piece of page table into the TLB and returns to the user program.
PowerPC (32-bit)¶
| Begin |
End |
Description |
| 0x00000000 |
0x00003000 |
Interrupt vector table |
| 0x00800000 |
0x01000000 |
Bootloader |
| 0x01000000 |
0x80000000 |
User accessible space |
| 0x80000000 |
0xA0000000 |
OF mapped devices - PCI etc |
| 0xA0000000 |
0xC0000000 |
Reserved for memory regions |
| 0xC0000000 |
0xC0100000 |
Initial kernel page tables |
| 0xC0100000 |
0xC0xxxxxx |
Processor page table |
| 0xD0000000 |
0xE0000000 |
Kernel heap |
| 0xE0000000 |
0xF0000000 |
Kernel text/data, and modules |
| 0xF0000000 |
0xFFFFFFFF |
Open Firmware |
Also available in:
HTML
TXT