summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/AMD64/Processor.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-16 09:51:24 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-16 10:08:17 +0200
commit5b2ec031ab578caec8fbbdbe5350b9c0df493fd3 (patch)
treea0aab7bea6ef32aaa48ece6bdf287974dd67c8eb /dev/kernel/HALKit/AMD64/Processor.h
parentb7c6e7aef4c2c647623520f65d78921841bdffaa (diff)
feat(kernel/ap): Improved and fixed the AP boot flow, also made sure that the segment
loading for the long mode stub works. TODO: - Stack pointer shall be set when jumping to AP routine. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/Processor.h')
-rw-r--r--dev/kernel/HALKit/AMD64/Processor.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/dev/kernel/HALKit/AMD64/Processor.h b/dev/kernel/HALKit/AMD64/Processor.h
index 1b2e35f7..8fb69c0c 100644
--- a/dev/kernel/HALKit/AMD64/Processor.h
+++ b/dev/kernel/HALKit/AMD64/Processor.h
@@ -19,6 +19,8 @@
#include <NewKit/Defines.h>
#include <NewKit/Utils.h>
+#include <HALKit/AMD64/CPUID.h>
+
#define kPITControlPort (0x43)
#define kPITChannel0Port (0x40)
#define kPITFrequency (1193180)
@@ -28,7 +30,8 @@
#define kPIC2Command (0xA0)
#define kPIC2Data (0xA1)
-#include <HALKit/AMD64/CPUID.h>
+#define kIOAPICRegVal (4)
+#define kIOAPICRegReg (0)
#define rtl_nop_op() asm volatile("nop")
@@ -229,16 +232,16 @@ namespace Detail {
};
} // namespace Detail
-class APICController final {
+class LAPICDmaWrapper final {
public:
- explicit APICController(VoidPtr base);
- ~APICController() = default;
+ explicit LAPICDmaWrapper(VoidPtr base);
+ ~LAPICDmaWrapper();
- NE_COPY_DEFAULT(APICController)
+ NE_COPY_DEFAULT(LAPICDmaWrapper)
public:
- UInt32 Read(UInt32 reg) noexcept;
- Void Write(UInt32 reg, UInt32 value) noexcept;
+ UInt32 Read(UInt16 reg) noexcept;
+ Void Write(UInt16 reg, UInt32 value) noexcept;
private:
VoidPtr fApic{nullptr};