diff options
| author | Miguel <m.i@gmx.at> | 2018-09-08 17:08:55 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-08 17:08:55 +0200 |
| commit | 9fde748acea83d775e367a64858414b674f05b13 (patch) | |
| tree | 0927b570c07c9ee469817a560b965c094c5d8145 /asm/asm_mp.asm | |
| parent | aa4b4c6c1918a51318709761873d1c5e248a831d (diff) | |
struggling with pic and lapic and smp...
Diffstat (limited to 'asm/asm_mp.asm')
| -rw-r--r-- | asm/asm_mp.asm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/asm/asm_mp.asm b/asm/asm_mp.asm index 5e5259e..165dc97 100644 --- a/asm/asm_mp.asm +++ b/asm/asm_mp.asm @@ -1,7 +1,8 @@ global smp_start -global LLOCK extern smp_main global gdt_descriptor +global asm_smp_unlock + ; master boot record for application processors smp_start: @@ -20,7 +21,12 @@ smp_start: [bits 32] -LLOCK: dd 0 +LLOCK: dd 1 + +asm_smp_unlock: + mov eax, 0x0 + mov [LLOCK], eax + ret init_pm: @@ -31,7 +37,7 @@ init_pm: mov fs, ax mov gs, ax - mov ebp, 0x7000 + mov ebp, 0x7000 ;temporary stack mov esp, ebp call boot_32_pm ;continue booting in 32-bit protected mode @@ -46,11 +52,11 @@ boot_32_pm: mov ebp, 0x7000 mov esp, ebp - call smp_main + 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) |
