Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/drivers/cpu/idt.c b/drivers/cpu/idt.c
- index 05016e1..39ccefb 100644
- --- a/drivers/cpu/idt.c
- +++ b/drivers/cpu/idt.c
- @@ -19,7 +19,7 @@ static struct idt_entry {
- static struct idt_ptr {
- uint16_t limit;
- uint32_t base;
- -};
- +} __attribute__((packed));
- extern void idt_load(struct idt_ptr *);
- diff --git a/drivers/cpu/idt_load.asm b/drivers/cpu/idt_load.asm
- index e1ce160..979036c 100644
- --- a/drivers/cpu/idt_load.asm
- +++ b/drivers/cpu/idt_load.asm
- @@ -1,8 +1,7 @@
- [GLOBAL idt_load]
- -idt_load:
- - mov eax, [esp]
- - lidt [edi]
- - mov eax, [esp]
- +idt_load:
- + mov eax, [esp+4]
- + lidt [eax]
- ret
- diff --git a/drivers/cpu/interrupt.asm b/drivers/cpu/interrupt.asm
- index e168aeb..0b712d2 100644
- --- a/drivers/cpu/interrupt.asm
- +++ b/drivers/cpu/interrupt.asm
- @@ -314,13 +314,13 @@ service_interrupt:
- mov fs, ax
- mov gs, ax
- - push edi
- - push esi
- - push ebp
- - push edx
- - push ecx
- - push ebx
- - push eax
- + pop edi
- + pop esi
- + pop ebp
- + pop edx
- + pop ecx
- + pop ebx
- + pop eax
- - add esp, 16
- + add esp, 8
- iret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement