operating system - x86 Processor clearing IDTR and jumping to EIP 0xe05b after an 'int $0x80' -
i creating os x86 processor, , have program executing in user space (with paging enabled). right before program goes make syscall ('int $0x80'), idtr points idt, , entry 0x80 points correctly function have executed. in gdb, after 'si', processor ends @ address 0xe05b idtr cleared (set 0).
note before entering user space, 'int $0x80' call works perfectly, gets function call. after executing artificial iret userspace, next 'int $0x80' causes strange behavior.
if helps, started happening after made changes filesystem code, don't see have idtr.
it seeems clear every other register, including stack, data, , code selector. it's kind of panic
does know cause processor this?
thanks in advance!
i'm going assume you're debugging under bochs. looks happening triple faulting cpu causing reboot. f000:e05b address debugger breaks @ in bios when bochs starts up.
what happening idt invalid in way prevents interrupt being delivered user mode. causes other exception raised (possibly general protection fault or double fault exception). if idt exception not valid, cpu gives , triple faults, handles resetting itself.
you should check idt valid calling through user mode.
Comments
Post a Comment