From fc55f0d69d24fb4908cbd811681f2c3fac53614d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 31 Jan 2024 09:42:54 +0100 Subject: kernel: add GKit, improve AMD64 HAL. Signed-off-by: Amlal El Mahrouss --- Public/Kits/SystemKit/ThreadAPI.hxx | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Public/Kits/SystemKit/ThreadAPI.hxx (limited to 'Public/Kits/SystemKit/ThreadAPI.hxx') diff --git a/Public/Kits/SystemKit/ThreadAPI.hxx b/Public/Kits/SystemKit/ThreadAPI.hxx new file mode 100644 index 00000000..a9490033 --- /dev/null +++ b/Public/Kits/SystemKit/ThreadAPI.hxx @@ -0,0 +1,39 @@ +/* + * ======================================================== + * + * h-core + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +// +// Created by Amlal on 1/27/24. +// + +#ifndef __THREAD_API__ +#define __THREAD_API__ + +#include + +namespace HCore { +/// @brief Thread Information Block for Local Storage. +/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64) +struct ThreadInformationBlock final { + const Char NAME[255]; // Module Name + const UIntPtr START_ADDRESS; // Start Address + const UIntPtr START_ALLOC; // Allocation Heap + const UIntPtr START_STACK; // Stack Pointer. + const Int32 ARCH; // Architecture and/or platform. +}; + +enum { + kPC_IA64, + kPC_AMD64 = kPC_IA64, + kPC_ARM, + kMACS_64x0, + kMACS_32x0, +}; +} // namespace HCore + +#endif // __THREAD_API__ -- cgit v1.2.3