From 70e95128b11dbb535e4679cbacb1cbeaa414c822 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 27 Jan 2024 10:26:31 +0100 Subject: Kernel: Improving AMD64 HAL, Add TIBInstall.asm, currently Working on SMPManager and Bootloader. Signed-off-by: Amlal El Mahrouss --- Private/Source/FilesystemIndexer.cxx | 28 ---------------------------- Private/Source/IndexableProperty.cxx | 28 ++++++++++++++++++++++++++++ Private/Source/Network/IP.cpp | 11 ++++++++--- Private/Source/NewFS-Journal.cxx | 1 - Private/Source/ThreadLocalStorage.cxx | 6 +++--- 5 files changed, 39 insertions(+), 35 deletions(-) delete mode 100644 Private/Source/FilesystemIndexer.cxx create mode 100644 Private/Source/IndexableProperty.cxx (limited to 'Private/Source') diff --git a/Private/Source/FilesystemIndexer.cxx b/Private/Source/FilesystemIndexer.cxx deleted file mode 100644 index bb1393b5..00000000 --- a/Private/Source/FilesystemIndexer.cxx +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ======================================================== - * - * hCore - * Copyright 2024 Mahrouss Logic, all rights reserved. - * - * ======================================================== - */ - -//! @brief hCore NewFS Indexer. - -#include -#include -#include -#include - -#define kMaxLenIndexer 256 - -namespace hCore -{ - namespace Indexer - { - IndexProperty& IndexableProperty::LeakProperty() noexcept { return fIndex; } - - void IndexableProperty::AddFlag(Int16 flag) { fFlags |= flag; } - void IndexableProperty::RemoveFlag(Int16 flag) { fFlags &= flag; } - } -} diff --git a/Private/Source/IndexableProperty.cxx b/Private/Source/IndexableProperty.cxx new file mode 100644 index 00000000..bb1393b5 --- /dev/null +++ b/Private/Source/IndexableProperty.cxx @@ -0,0 +1,28 @@ +/* + * ======================================================== + * + * hCore + * Copyright 2024 Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +//! @brief hCore NewFS Indexer. + +#include +#include +#include +#include + +#define kMaxLenIndexer 256 + +namespace hCore +{ + namespace Indexer + { + IndexProperty& IndexableProperty::LeakProperty() noexcept { return fIndex; } + + void IndexableProperty::AddFlag(Int16 flag) { fFlags |= flag; } + void IndexableProperty::RemoveFlag(Int16 flag) { fFlags &= flag; } + } +} 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 IPHelper::ToStringView(Ref ipv6) + ErrorOr IPFactory::ToStringView(Ref ipv6) { auto str = StringBuilder::Construct(ipv6.Leak().Address()); return str; } - ErrorOr IPHelper::ToStringView(Ref ipv4) + ErrorOr IPFactory::ToStringView(Ref 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 #include 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(); } } -- cgit v1.2.3