From bb7366e80ad639c007c0a06abd22c6207a9da659 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Tue, 9 Jul 2013 00:34:01 +0000 Subject: [PATCH] Additional check for IDE controllers git-svn-id: svn://kolibrios.org@3785 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/detect/dev_hdcd.inc | 3 +++ kernel/trunk/kernel.asm | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/trunk/detect/dev_hdcd.inc b/kernel/trunk/detect/dev_hdcd.inc index a09eefaee..b4b0552c1 100644 --- a/kernel/trunk/detect/dev_hdcd.inc +++ b/kernel/trunk/detect/dev_hdcd.inc @@ -17,6 +17,9 @@ $Revision$ ;**************************************************** ;* ПОИСК HDD и CD * ;**************************************************** + cmp [IDEContrProgrammingInterface], 0 + je EndFindHDD + FindHDD: mov [ChannelNumber], 1 mov [DiskNumber], 0 diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 0e32e2400..ae534d332 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -755,12 +755,15 @@ no_mode_0x12: mov esi, boot_enableirq call boot_log -; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15) +; Enable timer IRQ (IRQ0) and co-processor IRQ (IRQ13) ; they are used: when partitions are scanned, hd_read relies on timer call unmask_timer stdcall enable_irq, 2 ; @#$%! PIC stdcall enable_irq, 13 ; co-processor + cmp [IDEContrProgrammingInterface], 0 + je @f + mov esi, boot_disabling_ide call boot_log ;-------------------------------------- @@ -776,6 +779,7 @@ no_mode_0x12: mov dx, [IDE_BAR3_val] ;0x374 add dx, 2 ;0x376 out dx, al +@@: ;----------------------------------------------------------------------------- ;!!!!!!!!!!!!!!!!!!!!!!!!!! ; mov esi, boot_detectdisks @@ -1111,6 +1115,8 @@ end if cmp [IDEContrRegsBaseAddr], 0 setnz [dma_hdd] + cmp [IDEContrProgrammingInterface], 0 + je set_interrupts_for_IDE_controllers.continue ;----------------------------------------------------------------------------- ; set interrupts for IDE Controller ;-----------------------------------------------------------------------------