Page 1 of 1
Debugging and (U)EFI.
Posted: Fri Jul 03, 2015 5:11 am
by Roman
Hello, everyone. Some time passed since I asked for help here last time.
I'm developing a microkernel and also rolling my own EFI loader. The kernel is loaded perfectly, paging is initialized, but I'm having a problem with interrupts. Unfortunately, QEMU is not very informative about triple faults. I remember that Bochs produces good information, but it doesn't seem to be able to work with EFI. Is there any emulator/VM that both supports EFI and produces good debugging information?
Re: Debugging and (U)EFI.
Posted: Fri Jul 03, 2015 8:21 am
by iansjack
What's the problem with qemu/gdb, or even qemu with the built-in debugger?
Re: Debugging and (U)EFI.
Posted: Fri Jul 03, 2015 8:26 am
by Roman
iansjack wrote:What's the problem with qemu/gdb, or even qemu with the built-in debugger?
I would like to know the exact reason of the fault (e. g. like Bochs reports).
Re: Debugging and (U)EFI.
Posted: Sun Jul 05, 2015 3:08 am
by jnc100
VirtualBox supports UEFI and has a built in debugger which can be used for interrogating the idt for example. There is rudimentary support for dumping the nature of an exception and the registers at the time to the crash log (normally located in the VM directory) however if you want to fully investigate the nature of the faults you will need to install your own exception handlers.
Regards,
John.
Re: Debugging and (U)EFI.
Posted: Sun Jul 05, 2015 3:21 am
by iansjack
qemu also has a built in debugger/monitor and allows you to write debug logs. If this is not enough then when used in conjunction with gdb you ought to be able to find out any information that you need to about a triple-fault.
Re: Debugging and (U)EFI.
Posted: Sun Jul 05, 2015 7:35 am
by Roman
I've written a multiboot-compliant loader for my kernel and tested it with Bochs. Now I get this:
Code: Select all
interrupt(long mode): IDT entry extended attributes DWORD4 TYPE != 0
The fourth double word is zero. My IDTR's offset points to the virtual address of the IDT. What am I missing? Should I show some code?
EDIT: Nevermind, I've made a stupid mistake. Now everything works! Thanks for the suggestions anyway.