1)fixed bug in fs_lfn.inc

2)cleanup


git-svn-id: svn://kolibrios.org@432 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2007-03-27 13:02:45 +00:00
parent 5b119159d4
commit 13c87af9d3
8 changed files with 44 additions and 59 deletions

View File

@ -280,7 +280,6 @@ IMG_BACKGROUND equ (OS_BASE+0x0300000)
WinMapAddress equ (OS_BASE+0x0460000) WinMapAddress equ (OS_BASE+0x0460000)
display_data equ (OS_BASE+0x0460000) display_data equ (OS_BASE+0x0460000)
;unused ?
HD_CACHE equ (OS_BASE+0x0600000) HD_CACHE equ (OS_BASE+0x0600000)
stack_data_start equ (OS_BASE+0x0700000) stack_data_start equ (OS_BASE+0x0700000)
@ -387,10 +386,11 @@ struc THR_DATA
rb (8192-512) rb (8192-512)
.pl0_stack: .pl0_stack:
.fpu_state rb 512 .fpu_state rb 512
.tls_page rb 4096
.pdbr rb 4096 .pdbr rb 4096
} }
THR_DATA_SIZE equ 4096*3 THR_DATA_SIZE equ 4096*4
virtual at (OS_BASE-THR_DATA_SIZE) virtual at (OS_BASE-THR_DATA_SIZE)
thr_data THR_DATA thr_data THR_DATA

View File

@ -246,9 +246,8 @@ endp
align 4 align 4
srv_handlerEx: srv_handlerEx:
test ebx, ebx cmp ebx, OS_BASE
jz .fail jae .fail
; add ebx, new_app_base
mov eax, [ebx+handle] mov eax, [ebx+handle]
cmp [eax+SRV.magic], ' SRV' cmp [eax+SRV.magic], ' SRV'
@ -257,9 +256,6 @@ srv_handlerEx:
cmp [eax+SRV.size], SRV_SIZE cmp [eax+SRV.size], SRV_SIZE
jne .fail jne .fail
; add [ebx+input], new_app_base
; add [ebx+output], new_app_base
stdcall [eax+SRV.srv_proc], ebx stdcall [eax+SRV.srv_proc], ebx
ret ret
.fail: .fail:
@ -437,8 +433,6 @@ proc read_file stdcall,file_name:dword, buffer:dword, off:dword,\
mov ecx, [off] mov ecx, [off]
mov edx, [bytes] mov edx, [bytes]
mov esi, [buffer] mov esi, [buffer]
; sub ebx, new_app_base
; sub esi, new_app_base
mov [cmd], eax mov [cmd], eax
mov [offset], ecx mov [offset], ecx
@ -448,10 +442,12 @@ proc read_file stdcall,file_name:dword, buffer:dword, off:dword,\
mov byte [buff+4], al mov byte [buff+4], al
mov [name], ebx mov [name], ebx
mov eax, 70 pushad
lea ebx, [cmd] push eax
; sub ebx, new_app_base lea eax, [cmd]
int 0x40 call file_system_lfn
pop eax
popad
ret ret
endp endp

View File

@ -593,31 +593,6 @@ align 4
mov bl, 14 mov bl, 14
jmp exc_c jmp exc_c
iretd iretd
;.kernel_space:
; shr ebx, 12
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; mov eax, [master_tab+ebx*4]
jmp .exit
;.old_addr:
; shr ebx, 12
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; mov eax, [master_tab+ebx*4]
jmp .exit
;.lfb_addr:
; shr ebx, 22
; ;mov ecx, [sys_page_dir]
; mov eax, [master_tab+ebx*4]
jmp .exit
;.tab_space:
; shr ebx, 12
; mov eax, [page_tabs+ebx*4]
; shr ebx, 10
; ;mov ecx, [sys_page_dir]
; mov eax, [master_tab+ebx*4]
; jmp .exit
endp endp
align 4 align 4

View File

@ -214,16 +214,6 @@ do_change_task:
ret ret
;
; shl ebx, 3
; xor eax, eax
; add ebx, tss0
; mov [far_jump.sel], bx ; selector
; mov [far_jump.offs], eax ; offset
; jmp pword [far_jump]
; inc [context_counter] ;noname & halyavin
;ret
align 4 align 4
updatecputimes: updatecputimes:
@ -244,6 +234,23 @@ updatecputimes:
if 0 if 0
struc TIMER
{
.next dd ?
.exp_time dd ?
.func dd ?
.arg dd ?
}
MAX_PROIRITY 0 ; highest, used for kernel tasks MAX_PROIRITY 0 ; highest, used for kernel tasks
MAX_USER_PRIORITY 0 ; highest priority for user processes MAX_USER_PRIORITY 0 ; highest priority for user processes
USER_PRIORITY 7 ; default (should correspond to nice 0) USER_PRIORITY 7 ; default (should correspond to nice 0)

View File

@ -652,6 +652,17 @@ term9:
mov edi, [.slot] mov edi, [.slot]
shl edi,8 shl edi,8
add edi,SLOT_BASE add edi,SLOT_BASE
mov eax, [edi+APPDATA.io_map]
cmp eax, (tss._io_map_0-OS_BASE+PG_MAP)
je @F
call free_page
@@:
mov eax, [edi+APPDATA.io_map+4]
cmp eax, (tss._io_map_0-OS_BASE+PG_MAP)
je @F
call free_page
@@:
mov eax, 0x20202020 mov eax, 0x20202020
stosd stosd
stosd stosd

View File

@ -959,19 +959,17 @@ proc set_app_params stdcall,slot:dword, params:dword,\
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8] cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
ja @f ja @f
; add edx, new_app_base
stdcall k_strncpy, edx, [cmd_line], 256 stdcall k_strncpy, edx, [cmd_line], 256
@@: @@:
mov edx,[params] mov edx,[params]
mov edx, [edx+4] ;app_path mov edx, [edx+4] ;app_path
test edx,edx test edx,edx
jz @F ;application don't need path of file jz @F ;application don't need path of file
mov eax, edx mov eax, edx
add eax, 1024 add eax, 1024
jc @f jc @f
cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8] cmp eax, [SLOT_BASE+APPDATA.mem_size+ebx*8]
ja @f ja @f
; add edx, new_app_base
stdcall k_strncpy, edx, [app_path], 1024 stdcall k_strncpy, edx, [app_path], 1024
@@: @@:
mov ebx,[slot] mov ebx,[slot]

View File

@ -427,7 +427,7 @@ fs_OnHd:
mov [hdpos], eax mov [hdpos], eax
cmp ecx, 0x100 cmp ecx, 0x100
jae .nf jae .nf
cmp cl, [DRIVE_DATA+eax] cmp cl, [DRIVE_DATA+1+eax]
jbe @f jbe @f
.nf: .nf:
call free_hd_channel call free_hd_channel

View File

@ -120,8 +120,6 @@ proc init_mem
ret ret
endp endp
align 4 align 4
proc init_page_map proc init_page_map