From 2529c8722d6d3491a3e19aa728f4bfce099bcc91 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 29 Jan 2024 09:55:05 +0100 Subject: Kernel: Improve BootKit and EFIKit. TODO: Add File Protocol support and Pool support for EFIKit. Signed-off-by: Amlal El Mahrouss --- Private/KernelKit/ThreadLocalStorage.hxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Private/KernelKit/ThreadLocalStorage.hxx') diff --git a/Private/KernelKit/ThreadLocalStorage.hxx b/Private/KernelKit/ThreadLocalStorage.hxx index afd0afb3..8fc8b9dd 100644 --- a/Private/KernelKit/ThreadLocalStorage.hxx +++ b/Private/KernelKit/ThreadLocalStorage.hxx @@ -18,14 +18,11 @@ #define kCookieMag1 'C' #define kCookieMag2 'o' -template -T* hcore_tls_new_ptr(void); +template T *hcore_tls_new_ptr(void); -template -bool hcore_tls_delete_ptr(T* ptr); +template bool hcore_tls_delete_ptr(T *ptr); -template -T* hcore_tls_new_class(Args&&... args); +template T *hcore_tls_new_class(Args &&...args); typedef char rt_cookie_type[3]; @@ -33,19 +30,22 @@ typedef char rt_cookie_type[3]; /// 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::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. + 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); +/// @brief TLS install TIB +extern void rt_install_tib(ThreadInformationBlock *pTib); + +///! @brief Cookie Sanity check. +hCore::Boolean hcore_tls_check(ThreadInformationBlock *ptr); #include "ThreadLocalStorage.inl" -// last rev 1/27/24 +// last rev 1/29/24 #endif /* ifndef _KERNELKIT_TLS_HPP */ -- cgit v1.2.3