summaryrefslogtreecommitdiff
path: root/boot2/mp.asm
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-11-14 11:08:04 +0100
committerMichal Idziorek <m.i@gmx.at>2014-11-14 11:08:04 +0100
commite3cc5f6c89ba9f37bf2c1edf588d0f75c1d63c57 (patch)
tree1c43c3e9ce81f7564beb3a970b88beaa66169946 /boot2/mp.asm
parent2761b620043ad511d9baf66d5478a463aeece77b (diff)
rename dirs
Diffstat (limited to 'boot2/mp.asm')
-rw-r--r--boot2/mp.asm37
1 files changed, 37 insertions, 0 deletions
diff --git a/boot2/mp.asm b/boot2/mp.asm
new file mode 100644
index 0000000..072aa74
--- /dev/null
+++ b/boot2/mp.asm
@@ -0,0 +1,37 @@
+; other processors will enter here!
+[org 0x7000] ; here the binary will be loaded
+
+[bits 16]
+
+ 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 0x18000 ;jump into our Kernel!
+
+%include "boot/GDT.asm"