From 4dd686d6d5436b4197c613c570c5aa4a84fc1e80 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Thu, 28 Nov 2013 19:55:40 +0000 Subject: [PATCH] Additional fix to r.4307 git-svn-id: svn://kolibrios.org@4311 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 023df34d79..98067e9b3e 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -796,13 +796,6 @@ no_mode_0x12: add dx, 2 ;0x376 out dx, al @@: -; read status register and remove the interrupt request - mov dx, [IDE_BAR0_val] ;0x1F0 - add dx, 0x7 ;0x1F7 - in al, dx - mov dx, [IDE_BAR2_val] ;0x170 - add dx, 0x7 ;0x177 - in al, dx ;----------------------------------------------------------------------------- ;!!!!!!!!!!!!!!!!!!!!!!!!!! ; mov esi, boot_detectdisks @@ -888,7 +881,34 @@ end if mov [pci_access_enabled], 1 call pci_enum - +;----------------------------------------------------------------------------- + mov dx, [IDEContrRegsBaseAddr] +; test whether it is our interrupt? + add dx, 2 + in al, dx + test al, 100b + jz @f +; clear Bus Master IDE Status register +; clear Interrupt bit + out dx, al +@@: + add dx, 8 +; test whether it is our interrupt? + in al, dx + test al, 100b + jz @f +; clear Bus Master IDE Status register +; clear Interrupt bit + out dx, al +@@: +; read status register and remove the interrupt request + mov dx, [IDE_BAR0_val] ;0x1F0 + add dx, 0x7 ;0x1F7 + in al, dx + mov dx, [IDE_BAR2_val] ;0x170 + add dx, 0x7 ;0x177 + in al, dx +;----------------------------------------------------------------------------- include "detect/vortex86.inc" ; Vortex86 SoC detection code stdcall load_driver, szVidintel