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?
Debugging and (U)EFI.
Debugging and (U)EFI.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: Debugging and (U)EFI.
What's the problem with qemu/gdb, or even qemu with the built-in debugger?
Re: Debugging and (U)EFI.
I would like to know the exact reason of the fault (e. g. like Bochs reports).iansjack wrote:What's the problem with qemu/gdb, or even qemu with the built-in debugger?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay
Re: Debugging and (U)EFI.
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.
Regards,
John.
Re: Debugging and (U)EFI.
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.
I've written a multiboot-compliant loader for my kernel and tested it with Bochs. Now I get this:
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.
Code: Select all
interrupt(long mode): IDT entry extended attributes DWORD4 TYPE != 0
EDIT: Nevermind, I've made a stupid mistake. Now everything works! Thanks for the suggestions anyway.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
- Alan Kay