You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I've seen, the bootloader can boot in legacy BIOS ams UEFI modes. However, there is no way for the kernel to directly know in which mode it has been booted. This can be useful in different parts of the kernel (For example, during the initialisation of 8259 PIC as trying to enable PIC in UEFI mode double faults immediately).
One way I've seen is to iterate over the memory map and check if the regions are of type UnknownBios or UnknownUefi and take decisions. But this isn't an idiomatic way.
The best way would be to pass a flag in BootInfo struct called is_uefi which is true or false based on the mode the kernel is booted.
The text was updated successfully, but these errors were encountered:
As I've seen, the bootloader can boot in legacy BIOS ams UEFI modes. However, there is no way for the kernel to directly know in which mode it has been booted. This can be useful in different parts of the kernel (For example, during the initialisation of 8259 PIC as trying to enable PIC in UEFI mode double faults immediately).
One way I've seen is to iterate over the memory map and check if the regions are of type
UnknownBios
orUnknownUefi
and take decisions. But this isn't an idiomatic way.The best way would be to pass a flag in
BootInfo
struct calledis_uefi
which istrue
orfalse
based on the mode the kernel is booted.The text was updated successfully, but these errors were encountered: