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:
Marat Zakiyanov (Mario79) 2006-04-29 13:10:34 +00:00
parent a939e78130
commit 9d76fed06e
3 changed files with 609 additions and 212 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,8 @@
;; ;;
;; System service for filesystem call ;;
;; (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 ;;
;; 15.01.2005 get file size/attr/date, file_append (only for hd) - ATV ;;
;; 23.11.2004 test if hd/partition is set - ATV ;;
@ -31,6 +32,7 @@ hd_address_table: dd 0x1f0,0x00,0x1f0,0x10
endg
file_system:
; IN:
;
; eax = 0 ; read file /RamDisk/First 6 /HardDisk/First 30
@ -936,6 +938,8 @@ LBA_read:
mov [hdid],ebx
call wait_for_hd_idle
cmp [hd_error],0
jne hd_lba_error
; eax = hd port
; ebx = set for primary (0x00) or slave (0x10)
@ -972,6 +976,8 @@ LBA_read:
sti
call wait_for_sector_buffer
cmp [hd_error],0
jne hd_lba_error
cli
@ -987,7 +993,7 @@ LBA_read:
xor ebx,ebx
LBA_read_ret:
mov [hd_error],0
mov [hd1_status],0
add esp,2*4

View File

@ -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 *
;* to MBR - Mario79 *
;*************************************************************
@ -100,6 +102,8 @@ extended_already_set:
add eax,ebp ; mbr=mbr+0, ext_part=ext_start+relat_start
mov ebx,buffer
call hd_read
cmp [hd_error],0
jne problem_hd
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?
jnz end_partition_chain
@ -249,6 +253,9 @@ hd_and_partition_ok:
mov [hd_setup],1
mov ebx,buffer
call hd_read ; read boot sector of partition
cmp [hd_error],0
jne problem_fat_dec_count
mov [hd_setup],0
cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector?