Repository navigation
Academic Operating System
Hirochika Asai edited this page Oct 9, 2015
·
11 revisions
Welcome to the aos wiki!
[x86 instructions](x86 instructions)
Start End Description
----------------------------------------------------------
00000500 00005fff free
00006000 000061ff buffer for kernel loader
00006200 00007bff default stack in boot monitor
00007c00 00007dff MBR
00007e00 00007fff free
00008000 00008fff boot information
00009000 0000ffff boot monitor (currently 15*512B used)
----------------------------------------------------------
00010000 00079fff free
00079000 0007ffff page table (at least 24KiB = 6 * 4KiB)
00080000 000fffff free or reserved (We don't use here)
----------------------------------------------------------
00100000 00ffffff reserved for kernel
01000000 01ffffff for processor flags, tss, stack
----------------------------------------------------------
* managed by the memory allocator below *
----------------------------------------------------------
02000000 -------- free
Start End Description
----------------------------------------------------------
00000500 00007fff free
00008000 00008fff boot information
00009000 0000ffff free
----------------------------------------------------------
00010000 0001ffff kernel (64KiB)
00020000 0006ffff initramfs (320KiB)
00070000 00073fff trampoline (16KiB)
00074000 00075fff GDT (8KiB)
00076000 00077fff IDT (8KiB)
00078000 00079fff free
00079000 0007ffff page table (at least 24KiB = 6 * 4KiB)
00080000 000fffff free or reserved (We don't use here)
----------------------------------------------------------
00100000 00ffffff used by kmem
----------------------------------------------------------
01000000 0100ffff BSP (flags, tss, stack)
01010000 0101ffff AP #1
.... 01ffffff for application processors
----------------------------------------------------------
* managed by the memory allocator below *
----------------------------------------------------------
02000000 -------- free
Start End Description
----------------------------------------------------------
00000000 3fffffff Kernel
----------------------------------------------------------
40000000 bfffffff Userland application
----------------------------------------------------------
c0000000 ffffffff Kernel
At the current version, we don't implement kernel relocation to the higher address space. Therefore, unlike other UNIX-like operating systems, 0-1 GiB are also used by kernel and userland applications use 1-3 GiB space.
- Prefixes
- phys_mem_ : Physical memory
- vmem_ : Virtual memory
- kmem_ : Kernel memory
malloc() --> mmap() --> vmem_page_alloc() --> phys_mem_page_alloc()
(libc) (syscall) | for page table entry
v
kmalloc()
|
v
kmem_page_alloc() --> phys_mem_page_alloc()