diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-29 09:05:36 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-29 09:05:36 +0100 |
| commit | b7f2a078b4284c3adc253f40bc54e733d27b6bd6 (patch) | |
| tree | 9eb5c6c0501278bcf1615ba59e7bb25a63bd4f1b /Private/Source/ThreadLocalStorage.cxx | |
| parent | 375fa68692447f6806264fc0339d26b691e2a1bb (diff) | |
HCoreKrnl: Start work on AHCI support. to add HCFS,EPM,GPT support to
the kernel.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/ThreadLocalStorage.cxx')
| -rw-r--r-- | Private/Source/ThreadLocalStorage.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Private/Source/ThreadLocalStorage.cxx b/Private/Source/ThreadLocalStorage.cxx index 9a9c8477..60d02efd 100644 --- a/Private/Source/ThreadLocalStorage.cxx +++ b/Private/Source/ThreadLocalStorage.cxx @@ -24,12 +24,13 @@ using namespace HCore; * @param ptr * @return if the cookie is enabled. */ + Boolean hcore_tls_check(VoidPtr ptr) { if (!ptr) return false; const char* _ptr = (const char*)ptr; - kcout << "Krnl\\TLS: Checking for cookie...\n"; + kcout << "HCoreKrnl\\TLS: Checking for cookie...\n"; return _ptr[0] == kCookieMag0 && _ptr[1] == kCookieMag1 && _ptr[2] == kCookieMag2; @@ -40,11 +41,13 @@ Boolean hcore_tls_check(VoidPtr ptr) { * @param ptr * @return */ -Void hcore_tls_check_syscall_impl(ThreadInformationBlock ptr) noexcept { - if (!hcore_tls_check(ptr.Cookie)) { - kcout << "Krnl\\TLS: Verification failure, Crashing...\n"; +EXTERN_C Void hcore_tls_check_syscall_impl(HCore::HAL::StackFramePtr stackPtr) noexcept { + ThreadInformationBlock* tib = (ThreadInformationBlock*)stackPtr->Gs; + + if (!hcore_tls_check(tib->Cookie)) { + kcout << "HCoreKrnl\\TLS: Verification failed, Crashing...\n"; ProcessManager::Shared().Leak().GetCurrent().Leak().Crash(); } - kcout << "Krnl\\TLS: Verification succeeded! Keeping on...\n"; + kcout << "HCoreKrnl\\TLS: Verification succeeded! Keeping on...\n"; } |
