Hi all:
I attach a new patch, to solve the problem which caused the kernel panic
when Mach boots in SMP mode,
From 271963f90f699c75cd5818719365ca323ec2f693 Mon Sep 17 00:00:00 2001
From: Almudena Garcia <[email protected]>
Date: Tue, 6 Oct 2020 23:19:58 +0200
Subject: [PATCH] fix: fix kernel panic in SMP mode
Add mp_desc_init() call in BSP processor, to initialize some structures needed for SMP
---
i386/i386at/model_dep.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 346f2b9c..6e6032ef 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -58,6 +58,7 @@
#include <i386/ktss.h>
#include <i386/ldt.h>
#include <i386/machspl.h>
+#include <i386/mp_desc.h>
#include <i386/pic.h>
#include <i386/pit.h>
#include <i386/pmap.h>
@@ -501,6 +502,10 @@ i386at_init(void)
ldt_init();
ktss_init();
+ #if NCPUS > 1
+ mp_desc_init(0);
+ #endif // NCPUS
+
#if INIT_VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
/* Get rid of the temporary direct mapping and flush it out of the TLB. */
for (i = 0 ; i < nb_direct; i++) {
--
2.28.0