summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources/SMPManager.cxx
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-12 18:09:07 +0200
committerAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-12 18:09:07 +0200
commit4b58295fb04c2430817301352fadce33178f94d4 (patch)
treefb16edeb9d81ee475200bbbf9a5125822ea2a589 /Kernel/Sources/SMPManager.cxx
parent6a3b080067ff47f84c400987982cfa44927fe7e0 (diff)
MHR-30: initial commit.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'Kernel/Sources/SMPManager.cxx')
-rw-r--r--Kernel/Sources/SMPManager.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Kernel/Sources/SMPManager.cxx b/Kernel/Sources/SMPManager.cxx
index b2c3f488..f0b680ce 100644
--- a/Kernel/Sources/SMPManager.cxx
+++ b/Kernel/Sources/SMPManager.cxx
@@ -99,6 +99,21 @@ namespace NewOS
fStack->Rsp = stack->Rsp;
fStack->Fs = stack->Fs;
fStack->Gs = stack->Gs;
+
+ // save global registers.
+
+ fStack->R15 = stack->R15;
+ fStack->R14 = stack->R14;
+
+ fStack->R13 = stack->R13;
+ fStack->R12 = stack->R12;
+ fStack->R11 = stack->R11;
+
+ fStack->R10 = stack->R10;
+ fStack->R9 = stack->R9;
+ fStack->R8 = stack->R8;
+
+ fStack->Exception = this->fID;
}
rt_do_context_switch(fStack);