diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-12 19:20:29 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-12 19:20:29 +0200 |
| commit | c7b637d7b68d9b7e271e70a5a5cc0c4fcf9172de (patch) | |
| tree | 2d297a7250978efa7a81e101232f62254892f94b /dev/zka | |
| parent | 3347073aaa031b71e5063192f0806d83e9021c34 (diff) | |
IMP: Porting stack to AARCH64.
- Bootloader and kernel were made to be ported to mulitple
platforms.
- Some part of the stack have to be written specifically
for the platform though.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/zka')
| -rw-r--r-- | dev/zka/ArchKit/ArchKit.hxx | 24 | ||||
| -rw-r--r-- | dev/zka/HALKit/ARM64/HalSchedulerCore.cxx | 17 | ||||
| -rw-r--r-- | dev/zka/HALKit/ARM64/HalTimer.cxx | 2 | ||||
| -rw-r--r-- | dev/zka/amd64-efi.make | 6 | ||||
| -rw-r--r-- | dev/zka/arm64-efi.make | 2 | ||||
| -rw-r--r-- | dev/zka/src/BitMapMgr.cxx (renamed from dev/zka/HALKit/AMD64/HalBMPMgr.cxx) | 0 |
6 files changed, 11 insertions, 40 deletions
diff --git a/dev/zka/ArchKit/ArchKit.hxx b/dev/zka/ArchKit/ArchKit.hxx index 3c617705..e52eeabf 100644 --- a/dev/zka/ArchKit/ArchKit.hxx +++ b/dev/zka/ArchKit/ArchKit.hxx @@ -56,30 +56,6 @@ namespace Kernel { return *(volatile UInt32*)((UInt64)base + reg); } - - /// @brief Print a region of memory. - /// @param start - /// @param length - inline Void ke_print_raw_memory(const void* start, Size length) - { - const UInt8* ptr = (const UInt8*)start; - - for (Size i = 0; i < length; i++) - { - if (i % 16 == 0) - { - kcout << hex_number((UIntPtr)ptr + i); - } - else - { - kcout << hex_number(ptr[i]); - } - - kcout << " "; - } - - kcout << "\r"; - } } // namespace Kernel #define kKernelMaxSystemCalls (256) diff --git a/dev/zka/HALKit/ARM64/HalSchedulerCore.cxx b/dev/zka/HALKit/ARM64/HalSchedulerCore.cxx index 7545b350..630df4fd 100644 --- a/dev/zka/HALKit/ARM64/HalSchedulerCore.cxx +++ b/dev/zka/HALKit/ARM64/HalSchedulerCore.cxx @@ -6,19 +6,16 @@ #include <KernelKit/UserProcessScheduler.hxx> -using namespace Kernel; - -Void UserProcess::SetImageStart(UIntPtr& imageStart) noexcept +namespace Kernel { - if (imageStart == 0) - this->Crash(); + Void UserProcess::SetImageStart(VoidPtr image_start) noexcept + { + if (image_start == 0) + this->Crash(); - this->StackFrame->BP = imageStart; - this->StackFrame->SP = this->StackFrame->BP; -} + this->Image = image_start; + } -namespace Kernel -{ bool hal_check_stack(HAL::StackFramePtr stackPtr) { if (!stackPtr) diff --git a/dev/zka/HALKit/ARM64/HalTimer.cxx b/dev/zka/HALKit/ARM64/HalTimer.cxx index 4ef87227..fd3bf87b 100644 --- a/dev/zka/HALKit/ARM64/HalTimer.cxx +++ b/dev/zka/HALKit/ARM64/HalTimer.cxx @@ -12,5 +12,3 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.hxx> - -struct TIMER_INFO; diff --git a/dev/zka/amd64-efi.make b/dev/zka/amd64-efi.make index 6c69a423..f1a8742b 100644 --- a/dev/zka/amd64-efi.make +++ b/dev/zka/amd64-efi.make @@ -3,13 +3,13 @@ # This is the minoskrnl's makefile. ################################################## -CC = x86_64-w64-mingw32-g++.exe -LD = x86_64-w64-mingw32-ld.exe +CC = x86_64-w64-mingw32-g++ +LD = x86_64-w64-mingw32-ld CCFLAGS = -fshort-wchar -c -D__ZKA_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \ -std=c++20 -D__ZKA_SUPPORT_NX__ -I../Vendor -D__FSKIT_USE_NEFS__ \ -D__NEWOSKRNL__ -D__HAVE_ZKA_APIS__ -D__FREESTANDING__ -D__ZKA__ -I./ -I../ -I../zba -ASM = nasm.exe +ASM = nasm DISK_DRV = diff --git a/dev/zka/arm64-efi.make b/dev/zka/arm64-efi.make index 51753026..51ea8638 100644 --- a/dev/zka/arm64-efi.make +++ b/dev/zka/arm64-efi.make @@ -7,7 +7,7 @@ CC = clang++ LD = lld-link CCFLAGS = -fshort-wchar -c -ffreestanding -MMD -mno-red-zone -D__ZKA_ARM64__ -fno-rtti -fno-exceptions -I./ \ -target aarch64-unknown-windows \ - -std=c++20 -D__FSKIT_USE_NEFS__ -D__ZETA_MACHINE__ -D__NEWOSKRNL__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../ + -std=c++20 -D__FSKIT_USE_NEFS__ -D__NEWOSKRNL__ -D__HAVE_ZKA_APIS__ -D__ZKA__ -I../ ASM = clang++ diff --git a/dev/zka/HALKit/AMD64/HalBMPMgr.cxx b/dev/zka/src/BitMapMgr.cxx index e577bd7e..e577bd7e 100644 --- a/dev/zka/HALKit/AMD64/HalBMPMgr.cxx +++ b/dev/zka/src/BitMapMgr.cxx |
