From 3e607e871b1b20e14527845a511ae2a6739fcaac Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 9 Mar 2024 08:37:29 +0100 Subject: 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 --- Private/HALKit/AMD64/HalDescriptorLoader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Private/HALKit/AMD64/HalDescriptorLoader.cpp') 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(kInterruptVectorTable); kRegIdt.Limit = sizeof(::HCore::Detail::AMD64::InterruptDescriptorAMD64) * - kKernelIdtSize - - 1; + (kKernelIdtSize - 1); rt_load_idt(kRegIdt); -- cgit v1.2.3