summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-22 11:18:10 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-22 11:20:06 +0100
commitda9920a33d12a2ebd04f4572a6d134dfb6e6cab6 (patch)
treec61a3f26f529b3bd97030614e253b6bb05c216ce /Private/HALKit
parent223aad0fd3f8af6f69eb6429e5514bc888afe0d9 (diff)
Kernel: Got HCoreLite up and running.
- Working on standard edition of HCoreLdr (Kernel and Bootloader separated) Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.cpp7
-rw-r--r--Private/HALKit/PowerPC/HalHardware.cxx2
2 files changed, 4 insertions, 5 deletions
diff --git a/Private/HALKit/AMD64/HalPageAlloc.cpp b/Private/HALKit/AMD64/HalPageAlloc.cpp
index 8920f295..64752520 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.cpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.cpp
@@ -22,14 +22,15 @@ namespace HCore {
namespace HAL {
static auto hal_try_alloc_new_page(SizeT sz, Boolean rw, Boolean user)
-> PageTable64 * {
- PageTable64 *pte = reinterpret_cast<PageTable64 *>(
- (UIntPtr)kKernelVirtualStart + kPageCnt + kPagePad);
+ PageTable64 *pte =
+ reinterpret_cast<PageTable64 *>((UIntPtr)kKernelVirtualStart);
pte->Rw = rw;
pte->User = user;
pte->Present = true;
- kKernelVirtualStart = (VoidPtr)((UIntPtr)kKernelVirtualStart + kPageCnt + sz);
+ kKernelVirtualStart =
+ (VoidPtr)((UIntPtr)kKernelVirtualStart + kPageCnt + sz + kPagePad);
return pte;
}
diff --git a/Private/HALKit/PowerPC/HalHardware.cxx b/Private/HALKit/PowerPC/HalHardware.cxx
index a5f11449..c066051c 100644
--- a/Private/HALKit/PowerPC/HalHardware.cxx
+++ b/Private/HALKit/PowerPC/HalHardware.cxx
@@ -44,6 +44,4 @@ void ke_com_print(const Char* bytes) {
++index;
}
}
-
-TerminalDevice kcout(HCore::ke_com_print, nullptr);
} // namespace HCore