summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 07:58:47 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-10 08:00:25 +0200
commit80039963ff08d1810e22a0ae41497b156e861db0 (patch)
tree32b0f12573584668e656b4869a733e31264a06ba /Kernel/HALKit
parent1c217ed09c6c4b13ec09b897270a208439f0db55 (diff)
[META] Important refactors and fixes.
+ FIX SCIBase.hxx header and inline scm.internal.inl header. + Rename targets libSCI, libDDK to sci.dll and ddk.dll. + Don't initialize again the values of heap and such in HalKernelMain.cxx + Add 'STOP code' in ke_stop call. + Updated ReadMe.md. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit')
-rw-r--r--Kernel/HALKit/AMD64/HalKernelMain.cxx34
1 files changed, 8 insertions, 26 deletions
diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx
index 924eb6c9..d24099f2 100644
--- a/Kernel/HALKit/AMD64/HalKernelMain.cxx
+++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx
@@ -50,16 +50,9 @@ namespace Kernel::HAL
{
/// @brief Gets the system cores using the MADT.
/// @param rsdPtr The 'RSD PTR' data structure.
- extern void hal_system_get_cores(Kernel::voidPtr rsdPtr);
+ EXTERN void hal_system_get_cores(Kernel::voidPtr rsdPtr);
} // namespace Kernel::HAL
-namespace Kernel
-{
- EXTERN SizeT kHeapCount;
- EXTERN PageManager kHeapPageManager;
- EXTERN Bool kOperationInProgress;
-} // namespace Kernel
-
/* GDT. */
STATIC Kernel::HAL::Detail::NewOSGDT cGdt = {
{0, 0, 0, 0x00, 0x00, 0}, // null entry
@@ -70,7 +63,7 @@ STATIC Kernel::HAL::Detail::NewOSGDT cGdt = {
{0, 0, 0, 0x92, 0xaf, 0}, // user data
};
-void hal_real_init(void);
+Kernel::Void hal_real_init(Kernel::Void) noexcept;
static Kernel::User* cRoot;
@@ -90,16 +83,8 @@ EXTERN_C void hal_init_platform(
hal_real_init();
}
-EXTERN Kernel::Boolean kAllocationInProgress;
-
-void hal_real_init(void)
-{
- Kernel::kHeapPageManager = Kernel::PageManager();
- Kernel::kHeapCount = 0UL;
- Kernel::kOperationInProgress = No;
- kAllocationInProgress = No;
-
- // get page size.
+Kernel::Void hal_real_init(Kernel::Void) noexcept
+{ // get page size.
kKernelVirtualSize = kHandoverHeader->f_VirtualSize;
// get virtual address start (for the heap)
@@ -228,16 +213,13 @@ void hal_real_init(void)
cRoot = new Kernel::User(Kernel::RingKind::kRingSuperUser, kSuperUser);
#ifdef __DEBUG__
- cRoot->TrySave("6aa162f3-20f6-4143-92f9-5dd37066aedc");
+ const auto cPassword = "6aa162f3-20f6-4143-92f9-5dd37066aedc";
#else
- cRoot->TrySave("password");
+ const auto cPassword = "password";
#endif
-#ifdef __DEBUG__
- Kernel::UserManager::The()->TryLogIn(cRoot, "6aa162f3-20f6-4143-92f9-5dd37066aedc");
-#else
- Kernel::UserManager::The()->TryLogIn(cRoot, "password");
-#endif
+ cRoot->TrySave(cPassword);
+ Kernel::UserManager::The()->TryLogIn(cRoot, cPassword);
Kernel::ke_stop(RUNTIME_CHECK_FAILED);
}