diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:26:31 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-27 10:26:31 +0100 |
| commit | 70e95128b11dbb535e4679cbacb1cbeaa414c822 (patch) | |
| tree | 42fd94536a54058a39f0c85be99431c6ad1a0cf8 /Private | |
| parent | 44a081a4442181b208c09c6f748124c9d23b61fd (diff) | |
Kernel: Improving AMD64 HAL, Add TIBInstall.asm, currently Working on
SMPManager and Bootloader.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/HALKit/AMD64/DebugManager.asm | 7 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/HalPageAlloc.cpp | 2 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/HalPageAlloc.hpp | 2 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/SMPCoreManager.asm | 23 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/TIBInstall.asm | 18 | ||||
| -rw-r--r-- | Private/KernelKit/FileManager.hpp | 10 | ||||
| -rw-r--r-- | Private/KernelKit/ThreadLocalStorage.hxx | 20 | ||||
| -rw-r--r-- | Private/NetworkKit/IP.hpp | 25 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Boot.hpp (renamed from Private/newBoot/BootKit/Boot.hpp) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/CxxKit/__cxxkit_unwind.cxx (renamed from Private/newBoot/cxxKitModule/__cxxkit_unwind.cxx) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/CxxKit/manifest.json (renamed from Private/newBoot/cxxKitModule/manifest.json) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/NetBoot/.hgkeep (renamed from Private/newBoot/Source/MPT/.hgkeep) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/NetBoot/manifest.json (renamed from Private/newBoot/netBootModule/manifest.json) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/NetBoot/module.cxx (renamed from Private/newBoot/netBootModule/module.cxx) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/.gitkeep (renamed from Private/newBoot/Source/.gitkeep) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/BootNotes.txt (renamed from Private/newBoot/Source/BootNotes.txt) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/.gitkeep (renamed from Private/newBoot/Source/Arch/AMD64/.gitkeep) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/ATA.cxx (renamed from Private/newBoot/Source/Arch/AMD64/ATA.cxx) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/ATA.hxx (renamed from Private/newBoot/Source/Arch/AMD64/ATA.hxx) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BIOSAllocApi.inc (renamed from Private/newBoot/Source/Arch/AMD64/BIOSAllocApi.inc) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BIOSApiGdt.inc (renamed from Private/newBoot/Source/Arch/AMD64/BIOSApiGdt.inc) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BIOSRuntime.cxx (renamed from Private/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BIOSRuntime0.asm (renamed from Private/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootAMD64.cxx (renamed from Private/newBoot/Source/Arch/AMD64/BootAMD64.cxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx (renamed from Private/newBoot/Source/Arch/AMD64/EFIApi.hxx) | 4 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx (renamed from Private/newBoot/Source/Arch/AMD64/EFIApiCrt0.cxx) | 12 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Processor.cxx (renamed from Private/newBoot/Source/Arch/AMD64/Processor.cxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/makefile (renamed from Private/newBoot/Source/Arch/AMD64/makefile) | 6 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/PowerPC/.gitkeep (renamed from Private/newBoot/Source/Arch/PowerPC/.gitkeep) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/.hgkeep (renamed from Private/newBoot/netBootModule/.hgkeep) | 0 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/API.cxx (renamed from Private/newBoot/Source/MPT/API.cxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/API.hxx (renamed from Private/newBoot/Source/MPT/API.hxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/Detail.hxx (renamed from Private/newBoot/Source/MPT/Detail.hxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/FileType.hxx (renamed from Private/newBoot/Source/MPT/FileType.hxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/MPT/MPT.hxx (renamed from Private/newBoot/Source/MPT/MPT.hxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/Start.cxx (renamed from Private/newBoot/Source/Start.cxx) | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile (renamed from Private/newBoot/Source/makefile) | 2 | ||||
| -rw-r--r-- | Private/Source/IndexableProperty.cxx (renamed from Private/Source/FilesystemIndexer.cxx) | 0 | ||||
| -rw-r--r-- | Private/Source/Network/IP.cpp | 11 | ||||
| -rw-r--r-- | Private/Source/NewFS-Journal.cxx | 1 | ||||
| -rw-r--r-- | Private/Source/ThreadLocalStorage.cxx | 6 |
41 files changed, 115 insertions, 52 deletions
diff --git a/Private/HALKit/AMD64/DebugManager.asm b/Private/HALKit/AMD64/DebugManager.asm index 6c0bf149..0c717039 100644 --- a/Private/HALKit/AMD64/DebugManager.asm +++ b/Private/HALKit/AMD64/DebugManager.asm @@ -8,7 +8,6 @@ ;; */ [global rt_debug_fence] -[global rt_debug_fence_end] [global __rt_debug_int_3] ;; //////////////////////////////////////////////////// ;; @@ -25,8 +24,10 @@ L0: jmp $ rt_debug_fence: - push __rt_debug_record_table + mov [__rt_debug_record_table], rsi + push rsi jmp [rbx] -rt_debug_fence_end: + pop rsi + ret ;; //////////////////////////////////////////////////// ;;
\ No newline at end of file diff --git a/Private/HALKit/AMD64/HalPageAlloc.cpp b/Private/HALKit/AMD64/HalPageAlloc.cpp index ccdfa8b6..07cfbecf 100644 --- a/Private/HALKit/AMD64/HalPageAlloc.cpp +++ b/Private/HALKit/AMD64/HalPageAlloc.cpp @@ -13,7 +13,7 @@ // this files handles paging. -static hCore::UIntPtr kPagePtr = 0x0900000; +static hCore::UIntPtr kPagePtr = kPagePtrAddress; static hCore::SizeT kPageCnt = 0UL; namespace hCore diff --git a/Private/HALKit/AMD64/HalPageAlloc.hpp b/Private/HALKit/AMD64/HalPageAlloc.hpp index 4f5f8592..06a883bf 100644 --- a/Private/HALKit/AMD64/HalPageAlloc.hpp +++ b/Private/HALKit/AMD64/HalPageAlloc.hpp @@ -19,6 +19,8 @@ #define PTE_ALIGN (4096) #endif //! PTE_ALIGN +#define kPagePtrAddress 0x0900000 + extern "C" void flush_tlb(hCore::UIntPtr VirtualAddr); extern "C" void write_cr3(hCore::UIntPtr pde); extern "C" void write_cr0(hCore::UIntPtr bit); diff --git a/Private/HALKit/AMD64/SMPCoreManager.asm b/Private/HALKit/AMD64/SMPCoreManager.asm index a528f847..ed56d7db 100644 --- a/Private/HALKit/AMD64/SMPCoreManager.asm +++ b/Private/HALKit/AMD64/SMPCoreManager.asm @@ -1,16 +1,25 @@ +;; /* +;; * ======================================================== +;; * +;; * hCore +;; * Copyright 2024 Mahrouss Logic, all rights reserved. +;; * +;; * ======================================================== +;; */ + [bits 64] [global rt_do_context_switch] [extern rt_debug_fence] -[extern rt_debug_fence_end] rt_do_context_switch: - mov rsi, [rt_do_context_switch] + mov rsi, [rt_do_context_switch_unprotected] call rt_debug_fence - mov rsi, rdi - mov rax, rsi - - call rt_debug_fence_end + iret - iret
\ No newline at end of file +rt_do_context_switch_unprotected: + mov [rdi+0], rax + mov [rdi+8], rbx + mov [rdi+16], rcx + ret
\ No newline at end of file diff --git a/Private/HALKit/AMD64/TIBInstall.asm b/Private/HALKit/AMD64/TIBInstall.asm new file mode 100644 index 00000000..69aa7503 --- /dev/null +++ b/Private/HALKit/AMD64/TIBInstall.asm @@ -0,0 +1,18 @@ +;; /* +;; * ======================================================== +;; * +;; * hCore +;; * Copyright 2024 Mahrouss Logic, all rights reserved. +;; * +;; * ======================================================== +;; */ + +[bits 64] + +[global rt_install_tib] + +rt_install_tib: + mov rsi, gs + ret + +;; //////////////////////////////////////////////////// ;;
\ No newline at end of file diff --git a/Private/KernelKit/FileManager.hpp b/Private/KernelKit/FileManager.hpp index 52dfb267..311527f9 100644 --- a/Private/KernelKit/FileManager.hpp +++ b/Private/KernelKit/FileManager.hpp @@ -77,10 +77,13 @@ namespace hCore }; + /** + * @brief Child of IFilesystemManager, takes care of managing NewFS disks. + */ class NewFilesystemManager final : public IFilesystemManager { public: - NewFilesystemManager(); + explicit NewFilesystemManager(); ~NewFilesystemManager() override; public: @@ -113,6 +116,11 @@ namespace hCore }; + /** + * Usable FileStream + * @tparam Encoding file encoding (char, wchar_t...) + * @tparam FSClass Filesystem contract who takes care of it. + */ template <typename Encoding = char, typename FSClass = NewFilesystemManager> class FileStream final { diff --git a/Private/KernelKit/ThreadLocalStorage.hxx b/Private/KernelKit/ThreadLocalStorage.hxx index 518adb32..8b3f2c9b 100644 --- a/Private/KernelKit/ThreadLocalStorage.hxx +++ b/Private/KernelKit/ThreadLocalStorage.hxx @@ -27,11 +27,25 @@ bool hcore_tls_delete_ptr(T* ptr); template <typename T, typename... Args> T* hcore_tls_new_class(Args&&... args); -//! @brief Cookie Sanity check. -hCore::Boolean hcore_tls_check(hCore::VoidPtr ptr); - typedef char rt_cookie_type[3]; +/// @brief Thread Information Block for Local Storage. +/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64) +struct ThreadInformationBlock final +{ + hCore::Char Name[255]; // Module Name + hCore::UIntPtr StartCode; // Start Address + hCore::UIntPtr StartData; // Allocation Heap + hCore::UIntPtr StartStack; // Stack Pointer. + hCore::Int32 Arch; // Architecture and/or platform. + rt_cookie_type Cookie; // Not shown in public header, this is the way we tell something went wrong. +}; + +//! @brief Cookie Sanity check. +hCore::Boolean hcore_tls_check(ThreadInformationBlock* ptr); + #include "ThreadLocalStorage.inl" +// last rev 1/27/24 + #endif /* ifndef _KERNELKIT_TLS_HPP */ diff --git a/Private/NetworkKit/IP.hpp b/Private/NetworkKit/IP.hpp index 7323296f..13fa0c9d 100644 --- a/Private/NetworkKit/IP.hpp +++ b/Private/NetworkKit/IP.hpp @@ -18,22 +18,19 @@ namespace hCore { class RawIPAddress6; class RawIPAddress; -class NetworkManager; +class IPFactory; class RawIPAddress final { private: - RawIPAddress(char bytes[4]); + explicit RawIPAddress(char bytes[4]); ~RawIPAddress() = default; RawIPAddress &operator=(const RawIPAddress &) = delete; RawIPAddress(const RawIPAddress &) = default; public: - char *Address() - { - return m_Addr; - } + char *Address(); char &operator[](const Size &index); @@ -43,14 +40,17 @@ class RawIPAddress final private: char m_Addr[4]; - friend NetworkManager; // it is the one creating these addresses, thus this + friend IPFactory; // it is the one creating these addresses, thus this // is why the constructors are private. }; +/** + * @brief IPv6 address. + */ class RawIPAddress6 final { private: - RawIPAddress6(char Bytes[8]); + explicit RawIPAddress6(char Bytes[8]); ~RawIPAddress6() = default; RawIPAddress6 &operator=(const RawIPAddress6 &) = delete; @@ -70,15 +70,18 @@ class RawIPAddress6 final private: char m_Addr[8]; - friend NetworkManager; + friend IPFactory; }; -class IPHelper +/** + * @brief IP Creation helpers + */ +class IPFactory final { public: static ErrorOr<StringView> ToStringView(Ref<RawIPAddress6> ipv6); static ErrorOr<StringView> ToStringView(Ref<RawIPAddress> ipv4); - static bool IpCheckV4(const char *ip); + static bool IpCheckVersion4(const char *ip); }; } // namespace hCore diff --git a/Private/newBoot/BootKit/Boot.hpp b/Private/NewBoot/BootKit/Boot.hpp index af86ce4c..7323737e 100644 --- a/Private/newBoot/BootKit/Boot.hpp +++ b/Private/NewBoot/BootKit/Boot.hpp @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/cxxKitModule/__cxxkit_unwind.cxx b/Private/NewBoot/CxxKit/__cxxkit_unwind.cxx index 477b6302..477b6302 100644 --- a/Private/newBoot/cxxKitModule/__cxxkit_unwind.cxx +++ b/Private/NewBoot/CxxKit/__cxxkit_unwind.cxx diff --git a/Private/newBoot/cxxKitModule/manifest.json b/Private/NewBoot/CxxKit/manifest.json index 42b5d166..42b5d166 100644 --- a/Private/newBoot/cxxKitModule/manifest.json +++ b/Private/NewBoot/CxxKit/manifest.json diff --git a/Private/newBoot/Source/MPT/.hgkeep b/Private/NewBoot/NetBoot/.hgkeep index e69de29b..e69de29b 100644 --- a/Private/newBoot/Source/MPT/.hgkeep +++ b/Private/NewBoot/NetBoot/.hgkeep diff --git a/Private/newBoot/netBootModule/manifest.json b/Private/NewBoot/NetBoot/manifest.json index 1a177877..1a177877 100644 --- a/Private/newBoot/netBootModule/manifest.json +++ b/Private/NewBoot/NetBoot/manifest.json diff --git a/Private/newBoot/netBootModule/module.cxx b/Private/NewBoot/NetBoot/module.cxx index 759e5cfe..759e5cfe 100644 --- a/Private/newBoot/netBootModule/module.cxx +++ b/Private/NewBoot/NetBoot/module.cxx diff --git a/Private/newBoot/Source/.gitkeep b/Private/NewBoot/Source/.gitkeep index e69de29b..e69de29b 100644 --- a/Private/newBoot/Source/.gitkeep +++ b/Private/NewBoot/Source/.gitkeep diff --git a/Private/newBoot/Source/BootNotes.txt b/Private/NewBoot/Source/BootNotes.txt index e09e9cce..e09e9cce 100644 --- a/Private/newBoot/Source/BootNotes.txt +++ b/Private/NewBoot/Source/BootNotes.txt diff --git a/Private/newBoot/Source/Arch/AMD64/.gitkeep b/Private/NewBoot/Source/HEL/AMD64/.gitkeep index e69de29b..e69de29b 100644 --- a/Private/newBoot/Source/Arch/AMD64/.gitkeep +++ b/Private/NewBoot/Source/HEL/AMD64/.gitkeep diff --git a/Private/newBoot/Source/Arch/AMD64/ATA.cxx b/Private/NewBoot/Source/HEL/AMD64/ATA.cxx index 7bcd304a..7bcd304a 100644 --- a/Private/newBoot/Source/Arch/AMD64/ATA.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/ATA.cxx diff --git a/Private/newBoot/Source/Arch/AMD64/ATA.hxx b/Private/NewBoot/Source/HEL/AMD64/ATA.hxx index 09cc4007..09cc4007 100644 --- a/Private/newBoot/Source/Arch/AMD64/ATA.hxx +++ b/Private/NewBoot/Source/HEL/AMD64/ATA.hxx diff --git a/Private/newBoot/Source/Arch/AMD64/BIOSAllocApi.inc b/Private/NewBoot/Source/HEL/AMD64/BIOSAllocApi.inc index 5b007434..5b007434 100644 --- a/Private/newBoot/Source/Arch/AMD64/BIOSAllocApi.inc +++ b/Private/NewBoot/Source/HEL/AMD64/BIOSAllocApi.inc diff --git a/Private/newBoot/Source/Arch/AMD64/BIOSApiGdt.inc b/Private/NewBoot/Source/HEL/AMD64/BIOSApiGdt.inc index be7a97e3..be7a97e3 100644 --- a/Private/newBoot/Source/Arch/AMD64/BIOSApiGdt.inc +++ b/Private/NewBoot/Source/HEL/AMD64/BIOSApiGdt.inc diff --git a/Private/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx b/Private/NewBoot/Source/HEL/AMD64/BIOSRuntime.cxx index a9cb4fe4..a9cb4fe4 100644 --- a/Private/newBoot/Source/Arch/AMD64/BIOSRuntime.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BIOSRuntime.cxx diff --git a/Private/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm b/Private/NewBoot/Source/HEL/AMD64/BIOSRuntime0.asm index f5ba44ec..f5ba44ec 100644 --- a/Private/newBoot/Source/Arch/AMD64/BIOSRuntime0.asm +++ b/Private/NewBoot/Source/HEL/AMD64/BIOSRuntime0.asm diff --git a/Private/newBoot/Source/Arch/AMD64/BootAMD64.cxx b/Private/NewBoot/Source/HEL/AMD64/BootAMD64.cxx index 0ed59ff0..daaa62ec 100644 --- a/Private/newBoot/Source/Arch/AMD64/BootAMD64.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootAMD64.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/Arch/AMD64/EFIApi.hxx b/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx index 23e7b088..a10efc38 100644 --- a/Private/newBoot/Source/Arch/AMD64/EFIApi.hxx +++ b/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== @@ -18,7 +18,7 @@ void newboot_mount_drive(const char* name); void newboot_boot_file(const char* path); /// @brief initializes xpm library. -void newboot_init_xpm(void); +void newboot_init_epm(void); /// @brief frees the xpm library, called when newboot_auto_mount/newboot_boot_file /// succeeds. diff --git a/Private/newBoot/Source/Arch/AMD64/EFIApiCrt0.cxx b/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx index dcfe84c2..23357681 100644 --- a/Private/newBoot/Source/Arch/AMD64/EFIApiCrt0.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== @@ -16,17 +16,17 @@ typedef EFI_STATUS(*EfiMainType)(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *Syste EFI_STATUS main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { InitializeLib(ImageHandle, SystemTable); - Print(L"newBoot: Booting from XPM...\r\n"); + Print(L"NewBoot: Booting from EPM...\r\n"); - newboot_init_xpm(); + newboot_init_epm(); //! these two should execute a program if any on it. - newboot_mount_drive("xpm:///system/"); - newboot_mount_drive("xpm:///efi/"); + newboot_mount_drive("epm:///system/"); + newboot_mount_drive("epm:///efi/"); newboot_fini_xpm(); - Print(L"newBoot: No auto-mount found.\r\n"); + Print(L"NewBoot: No auto-mount found.\r\n"); return EFI_LOAD_ERROR; } diff --git a/Private/newBoot/Source/Arch/AMD64/Processor.cxx b/Private/NewBoot/Source/HEL/AMD64/Processor.cxx index 50330e47..d2a0c15f 100644 --- a/Private/newBoot/Source/Arch/AMD64/Processor.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Processor.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * -* newBoot +* NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/Arch/AMD64/makefile b/Private/NewBoot/Source/HEL/AMD64/makefile index 21860551..576bb12b 100644 --- a/Private/newBoot/Source/Arch/AMD64/makefile +++ b/Private/NewBoot/Source/HEL/AMD64/makefile @@ -30,4 +30,8 @@ build-crt0-bios: .PHONY: all all: build-crt0-bios - @echo "Done (CRT-0)"
\ No newline at end of file + @echo "Done (CRT-0)" + +.PHONY: clean +clean: + rm -f $(wildcard *.o) $(wildcard *.bin)
\ No newline at end of file diff --git a/Private/newBoot/Source/Arch/PowerPC/.gitkeep b/Private/NewBoot/Source/HEL/PowerPC/.gitkeep index e69de29b..e69de29b 100644 --- a/Private/newBoot/Source/Arch/PowerPC/.gitkeep +++ b/Private/NewBoot/Source/HEL/PowerPC/.gitkeep diff --git a/Private/newBoot/netBootModule/.hgkeep b/Private/NewBoot/Source/MPT/.hgkeep index e69de29b..e69de29b 100644 --- a/Private/newBoot/netBootModule/.hgkeep +++ b/Private/NewBoot/Source/MPT/.hgkeep diff --git a/Private/newBoot/Source/MPT/API.cxx b/Private/NewBoot/Source/MPT/API.cxx index e607eecd..8c649024 100644 --- a/Private/newBoot/Source/MPT/API.cxx +++ b/Private/NewBoot/Source/MPT/API.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/MPT/API.hxx b/Private/NewBoot/Source/MPT/API.hxx index 3ce689e7..2ba9bc74 100644 --- a/Private/newBoot/Source/MPT/API.hxx +++ b/Private/NewBoot/Source/MPT/API.hxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/MPT/Detail.hxx b/Private/NewBoot/Source/MPT/Detail.hxx index 12212b01..31636b90 100644 --- a/Private/newBoot/Source/MPT/Detail.hxx +++ b/Private/NewBoot/Source/MPT/Detail.hxx @@ -1,7 +1,7 @@ /* * ======================================================== * -* newBoot +* NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/MPT/FileType.hxx b/Private/NewBoot/Source/MPT/FileType.hxx index fe0ff322..77408b25 100644 --- a/Private/newBoot/Source/MPT/FileType.hxx +++ b/Private/NewBoot/Source/MPT/FileType.hxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/MPT/MPT.hxx b/Private/NewBoot/Source/MPT/MPT.hxx index e8bbe7cd..c1b9c6a1 100644 --- a/Private/newBoot/Source/MPT/MPT.hxx +++ b/Private/NewBoot/Source/MPT/MPT.hxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/Start.cxx b/Private/NewBoot/Source/Start.cxx index 7c8b5e04..223fcc0f 100644 --- a/Private/newBoot/Source/Start.cxx +++ b/Private/NewBoot/Source/Start.cxx @@ -1,7 +1,7 @@ /* * ======================================================== * - * newBoot + * NewBoot * Copyright 2024 Mahrouss Logic, all rights reserved. * * ======================================================== diff --git a/Private/newBoot/Source/makefile b/Private/NewBoot/Source/makefile index 835e4afa..3273b52f 100644 --- a/Private/newBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -11,7 +11,7 @@ FLAG_GNU=-I../ -I../../../efiSDK/inc -c -ffreestanding -fno-rtti -fno-exceptions .PHONY: arch-amd64 arch-amd64: - $(CC_GNU) $(FLAG_GNU) Arch/AMD64/BootAMD64.cxx *.cxx + $(CC_GNU) $(FLAG_GNU) HEL/AMD64/BootAMD64.cxx *.cxx $(LD_GNU) *.o -e Main -Ttext 0x000 --oformat binary -o BootloaderStage2.bin .PHONY: clean diff --git a/Private/Source/FilesystemIndexer.cxx b/Private/Source/IndexableProperty.cxx index bb1393b5..bb1393b5 100644 --- a/Private/Source/FilesystemIndexer.cxx +++ b/Private/Source/IndexableProperty.cxx diff --git a/Private/Source/Network/IP.cpp b/Private/Source/Network/IP.cpp index 4a0b3011..ba6fd71f 100644 --- a/Private/Source/Network/IP.cpp +++ b/Private/Source/Network/IP.cpp @@ -12,6 +12,11 @@ namespace hCore { + char* RawIPAddress::Address() + { + return m_Addr; + } + RawIPAddress::RawIPAddress(char bytes[4]) { rt_copy_memory(bytes, m_Addr, 4); @@ -86,19 +91,19 @@ namespace hCore return true; } - ErrorOr<StringView> IPHelper::ToStringView(Ref<RawIPAddress6> ipv6) + ErrorOr<StringView> IPFactory::ToStringView(Ref<RawIPAddress6> ipv6) { auto str = StringBuilder::Construct(ipv6.Leak().Address()); return str; } - ErrorOr<StringView> IPHelper::ToStringView(Ref<RawIPAddress> ipv4) + ErrorOr<StringView> IPFactory::ToStringView(Ref<RawIPAddress> ipv4) { auto str = StringBuilder::Construct(ipv4.Leak().Address()); return str; } - bool IPHelper::IpCheckV4(const char *ip) + bool IPFactory::IpCheckVersion4(const char *ip) { int cnter = 0; diff --git a/Private/Source/NewFS-Journal.cxx b/Private/Source/NewFS-Journal.cxx index bc3a4345..9c96928d 100644 --- a/Private/Source/NewFS-Journal.cxx +++ b/Private/Source/NewFS-Journal.cxx @@ -7,7 +7,6 @@ * ======================================================== */ - #include <FSKit/NewFS.hxx> #include <KernelKit/DebugOutput.hpp> diff --git a/Private/Source/ThreadLocalStorage.cxx b/Private/Source/ThreadLocalStorage.cxx index 5cde1e77..5d231f61 100644 --- a/Private/Source/ThreadLocalStorage.cxx +++ b/Private/Source/ThreadLocalStorage.cxx @@ -21,11 +21,11 @@ Boolean hcore_tls_check(VoidPtr ptr) return _ptr[0] == kRTLMag0 && _ptr[1] == kRTLMag1 && _ptr[2] == kRTLMag2; } -Void hcore_tls_check_syscall_impl(VoidPtr ptr) noexcept +Void hcore_tls_check_syscall_impl(ThreadInformationBlock ptr) noexcept { - if (!hcore_tls_check(ptr)) + if (!hcore_tls_check(ptr.Cookie)) { - kcout << "TLS: TLS check failure, crashing...\n"; + kcout << "TLS: Verification failure, crashing...\n"; ProcessManager::Shared().Leak().GetCurrent().Leak().Crash(); } } |
