Rev 4850 | Rev 5363 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4850 | Rev 5147 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2014. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2014. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 4850 $ |
8 | $Revision: 5147 $ |
9 | 9 | ||
10 | 10 | ||
Line 19... | Line 19... | ||
19 | mov esi, [esi+PCIDEV.fd] |
19 | mov esi, [esi+PCIDEV.fd] |
20 | cmp esi, pcidev_list |
20 | cmp esi, pcidev_list |
21 | jz find_IDE_controller_done |
21 | jz find_IDE_controller_done |
Line 22... | Line 22... | ||
22 | 22 | ||
23 | mov eax, [esi+PCIDEV.class] |
23 | mov eax, [esi+PCIDEV.class] |
24 | shr eax, 4 |
24 | ; shr eax, 4 |
- | 25 | ; cmp eax, 0x01018 |
|
- | 26 | shr eax, 7 |
|
25 | cmp eax, 0x01018 |
27 | cmp eax, 0x010180 shr 7 |
26 | jnz .loop |
28 | jnz .loop |
27 | ;-------------------------------------- |
29 | ;-------------------------------------- |
28 | .found: |
30 | .found: |
29 | mov eax, [esi+PCIDEV.class] |
31 | mov eax, [esi+PCIDEV.class] |
Line 360... | Line 362... | ||
360 | .set_interrupts_for_IDE_controllers: |
362 | .set_interrupts_for_IDE_controllers: |
361 | mov esi, boot_set_int_IDE |
363 | mov esi, boot_set_int_IDE |
362 | call boot_log |
364 | call boot_log |
363 | ;-------------------------------------- |
365 | ;-------------------------------------- |
364 | mov eax, [ecx+IDE_DATA.ProgrammingInterface] |
366 | mov eax, [ecx+IDE_DATA.ProgrammingInterface] |
365 | cmp ax, 0x0180 |
367 | ; cmp ax, 0x0180 |
366 | je .pata_ide |
368 | ; je .pata_ide |
Line 367... | Line 369... | ||
367 | 369 | ||
368 | cmp ax, 0x018a |
370 | ; cmp ax, 0x018a |
- | 371 | ; jne .sata_ide |
|
- | 372 | ||
- | 373 | test al, 1 ; 0 - legacy PCI mode, 1 - native PCI mode |
|
369 | jne .sata_ide |
374 | jnz .sata_ide |
370 | ;-------------------------------------- |
375 | ;-------------------------------------- |
371 | .pata_ide: |
376 | .pata_ide: |
372 | cmp [ecx+IDE_DATA.RegsBaseAddres], 0 |
377 | cmp [ecx+IDE_DATA.RegsBaseAddres], 0 |
Line 380... | Line 385... | ||
380 | pop ecx |
385 | pop ecx |
Line 381... | Line 386... | ||
381 | 386 | ||
382 | jmp .end_set_interrupts |
387 | jmp .end_set_interrupts |
383 | ;-------------------------------------- |
388 | ;-------------------------------------- |
384 | .sata_ide: |
389 | .sata_ide: |
385 | cmp ax, 0x0185 |
390 | ; cmp ax, 0x0185 |
Line 386... | Line 391... | ||
386 | je .sata_ide_1 |
391 | ; je .sata_ide_1 |
387 | 392 | ||
388 | cmp ax, 0x018f |
393 | ; cmp ax, 0x018f |
389 | jne .end_set_interrupts |
394 | ; jne .end_set_interrupts |
390 | ;-------------------------------------- |
395 | ;-------------------------------------- |
391 | .sata_ide_1: |
396 | ;.sata_ide_1: |
392 | ; Some weird controllers generate an interrupt even if IDE interrupts |
397 | ; Some weird controllers generate an interrupt even if IDE interrupts |
393 | ; are disabled and no IDE devices. For example, notebook ASUS K72F - |
398 | ; are disabled and no IDE devices. For example, notebook ASUS K72F - |
394 | ; IDE controller 010185 generates false interrupt when we work with |
399 | ; IDE controller 010185 generates false interrupt when we work with |