summaryrefslogtreecommitdiffhomepage
path: root/Public
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-27 10:26:31 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-27 10:26:31 +0100
commit70e95128b11dbb535e4679cbacb1cbeaa414c822 (patch)
tree42fd94536a54058a39f0c85be99431c6ad1a0cf8 /Public
parent44a081a4442181b208c09c6f748124c9d23b61fd (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 'Public')
-rw-r--r--Public/SDK/DriverKit/HW.hxx (renamed from Public/SDK/DriverKit/HWInterface.hpp)19
-rw-r--r--Public/SDK/DriverKit/TIB.hxx41
2 files changed, 51 insertions, 9 deletions
diff --git a/Public/SDK/DriverKit/HWInterface.hpp b/Public/SDK/DriverKit/HW.hxx
index d1824c67..14dd3cf2 100644
--- a/Public/SDK/DriverKit/HWInterface.hpp
+++ b/Public/SDK/DriverKit/HW.hxx
@@ -9,24 +9,23 @@
#pragma once
-#include <CompilerKit/Compiler.hpp>
-#include <NewKit/Defines.hpp>
+#include <Private/CompilerKit/Compiler.hpp>
+#include <Private/NewKit/Defines.hpp>
namespace h-core
{
- // h-core HardWare Interface.
- // Purpose: Provides a gentle way to initialize, dispose, send and receive hardware data.
- class HWInterface
+ /// @brief Provides a gentle way to initialize, dispose, send and receive hardware data.
+ class HardwareInterface
{
public:
- HWInterface() = default;
- virtual ~HWInterface() = default;
+ explicit HardwareInterface() ={ this->Initialize(); }
+ virtual ~HardwareInterface() { this->Dispose(); }
public:
- HCORE_COPY_DEFAULT(HWInterface);
+ HCORE_COPY_DEFAULT(HardwareInterface);
public:
- virtual const char* Name() { return "Unimplemented Hardware."; }
+ virtual const char* Name() { return "Generic HW."; }
public:
virtual void Initialize() {}
@@ -42,3 +41,5 @@ namespace h-core
};
}
+
+// last rev 1/27/24 \ No newline at end of file
diff --git a/Public/SDK/DriverKit/TIB.hxx b/Public/SDK/DriverKit/TIB.hxx
new file mode 100644
index 00000000..3a1c038b
--- /dev/null
+++ b/Public/SDK/DriverKit/TIB.hxx
@@ -0,0 +1,41 @@
+/*
+* ========================================================
+*
+* h-core
+* Copyright Mahrouss Logic, all rights reserved.
+*
+* ========================================================
+*/
+
+//
+// Created by Amlal on 1/27/24.
+//
+
+#ifndef HCORE_TIB_HXX
+#define HCORE_TIB_HXX
+
+#include <Private/NewKit/Defines.hpp>
+
+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 TIB_NAME[255]; // Module Name
+ const UIntPtr TIB_START; // Start Address
+ const UIntPtr TIB_ALLOC; // Allocation Heap
+ const UIntPtr TIB_STACK; // Stack Pointer.
+ const Int32 TIB_ARCH; // Architecture and/or platform.
+ };
+
+ enum
+ {
+ kPC_IA64,
+ kPC_ARM,
+ kMACS_64x0,
+ kMACS_32x0,
+ };
+}
+
+#endif // HCORE_TIB_HXX