diff options
| author | amlal <amlal@el-mahrouss-logic.com> | 2024-03-17 07:25:31 +0100 |
|---|---|---|
| committer | amlal <amlal@el-mahrouss-logic.com> | 2024-03-17 07:25:31 +0100 |
| commit | 45548d516ddf5e88bf80940365d151e1bd69c29f (patch) | |
| tree | f7347078e07a9d524e874f7f6c23622d538064bc /Private/Drivers | |
| parent | a4d4de6913fb7dd54847b0e5a004c3100bc02459 (diff) | |
HCR-14: A series of important fixes and improvements regarding the
kernel.
Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/Drivers')
| -rw-r--r-- | Private/Drivers/AHCI/Defines.hxx | 8 | ||||
| -rw-r--r-- | Private/Drivers/PS2/PS2KernelMouse.hxx | 23 |
2 files changed, 15 insertions, 16 deletions
diff --git a/Private/Drivers/AHCI/Defines.hxx b/Private/Drivers/AHCI/Defines.hxx index f3b93660..c1d3c063 100644 --- a/Private/Drivers/AHCI/Defines.hxx +++ b/Private/Drivers/AHCI/Defines.hxx @@ -313,10 +313,4 @@ typedef struct HbaCmdTbl final { HbaPrdtEntry prdtEntries[1]; // Physical region descriptor table entries, 0 ~ 65535 } HbaCmdTbl; -/* - * - * - * - * - * - */ +/* EOF */ diff --git a/Private/Drivers/PS2/PS2KernelMouse.hxx b/Private/Drivers/PS2/PS2KernelMouse.hxx index ecfc0459..e78bd97f 100644 --- a/Private/Drivers/PS2/PS2KernelMouse.hxx +++ b/Private/Drivers/PS2/PS2KernelMouse.hxx @@ -32,25 +32,30 @@ class PS2KernelMouse final { this->Write(0xFF); + HAL::Out8(0x64, 0xA8); + this->Wait(); HAL::Out8(0x64, 0x20); - this->Wait(); + this->WaitInput(); - auto status = HAL::In8(0x60); + UInt8 dataStatus = HAL::In8(0x60); - status |= 0x12; + dataStatus |= 0b10; this->Wait(); - - HAL::Out8(0x64, 0x60); - this->Wait(); - - HAL::Out8(0x60, status); + HAL::Out8(0x60, dataStatus); + + this->Write(0xF6); + auto f6Dat = this->Read(); + + this->Write(0xF4); + auto f4Dat = this->Read(); - HCore::kcout << "HCoreKrnl.exe: PS/2 mouse is OK.\r\n"; + HCore::kcout << "HCoreKrnl.exe: PS/2 mouse is OK: " << hex_number(f6Dat); + HCore::kcout << ", " << hex_number(f4Dat) << end_line(); } private: |
