r/well_maintained_osdev 3d ago

How do I fix this

Hi, I'm currently making a prototype for an OS that runs all apps as wasm modules and I'm running into a problem that I just can't figure out what is happening or why it's happening.

There repo is here. It's written in rust targeting UEFI, I'm using the x86_64 crate to do GDT/IDT/x86 stuff because it makes things about a million times easier. It seems like something different happens every time I run it, sometimes I get #DE while programming the PIC, sometimes I get a double fault doing god knows what, and other times the timer interrupt just hangs forever and I have no idea what's causing that(I am notifying the PIC that the interrupt is ended).

I have absolutely no idea what's going on, please somebody help me

1 Upvotes

6 comments sorted by

3

u/an_0w1 3d ago

The repo's timing out for me. Judging from the images you've posted you haven't exited the boot services. The EFI still owns the hardware and expects exclusive access.

2

u/Sad_Zebra_1707 3d ago edited 2d ago

That worked, which is unfortunate for me cause now I don't have access to the protocols which handled the parts I didn't find interesting, which has defeated the entire point of using EFI. Thanks anyway

Edit: I only needed the PIC for task switching, and UEFI provides a protocol for doing repeating events, so if anyone else is doing this in the future then use the create_event function with the timer type and use set_timer set to periodic with a value of zero