:: commit a58fd6bd3cca37a31b4cf191438048ddc3ece93a

mintsuki <mintsuki@protonmail.com> — 2020-09-26 15:03

parents: 0dc73b3529

Fix stivale2 SMP tag issue

diff --git a/limine.bin b/limine.bin
index f82b6593..3f423bc2 100644
Binary files a/limine.bin and b/limine.bin differ
diff --git a/stage2/sys/smp.c b/stage2/sys/smp.c
index e833d0bf..8c5e4e1f 100644
--- a/stage2/sys/smp.c
+++ b/stage2/sys/smp.c
@@ -87,10 +87,10 @@ struct smp_information *init_smp(size_t   *cpu_count,
         return NULL;
 
     struct gdtr gdtr;
-    asm volatile ("sgdt %0" :: "m"(gdtr));
+    asm volatile ("sgdt %0" :: "m"(gdtr) : "memory");
 
     struct smp_information *ret = conv_mem_alloc_aligned(0, 1);
-    *cpu_count = 0;
+    *cpu_count = 1;
 
     // Parse the MADT entries
     for (uint8_t *madt_ptr = (uint8_t *)madt->madt_entries_begin;
tab: 248 wrap: offon