forked from KolibriOS/kolibrios
speed up IDE operations
git-svn-id: svn://kolibrios.org@5569 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5d45386146
commit
0ad5c3e509
@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
|
; Disk access through BIOS
|
||||||
; Access through BIOS by diamond
|
|
||||||
iglobal
|
iglobal
|
||||||
align 4
|
align 4
|
||||||
bd_callbacks:
|
bd_callbacks:
|
||||||
@ -23,6 +22,16 @@ bd_callbacks:
|
|||||||
.end:
|
.end:
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
uglobal
|
||||||
|
bios_hdpos dd 0
|
||||||
|
bios_cur_sector dd ?
|
||||||
|
bios_read_len dd ?
|
||||||
|
cache_chain_ptr dd ?
|
||||||
|
int13_regs_in rb sizeof.v86_regs
|
||||||
|
int13_regs_out rb sizeof.v86_regs
|
||||||
|
cache_chain_size db ?
|
||||||
|
endg
|
||||||
|
;-----------------------------------------------------------------
|
||||||
proc bd_read_interface stdcall uses edi, \
|
proc bd_read_interface stdcall uses edi, \
|
||||||
userdata, buffer, startsector:qword, numsectors
|
userdata, buffer, startsector:qword, numsectors
|
||||||
; userdata = old [hdpos] = 80h + index in NumBiosDisks
|
; userdata = old [hdpos] = 80h + index in NumBiosDisks
|
||||||
@ -76,7 +85,7 @@ endl
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
;-----------------------------------------------------------------
|
||||||
proc bd_write_interface stdcall uses esi edi, \
|
proc bd_write_interface stdcall uses esi edi, \
|
||||||
userdata, buffer, startsector:qword, numsectors
|
userdata, buffer, startsector:qword, numsectors
|
||||||
; userdata = old [hdpos] = 80h + index in NumBiosDisks
|
; userdata = old [hdpos] = 80h + index in NumBiosDisks
|
||||||
@ -142,7 +151,7 @@ endl
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
;-----------------------------------------------------------------
|
||||||
; This is a stub.
|
; This is a stub.
|
||||||
proc bd_querymedia stdcall, hd_data, mediainfo
|
proc bd_querymedia stdcall, hd_data, mediainfo
|
||||||
mov eax, [mediainfo]
|
mov eax, [mediainfo]
|
||||||
@ -153,16 +162,7 @@ proc bd_querymedia stdcall, hd_data, mediainfo
|
|||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
;-----------------------------------------------------------------
|
||||||
;-----------------------------------------------------------------------------
|
|
||||||
; \begin{diamond}
|
|
||||||
uglobal
|
|
||||||
bios_hdpos dd 0 ; 0 is invalid value for [hdpos]
|
|
||||||
bios_cur_sector dd ?
|
|
||||||
bios_read_len dd ?
|
|
||||||
endg
|
|
||||||
;-----------------------------------------------------------------------------
|
|
||||||
align 4
|
|
||||||
bd_read:
|
bd_read:
|
||||||
push eax
|
push eax
|
||||||
push edx
|
push edx
|
||||||
@ -209,8 +209,7 @@ bd_read:
|
|||||||
.v86err:
|
.v86err:
|
||||||
mov [hd_error], 1
|
mov [hd_error], 1
|
||||||
jmp hd_read_error
|
jmp hd_read_error
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------
|
||||||
align 4
|
|
||||||
bd_write_cache_chain:
|
bd_write_cache_chain:
|
||||||
pusha
|
pusha
|
||||||
mov edi, OS_BASE + 0x9A000
|
mov edi, OS_BASE + 0x9A000
|
||||||
@ -234,13 +233,7 @@ bd_write_cache_chain:
|
|||||||
popa
|
popa
|
||||||
mov [hd_error], 1
|
mov [hd_error], 1
|
||||||
jmp hd_write_error
|
jmp hd_write_error
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------
|
||||||
uglobal
|
|
||||||
int13_regs_in rb sizeof.v86_regs
|
|
||||||
int13_regs_out rb sizeof.v86_regs
|
|
||||||
endg
|
|
||||||
;-----------------------------------------------------------------------------
|
|
||||||
align 4
|
|
||||||
int13_call:
|
int13_call:
|
||||||
; Because this code uses fixed addresses,
|
; Because this code uses fixed addresses,
|
||||||
; it can not be run simultaniously by many threads.
|
; it can not be run simultaniously by many threads.
|
||||||
@ -290,4 +283,3 @@ int13_call:
|
|||||||
mov edx, ecx
|
mov edx, ecx
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
; \end{diamond}
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -229,7 +229,6 @@ SLOT_BASE equ (OS_BASE+0x0080000)
|
|||||||
VGABasePtr equ (OS_BASE+0x00A0000)
|
VGABasePtr equ (OS_BASE+0x00A0000)
|
||||||
|
|
||||||
CLEAN_ZONE equ (_CLEAN_ZONE-OS_BASE)
|
CLEAN_ZONE equ (_CLEAN_ZONE-OS_BASE)
|
||||||
IDE_DMA equ (_IDE_DMA-OS_BASE)
|
|
||||||
|
|
||||||
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
UPPER_KERNEL_PAGES equ (OS_BASE+0x0400000)
|
||||||
|
|
||||||
|
@ -533,7 +533,6 @@ align 65536
|
|||||||
SB16Buffer rb 65536
|
SB16Buffer rb 65536
|
||||||
|
|
||||||
align 4096
|
align 4096
|
||||||
_IDE_DMA rb 16*512
|
|
||||||
BUTTON_INFO rb 64*1024
|
BUTTON_INFO rb 64*1024
|
||||||
RESERVED_PORTS: rb 64*1024
|
RESERVED_PORTS: rb 64*1024
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user