summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 17:30:15 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 17:30:15 +0200
commite47e393fc01c663ca634068c56a41eb74ed01439 (patch)
tree3f2e313834295db3d18b93bbe539126097496183 /dev/ZKA/Sources
parentb3888ff9e2c18da6b73a57f453f7ad36fea61b7b (diff)
[ FIX ] A fix has been found for the SYSRET issue. Will apply it later.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/Sources')
-rw-r--r--dev/ZKA/Sources/CodeManager.cxx2
-rw-r--r--dev/ZKA/Sources/DLLMain.cxx11
-rw-r--r--dev/ZKA/Sources/MP.cxx12
-rw-r--r--dev/ZKA/Sources/PEFCodeManager.cxx2
4 files changed, 17 insertions, 10 deletions
diff --git a/dev/ZKA/Sources/CodeManager.cxx b/dev/ZKA/Sources/CodeManager.cxx
index 5f634539..f01bf41c 100644
--- a/dev/ZKA/Sources/CodeManager.cxx
+++ b/dev/ZKA/Sources/CodeManager.cxx
@@ -20,7 +20,7 @@ namespace Kernel
return false;
UserProcess proc;
- proc.SetEntrypoint(reinterpret_cast<VoidPtr>(main));
+ proc.SetImageStart(reinterpret_cast<VoidPtr>(main));
proc.Kind = UserProcess::kExeKind;
proc.StackSize = mib_cast(1);
diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx
index d8edeaaf..25be253f 100644
--- a/dev/ZKA/Sources/DLLMain.cxx
+++ b/dev/ZKA/Sources/DLLMain.cxx
@@ -188,8 +188,15 @@ EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void)
Kernel::cProcessScheduler = nullptr;
Kernel::ProcessHelper::StartScheduling();
- CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: Starting ZKA System...", 30, 10, RGB(0, 0, 0));
+ CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: Starting ZKA System...", 20, 10, RGB(0, 0, 0));
+
+ static Kernel::MainKind fn = []() -> void {while(1); };
+ Kernel::sched_execute_thread(fn, "ZKA Logger");
+
+ while (Yes)
+ {
+ Kernel::ProcessHelper::StartScheduling();
+ }
- Kernel::ProcessHelper::StartScheduling();
Kernel::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
diff --git a/dev/ZKA/Sources/MP.cxx b/dev/ZKA/Sources/MP.cxx
index 9c7a47f3..5b44a119 100644
--- a/dev/ZKA/Sources/MP.cxx
+++ b/dev/ZKA/Sources/MP.cxx
@@ -98,15 +98,15 @@ namespace Kernel
fStack = frame;
- auto ret = mp_register_process(fStack);
-
- if (!ret)
+ if (kHandoverHeader->f_HardwareTables.f_MultiProcessingEnabled)
{
- mp_do_context_switch_pre();
- return mp_do_context_switch(image, stack_ptr, fStack) != 0;
+ return mp_register_process(fStack);
}
- return ret;
+ kcout << "newoskrnl: Switching now...\r";
+
+ mp_do_context_switch_pre();
+ return mp_do_context_switch(image, stack_ptr, fStack) != 0;
}
///! @brief Tells if processor is waked up.
diff --git a/dev/ZKA/Sources/PEFCodeManager.cxx b/dev/ZKA/Sources/PEFCodeManager.cxx
index 11743373..0f1a4885 100644
--- a/dev/ZKA/Sources/PEFCodeManager.cxx
+++ b/dev/ZKA/Sources/PEFCodeManager.cxx
@@ -206,7 +206,7 @@ namespace Kernel
UserProcess proc;
- proc.SetEntrypoint(errOrStart.Leak().Leak());
+ proc.SetImageStart(errOrStart.Leak().Leak());
proc.Kind = procKind;
proc.StackSize = *(UIntPtr*)exec.FindSymbol(cPefStackSizeSymbol, kPefData);