1

Sync with BSuSP

This commit is contained in:
2023-03-03 15:40:25 +01:00
parent 8bec9735e3
commit 5349bca520
27 changed files with 804 additions and 2523 deletions

View File

@ -6,18 +6,18 @@
mov edi, ebx ; Now the ID is in EDI
; Load the AP's prepared GDT and TSS
mov ebx, [boot_ap_gdts - boot_ap + startup_address]
mov eax, [ebx + edi * 0x4]
mov ebx, [boot_ap_gdts - boot_ap + 0x8000]
mov eax, [ebx + edi * 0x4] ; Select the GDT
lgdt [eax]
mov ax, 0x28
ltr ax
; Load the correct stack for this AP
mov ebx, [boot_ap_stacks - boot_ap + startup_address]
mov esp, [ebx + edi * 0x4]
add esp, stack_size ; Stack starts at the bottom
mov ebx, [boot_ap_stacks - boot_ap + 0x8000]
mov esp, [ebx + edi * 0x4] ; Select the stack
add esp, 0x1000 ; Stack starts at the bottom
mov ebp, esp
; Call the entry function
; Call the entry function smpEntry(uint8_t cpuid)
push edi
call [boot_ap_entry - boot_ap + startup_address]
call [boot_ap_entry - boot_ap + 0x8000]