From 6306a83beaa8df685417ecd65b7647d58cd6528d Mon Sep 17 00:00:00 2001 From: Morten Delenk Date: Tue, 15 Mar 2016 21:48:57 +0100 Subject: [PATCH] Added software reset to the block device --- kernel/hal/x86/blk/BlockDevice.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/hal/x86/blk/BlockDevice.cpp b/kernel/hal/x86/blk/BlockDevice.cpp index 0faa353..cef07da 100644 --- a/kernel/hal/x86/blk/BlockDevice.cpp +++ b/kernel/hal/x86/blk/BlockDevice.cpp @@ -43,7 +43,12 @@ namespace MTGosHAL { for(int i=0;i<8;i++) { if(!(existent&(1<>1],0x40); + inb(ataports[i>>1]+CMD); + inb(ataports[i>>1]+CMD); + inb(ataports[i>>1]+CMD); + inb(ataports[i>>1]+CMD); + outb(commports[i>>1],0x00); } } auto BlockDevice::getDriveCnt() -> uint8_t {return numDevices;}