forked from KolibriOS/kolibrios
Synced net branch with trunk (#3358)
git-svn-id: svn://kolibrios.org@3359 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -340,7 +340,11 @@ hd_timeout_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_timeout_str
|
||||
; call sys_msg_board_str
|
||||
if lang eq sp
|
||||
DEBUGF 1,"K : FS - HD tiempo de espera agotado\n"
|
||||
else
|
||||
DEBUGF 1,"K : FS - HD timeout\n"
|
||||
end if
|
||||
|
||||
mov [hd_error], 1
|
||||
pop eax
|
||||
@@ -352,7 +356,11 @@ hd_read_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_read_str
|
||||
; call sys_msg_board_str
|
||||
if lang eq sp
|
||||
DEBUGF 1,"K : FS - HD error de lectura\n"
|
||||
else
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
end if
|
||||
pop edx eax
|
||||
ret
|
||||
|
||||
@@ -362,7 +370,11 @@ hd_write_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_write_str
|
||||
; call sys_msg_board_str
|
||||
if lang eq sp
|
||||
DEBUGF 1,"K : FS - HD error de escritura\n"
|
||||
else
|
||||
DEBUGF 1,"K : FS - HD write error\n"
|
||||
end if
|
||||
ret
|
||||
|
||||
hd_write_error_dma:
|
||||
@@ -370,7 +382,11 @@ hd_write_error_dma:
|
||||
; call clear_application_table_status
|
||||
; mov esi, hd_write_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
if lang eq sp
|
||||
DEBUGF 1,"K : FS - HD error de escritura\n"
|
||||
else
|
||||
DEBUGF 1,"K : FS - HD write error\n"
|
||||
end if
|
||||
pop esi
|
||||
ret
|
||||
|
||||
@@ -379,7 +395,11 @@ hd_lba_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_lba_str
|
||||
; call sys_msg_board_str
|
||||
if lang eq sp
|
||||
DEBUGF 1,"K : FS - HD error en LBA\n"
|
||||
else
|
||||
DEBUGF 1,"K : FS - HD LBA error\n"
|
||||
end if
|
||||
jmp LBA_read_ret
|
||||
|
||||
|
||||
@@ -942,86 +962,86 @@ int13_call:
|
||||
test byte [int13_regs_out+v86_regs.eflags], 1
|
||||
jnz @f
|
||||
mov edx, ecx
|
||||
@@:
|
||||
ret
|
||||
; \end{diamond}
|
||||
|
||||
reserve_hd1:
|
||||
|
||||
cli
|
||||
cmp [hd1_status], 0
|
||||
je reserve_ok1
|
||||
|
||||
sti
|
||||
call change_task
|
||||
jmp reserve_hd1
|
||||
|
||||
reserve_ok1:
|
||||
|
||||
push eax
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 5
|
||||
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov [hd1_status], eax
|
||||
pop eax
|
||||
sti
|
||||
ret
|
||||
;********************************************
|
||||
|
||||
uglobal
|
||||
hd_in_cache db ?
|
||||
endg
|
||||
|
||||
reserve_hd_channel:
|
||||
; BIOS disk accesses are protected with common mutex hd1_status
|
||||
; This must be modified when hd1_status will not be valid!
|
||||
cmp [hdpos], 0x80
|
||||
jae .ret
|
||||
cmp [hdbase], 0x1F0
|
||||
jne .IDE_Channel_2
|
||||
.IDE_Channel_1:
|
||||
cli
|
||||
cmp [IDE_Channel_1], 0
|
||||
je .reserve_ok_1
|
||||
sti
|
||||
call change_task
|
||||
jmp .IDE_Channel_1
|
||||
.IDE_Channel_2:
|
||||
cli
|
||||
cmp [IDE_Channel_2], 0
|
||||
je .reserve_ok_2
|
||||
sti
|
||||
call change_task
|
||||
jmp .IDE_Channel_2
|
||||
.reserve_ok_1:
|
||||
mov [IDE_Channel_1], 1
|
||||
push eax
|
||||
mov al, 1
|
||||
jmp @f
|
||||
.reserve_ok_2:
|
||||
mov [IDE_Channel_2], 1
|
||||
push eax
|
||||
mov al, 3
|
||||
@@:
|
||||
cmp [hdid], 1
|
||||
sbb al, -1
|
||||
mov [hd_in_cache], al
|
||||
pop eax
|
||||
sti
|
||||
.ret:
|
||||
ret
|
||||
|
||||
free_hd_channel:
|
||||
; see comment at reserve_hd_channel
|
||||
cmp [hdpos], 0x80
|
||||
jae .ret
|
||||
cmp [hdbase], 0x1F0
|
||||
jne .IDE_Channel_2
|
||||
.IDE_Channel_1:
|
||||
mov [IDE_Channel_1], 0
|
||||
.ret:
|
||||
ret
|
||||
.IDE_Channel_2:
|
||||
mov [IDE_Channel_2], 0
|
||||
ret
|
||||
;********************************************
|
||||
@@:
|
||||
ret
|
||||
; \end{diamond}
|
||||
|
||||
reserve_hd1:
|
||||
|
||||
cli
|
||||
cmp [hd1_status], 0
|
||||
je reserve_ok1
|
||||
|
||||
sti
|
||||
call change_task
|
||||
jmp reserve_hd1
|
||||
|
||||
reserve_ok1:
|
||||
|
||||
push eax
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 5
|
||||
mov eax, [eax+CURRENT_TASK+TASKDATA.pid]
|
||||
mov [hd1_status], eax
|
||||
pop eax
|
||||
sti
|
||||
ret
|
||||
;********************************************
|
||||
|
||||
uglobal
|
||||
hd_in_cache db ?
|
||||
endg
|
||||
|
||||
reserve_hd_channel:
|
||||
; BIOS disk accesses are protected with common mutex hd1_status
|
||||
; This must be modified when hd1_status will not be valid!
|
||||
cmp [hdpos], 0x80
|
||||
jae .ret
|
||||
cmp [hdbase], 0x1F0
|
||||
jne .IDE_Channel_2
|
||||
.IDE_Channel_1:
|
||||
cli
|
||||
cmp [IDE_Channel_1], 0
|
||||
je .reserve_ok_1
|
||||
sti
|
||||
call change_task
|
||||
jmp .IDE_Channel_1
|
||||
.IDE_Channel_2:
|
||||
cli
|
||||
cmp [IDE_Channel_2], 0
|
||||
je .reserve_ok_2
|
||||
sti
|
||||
call change_task
|
||||
jmp .IDE_Channel_2
|
||||
.reserve_ok_1:
|
||||
mov [IDE_Channel_1], 1
|
||||
push eax
|
||||
mov al, 1
|
||||
jmp @f
|
||||
.reserve_ok_2:
|
||||
mov [IDE_Channel_2], 1
|
||||
push eax
|
||||
mov al, 3
|
||||
@@:
|
||||
cmp [hdid], 1
|
||||
sbb al, -1
|
||||
mov [hd_in_cache], al
|
||||
pop eax
|
||||
sti
|
||||
.ret:
|
||||
ret
|
||||
|
||||
free_hd_channel:
|
||||
; see comment at reserve_hd_channel
|
||||
cmp [hdpos], 0x80
|
||||
jae .ret
|
||||
cmp [hdbase], 0x1F0
|
||||
jne .IDE_Channel_2
|
||||
.IDE_Channel_1:
|
||||
mov [IDE_Channel_1], 0
|
||||
.ret:
|
||||
ret
|
||||
.IDE_Channel_2:
|
||||
mov [IDE_Channel_2], 0
|
||||
ret
|
||||
;********************************************
|
||||
|
Reference in New Issue
Block a user