SMP and timer interrupts

This commit is contained in:
2025-12-23 19:50:37 +01:00
parent 259aa732c8
commit c16170e4c2
31 changed files with 1766 additions and 88 deletions

View File

@@ -1,8 +1,5 @@
.extern amd64_intr_handler
dupa:
jmp dupa
#define err(z) \
pushq $z;
@@ -36,7 +33,7 @@ dupa:
popq %r10; \
popq %r9; \
popq %r8; \
pushq %rbx; \
popq %rbx; \
popq %rbp; \
popq %rdi; \
popq %rsi; \
@@ -52,9 +49,12 @@ dupa:
push_regs; \
cld; \
movq %rsp, %rdi; \
movq %rsp, %rax; \
subq $8, %rsp; \
andq $~0xF, %rsp; \
movq %rax, (%rsp); \
callq amd64_intr_handler; \
movq %rdi, %rsp; \
movq (%rsp), %rsp; \
pop_regs; \
addq $16, %rsp; \
iretq;