diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-01 13:26:52 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-01 13:26:52 +0200 |
| commit | 347ee926fd09d7fb45025f2c4e4a4eeab83459c9 (patch) | |
| tree | 8d082bcaebe7579fe4fa73dd6eead7c00bb051fd /boot/mp.asm | |
| parent | a9682cac5f14f8d04c87d206cf1d8367e77a61e1 (diff) | |
Added kernel_entry for APs
Diffstat (limited to 'boot/mp.asm')
| -rw-r--r-- | boot/mp.asm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/boot/mp.asm b/boot/mp.asm new file mode 100644 index 0000000..6c794bc --- /dev/null +++ b/boot/mp.asm @@ -0,0 +1,41 @@ +; other processors will enter here! + +[org 0x7000] + +jmp switch_to_pm + +%include "boot/GDT.asm" + +[bits 16] +switch_to_pm: + + cli ;switch off interrupts! + lgdt [gdt_descriptor] ;load descriptor table! + + ;switch on 32-bit protected mode + mov eax, cr0 + or eax,0x1 + mov cr0, eax + + jmp 0x8:init_pm + +[bits 32] +init_pm: + + mov ax, 0x10 + mov ds, ax + mov ss, ax + mov es, ax + mov fs, ax + mov gs, ax + + mov ebp, 0x95000 + mov esp, ebp + + call boot_32_pm ;continue booting in 32-bit protected mode + +boot_32_pm + + mov eax,1 +; + call 0x1000 ;jump into our Kernel! |
