summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/Sources
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 00:03:03 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 00:05:22 +0200
commitab69a596a336d9874555672a154c4f48e0ed1020 (patch)
tree5cb4abec909c1b2a63e016d60b1a83d471be1d6a /dev/ZKA/Sources
parenta65b375680f63f5d4621941f49834255b9a567fb (diff)
[ IMP ] Reserve system call interrupt for user code only.
[ FIX ] Fix mm_update_page function, which pde index instead of pte index. [ IMP ] New .drawio files. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/Sources')
-rw-r--r--dev/ZKA/Sources/CodeManager.cxx6
-rw-r--r--dev/ZKA/Sources/DLLMain.cxx9
-rw-r--r--dev/ZKA/Sources/Network/IPC.cxx4
-rw-r--r--dev/ZKA/Sources/ProcessTeam.cxx8
-rw-r--r--dev/ZKA/Sources/UserProcessScheduler.cxx2
5 files changed, 9 insertions, 20 deletions
diff --git a/dev/ZKA/Sources/CodeManager.cxx b/dev/ZKA/Sources/CodeManager.cxx
index c8f76309..de5417a1 100644
--- a/dev/ZKA/Sources/CodeManager.cxx
+++ b/dev/ZKA/Sources/CodeManager.cxx
@@ -19,10 +19,8 @@ namespace Kernel
if (!main)
return false;
- UserProcess proc((VoidPtr)main);
-
- if (mm_is_valid_heap((VoidPtr)main))
- proc.SetEntrypoint(reinterpret_cast<VoidPtr>(main));
+ UserProcess proc;
+ proc.SetEntrypoint(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 6684ed69..c6ec3739 100644
--- a/dev/ZKA/Sources/DLLMain.cxx
+++ b/dev/ZKA/Sources/DLLMain.cxx
@@ -39,8 +39,6 @@ EXTERN Kernel::Property cKernelVersion;
STATIC CG::UI_WINDOW_STRUCT* cKernelWnd = nullptr;
-EXTERN_C void hal_switch_to_user_code(void);
-
namespace Kernel::Detail
{
/// @brief Filesystem auto formatter, additional checks are also done by the class.
@@ -192,13 +190,6 @@ EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void)
CG::CGDrawStringToWnd(cKernelWnd, "newoskrnl.dll: Starting ZKA System...", 30, 10, RGB(0, 0, 0));
- auto main_logger = []() -> void {
- /// TODO: Write code which calls the login process.
- while (Yes);
- };
-
- Kernel::sched_execute_thread(main_logger, "ZKA Init Thread");
-
Kernel::ProcessHelper::StartScheduling();
Kernel::ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
diff --git a/dev/ZKA/Sources/Network/IPC.cxx b/dev/ZKA/Sources/Network/IPC.cxx
index e60742ca..34b08b88 100644
--- a/dev/ZKA/Sources/Network/IPC.cxx
+++ b/dev/ZKA/Sources/Network/IPC.cxx
@@ -98,8 +98,8 @@ namespace Kernel
(*pckt_in)->IpcEndianess = static_cast<UInt8>(endian);
(*pckt_in)->IpcPacketSize = sizeof(IPC_MESSAGE_STRUCT);
- (*pckt_in)->IpcFrom.ProcessID = Kernel::UserProcessScheduler::The().CurrentProcess().Leak().ProcessId;
- (*pckt_in)->IpcFrom.ProcessTeam = Kernel::UserProcessScheduler::The().CurrentTeam().mTeamId;
+ (*pckt_in)->IpcFrom.UserProcessID = Kernel::UserProcessScheduler::The().CurrentProcess().Leak().ProcessId;
+ (*pckt_in)->IpcFrom.UserProcessTeam = Kernel::UserProcessScheduler::The().CurrentTeam().mTeamId;
return true;
}
diff --git a/dev/ZKA/Sources/ProcessTeam.cxx b/dev/ZKA/Sources/ProcessTeam.cxx
index f7282faf..bb5726f7 100644
--- a/dev/ZKA/Sources/ProcessTeam.cxx
+++ b/dev/ZKA/Sources/ProcessTeam.cxx
@@ -5,7 +5,7 @@
------------------------------------------- */
/***********************************************************************************/
-/// @file ProcessTeam.cxx
+/// @file UserProcessTeam.cxx
/// @brief UserProcess teams implementation.
/***********************************************************************************/
@@ -15,21 +15,21 @@ namespace Kernel
{
/// @brief UserProcess list array getter.
/// @return The list of process to schedule.
- Array<UserProcess, kSchedProcessLimitPerTeam>& ProcessTeam::AsArray()
+ Array<UserProcess, kSchedProcessLimitPerTeam>& UserProcessTeam::AsArray()
{
return mProcessList;
}
/// @brief Get team ID.
/// @return The team's ID.
- ProcessID& ProcessTeam::Id() noexcept
+ ProcessID& UserProcessTeam::Id() noexcept
{
return mTeamId;
}
/// @brief Current process getter.
/// @return The current process header.
- Ref<UserProcess>& ProcessTeam::AsRef()
+ Ref<UserProcess>& UserProcessTeam::AsRef()
{
return mCurrentProcess;
}
diff --git a/dev/ZKA/Sources/UserProcessScheduler.cxx b/dev/ZKA/Sources/UserProcessScheduler.cxx
index 60dbdd1b..c20c6054 100644
--- a/dev/ZKA/Sources/UserProcessScheduler.cxx
+++ b/dev/ZKA/Sources/UserProcessScheduler.cxx
@@ -363,7 +363,7 @@ namespace Kernel
/// @brief Gets the current scheduled team.
/// @return
- ProcessTeam& UserProcessScheduler::CurrentTeam()
+ UserProcessTeam& UserProcessScheduler::CurrentTeam()
{
return mTeam;
}