mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-27 02:49:56 +03:00
Add BIOS/UEFI flag to stivale spec
This commit is contained in:
parent
ed8e7b962b
commit
ef122f652d
@ -130,6 +130,9 @@ struct stivale_struct {
|
||||
uint64_t module_count; // Count of modules that stivale loaded according to config
|
||||
uint64_t modules; // Pointer to the first entry in the linked list of modules (described below)
|
||||
uint64_t epoch; // UNIX epoch at boot, read from system RTC
|
||||
uint64_t flags; // Flags
|
||||
// bit 0: 1 if booted with BIOS, 0 if booted with UEFI
|
||||
// All other bits undefined.
|
||||
} __attribute__((packed));
|
||||
```
|
||||
|
||||
|
BIN
qloader2.bin
BIN
qloader2.bin
Binary file not shown.
@ -43,11 +43,14 @@ struct stivale_struct {
|
||||
uint64_t module_count;
|
||||
uint64_t modules;
|
||||
uint64_t epoch;
|
||||
uint64_t flags; // bit 0: 1 if booted with BIOS, 0 if booted with UEFI
|
||||
} __attribute__((packed));
|
||||
|
||||
struct stivale_struct stivale_struct = {0};
|
||||
|
||||
void stivale_load(char *cmdline, int boot_drive) {
|
||||
stivale_struct.flags &= (1 << 0); // set bit 0 since we are BIOS and not UEFI
|
||||
|
||||
int kernel_drive; {
|
||||
char buf[32];
|
||||
if (!config_get_value(buf, 0, 32, "KERNEL_DRIVE")) {
|
||||
|
Loading…
Reference in New Issue
Block a user