diff options
author | dzwdz | 2022-07-16 13:33:00 +0200 |
---|---|---|
committer | dzwdz | 2022-07-16 13:33:00 +0200 |
commit | 912d2e3c7eb1baa71dda2c0a28aa5809eaa96f27 (patch) | |
tree | 4e27f3538466d5fd63a311d50916039a7a15a485 /src/kernel/arch/i386/interrupts/isr_stub.s | |
parent | 1eeb66af44ab335888410d716d604e569f20866e (diff) |
amd64: barely boot into kernel code
Diffstat (limited to 'src/kernel/arch/i386/interrupts/isr_stub.s')
-rw-r--r-- | src/kernel/arch/i386/interrupts/isr_stub.s | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/kernel/arch/i386/interrupts/isr_stub.s b/src/kernel/arch/i386/interrupts/isr_stub.s deleted file mode 100644 index fdbae6f..0000000 --- a/src/kernel/arch/i386/interrupts/isr_stub.s +++ /dev/null @@ -1,64 +0,0 @@ -.section .shared - -.global _isr_stubs -_isr_stubs: -.rept 256 - .set _stub_start, . - - cli - call _isr_stage2 - - .if . - _stub_start > 8 - .error "isr stubs over maximum size" - .abort - .endif - .align 8 -.endr - -_isr_stage2: - // pushal order, without %esp - push %eax - push %ecx - push %edx - push %ebx - push %ebp - push %esi - push %edi - - // convert the return address into the vector nr - mov 28(%esp), %eax - add $-_isr_stubs, %eax - shr $3, %eax - - // disable paging, if present - mov %cr0, %ebx - push %ebx // push original cr0 - and $0x7FFFFFFF, %ebx - mov %ebx, %cr0 - - mov %esp, %ebp - mov $_isr_big_stack, %esp - push %eax // push the vector nr - call isr_stage3 - - mov %ebp, %esp - pop %eax // restore old cr0 - mov %eax, %cr0 - - // restore registers - pop %edi - pop %esi - pop %ebp - pop %ebx - pop %edx - pop %ecx - pop %eax - - add $4, %esp // skip call's return address - iret - -.align 8 -// TODO overflow check -.skip 64 // seems to be enough -.global _isr_mini_stack -_isr_mini_stack: |