diff options
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) |
