392,7 → 392,7 |
save_hd_wait_timeout: |
|
push eax |
mov eax,[timer_ticks];[0xfdf0] |
mov eax,[timer_ticks] |
add eax,300 ; 3 sec timeout |
mov [hd_wait_timeout],eax |
pop eax |
403,7 → 403,7 |
|
push eax |
mov eax,[hd_wait_timeout] |
cmp [timer_ticks], eax ;[0xfdf0],eax |
cmp [timer_ticks], eax |
jg hd_timeout_error |
pop eax |
mov [hd_error],0 |
423,7 → 423,7 |
; mov esi,hd_timeout_str |
; call sys_msg_board_str |
DEBUGF 1,"K : FS - HD timeout\n" |
; jmp $ |
|
mov [hd_error],1 |
pop eax |
ret |
574,9 → 574,9 |
align 4 |
; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary |
IDE_descriptor_table: |
dd OS_BASE+284000h |
dw 2000h |
dw 8000h |
dd 0x284000 |
dw 0x2000 |
dw 0x8000 |
|
dma_cur_sector dd not 40h |
irq14_func dd hdd_irq_null |
617,7 → 617,7 |
mov [dma_slot_ptr], eax |
mov [CURRENT_TASK], ebx |
mov [TASK_BASE], edi |
mov byte [0xFFFF], 1 |
mov byte [DONT_SWITCH], 1 |
call do_change_task |
.noswitch: |
popad |
648,7 → 648,7 |
mov [dma_slot_ptr], eax |
mov [CURRENT_TASK], ebx |
mov [TASK_BASE], edi |
mov byte [0xFFFF], 1 |
mov byte [DONT_SWITCH], 1 |
call do_change_task |
.noswitch: |
popad |
681,9 → 681,10 |
pop eax |
ret |
.notread: |
mov eax, IDE_descriptor_table-OS_BASE |
mov dword [eax+OS_BASE], 0x284000 |
mov word [eax+4+OS_BASE], 0x2000 |
mov eax, IDE_descriptor_table |
mov dword [eax], 0x284000 |
mov word [eax+4], 0x2000 |
sub eax, OS_BASE |
mov dx, [IDEContrRegsBaseAddr] |
cmp [hdbase], 0x1F0 |
jz @f |
766,7 → 767,7 |
mov eax, IDE_descriptor_table |
mov edx, [cache_chain_pos] |
shl edx, 9 |
add edx, OS_BASE+0x610000 |
add edx, 0x610000 |
mov [eax], edx |
movzx edx, [cache_chain_size] |
shl edx, 9 |
777,10 → 778,11 |
mov eax, IDE_descriptor_table |
mov edx, edi |
shl edx, 9 |
add edx, OS_BASE+0x610000 |
add edx, 0x610000 |
mov [eax], edx |
mov word [eax+4], 0x200 |
do_write_dma: |
sub eax, OS_BASE |
mov dx, [IDEContrRegsBaseAddr] |
cmp [hdbase], 0x1F0 |
jz @f |