2021-07-06 00:28:04 +03:00
|
|
|
section .rodata
|
|
|
|
|
|
|
|
invalid_idt:
|
|
|
|
dd 0, 0
|
|
|
|
|
|
|
|
section .text
|
|
|
|
|
2021-09-21 18:28:32 +03:00
|
|
|
extern flush_irqs
|
|
|
|
|
2021-07-06 00:28:04 +03:00
|
|
|
global common_spinup
|
|
|
|
bits 32
|
|
|
|
common_spinup:
|
|
|
|
cli
|
|
|
|
|
|
|
|
lidt [invalid_idt]
|
|
|
|
|
2021-09-21 18:28:32 +03:00
|
|
|
call flush_irqs
|
|
|
|
|
2021-07-06 03:13:25 +03:00
|
|
|
xor eax, eax
|
|
|
|
lldt ax
|
|
|
|
|
2021-07-06 00:28:04 +03:00
|
|
|
; We don't need the return address
|
|
|
|
add esp, 4
|
|
|
|
|
|
|
|
; Get function address
|
|
|
|
pop edi
|
|
|
|
|
|
|
|
; We don't need the argument count
|
|
|
|
add esp, 4
|
|
|
|
|
|
|
|
mov eax, 0x00000011
|
|
|
|
mov cr0, eax
|
|
|
|
|
|
|
|
xor eax, eax
|
|
|
|
mov cr4, eax
|
|
|
|
|
|
|
|
call edi
|
2023-09-28 12:15:33 +03:00
|
|
|
|
|
|
|
section .note.GNU-stack noalloc noexec nowrite progbits
|