:: commit 6d9d3259a1179d835fa3b723e97080e5836ba2e5

mintsuki <mintsuki@protonmail.com> — 2021-03-11 23:04

parents: 12d5822839

stivale: UEFI is not BIOS

diff --git a/stage23/protos/stivale.c b/stage23/protos/stivale.c
index f2da8058..1a37bd04 100644
--- a/stage23/protos/stivale.c
+++ b/stage23/protos/stivale.c
@@ -28,8 +28,12 @@
 struct stivale_struct stivale_struct = {0};
 
 void stivale_load(char *config, char *cmdline) {
-    stivale_struct.flags |= (1 << 0);  // set bit 0 since we are BIOS and not UEFI
-    stivale_struct.flags |= (1 << 1);  // we give colour information
+    // BIOS or UEFI?
+#if defined (bios)
+    stivale_struct.flags |= (1 << 0);
+#endif
+
+    stivale_struct.flags |= (1 << 1);    // we give colour information
 
     struct file_handle *kernel = ext_mem_alloc(sizeof(struct file_handle));
 
diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index 7b5044e1..c4c1bf51 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -144,7 +144,9 @@ void stivale2_load(char *config, char *cmdline, bool pxe) {
     struct stivale2_struct_tag_firmware *tag = ext_mem_alloc(sizeof(struct stivale2_struct_tag_firmware));
     tag->tag.identifier = STIVALE2_STRUCT_TAG_FIRMWARE_ID;
 
+#if defined (bios)
     tag->flags = 1 << 0;   // bit 0 = BIOS boot
+#endif
 
     append_tag(&stivale2_struct, (struct stivale2_tag *)tag);
     }
tab: 248 wrap: offon