Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 411 → Rev 412

/kernel/trunk/core/memory.inc
382,7 → 382,7
 
cmp dword [LFBAddress], -1
jne @f
mov [0x2f0000+0x901c],byte 2
mov [BOOT_VAR+0x901c],byte 2
stdcall kernel_alloc, 0x280000
mov [LFBAddress], eax
ret
389,7 → 389,7
@@:
test [SCR_MODE],word 0100000000000000b
jnz @f
mov [0x2f0000+0x901c],byte 2
mov [BOOT_VAR+0x901c],byte 2
ret
@@:
mov edx, LFB_BASE
1229,7 → 1229,7
align 4
proc init_mtrr
 
cmp [0x2f0000+0x901c],byte 2
cmp [BOOT_VAR+0x901c],byte 2
je .exit
 
bt [cpu_caps], CAPS_MTRR
/kernel/trunk/core/syscall.inc
50,13 → 50,18
SYSENTER_VAR equ 0
sysenter_entry:
; Íàñòðàèâàåì ñòåê
cli
push eax
mov eax, [ss:CURRENT_TASK]
shl eax, 8
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
; cli sysenter clear IF
; push eax
; mov eax, [ss:CURRENT_TASK]
; shl eax, 8
; mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
 
mov esp, [ss:CURRENT_TASK]
shl esp, 8
mov esp, [ss:SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP
sti
;------------------
push ds es
93,15 → 98,22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 32
syscall_entry:
cli
; cli syscall clear IF
xchg ecx, [esp]
mov [SYSENTER_VAR + 4], esp
mov [ss:sysenter_stack - 4], eax
mov eax, [ss:CURRENT_TASK]
shl eax, 8
mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
lea esp, [ss:eax + RING0_STACK_SIZE] ; configure ESP
mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
 
; mov [ss:sysenter_stack - 4], eax
; mov eax, [ss:CURRENT_TASK]
; shl eax, 8
; mov eax, [ss:SLOT_BASE + eax + APPDATA.pl0_stack]
; lea esp, [eax + RING0_STACK_SIZE] ; configure ESP
; mov eax, [ss:sysenter_stack - 4] ; eax - original eax, from app
 
mov esp, [ss:CURRENT_TASK]
shl esp, 8
mov esp, [ss:SLOT_BASE + esp + APPDATA.pl0_stack]
add esp, RING0_STACK_SIZE ; configure ESP
 
sti
;------------------
push ds es
127,6 → 139,8
popad
pop es ds
;------------------
 
cli
mov esp, [SYSENTER_VAR + 4]
xchg ecx, [esp]
sysret
/kernel/trunk/core/taskman.inc
226,7 → 226,6
mov eax, [save_cr3]
call set_cr3
 
; popfd
xor ebx, ebx
mov [application_table_status],ebx ;unlock application_table_status mutex
mov eax,[process_number] ;set result
235,7 → 234,6
mov eax, [save_cr3]
call set_cr3
.err:
; popfd
.err_hdr:
stdcall kernel_free,[file_base]
.err_file:
334,9 → 332,7
cmp eax,256
jge .failed ;it should be <256
mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary)
; mov [new_process_place], eax
ret
 
.failed:
xor eax,eax
ret
471,7 → 467,6
add edx, 0x1000
dec [app_pages]
jnz .alloc
 
end if
 
.done:
531,7 → 526,6
xor edx,edx
mov eax,0x2
mov ebx, [pg_dir]
 
.loop:
;eax = current slot of process
mov ecx,eax