summaryrefslogtreecommitdiff
path: root/asm/asm_mp.asm
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-09 17:28:59 +0200
committerMiguel <m.i@gmx.at>2018-09-09 17:28:59 +0200
commit4cda542d863839c5b0e026ccee297ca5ff3dd9cd (patch)
tree7b8f7734f8f982df82b5c784386232e35a7ced44 /asm/asm_mp.asm
parent9a4b35fd5a32490f8f15b48f978e7b1fbfdceb2a (diff)
switched to apic/ioapic finally
Diffstat (limited to 'asm/asm_mp.asm')
-rw-r--r--asm/asm_mp.asm93
1 files changed, 0 insertions, 93 deletions
diff --git a/asm/asm_mp.asm b/asm/asm_mp.asm
deleted file mode 100644
index 18b9d7e..0000000
--- a/asm/asm_mp.asm
+++ /dev/null
@@ -1,93 +0,0 @@
-global smp_start
-extern smp_main
-global asm_smp_unlock
-
-; master boot record for application processors
-smp_start:
-[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]
-
-
-LLOCK: dd 1
-
-asm_smp_unlock:
- mov eax, 0x0
- mov [LLOCK], eax
- ret
-
-init_pm:
-
- mov ax, 0x10
- mov ds, ax
- mov ss, ax
- mov es, ax
- mov fs, ax
- mov gs, ax
-
- mov ebp, 0x7000 ;temporary stack
- mov esp, ebp
-
- call boot_32_pm ;continue booting in 32-bit protected mode
-
-boot_32_pm:
-
- mov eax,1
- xchg eax, [LLOCK]
- cmp eax,1
- je boot_32_pm
-
- mov ebp, 0x7000
- mov esp, ebp
-
- and esp,-16 ; padding to align stack on 16byte boundary before CALL
- call smp_main
-
- jmp $ ; should never be reached
-
-gdt_start:
-
-gdt_null: ;null descriptor (2 x 4 bytes)
- dd 0x0
- dd 0x0
-
-gdt_code:
- ; flags:
- ; present: 1 / privilege: 00 / type: 1
- ; code: 1 / conforming: 0 / readable: 1 / accessed: 0
- ; granularity: 1 / 16-bit default: 1 / 64-bit seg: 0 / AVL: 0
- dw 0xffff ;limit
- dw 0x0 ;base
- db 0x0 ;base
- db 10011010b ;flags
- db 11001111b ;flags & seg.limit
- db 0x0 ;base
-
-gdt_data:
- ; flags:
- ; code: 0 / expand down: 0 / writable: 1 / accessed: 0
- dw 0xffff
- dw 0x0
- db 0x0
- db 10010010b
- db 11001111b
- db 0x0
-
-gdt_end:
-
-gdt_descriptor:
- dw gdt_end-gdt_start-1
- dd gdt_start
-
-;CODE_SEG equ gdt_code - gdt_start
-;DATA_SEG equ gdt_data - gdt_start