summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-04 12:56:23 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-04 12:56:23 +0200
commita0a90c80e5dd17df8f609aebc253b4bf9147f90f (patch)
tree459f98ea125db490e887bd85b38fd9165a9491b4 /dev/ZKA/HALKit
parentcc9ce57cac59bd443e2319e3b8f427172b93f7da (diff)
Created a new branch for the overhaul project.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/HALKit')
-rw-r--r--dev/ZKA/HALKit/AMD64/HalBitMapMgr.cxx99
-rw-r--r--dev/ZKA/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx9
-rw-r--r--dev/ZKA/HALKit/AMD64/HalCoreMPScheduler.cxx4
-rw-r--r--dev/ZKA/HALKit/AMD64/HalDescriptorLoader.cxx4
-rw-r--r--dev/ZKA/HALKit/AMD64/HalKernelMain.cxx9
-rw-r--r--dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm9
-rw-r--r--dev/ZKA/HALKit/AMD64/HalPageAlloc.cxx149
-rw-r--r--dev/ZKA/HALKit/AMD64/HalPageAlloc.hxx4
-rw-r--r--dev/ZKA/HALKit/AMD64/HalProcessor.cxx31
-rw-r--r--dev/ZKA/HALKit/AMD64/Processor.hxx12
-rw-r--r--dev/ZKA/HALKit/AMD64/Storage/ATA-PIO.cxx2
-rw-r--r--dev/ZKA/HALKit/ARM64/HalKernelMain.cxx4
-rw-r--r--dev/ZKA/HALKit/ARM64/HalPageAlloc.hxx2
-rw-r--r--dev/ZKA/HALKit/ARM64/Processor.hxx1
-rw-r--r--dev/ZKA/HALKit/POWER/HalHardware.cxx2
15 files changed, 142 insertions, 199 deletions
diff --git a/dev/ZKA/HALKit/AMD64/HalBitMapMgr.cxx b/dev/ZKA/HALKit/AMD64/HalBitMapMgr.cxx
new file mode 100644
index 00000000..677b1219
--- /dev/null
+++ b/dev/ZKA/HALKit/AMD64/HalBitMapMgr.cxx
@@ -0,0 +1,99 @@
+/* -------------------------------------------
+
+ Copyright ZKA Technologies.
+
+------------------------------------------- */
+
+#include <ArchKit/ArchKit.hxx>
+
+#define cVMHMagic ((Kernel::UIntPtr)0x10210)
+
+#ifdef __ZKA_AMD64__
+#include <HALKit/AMD64/HalPageAlloc.hxx>
+#elif defined(__ZKA_ARM64__)
+#include <HALKit/ARM64/HalPageAlloc.hxx>
+#endif
+
+#include <NewKit/Defines.hxx>
+#include <NewKit/KernelCheck.hxx>
+
+namespace Kernel
+{
+ namespace HAL
+ {
+ namespace Detail
+ {
+ struct AllocatorTraits final
+ {
+ /// @brief Iterate over availables pages for a free one.
+ /// @return The new address which was found.
+ VoidPtr FindBitMap(VoidPtr base_ptr, SizeT size, Bool rw, Bool user) noexcept
+ {
+ while (base_ptr && size)
+ {
+ UIntPtr* ptr_bit_set = reinterpret_cast<UIntPtr*>(base_ptr);
+
+ if (ptr_bit_set[0] != cVMHMagic)
+ {
+ ptr_bit_set[0] = cVMHMagic;
+ ptr_bit_set[1] = size;
+
+ kcout << "BBP: STATUS\r";
+ kcout << "BBP: MAG: " << hex_number(ptr_bit_set[0]) << endl;
+ kcout << "BBP: ADDRESS: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ kcout << "BBP: SIZE: " << hex_number(ptr_bit_set[1]) << endl;
+
+ if (rw)
+ mm_update_pte(base_ptr, eFlagsRw);
+
+ if (user)
+ mm_update_pte(base_ptr, eFlagsUser);
+
+ return (VoidPtr)(ptr_bit_set + 2);
+ }
+
+ base_ptr = reinterpret_cast<VoidPtr>(reinterpret_cast<UIntPtr>(base_ptr) + size);
+ }
+
+ return nullptr;
+ }
+ };
+ } // namespace Detail
+
+ /// @brief Allocate a new page to be used by the OS.
+ /// @param rw read/write bit.
+ /// @param user user bit.
+ /// @return
+ auto mm_alloc_bitmap(Boolean rw, Boolean user, SizeT size) -> VoidPtr
+ {
+ VoidPtr ptr_new = nullptr;
+ Detail::AllocatorTraits traits;
+
+ ptr_new = traits.FindBitMap(kKernelVirtualStart, size, rw, user);
+
+ return ptr_new;
+ }
+
+ auto mm_free_bitmap(VoidPtr page_ptr) -> Bool
+ {
+ if (!page_ptr)
+ return false;
+
+ UIntPtr* ptr_bit_set = reinterpret_cast<UIntPtr*>(page_ptr) - 2;
+
+ if (!ptr_bit_set[0] ||
+ ptr_bit_set[0] != cVMHMagic)
+ return false;
+
+ kcout << "BBP: FREE STATUS\r";
+ kcout << "BBP: MAG: " << hex_number(ptr_bit_set[0]) << endl;
+ kcout << "BBP: ADDRESSS: " << hex_number((UIntPtr)ptr_bit_set) << endl;
+ kcout << "BBP: SIZE: " << hex_number(ptr_bit_set[1]) << endl;
+
+ ptr_bit_set[0] = 0UL;
+ ptr_bit_set[1] = 0UL;
+
+ return true;
+ }
+ } // namespace HAL
+} // namespace Kernel
diff --git a/dev/ZKA/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx b/dev/ZKA/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx
index 611ec596..1bb54588 100644
--- a/dev/ZKA/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx
+++ b/dev/ZKA/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx
@@ -13,6 +13,9 @@
EXTERN_C void idt_handle_gpf(Kernel::UIntPtr rsp)
{
Kernel::UserProcessScheduler::The().CurrentProcess().Leak().Crash();
+
+ Kernel::UserProcessHelper::StartScheduling();
+ Kernel::ke_stop(RUNTIME_CHECK_PROCESS);
}
/// @brief Handle page fault.
@@ -20,6 +23,8 @@ EXTERN_C void idt_handle_gpf(Kernel::UIntPtr rsp)
EXTERN_C void idt_handle_pf(Kernel::UIntPtr rsp)
{
Kernel::UserProcessScheduler::The().CurrentProcess().Leak().Crash();
+
+ Kernel::UserProcessHelper::StartScheduling();
Kernel::ke_stop(RUNTIME_CHECK_PROCESS);
}
@@ -28,6 +33,8 @@ EXTERN_C void idt_handle_pf(Kernel::UIntPtr rsp)
EXTERN_C void idt_handle_math(Kernel::UIntPtr rsp)
{
Kernel::UserProcessScheduler::The().CurrentProcess().Leak().Crash();
+
+ Kernel::UserProcessHelper::StartScheduling();
Kernel::ke_stop(RUNTIME_CHECK_PROCESS);
}
@@ -44,6 +51,8 @@ EXTERN_C void idt_handle_generic(Kernel::UIntPtr rsp)
EXTERN_C void idt_handle_ud(Kernel::UIntPtr rsp)
{
Kernel::UserProcessScheduler::The().CurrentProcess().Leak().Crash();
+
+ Kernel::UserProcessHelper::StartScheduling();
Kernel::ke_stop(RUNTIME_CHECK_PROCESS);
}
diff --git a/dev/ZKA/HALKit/AMD64/HalCoreMPScheduler.cxx b/dev/ZKA/HALKit/AMD64/HalCoreMPScheduler.cxx
index 2e76d73a..b524b04c 100644
--- a/dev/ZKA/HALKit/AMD64/HalCoreMPScheduler.cxx
+++ b/dev/ZKA/HALKit/AMD64/HalCoreMPScheduler.cxx
@@ -160,10 +160,10 @@ namespace Kernel::HAL
{
fBlocks[UserProcessScheduler::The().CurrentProcess().Leak().ProcessId % kSchedProcessLimitPerTeam].f_Process = &UserProcessScheduler::The().CurrentProcess().Leak();
- return true;
+ return Yes;
}
- return false;
+ return No;
}
/***********************************************************************************/
diff --git a/dev/ZKA/HALKit/AMD64/HalDescriptorLoader.cxx b/dev/ZKA/HALKit/AMD64/HalDescriptorLoader.cxx
index 4474295f..19d62965 100644
--- a/dev/ZKA/HALKit/AMD64/HalDescriptorLoader.cxx
+++ b/dev/ZKA/HALKit/AMD64/HalDescriptorLoader.cxx
@@ -47,8 +47,6 @@ namespace Kernel::HAL
for (UInt16 idt_indx = 0; idt_indx < 12; ++idt_indx)
{
- MUST_PASS(ptr_ivt[idt_indx]);
-
Detail::kInterruptVectorTable[idt_indx].Selector = kGdtKernelCodeSelector;
Detail::kInterruptVectorTable[idt_indx].Ist = 0;
Detail::kInterruptVectorTable[idt_indx].TypeAttributes = kTrapGate;
@@ -62,8 +60,6 @@ namespace Kernel::HAL
for (UInt16 idt_indx = 13; idt_indx < kKernelIdtSize; ++idt_indx)
{
- MUST_PASS(ptr_ivt[idt_indx]);
-
Detail::kInterruptVectorTable[idt_indx].Selector = kGdtKernelCodeSelector;
Detail::kInterruptVectorTable[idt_indx].Ist = 0;
Detail::kInterruptVectorTable[idt_indx].TypeAttributes = kInterruptGate;
diff --git a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx
index 34398871..33c3f689 100644
--- a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx
+++ b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx
@@ -56,7 +56,6 @@ namespace Kernel::HAL
Kernel::Property cKernelVersion;
Kernel::User cUserSuper{Kernel::RingKind::kRingSuperUser, kSuperUser};
-EXTERN Kernel::Boolean kAllocationInProgress;
EXTERN_C Kernel::VoidPtr kInterruptVectorTable[];
Kernel::Void hal_real_init(Kernel::Void) noexcept;
@@ -93,17 +92,12 @@ EXTERN_C void hal_init_platform(
Kernel::Void hal_real_init(Kernel::Void) noexcept
{
- // reset kAllocationInProgress field to zero.
- kAllocationInProgress = false;
-
- kKernelVMHStart = kHandoverHeader->f_HeapStart;
-
// get page size.
kKernelVirtualSize = kHandoverHeader->f_VirtualSize;
// get virtual address start (for the heap)
kKernelVirtualStart = reinterpret_cast<Kernel::VoidPtr>(
- reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_VirtualStart));
+ reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_BitMapStart));
// get physical address start.
kKernelPhysicalStart = reinterpret_cast<Kernel::VoidPtr>(
@@ -136,7 +130,6 @@ Kernel::Void hal_real_init(Kernel::Void) noexcept
auto fs = new Kernel::NewFilesystemManager();
MUST_PASS(fs);
- MUST_PASS(fs->GetParser());
Kernel::NewFilesystemManager::Mount(fs);
diff --git a/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm b/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm
index dc534589..39a80922 100644
--- a/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm
+++ b/dev/ZKA/HALKit/AMD64/HalMPContextSwitch.asm
@@ -67,20 +67,15 @@ mp_system_call_handler:
o64 sysret
mp_do_context_switch_pre:
+ mov rcx, 0xc0000082
+ wrmsr
mov rcx, 0xc0000080
rdmsr
or eax, 1
wrmsr
-
mov rcx, 0xc0000081
rdmsr
- mov rax, 0x00000000
mov edx, 0x00180008
wrmsr
- mov rcx, 0xc0000082
- mov rax, mp_system_call_handler
- mov rdx, 0x0
- wrmsr
-
ret
diff --git a/dev/ZKA/HALKit/AMD64/HalPageAlloc.cxx b/dev/ZKA/HALKit/AMD64/HalPageAlloc.cxx
deleted file mode 100644
index 28b5f9be..00000000
--- a/dev/ZKA/HALKit/AMD64/HalPageAlloc.cxx
+++ /dev/null
@@ -1,149 +0,0 @@
-/* -------------------------------------------
-
- Copyright ZKA Technologies.
-
-------------------------------------------- */
-
-#include <ArchKit/ArchKit.hxx>
-
-#define cVMHMagic (0xDEEFD00D)
-#define cPaddingVMH (16)
-
-#ifdef __ZKA_AMD64__
-#include <HALKit/AMD64/HalPageAlloc.hxx>
-#elif defined(__ZKA_ARM64__)
-#include <HALKit/ARM64/HalPageAlloc.hxx>
-#endif
-
-#include <NewKit/Defines.hxx>
-#include <NewKit/KernelCheck.hxx>
-
-Kernel::Boolean kAllocationInProgress = false;
-
-namespace Kernel
-{
- namespace HAL
- {
- namespace Detail
- {
- struct VIRTUAL_MEMORY_HEADER
- {
- UInt32 Magic;
- Boolean Present : 1;
- Boolean ReadWrite : 1;
- Boolean User : 1;
- SizeT Size;
- };
-
- struct VirtualMemoryHeaderTraits final
- {
- /// @brief Get next header.
- /// @param current
- /// @return
- VIRTUAL_MEMORY_HEADER* Next(VIRTUAL_MEMORY_HEADER* current)
- {
- if (current->Magic != cVMHMagic)
- return current;
-
- return current + sizeof(VIRTUAL_MEMORY_HEADER) + current->Size;
- }
-
- /// @brief Get previous header.
- /// @param current
- /// @return
- VIRTUAL_MEMORY_HEADER* Prev(VIRTUAL_MEMORY_HEADER* current)
- {
- if (current->Magic != cVMHMagic)
- return current;
-
- return current - sizeof(VIRTUAL_MEMORY_HEADER) - current->Size;
- }
- };
- } // namespace Detail
-
- /// @brief Allocates a new page of memory.
- /// @param sz the size of it.
- /// @param rw read/write flag.
- /// @param user user flag.
- /// @return the page table of it.
- STATIC auto hal_try_alloc_new_page(Boolean rw, Boolean user, SizeT size) -> VoidPtr
- {
- if (kAllocationInProgress)
- return nullptr;
-
- kAllocationInProgress = true;
-
- //! fetch from the start.
- Detail::VIRTUAL_MEMORY_HEADER* vmh_header = reinterpret_cast<Detail::VIRTUAL_MEMORY_HEADER*>(kKernelVMHStart);
- Detail::VirtualMemoryHeaderTraits traits;
-
- while (vmh_header->Present &&
- vmh_header->Magic == cVMHMagic)
- {
- vmh_header = traits.Next(vmh_header);
-
- if (vmh_header == reinterpret_cast<VoidPtr>(kBadPtr))
- {
- ke_stop(RUNTIME_CHECK_POINTER);
- return nullptr;
- }
- }
-
- vmh_header->Magic = cVMHMagic;
- vmh_header->Present = true;
- vmh_header->ReadWrite = rw;
- vmh_header->User = user;
- vmh_header->Size = size;
-
- kAllocationInProgress = false;
-
- VoidPtr result = reinterpret_cast<VoidPtr>(vmh_header + sizeof(Detail::VIRTUAL_MEMORY_HEADER));
-
- mm_update_pte(result, (rw ? eFlagsRw : 0));
- mm_update_pte(result, (user ? eFlagsUser : 0));
-
- return result;
- }
-
- /// @brief Allocate a new page to be used by the OS.
- /// @param rw read/write bit.
- /// @param user user bit.
- /// @return
- auto hal_alloc_page(Boolean rw, Boolean user, SizeT size) -> VoidPtr
- {
- kcout << "PageAlloc: Waiting now...";
-
- // Wait for a ongoing allocation to complete.
- while (kAllocationInProgress)
- {
- (Void)0;
- }
-
- kcout << ", done waiting, allocating...\r";
-
- if (size == 0)
- ++size;
-
- // Now allocate the page.
- return hal_try_alloc_new_page(rw, user, size);
- }
-
- auto hal_free_page(VoidPtr page_ptr) -> Bool
- {
- if (!page_ptr)
- return false;
-
- Detail::VIRTUAL_MEMORY_HEADER* result = reinterpret_cast<Detail::VIRTUAL_MEMORY_HEADER*>((UIntPtr)page_ptr - sizeof(Detail::VIRTUAL_MEMORY_HEADER));
-
- if (result->Magic != cVMHMagic)
- return false;
-
- if (result->Present != true)
- return true;
-
- result->Present = false;
-
- return true;
- }
- } // namespace HAL
-} // namespace Kernel
diff --git a/dev/ZKA/HALKit/AMD64/HalPageAlloc.hxx b/dev/ZKA/HALKit/AMD64/HalPageAlloc.hxx
index aadabd9c..8eb85e78 100644
--- a/dev/ZKA/HALKit/AMD64/HalPageAlloc.hxx
+++ b/dev/ZKA/HALKit/AMD64/HalPageAlloc.hxx
@@ -87,8 +87,8 @@ namespace Kernel::HAL
ZKA_PTE ALIGN(kPTEAlign) Pte[kPTEMax];
};
- auto hal_alloc_page(Boolean rw, Boolean user, SizeT size) -> VoidPtr;
- auto hal_free_page(VoidPtr page_ptr) -> Bool;
+ auto mm_alloc_bitmap(Boolean rw, Boolean user, SizeT size) -> VoidPtr;
+ auto mm_free_bitmap(VoidPtr page_ptr) -> Bool;
} // namespace Kernel::HAL
namespace Kernel
diff --git a/dev/ZKA/HALKit/AMD64/HalProcessor.cxx b/dev/ZKA/HALKit/AMD64/HalProcessor.cxx
index 407b7e51..3c34ab68 100644
--- a/dev/ZKA/HALKit/AMD64/HalProcessor.cxx
+++ b/dev/ZKA/HALKit/AMD64/HalProcessor.cxx
@@ -27,32 +27,37 @@ namespace Kernel::HAL
// Access PML4 entry
volatile UInt64* pml4_entry = (volatile UInt64*)(((UInt64)pml4_base) + pml4_idx * sizeof(UIntPtr));
- UInt64 pdpt_base = *pml4_entry & ~0xFFF; // Remove flags (assuming 4KB pages)
+ UInt64 pdpt_base = *pml4_entry & ~0xFFF; // Remove flags (assuming 4KB pages)
// Access PDPT entry
volatile UInt64* pdpt_entry = (volatile UInt64*)(((UInt64)pdpt_base) + pdpt_idx * sizeof(UIntPtr));
- UInt64 pd_base = *pdpt_entry & ~0xFFF; // Remove flags
+ UInt64 pd_base = *pdpt_entry & ~0xFFF; // Remove flags
+ // Now PD
volatile UInt64* pd_entry = (volatile UInt64*)(((UInt64)pd_base) + pd_idx * sizeof(UIntPtr));
UInt64 pt_base = *pd_entry & ~0xFFF; // Remove flags
+ // And then PTE
volatile UInt64* page_addr = (volatile UInt64*)(((UInt64)pt_base) + (pte_idx * sizeof(UIntPtr)));
- if (page_addr)
- {
- if (flags & eFlagsPresent)
- *page_addr |= 0x01; // present bit
+ if (flags & eFlagsPresent)
+ *page_addr |= 0x01; // present bit
+ else if (flags & ~eFlagsPresent)
+ *page_addr &= 0x01; // present bit
- if (flags & eFlagsRw)
- *page_addr |= 0x02;
+ if (flags & eFlagsRw)
+ *page_addr |= 0x02;
+ else if (flags & ~eFlagsRw)
+ *page_addr &= 0x02; // present bit
- if (flags & eFlagsUser)
- *page_addr |= 0x02;
+ if (flags & eFlagsUser)
+ *page_addr |= 0x04;
+ else if (flags & ~eFlagsUser)
+ *page_addr &= 0x04; // present bit
- return Yes;
- }
+ hal_write_cr3((UIntPtr)pml4_base);
- return No;
+ return 0;
}
Void Out8(UInt16 port, UInt8 value)
diff --git a/dev/ZKA/HALKit/AMD64/Processor.hxx b/dev/ZKA/HALKit/AMD64/Processor.hxx
index a80e13cb..b7fa080c 100644
--- a/dev/ZKA/HALKit/AMD64/Processor.hxx
+++ b/dev/ZKA/HALKit/AMD64/Processor.hxx
@@ -56,11 +56,10 @@ namespace Kernel::HAL
/// @brief Virtual memory flags.
enum
{
- eFlagsPresent,
- eFlagsUser,
- eFlagsRw,
- eFlagsExecDisable,
- eFlagsCount,
+ eFlagsPresent = 0x01,
+ eFlagsRw = 0x02,
+ eFlagsUser = 0x04,
+ eFlagsCount = 0x3,
};
/// @brief Updates a PTE from pd_base.
@@ -100,7 +99,7 @@ namespace Kernel::HAL
using InterruptId = UInt16; /* For each element in the IVT */
/// @brief Stack frame (as retrieved from assembly.)
- struct PACKED StackFrame final
+ struct StackFrame final
{
UIntPtr R8{0};
UIntPtr R9{0};
@@ -293,7 +292,6 @@ EXTERN_C Kernel::Void hal_load_gdt(Kernel::HAL::RegisterGDT ptr);
#define kKernelIdtSize 0x100
#define kKernelInterruptId 0x32
-inline Kernel::VoidPtr kKernelVMHStart = nullptr;
inline Kernel::VoidPtr kKernelVirtualStart = nullptr;
inline Kernel::UIntPtr kKernelVirtualSize = 0UL;
diff --git a/dev/ZKA/HALKit/AMD64/Storage/ATA-PIO.cxx b/dev/ZKA/HALKit/AMD64/Storage/ATA-PIO.cxx
index 996b93ee..052f8c64 100644
--- a/dev/ZKA/HALKit/AMD64/Storage/ATA-PIO.cxx
+++ b/dev/ZKA/HALKit/AMD64/Storage/ATA-PIO.cxx
@@ -107,7 +107,7 @@ ATAInit_Retry:
OutMaster = (Bus == ATA_PRIMARY_IO) ? ATA_MASTER : ATA_SLAVE;
- Kernel::kcout << "newoskrnl.exe: Create ATA module.\r";
+ Kernel::kcout << "newoskrnl.exe: Created IDE module.\r";
return true;
}
diff --git a/dev/ZKA/HALKit/ARM64/HalKernelMain.cxx b/dev/ZKA/HALKit/ARM64/HalKernelMain.cxx
index 52e4f1ee..d51f0421 100644
--- a/dev/ZKA/HALKit/ARM64/HalKernelMain.cxx
+++ b/dev/ZKA/HALKit/ARM64/HalKernelMain.cxx
@@ -76,14 +76,12 @@ Kernel::Void hal_real_init(Kernel::Void) noexcept
// reset kAllocationInProgress field to zero.
kAllocationInProgress = false;
- kKernelVMHStart = kHandoverHeader->f_HeapStart;
-
// get page size.
kKernelVirtualSize = kHandoverHeader->f_VirtualSize;
// get virtual address start (for the heap)
kKernelVirtualStart = reinterpret_cast<Kernel::VoidPtr>(
- reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_VirtualStart));
+ reinterpret_cast<Kernel::UIntPtr>(kHandoverHeader->f_BitMapStart));
// get physical address start.
kKernelPhysicalStart = reinterpret_cast<Kernel::VoidPtr>(
diff --git a/dev/ZKA/HALKit/ARM64/HalPageAlloc.hxx b/dev/ZKA/HALKit/ARM64/HalPageAlloc.hxx
index ef3b6db1..ab77f1d0 100644
--- a/dev/ZKA/HALKit/ARM64/HalPageAlloc.hxx
+++ b/dev/ZKA/HALKit/ARM64/HalPageAlloc.hxx
@@ -96,7 +96,7 @@ namespace Kernel::HAL
LongDescLevel3 ALIGN(kPTEAlign) Pte[kPTEMax];
};
- VoidPtr hal_alloc_page(Boolean rw, Boolean user, SizeT size);
+ VoidPtr mm_alloc_bitmap(Boolean rw, Boolean user, SizeT size);
} // namespace Kernel::HAL
namespace Kernel
diff --git a/dev/ZKA/HALKit/ARM64/Processor.hxx b/dev/ZKA/HALKit/ARM64/Processor.hxx
index 1880d36c..ad2bdc7b 100644
--- a/dev/ZKA/HALKit/ARM64/Processor.hxx
+++ b/dev/ZKA/HALKit/ARM64/Processor.hxx
@@ -42,7 +42,6 @@ namespace Kernel::HAL
typedef StackFrame* StackFramePtr;
} // namespace Kernel::HAL
-inline Kernel::VoidPtr kKernelVMHStart = nullptr;
inline Kernel::VoidPtr kKernelVirtualStart = nullptr;
inline Kernel::UIntPtr kKernelVirtualSize = 0UL;
diff --git a/dev/ZKA/HALKit/POWER/HalHardware.cxx b/dev/ZKA/HALKit/POWER/HalHardware.cxx
index 9fb841c8..eb335d70 100644
--- a/dev/ZKA/HALKit/POWER/HalHardware.cxx
+++ b/dev/ZKA/HALKit/POWER/HalHardware.cxx
@@ -11,7 +11,7 @@ namespace Kernel
{
namespace HAL
{
- UIntPtr hal_alloc_page(bool rw, bool user)
+ UIntPtr mm_alloc_bitmap(bool rw, bool user)
{
return 0;
}