forked from KolibriOS/kolibrios
Elimination of hangup after the expiration hd_wait_timeou
git-svn-id: svn://kolibrios.org@74 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a939e78130
commit
9d76fed06e
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,8 @@
|
|||||||
;; ;;
|
;; ;;
|
||||||
;; System service for filesystem call ;;
|
;; System service for filesystem call ;;
|
||||||
;; (C) 2004 Ville Turjanmaa, License: GPL ;;
|
;; (C) 2004 Ville Turjanmaa, License: GPL ;;
|
||||||
;; ;;
|
;; 29.04.2006 Elimination of hangup after the ;;
|
||||||
|
;; expiration hd_wait_timeout (for LBA) - Mario79 ;;
|
||||||
;; xx.04.2006 LFN support - diamond ;;
|
;; xx.04.2006 LFN support - diamond ;;
|
||||||
;; 15.01.2005 get file size/attr/date, file_append (only for hd) - ATV ;;
|
;; 15.01.2005 get file size/attr/date, file_append (only for hd) - ATV ;;
|
||||||
;; 23.11.2004 test if hd/partition is set - ATV ;;
|
;; 23.11.2004 test if hd/partition is set - ATV ;;
|
||||||
@ -31,6 +32,7 @@ hd_address_table: dd 0x1f0,0x00,0x1f0,0x10
|
|||||||
endg
|
endg
|
||||||
|
|
||||||
file_system:
|
file_system:
|
||||||
|
|
||||||
; IN:
|
; IN:
|
||||||
;
|
;
|
||||||
; eax = 0 ; read file /RamDisk/First 6 /HardDisk/First 30
|
; eax = 0 ; read file /RamDisk/First 6 /HardDisk/First 30
|
||||||
@ -936,6 +938,8 @@ LBA_read:
|
|||||||
mov [hdid],ebx
|
mov [hdid],ebx
|
||||||
|
|
||||||
call wait_for_hd_idle
|
call wait_for_hd_idle
|
||||||
|
cmp [hd_error],0
|
||||||
|
jne hd_lba_error
|
||||||
|
|
||||||
; eax = hd port
|
; eax = hd port
|
||||||
; ebx = set for primary (0x00) or slave (0x10)
|
; ebx = set for primary (0x00) or slave (0x10)
|
||||||
@ -972,6 +976,8 @@ LBA_read:
|
|||||||
sti
|
sti
|
||||||
|
|
||||||
call wait_for_sector_buffer
|
call wait_for_sector_buffer
|
||||||
|
cmp [hd_error],0
|
||||||
|
jne hd_lba_error
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|
||||||
@ -987,7 +993,7 @@ LBA_read:
|
|||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
|
|
||||||
LBA_read_ret:
|
LBA_read_ret:
|
||||||
|
mov [hd_error],0
|
||||||
mov [hd1_status],0
|
mov [hd1_status],0
|
||||||
add esp,2*4
|
add esp,2*4
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
;*************************************************************
|
;*************************************************************
|
||||||
|
;* 29.04.2006 Elimination of hangup after the *
|
||||||
|
;* expiration hd_wait_timeout - Mario79 *
|
||||||
;* 28.01.2006 find all Fat16/32 partition in all input point *
|
;* 28.01.2006 find all Fat16/32 partition in all input point *
|
||||||
;* to MBR - Mario79 *
|
;* to MBR - Mario79 *
|
||||||
;*************************************************************
|
;*************************************************************
|
||||||
@ -100,6 +102,8 @@ extended_already_set:
|
|||||||
add eax,ebp ; mbr=mbr+0, ext_part=ext_start+relat_start
|
add eax,ebp ; mbr=mbr+0, ext_part=ext_start+relat_start
|
||||||
mov ebx,buffer
|
mov ebx,buffer
|
||||||
call hd_read
|
call hd_read
|
||||||
|
cmp [hd_error],0
|
||||||
|
jne problem_hd
|
||||||
|
|
||||||
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?
|
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?
|
||||||
jnz end_partition_chain
|
jnz end_partition_chain
|
||||||
@ -249,6 +253,9 @@ hd_and_partition_ok:
|
|||||||
mov [hd_setup],1
|
mov [hd_setup],1
|
||||||
mov ebx,buffer
|
mov ebx,buffer
|
||||||
call hd_read ; read boot sector of partition
|
call hd_read ; read boot sector of partition
|
||||||
|
cmp [hd_error],0
|
||||||
|
jne problem_fat_dec_count
|
||||||
|
|
||||||
mov [hd_setup],0
|
mov [hd_setup],0
|
||||||
|
|
||||||
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?
|
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?
|
||||||
|
Loading…
Reference in New Issue
Block a user