:: commit 3654bb7efb92426e04ad2d8e76238167a4a99ae0

mintsuki <mintsuki@protonmail.com> — 2021-12-22 19:27

parents: a294dd3ced

stivale1&2: Allocate kernel with the right memmap type for 32-bit

diff --git a/stage23/protos/stivale.c b/stage23/protos/stivale.c
index 0f93ab4f..30cf8706 100644
--- a/stage23/protos/stivale.c
+++ b/stage23/protos/stivale.c
@@ -153,7 +153,7 @@ bool stivale_load(char *config, char *cmdline) {
         }
         case 32: {
             if (!loaded_by_anchor) {
-                if (elf32_load(kernel, (uint32_t *)&entry_point, NULL, 10))
+                if (elf32_load(kernel, (uint32_t *)&entry_point, NULL, STIVALE_MMAP_KERNEL_AND_MODULES))
                     panic(true, "stivale: ELF32 load failure");
 
                 ret = elf32_load_section(kernel, &stivale_hdr, ".stivalehdr",
diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c
index 7f8758af..13d8853e 100644
--- a/stage23/protos/stivale2.c
+++ b/stage23/protos/stivale2.c
@@ -201,7 +201,7 @@ bool stivale2_load(char *config, char *cmdline) {
         }
         case 32: {
             if (!loaded_by_anchor) {
-                if (elf32_load(kernel, (uint32_t *)&entry_point, NULL, 10))
+                if (elf32_load(kernel, (uint32_t *)&entry_point, NULL, STIVALE2_MMAP_KERNEL_AND_MODULES))
                     panic(true, "stivale2: ELF32 load failure");
 
                 ret = elf32_load_section(kernel, &stivale2_hdr, ".stivale2hdr",
tab: 248 wrap: offon