Rev 928 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 928 | Rev 996 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. 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: 928 $ |
8 | $Revision: 996 $ |
9 | 9 | ||
10 | 10 | ||
Line 476... | Line 476... | ||
476 | pop edx |
476 | pop edx |
477 | pop eax |
477 | pop eax |
478 | ret |
478 | ret |
Line 479... | Line 479... | ||
479 | 479 | ||
480 | iglobal |
480 | iglobal |
481 | align 4 |
481 | align 8 |
482 | ; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary |
482 | ; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary |
483 | IDE_descriptor_table: |
483 | IDE_descriptor_table: |
484 | dd IDE_DMA |
484 | dd IDE_DMA+(0x100000000-OS_BASE) |
485 | dw 0x2000 |
485 | dw 0x2000 |
Line 486... | Line 486... | ||
486 | dw 0x8000 |
486 | dw 0x8000 |
487 | 487 | ||
Line 577... | Line 577... | ||
577 | cmp [esp+4], edx |
577 | cmp [esp+4], edx |
578 | ja .notread |
578 | ja .notread |
579 | mov eax, [esp+4] |
579 | mov eax, [esp+4] |
580 | sub eax, [dma_cur_sector] |
580 | sub eax, [dma_cur_sector] |
581 | shl eax, 9 |
581 | shl eax, 9 |
582 | add eax, (OS_BASE+IDE_DMA) |
582 | add eax, IDE_DMA |
583 | push ecx esi edi |
583 | push ecx esi edi |
584 | mov esi, eax |
584 | mov esi, eax |
585 | shl edi, 9 |
585 | shl edi, 9 |
586 | ; add edi, HD_CACHE+0x10000 |
586 | ; add edi, HD_CACHE+0x10000 |
587 | push eax |
587 | push eax |
Line 596... | Line 596... | ||
596 | pop edx |
596 | pop edx |
597 | pop eax |
597 | pop eax |
598 | ret |
598 | ret |
599 | .notread: |
599 | .notread: |
600 | mov eax, IDE_descriptor_table |
600 | mov eax, IDE_descriptor_table |
601 | mov dword [eax], IDE_DMA |
601 | mov dword [eax], IDE_DMA+(0x100000000-OS_BASE) |
602 | mov word [eax+4], 0x2000 |
602 | mov word [eax+4], 0x2000 |
603 | sub eax, OS_BASE |
603 | sub eax, OS_BASE |
604 | mov dx, [IDEContrRegsBaseAddr] |
604 | mov dx, [IDEContrRegsBaseAddr] |
605 | cmp [hdbase], 0x1F0 |
605 | cmp [hdbase], 0x1F0 |
606 | jz @f |
606 | jz @f |
Line 692... | Line 692... | ||
692 | pusha |
692 | pusha |
693 | mov esi,[cache_chain_pos] |
693 | mov esi,[cache_chain_pos] |
694 | shl esi, 9 |
694 | shl esi, 9 |
695 | call calculate_cache_2 |
695 | call calculate_cache_2 |
696 | add esi,eax |
696 | add esi,eax |
697 | mov edi, (OS_BASE+IDE_DMA) |
697 | mov edi, IDE_DMA |
698 | mov dword [edx], IDE_DMA |
698 | mov dword [edx], IDE_DMA+(0x100000000-OS_BASE) |
699 | movzx ecx, [cache_chain_size] |
699 | movzx ecx, [cache_chain_size] |
700 | shl ecx, 9 |
700 | shl ecx, 9 |
701 | mov word [edx+4], cx |
701 | mov word [edx+4], cx |
702 | shr ecx,2 |
702 | shr ecx,2 |
703 | cld |
703 | cld |