summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalDescriptorLoader.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-09 08:37:29 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-09 08:37:29 +0100
commit3e607e871b1b20e14527845a511ae2a6739fcaac (patch)
tree973c617f634367af2229e2ad2c10bce3e3df6aaa /Private/HALKit/AMD64/HalDescriptorLoader.cpp
parent5bf99218f0cad958868e662cf99192811060f95f (diff)
See below.
- HCoreKrnl: - Improve interrupt handler for AMD64 targets. - Wrapped AHCI and PE types into a namespace. - Replace L0 with the label MainLoop. - Reworked C++Kit and NetBoot modules. - Put INewFSIterator constructor as explicit. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/HALKit/AMD64/HalDescriptorLoader.cpp')
-rw-r--r--Private/HALKit/AMD64/HalDescriptorLoader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Private/HALKit/AMD64/HalDescriptorLoader.cpp b/Private/HALKit/AMD64/HalDescriptorLoader.cpp
index a68fb54a..1dbe8e9e 100644
--- a/Private/HALKit/AMD64/HalDescriptorLoader.cpp
+++ b/Private/HALKit/AMD64/HalDescriptorLoader.cpp
@@ -25,11 +25,12 @@ STATIC ::HCore::Detail::AMD64::InterruptDescriptorAMD64
void IDTLoader::Load(Register64 &idt) {
volatile ::HCore::UIntPtr **baseIdt = (volatile ::HCore::UIntPtr **)idt.Base;
+
MUST_PASS(baseIdt);
-
- MUST_PASS(baseIdt[0]);
-
+
for (UInt16 i = 0; i < kKernelIdtSize; i++) {
+ MUST_PASS(baseIdt[i]);
+
kInterruptVectorTable[i].Selector = kGdtCodeSelector;
kInterruptVectorTable[i].Ist = 0x0;
kInterruptVectorTable[i].TypeAttributes = kInterruptGate;
@@ -40,10 +41,9 @@ void IDTLoader::Load(Register64 &idt) {
kInterruptVectorTable[i].Zero = 0x0;
}
- kRegIdt.Base = (UIntPtr)kInterruptVectorTable;
+ kRegIdt.Base = reinterpret_cast<UIntPtr>(kInterruptVectorTable);
kRegIdt.Limit = sizeof(::HCore::Detail::AMD64::InterruptDescriptorAMD64) *
- kKernelIdtSize -
- 1;
+ (kKernelIdtSize - 1);
rt_load_idt(kRegIdt);