forked from KolibriOS/kolibrios
reduce memory size
git-svn-id: svn://kolibrios.org@472 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
614fe2dab1
commit
0cca9c7b8c
@ -6,7 +6,7 @@ $Revision$
|
||||
;; ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Low-level driver for HDD access
|
||||
; Low-level driver for HDD access
|
||||
; DMA support by Mario79
|
||||
|
||||
;**************************************************************************
|
||||
@ -33,7 +33,7 @@ hd_read:
|
||||
push ecx esi edi ; scan cache
|
||||
|
||||
mov ecx,cache_max ; entries in cache
|
||||
mov esi,OS_BASE+0x600000+8
|
||||
mov esi,HD_CACHE+8
|
||||
mov edi,1
|
||||
|
||||
hdreadcache:
|
||||
@ -62,7 +62,7 @@ hd_read:
|
||||
call hd_read_pio
|
||||
@@:
|
||||
|
||||
lea esi,[edi*8+OS_BASE+0x600000]
|
||||
lea esi,[edi*8+HD_CACHE]
|
||||
mov [esi],eax ; sector number
|
||||
mov dword [esi+4],1 ; hd read - mark as same as in hd
|
||||
|
||||
@ -70,7 +70,7 @@ hd_read:
|
||||
|
||||
mov esi,edi
|
||||
shl esi,9
|
||||
add esi,OS_BASE+0x600000+65536
|
||||
add esi,HD_CACHE+65536
|
||||
mov edi,ebx
|
||||
mov ecx,512/4
|
||||
cld
|
||||
@ -123,7 +123,7 @@ hd_read_pio:
|
||||
cli
|
||||
push edi
|
||||
shl edi,9
|
||||
add edi,OS_BASE+0x600000+65536
|
||||
add edi,HD_CACHE+65536
|
||||
mov ecx,256
|
||||
mov edx,[hdbase]
|
||||
cld
|
||||
@ -161,7 +161,7 @@ hd_write:
|
||||
; check if the cache already has the sector and overwrite it
|
||||
|
||||
mov ecx,cache_max
|
||||
mov esi,OS_BASE+0x600000+8
|
||||
mov esi,HD_CACHE+8
|
||||
mov edi,1
|
||||
|
||||
hdwritecache:
|
||||
@ -186,7 +186,7 @@ hd_write:
|
||||
cmp [hd_error],0
|
||||
jne hd_write_access_denied
|
||||
|
||||
lea esi,[edi*8+OS_BASE+0x600000]
|
||||
lea esi,[edi*8+HD_CACHE]
|
||||
mov [esi],eax ; sector number
|
||||
|
||||
yes_in_cache_write:
|
||||
@ -194,7 +194,7 @@ hd_write:
|
||||
mov dword [esi+4],2 ; write - differs from hd
|
||||
|
||||
shl edi,9
|
||||
add edi,OS_BASE+0x600000+65536
|
||||
add edi,HD_CACHE+65536
|
||||
mov esi,ebx
|
||||
mov ecx,512/4
|
||||
cld
|
||||
@ -213,7 +213,7 @@ write_cache:
|
||||
; write difference ( 2 ) from cache to hd
|
||||
|
||||
mov ecx,cache_max
|
||||
mov esi,OS_BASE+0x600000+8
|
||||
mov esi,HD_CACHE+8
|
||||
mov edi,1
|
||||
|
||||
write_cache_more:
|
||||
@ -331,7 +331,7 @@ cache_write_pio:
|
||||
; cli
|
||||
mov esi,edi
|
||||
shl esi,9
|
||||
add esi,OS_BASE+0x600000+65536 ; esi = from memory position
|
||||
add esi,HD_CACHE+65536 ; esi = from memory position
|
||||
mov ecx,256
|
||||
mov edx,[hdbase]
|
||||
cld
|
||||
@ -365,7 +365,7 @@ find_empty_slot:
|
||||
|
||||
inside_cache:
|
||||
|
||||
cmp dword [edi*8+OS_BASE+0x600000+4],2 ; get cache slot info
|
||||
cmp dword [edi*8+HD_CACHE+4],2 ; get cache slot info
|
||||
jb found_slot ; it's empty or read
|
||||
dec ecx
|
||||
jnz search_for_empty
|
||||
@ -386,7 +386,7 @@ align 4
|
||||
clear_hd_cache:
|
||||
|
||||
push eax ecx edi
|
||||
mov edi,OS_BASE+0x600000
|
||||
mov edi, HD_CACHE
|
||||
mov ecx,16384
|
||||
xor eax,eax
|
||||
cld
|
||||
@ -680,7 +680,7 @@ hd_read_dma:
|
||||
push ecx esi edi
|
||||
mov esi, eax
|
||||
shl edi, 9
|
||||
add edi, OS_BASE+0x610000
|
||||
add edi, HD_CACHE+0x10000
|
||||
mov ecx, 512/4
|
||||
cld
|
||||
rep movsd
|
||||
@ -775,7 +775,7 @@ write_cache_chain:
|
||||
mov eax, IDE_descriptor_table
|
||||
mov edx, [cache_chain_pos]
|
||||
shl edx, 9
|
||||
add edx, 0x610000
|
||||
add edx, DMA_HD_MEM+0x10000
|
||||
mov [eax], edx
|
||||
movzx edx, [cache_chain_size]
|
||||
shl edx, 9
|
||||
@ -786,7 +786,7 @@ write_cache_sector:
|
||||
mov eax, IDE_descriptor_table
|
||||
mov edx, edi
|
||||
shl edx, 9
|
||||
add edx, 0x610000
|
||||
add edx, DMA_HD_MEM+0x10000
|
||||
mov [eax], edx
|
||||
mov word [eax+4], 0x200
|
||||
do_write_dma:
|
||||
|
@ -282,27 +282,27 @@ BUTTON_INFO equ (OS_BASE+0x02C0000)
|
||||
RESERVED_PORTS equ (OS_BASE+0x02D0000)
|
||||
IRQ_SAVE equ (OS_BASE+0x02E0000)
|
||||
BOOT_VAR equ (OS_BASE+0x02f0000)
|
||||
WinMapAddress equ (OS_BASE+0x0460000)
|
||||
display_data equ (OS_BASE+0x0460000)
|
||||
|
||||
HD_CACHE equ (OS_BASE+0x0600000)
|
||||
DMA_HD_MEM equ 0x0300000
|
||||
HD_CACHE equ (OS_BASE+DMA_HD_MEM)
|
||||
|
||||
stack_data_start equ (OS_BASE+0x0700000)
|
||||
eth_data_start equ (OS_BASE+0x0700000)
|
||||
stack_data equ (OS_BASE+0x0704000)
|
||||
stack_data_end equ (OS_BASE+0x071ffff)
|
||||
VMODE_BASE equ (OS_BASE+0x0760000)
|
||||
resendQ equ (OS_BASE+0x0770000)
|
||||
stack_data_start equ (OS_BASE+0x0400000)
|
||||
eth_data_start equ (OS_BASE+0x0400000)
|
||||
stack_data equ (OS_BASE+0x0404000)
|
||||
stack_data_end equ (OS_BASE+0x041ffff)
|
||||
resendQ equ (OS_BASE+0x0420000)
|
||||
VMODE_BASE equ (OS_BASE+0x0428000)
|
||||
skin_data equ (OS_BASE+0x0430000)
|
||||
draw_data equ (OS_BASE+0x0438000);
|
||||
|
||||
skin_data equ (OS_BASE+0x0778000)
|
||||
|
||||
draw_data equ (OS_BASE+0x0780000);
|
||||
|
||||
virtual at (OS_BASE+0x0783F80)
|
||||
virtual at (OS_BASE+0x043BF80)
|
||||
tss TSS
|
||||
end virtual
|
||||
|
||||
tmp_page_tab equ 0x0786000;
|
||||
WinMapAddress equ (OS_BASE+0x043F000)
|
||||
display_data equ (OS_BASE+0x043F000)
|
||||
|
||||
tmp_page_tab equ 0x057F000;
|
||||
|
||||
HEAP_BASE equ (OS_BASE+tmp_page_tab)
|
||||
HEAP_MIN_SIZE equ 0x01000000
|
||||
|
@ -16,7 +16,7 @@ use32
|
||||
|
||||
macro align value { rb (value-1) - ($ + value-1) mod value }
|
||||
|
||||
org 0x80760000
|
||||
org OS_BASE+0x0428000
|
||||
|
||||
headerstart=$
|
||||
|
||||
|
@ -3568,9 +3568,6 @@ calculatebackground: ; background
|
||||
|
||||
; all black
|
||||
|
||||
; mov [display_data-8],dword 4 ; size x
|
||||
; mov [display_data-4],dword 2 ; size y
|
||||
|
||||
mov edi, [img_background] ;IMG_BACKGROUND ; set background to black
|
||||
xor eax, eax
|
||||
mov ecx, 1023 ;0x0fff00 / 4
|
||||
@ -3579,7 +3576,7 @@ calculatebackground: ; background
|
||||
|
||||
mov edi,display_data ; set os to use all pixels
|
||||
mov eax,0x01010101
|
||||
mov ecx,0x15ff00 / 4
|
||||
mov ecx,1280*1024 / 4
|
||||
rep stosd
|
||||
|
||||
mov byte [REDRAW_BACKGROUND], 0 ; do not draw background!
|
||||
|
@ -27,7 +27,7 @@ endg
|
||||
pushd [ScreenWidth] [ScreenHeight]
|
||||
popd [old_screen_height] [old_screen_width]
|
||||
or eax,-1 ; If driver is absent then eax does not change
|
||||
call OS_BASE+0x760100 ; Entry point of video driver
|
||||
call (VMODE_BASE+0x100) ; Entry point of video driver
|
||||
mov [esp+36],eax
|
||||
mov [esp+24],ebx
|
||||
mov [esp+32],ecx
|
||||
|
@ -9,7 +9,7 @@ $Revision$
|
||||
;
|
||||
; Load of videomode driver in memory
|
||||
;
|
||||
; (driver is located at 0x760000-0x768000 - 32kb) // if this area not occuped anything
|
||||
; (driver is located at VMODE_BASE - 32kb) // if this area not occuped anything
|
||||
;
|
||||
; Author: Trans
|
||||
; Date: 19.07.2003
|
||||
@ -21,11 +21,11 @@ $Revision$
|
||||
; LOAD VIDEOMODE DRIVER
|
||||
; If vmode.mdr file not found
|
||||
or eax,-1 ; Driver ID = -1 (not present in system)
|
||||
mov [OS_BASE+0x760000],eax ;
|
||||
mov [OS_BASE+0x760100],byte 0xC3 ; Instruction RETN - driver loop
|
||||
mov [VMODE_BASE],eax ;
|
||||
mov [VMODE_BASE+0x100],byte 0xC3 ; Instruction RETN - driver loop
|
||||
|
||||
mov esi, vmode
|
||||
xor ebx, ebx
|
||||
mov ecx, 0x8000 ; size of memory area for driver
|
||||
mov edx, OS_BASE+0x760000 ; Memory position of driver
|
||||
mov edx, VMODE_BASE ; Memory position of driver
|
||||
call fs_RamdiskRead
|
||||
|
Loading…
Reference in New Issue
Block a user