summaryrefslogtreecommitdiffhomepage
path: root/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-09 19:23:04 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-09 19:23:04 +0200
commit915c14eb3b717bbd168d069e296a4246c6aef117 (patch)
treeb01b1e9a522b66bc070fb0e5b34efc70f172cc92 /Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
parentaf8a516fc22865abd80d6e26f1541fa3d6bebfdc (diff)
MHR-23: Starting to implement SMP for AMD64.
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.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index 2129d790..ec6d47da 100644
--- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -23,12 +23,12 @@ namespace NewOS::HAL
constexpr Int32 kThreadBoot = 4;
/*
- *
- * this is used to store info about the current running thread
- * we use this struct to determine if we can use it, or mark it as used or on
- * sleep.
- *
- */
+ *
+ * this is used to store info about the current running thread
+ * we use this struct to determine if we can use it, or mark it as used or on
+ * sleep.
+ *
+ */
struct ProcessorInfoAMD64 final
{
@@ -51,12 +51,12 @@ namespace NewOS::HAL
{
struct MadtAddress final
{
+ UInt32 fAddress;
UInt32 fFlags; // 1 = Dual Legacy PICs installed
- UInt32 fPhysicalAddress;
Char fType;
Char fRecLen; // record length
- } Madt[];
+ } fMadt[];
};
struct MadtProcessorLocalApic final
@@ -104,20 +104,23 @@ namespace NewOS::HAL
void hal_system_get_cores(voidPtr rsdPtr)
{
- kcout << "New OS: Constructing ACPIFactoryInterface...\r";
-
auto acpi = ACPIFactoryInterface(rsdPtr);
kApicMadt = acpi.Find(kApicSignature).Leak().Leak();
if (kApicMadt)
{
- kcout << "New OS: Successfuly fetched the MADT!\r";
+ kcout << "New OS: Successfuly fetched the cores!\r";
kApicInfoBlock = (MadtType*)kApicMadt;
+
+ kcout << "New OS: Revision: ";
+ kcout.HexNumber(kApicInfoBlock->Revision).EndLine();
+
+ ke_stop(RUNTIME_CHECK_BOOTSTRAP);
}
- else
- {
- MUST_PASS(false);
- }
+ else
+ {
+ ke_stop(RUNTIME_CHECK_BOOTSTRAP);
+ }
}
} // namespace NewOS::HAL