mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-28 11:43:09 +03:00
fixed IDE DMA
git-svn-id: svn://kolibrios.org@390 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3764b8d630
commit
fd8f50d23f
@ -392,7 +392,7 @@ clear_hd_cache:
|
||||
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 @@ check_hd_wait_timeout:
|
||||
|
||||
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
|
||||
@ -422,8 +422,8 @@ hd_timeout_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_timeout_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD timeout\n"
|
||||
; jmp $
|
||||
DEBUGF 1,"K : FS - HD timeout\n"
|
||||
|
||||
mov [hd_error],1
|
||||
pop eax
|
||||
ret
|
||||
@ -434,7 +434,7 @@ hd_read_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_read_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
pop edx eax
|
||||
ret
|
||||
|
||||
@ -442,17 +442,17 @@ hd_write_error:
|
||||
|
||||
; call clear_hd_cache
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_write_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD write error\n"
|
||||
ret
|
||||
; mov esi,hd_write_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD write error\n"
|
||||
ret
|
||||
|
||||
hd_write_error_dma:
|
||||
; call clear_hd_cache
|
||||
; call clear_application_table_status
|
||||
; mov esi, hd_write_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
DEBUGF 1,"K : FS - HD read error\n"
|
||||
pop esi
|
||||
ret
|
||||
|
||||
@ -461,8 +461,8 @@ hd_lba_error:
|
||||
; call clear_application_table_status
|
||||
; mov esi,hd_lba_str
|
||||
; call sys_msg_board_str
|
||||
DEBUGF 1,"K : FS - HD LBA error\n"
|
||||
jmp LBA_read_ret
|
||||
DEBUGF 1,"K : FS - HD LBA error\n"
|
||||
jmp LBA_read_ret
|
||||
|
||||
|
||||
align 4
|
||||
@ -574,9 +574,9 @@ iglobal
|
||||
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 @@ hdd_irq14:
|
||||
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 @@ hdd_irq15:
|
||||
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 @@ hd_read_dma:
|
||||
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 @@ write_cache_chain:
|
||||
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 @@ write_cache_sector:
|
||||
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
|
||||
|
@ -241,14 +241,6 @@ proc init_LFB
|
||||
mov edi, 0x00800000
|
||||
mov dword [exp_lfb+4], edx
|
||||
|
||||
push eax
|
||||
push edx
|
||||
mov edx, 0x400 ;bocsh
|
||||
mov al,0xff ;bocsh
|
||||
out dx, al ;bocsh
|
||||
pop edx
|
||||
pop eax
|
||||
|
||||
shr edi, 12
|
||||
mov [pg_count], edi
|
||||
shr edi, 10
|
||||
|
@ -10,8 +10,8 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
||||
; edi 1 force
|
||||
|
||||
pushad
|
||||
|
||||
call [disable_mouse]
|
||||
|
||||
mov ebp, ecx ; ebp=pointer to text
|
||||
mov ecx, ebx ; ecx=color
|
||||
movsx ebx, ax ; ebx=y
|
||||
|
@ -205,12 +205,12 @@ B32:
|
||||
|
||||
__DEBUG__ fix 1
|
||||
__DEBUG_LEVEL__ fix 1
|
||||
include 'fdo.inc'
|
||||
include 'init.inc'
|
||||
include "boot/shutdown.inc" ; shutdown or restart
|
||||
|
||||
|
||||
org OS_BASE+$
|
||||
include 'fdo.inc'
|
||||
|
||||
align 4
|
||||
high_code:
|
||||
mov ax,os_data
|
||||
|
@ -444,7 +444,6 @@ proc init_cursors
|
||||
|
||||
stdcall load_driver, szHwMouse
|
||||
mov [hw_cursor], eax
|
||||
|
||||
test eax, eax
|
||||
jz .sw_mouse
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user