UEFI (UGA) Graphics After exiting Boot Services

563 Views Asked by At

I was writing an Operating System and testing it on an emulator in my primary computer (HP Z420), i tested it sometimes on that computer but i was always in a boot/shutdown loop that taked a long time. So i had an old pc (HP 620) Which has an old version of UEFI and nothing gets displayed when i run the O.S on it. So i founded that it has not GOP Support and Frame buffer address is always 0. I switched from gnu-efi to edk2 to give support to U.G.A, i succeeded and graphics worked, however when i exit boot services and call UgaProtocol->Blt from the kernel, the system triple faults but when i call it without exiting boot services, everything works fine.

  • I know that these functions are Boot Services and may use Boot Services so that maybe the cause of the triple fault

  • So how can i implement a permanent communication with U.G.A After exiting boot services (in G.O.P, we usually write to a frame buffer)

  • If i do not exit boot services, changing the gdt or the idt or any other thing causes a debug exception (Result on qemu & VBox) and halts on Real Hardware.

0

There are 0 best solutions below