summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-10 07:06:43 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-10 07:06:43 +0200
commit84b0e780dfd9272b177c32cc3bb99f37bb88304d (patch)
tree44d596f6511eae83b8762aa42550b100d5646de6 /Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
parent915c14eb3b717bbd168d069e296a4246c6aef117 (diff)
MHR-23: Getting SMP to work...
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp')
-rw-r--r--Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp58
1 files changed, 27 insertions, 31 deletions
diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index ec6d47da..470a3286 100644
--- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -46,54 +46,54 @@ namespace NewOS::HAL
STATIC voidPtr kApicMadt = nullptr;
STATIC const char* kApicSignature = "APIC";
- /// @brief Multiple APIC descriptor table.
+ /// @brief Multiple APIC Descriptor Table.
struct MadtType final : public SDT
{
struct MadtAddress final
{
- UInt32 fAddress;
- UInt32 fFlags; // 1 = Dual Legacy PICs installed
-
- Char fType;
- Char fRecLen; // record length
- } fMadt[];
+ Char RecordType;
+ Char RecordLen; // record length
+
+ UInt32 Address;
+ UInt32 Flags; // 1 = Dual Legacy PICs installed
+ } MadtRecords[];
};
struct MadtProcessorLocalApic final
{
- Char fProcessorId;
- Char fApicId;
- UInt32 fFlags;
+ Char AcpiProcessorId;
+ Char Reserved;
+ UInt32 Flags;
};
struct MadtIOApic final
{
- Char fApicId;
- Char fReserved;
- UInt32 fAddress;
- UInt32 fSystemInterruptBase;
+ Char ApicId;
+ Char Reserved;
+ UInt32 Address;
+ UInt32 SystemInterruptBase;
};
struct MadtInterruptSource final
{
- Char fBusSource;
- Char fIrqSource;
- UInt32 fGSI;
- UInt16 fFlags;
+ Char BusSource;
+ Char IrqSource;
+ UInt32 GSI;
+ UInt16 Flags;
};
struct MadtInterruptNmi final
{
- Char fNmiSource;
- Char fReserved;
- UInt16 fFlags;
- UInt32 fGSI;
+ Char NmiSource;
+ Char Reserved;
+ UInt16 Flags;
+ UInt32 GSI;
};
struct MadtLocalApicAddressOverride final
{
- UInt16 fResvered;
- UIntPtr fAddress;
+ UInt16 Resvered;
+ UIntPtr Address;
};
///////////////////////////////////////////////////////////////////////////////////////
@@ -109,17 +109,13 @@ namespace NewOS::HAL
if (kApicMadt)
{
- kcout << "New OS: Successfuly fetched the cores!\r";
+ kcout << "New OS: APIC is present...\r";
kApicInfoBlock = (MadtType*)kApicMadt;
-
- kcout << "New OS: Revision: ";
- kcout.HexNumber(kApicInfoBlock->Revision).EndLine();
-
- ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
else
{
- ke_stop(RUNTIME_CHECK_BOOTSTRAP);
+ kcout << "New OS: APIC is not present! it is a vital component.\r";
+ ke_stop(RUNTIME_CHECK_FAILED);
}
}
} // namespace NewOS::HAL