summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-14 09:38:17 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-14 09:38:17 +0100
commit2eb529e37a5e10ea2483fce04de778ac13be6f1d (patch)
tree5bbdaf533d8f173f3d6d73f9daf46f8008cbc73d /Private/HALKit/AMD64
parente1b37b42b50e4b72bd49eefa2ff2bcdc16140b5d (diff)
HCR-18: Fixed UEFI bootloader, loading stuff correctly.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/AMD64')
-rw-r--r--Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp4
-rw-r--r--Private/HALKit/AMD64/HalDebugOutput.cxx2
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.hpp18
3 files changed, 14 insertions, 10 deletions
diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index 1e53140f..73c995c4 100644
--- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -96,8 +96,8 @@ static Madt kApicMadtList[256];
Madt* system_find_core(Madt* madt) {
madt = madt + sizeof(Madt);
- if (string_compare(madt->fMag, kApicSignature,
- string_length(kApicSignature)) == 0)
+ if (rt_string_cmp(madt->fMag, kApicSignature,
+ rt_string_len(kApicSignature)) == 0)
return madt;
return nullptr;
diff --git a/Private/HALKit/AMD64/HalDebugOutput.cxx b/Private/HALKit/AMD64/HalDebugOutput.cxx
index ac16cf70..ba8770fe 100644
--- a/Private/HALKit/AMD64/HalDebugOutput.cxx
+++ b/Private/HALKit/AMD64/HalDebugOutput.cxx
@@ -60,7 +60,7 @@ void ke_io_print(const char *bytes) {
Detail::kState = kStateTransmit;
SizeT index = 0;
- SizeT len = string_length(bytes, 256);
+ SizeT len = rt_string_len(bytes, 256);
while (index < len) {
HAL::Out8(Detail::PORT, bytes[index]);
diff --git a/Private/HALKit/AMD64/HalPageAlloc.hpp b/Private/HALKit/AMD64/HalPageAlloc.hpp
index d6912318..9ca2c580 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.hpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.hpp
@@ -17,13 +17,17 @@
#include <NewKit/Defines.hpp>
-#ifndef PTE_MAX
-#define PTE_MAX (0x200)
-#endif //! PTE_MAX
+#ifndef kPTEMax
+#define kPTEMax (0x200)
+#endif //! kPTEMax
-#ifndef PTE_ALIGN
-#define PTE_ALIGN (0x1000)
-#endif //! PTE_ALIGN
+#ifndef kPTEAlign
+#define kPTEAlign (0x1000)
+#endif //! kPTEAlign
+
+#ifndef kPTESize
+#define kPTESize (0x1000)
+#endif // !kPTESize
extern "C" void flush_tlb(HCore::UIntPtr VirtualAddr);
extern "C" void write_cr3(HCore::UIntPtr pde);
@@ -68,7 +72,7 @@ inline UInt8 control_register_cast(ControlRegisterBits reg) {
} // namespace Detail
struct PageDirectory64 final {
- PageTable64 ALIGN(PTE_ALIGN) Pte[PTE_MAX];
+ PageTable64 ALIGN(kPTEAlign) Pte[kPTEMax];
};
PageTable64* hal_alloc_page(SizeT sz, Boolean rw, Boolean user);