diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-29 20:20:57 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-29 20:20:57 +0200 |
| commit | 77423c4fa55a060c5cf710bbe5c4de02fce43e97 (patch) | |
| tree | 9fd6308619a7ee4deca80c05d44fea2566d99da4 /Private/HALKit | |
| parent | a21859d722597e4eb1216a4a48d08d8f2659b514 (diff) | |
MHR-18: Fixing last bugs...
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
| -rw-r--r-- | Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp | 2 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 4 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/HalDebugOutput.cxx | 5 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/PCI/Dma.cxx | 2 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/Storage/AHCI.cxx | 2 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/Storage/ATA-PIO.cxx | 4 |
6 files changed, 13 insertions, 6 deletions
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp index 99a66532..288462ab 100644 --- a/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp +++ b/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp @@ -35,7 +35,7 @@ EXTERN_C void idt_handle_scheduler(NewOS::UIntPtr rsp) { /// schedule another process. if (!NewOS::ProcessHelper::StartScheduling()) { - NewOS::kcout << "New OS: Continue schedule this process...\r\n"; + NewOS::kcout << "New OS: Continue schedule this process...\r"; } } diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index 5c845812..917af45d 100644 --- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -93,13 +93,13 @@ STATIC MadtType* kApicInfoBlock = nullptr; /////////////////////////////////////////////////////////////////////////////////////// void hal_system_get_cores(voidPtr rsdPtr) { - kcout << "New OS: Constructing ACPIFactoryInterface...\r\n"; + 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\n"; + kcout << "New OS: Successfuly fetched the MADT!\r"; kApicInfoBlock = (MadtType*)kApicMadt; } else { MUST_PASS(false); diff --git a/Private/HALKit/AMD64/HalDebugOutput.cxx b/Private/HALKit/AMD64/HalDebugOutput.cxx index ed247875..95f6a3ce 100644 --- a/Private/HALKit/AMD64/HalDebugOutput.cxx +++ b/Private/HALKit/AMD64/HalDebugOutput.cxx @@ -68,7 +68,10 @@ EXTERN_C void ke_io_write(const char* bytes) { SizeT len = rt_string_len(bytes, 256); while (index < len) { - HAL::Out8(Detail::PORT, bytes[index]); + if (bytes[index] == '\r') + HAL::Out8(Detail::PORT, '\r'); + + HAL::Out8(Detail::PORT, bytes[index] == '\r' ? '\n' : bytes[index]); ++index; } diff --git a/Private/HALKit/AMD64/PCI/Dma.cxx b/Private/HALKit/AMD64/PCI/Dma.cxx index f0a10eb9..96063b14 100644 --- a/Private/HALKit/AMD64/PCI/Dma.cxx +++ b/Private/HALKit/AMD64/PCI/Dma.cxx @@ -52,7 +52,7 @@ OwnPtr<IOBuf<Char *>> DMAFactory::Construct(OwnPtr<DMAWrapper> &dma) { if (!dmaOwnPtr) return {}; - kcout << "Returning the new OwnPtr<IOBuf<Char*>>!\r\n"; + kcout << "Returning the new OwnPtr<IOBuf<Char*>>!\r"; return dmaOwnPtr; } diff --git a/Private/HALKit/AMD64/Storage/AHCI.cxx b/Private/HALKit/AMD64/Storage/AHCI.cxx index 80224d89..7c2bc0f6 100644 --- a/Private/HALKit/AMD64/Storage/AHCI.cxx +++ b/Private/HALKit/AMD64/Storage/AHCI.cxx @@ -36,7 +36,7 @@ NewOS::Boolean drv_std_init(NewOS::UInt16& PortsImplemented) { iterator[devIndex].Leak().EnableMmio(); /// enable the memory i/o for this ahci device. kAhciDevice = iterator[devIndex].Leak(); /// and then leak the reference. - kcout << "New Kernel: [PCI] Found AHCI controller.\r\n"; + kcout << "New Kernel: [PCI] Found AHCI controller.\r"; return true; } diff --git a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx index 9b37e248..6dafb5e5 100644 --- a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx +++ b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx @@ -123,6 +123,8 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, Buf[IndexOff] = In16(IO + ATA_REG_DATA); drv_std_wait_io(IO); } + + drv_std_wait_io(IO); } Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, @@ -153,6 +155,8 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, Out16(IO + ATA_REG_DATA, Buf[IndexOff]); drv_std_wait_io(IO); } + + drv_std_wait_io(IO); } /// @brief is ATA detected? |
