forked from KolibriOS/kolibrios
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:
|
save_hd_wait_timeout:
|
||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,[timer_ticks];[0xfdf0]
|
mov eax,[timer_ticks]
|
||||||
add eax,300 ; 3 sec timeout
|
add eax,300 ; 3 sec timeout
|
||||||
mov [hd_wait_timeout],eax
|
mov [hd_wait_timeout],eax
|
||||||
pop eax
|
pop eax
|
||||||
@ -403,7 +403,7 @@ check_hd_wait_timeout:
|
|||||||
|
|
||||||
push eax
|
push eax
|
||||||
mov eax,[hd_wait_timeout]
|
mov eax,[hd_wait_timeout]
|
||||||
cmp [timer_ticks], eax ;[0xfdf0],eax
|
cmp [timer_ticks], eax
|
||||||
jg hd_timeout_error
|
jg hd_timeout_error
|
||||||
pop eax
|
pop eax
|
||||||
mov [hd_error],0
|
mov [hd_error],0
|
||||||
@ -423,7 +423,7 @@ hd_timeout_error:
|
|||||||
; mov esi,hd_timeout_str
|
; mov esi,hd_timeout_str
|
||||||
; call sys_msg_board_str
|
; call sys_msg_board_str
|
||||||
DEBUGF 1,"K : FS - HD timeout\n"
|
DEBUGF 1,"K : FS - HD timeout\n"
|
||||||
; jmp $
|
|
||||||
mov [hd_error],1
|
mov [hd_error],1
|
||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
@ -574,9 +574,9 @@ iglobal
|
|||||||
align 4
|
align 4
|
||||||
; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary
|
; note that IDE descriptor table must be 4-byte aligned and do not cross 4K boundary
|
||||||
IDE_descriptor_table:
|
IDE_descriptor_table:
|
||||||
dd OS_BASE+284000h
|
dd 0x284000
|
||||||
dw 2000h
|
dw 0x2000
|
||||||
dw 8000h
|
dw 0x8000
|
||||||
|
|
||||||
dma_cur_sector dd not 40h
|
dma_cur_sector dd not 40h
|
||||||
irq14_func dd hdd_irq_null
|
irq14_func dd hdd_irq_null
|
||||||
@ -617,7 +617,7 @@ hdd_irq14:
|
|||||||
mov [dma_slot_ptr], eax
|
mov [dma_slot_ptr], eax
|
||||||
mov [CURRENT_TASK], ebx
|
mov [CURRENT_TASK], ebx
|
||||||
mov [TASK_BASE], edi
|
mov [TASK_BASE], edi
|
||||||
mov byte [0xFFFF], 1
|
mov byte [DONT_SWITCH], 1
|
||||||
call do_change_task
|
call do_change_task
|
||||||
.noswitch:
|
.noswitch:
|
||||||
popad
|
popad
|
||||||
@ -648,7 +648,7 @@ hdd_irq15:
|
|||||||
mov [dma_slot_ptr], eax
|
mov [dma_slot_ptr], eax
|
||||||
mov [CURRENT_TASK], ebx
|
mov [CURRENT_TASK], ebx
|
||||||
mov [TASK_BASE], edi
|
mov [TASK_BASE], edi
|
||||||
mov byte [0xFFFF], 1
|
mov byte [DONT_SWITCH], 1
|
||||||
call do_change_task
|
call do_change_task
|
||||||
.noswitch:
|
.noswitch:
|
||||||
popad
|
popad
|
||||||
@ -681,9 +681,10 @@ hd_read_dma:
|
|||||||
pop eax
|
pop eax
|
||||||
ret
|
ret
|
||||||
.notread:
|
.notread:
|
||||||
mov eax, IDE_descriptor_table-OS_BASE
|
mov eax, IDE_descriptor_table
|
||||||
mov dword [eax+OS_BASE], 0x284000
|
mov dword [eax], 0x284000
|
||||||
mov word [eax+4+OS_BASE], 0x2000
|
mov word [eax+4], 0x2000
|
||||||
|
sub eax, OS_BASE
|
||||||
mov dx, [IDEContrRegsBaseAddr]
|
mov dx, [IDEContrRegsBaseAddr]
|
||||||
cmp [hdbase], 0x1F0
|
cmp [hdbase], 0x1F0
|
||||||
jz @f
|
jz @f
|
||||||
@ -766,7 +767,7 @@ write_cache_chain:
|
|||||||
mov eax, IDE_descriptor_table
|
mov eax, IDE_descriptor_table
|
||||||
mov edx, [cache_chain_pos]
|
mov edx, [cache_chain_pos]
|
||||||
shl edx, 9
|
shl edx, 9
|
||||||
add edx, OS_BASE+0x610000
|
add edx, 0x610000
|
||||||
mov [eax], edx
|
mov [eax], edx
|
||||||
movzx edx, [cache_chain_size]
|
movzx edx, [cache_chain_size]
|
||||||
shl edx, 9
|
shl edx, 9
|
||||||
@ -777,10 +778,11 @@ write_cache_sector:
|
|||||||
mov eax, IDE_descriptor_table
|
mov eax, IDE_descriptor_table
|
||||||
mov edx, edi
|
mov edx, edi
|
||||||
shl edx, 9
|
shl edx, 9
|
||||||
add edx, OS_BASE+0x610000
|
add edx, 0x610000
|
||||||
mov [eax], edx
|
mov [eax], edx
|
||||||
mov word [eax+4], 0x200
|
mov word [eax+4], 0x200
|
||||||
do_write_dma:
|
do_write_dma:
|
||||||
|
sub eax, OS_BASE
|
||||||
mov dx, [IDEContrRegsBaseAddr]
|
mov dx, [IDEContrRegsBaseAddr]
|
||||||
cmp [hdbase], 0x1F0
|
cmp [hdbase], 0x1F0
|
||||||
jz @f
|
jz @f
|
||||||
|
@ -241,14 +241,6 @@ proc init_LFB
|
|||||||
mov edi, 0x00800000
|
mov edi, 0x00800000
|
||||||
mov dword [exp_lfb+4], edx
|
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
|
shr edi, 12
|
||||||
mov [pg_count], edi
|
mov [pg_count], edi
|
||||||
shr edi, 10
|
shr edi, 10
|
||||||
|
@ -10,8 +10,8 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org])
|
|||||||
; edi 1 force
|
; edi 1 force
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
call [disable_mouse]
|
call [disable_mouse]
|
||||||
|
|
||||||
mov ebp, ecx ; ebp=pointer to text
|
mov ebp, ecx ; ebp=pointer to text
|
||||||
mov ecx, ebx ; ecx=color
|
mov ecx, ebx ; ecx=color
|
||||||
movsx ebx, ax ; ebx=y
|
movsx ebx, ax ; ebx=y
|
||||||
|
@ -205,12 +205,12 @@ B32:
|
|||||||
|
|
||||||
__DEBUG__ fix 1
|
__DEBUG__ fix 1
|
||||||
__DEBUG_LEVEL__ fix 1
|
__DEBUG_LEVEL__ fix 1
|
||||||
include 'fdo.inc'
|
|
||||||
include 'init.inc'
|
include 'init.inc'
|
||||||
include "boot/shutdown.inc" ; shutdown or restart
|
include "boot/shutdown.inc" ; shutdown or restart
|
||||||
|
|
||||||
|
|
||||||
org OS_BASE+$
|
org OS_BASE+$
|
||||||
|
include 'fdo.inc'
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
high_code:
|
high_code:
|
||||||
mov ax,os_data
|
mov ax,os_data
|
||||||
|
@ -444,7 +444,6 @@ proc init_cursors
|
|||||||
|
|
||||||
stdcall load_driver, szHwMouse
|
stdcall load_driver, szHwMouse
|
||||||
mov [hw_cursor], eax
|
mov [hw_cursor], eax
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .sw_mouse
|
jz .sw_mouse
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user