From b5ea4be45949b4592879ae35bd15cc3b35ac9ff5 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Tue, 18 Jun 2024 23:21:07 +0200 Subject: MHR-31: Fix code quality. Signed-off-by: Amlal EL Mahrouss --- Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx | 7 ++++++- Kernel/HALKit/AMD64/HalKernelMain.cxx | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'Kernel/HALKit') diff --git a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx index 057ba61b..a8d0d8d7 100644 --- a/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/Kernel/HALKit/AMD64/HalACPIFactoryInterface.cxx @@ -32,9 +32,14 @@ namespace NewOS /// You have to parse the MADT! - ACPIFactoryInterface::ACPIFactoryInterface(voidPtr rsdPtr) + ACPIFactoryInterface::ACPIFactoryInterface(VoidPtr rsdPtr) : fRsdp(rsdPtr), fEntries(0) { +#ifdef __DEBUG__ + kcout << "newoskrnl: ACPI: init interface.\r"; +#else + +#endif } Void ACPIFactoryInterface::Shutdown() diff --git a/Kernel/HALKit/AMD64/HalKernelMain.cxx b/Kernel/HALKit/AMD64/HalKernelMain.cxx index 701439f1..8c4a05dc 100644 --- a/Kernel/HALKit/AMD64/HalKernelMain.cxx +++ b/Kernel/HALKit/AMD64/HalKernelMain.cxx @@ -106,7 +106,7 @@ EXTERN_C void hal_init_platform( kSyscalls[cNewInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { /// get HAC struct. - HeapAllocInfo* rdxInf = (HeapAllocInfo*)rdx; + HeapAllocInfo* rdxInf = reinterpret_cast(rdx); /// assign the fThe field with the pointer. rdxInf->fThe = NewOS::ProcessScheduler::The().Leak().TheCurrent().Leak().New(rdxInf->fTheSz); @@ -114,14 +114,14 @@ EXTERN_C void hal_init_platform( kSyscalls[cDeleteInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { /// get HAC struct. - HeapAllocInfo* rdxInf = (HeapAllocInfo*)rdx; + HeapAllocInfo* rdxInf = reinterpret_cast(rdx); /// delete ptr with sz in mind. NewOS::ProcessScheduler::The().Leak().TheCurrent().Leak().Delete(rdxInf->fThe, rdxInf->fTheSz); }; kSyscalls[cTlsInstallInterrupt].Leak().Leak()->fProc = [](NewOS::VoidPtr rdx)->void { - ProcessBlockInfo* rdxPb = (ProcessBlockInfo*)rdx; + ProcessBlockInfo* rdxPb = reinterpret_cast(rdx); /// install the process's fTIB and fPIB. rt_install_tib(rdxPb->fTIB, rdxPb->fPIB); -- cgit v1.2.3