diff --git a/kernel/trunk/const.inc b/kernel/trunk/const.inc index 28c4b4a1d2..13c18f0ca6 100644 --- a/kernel/trunk/const.inc +++ b/kernel/trunk/const.inc @@ -275,7 +275,7 @@ new_app_base equ 0x80000000 twdw equ (CURRENT_TASK-window_data) std_application_base_address equ new_app_base -RING0_STACK_SIZE equ 0x2000 - 512 ;512 байт для контекста FPU +RING0_STACK_SIZE equ (0x2000-512) ;512 байт для контекста FPU ;PAGES_USED equ 4 diff --git a/kernel/trunk/core/taskman.inc b/kernel/trunk/core/taskman.inc index 3d05099a8b..563dc31a9a 100644 --- a/kernel/trunk/core/taskman.inc +++ b/kernel/trunk/core/taskman.inc @@ -889,6 +889,8 @@ proc new_sys_threads rep stosd ;clean extended information about new thread mov esi,ebx mov edi,edx + mov byte [edi], '@' + inc edi mov ecx,11 rep movsb ;copy process name @@ -949,10 +951,10 @@ proc set_app_params stdcall,slot:dword, params:dword,\ pl0_stack dd ? endl - stdcall kernel_alloc, 0x2000 + stdcall kernel_alloc, RING0_STACK_SIZE+512 mov [pl0_stack], eax - lea edi, [eax+0x2000-512] + lea edi, [eax+RING0_STACK_SIZE] mov eax, [slot] mov ebx, eax @@ -1077,7 +1079,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\ mov [edi+TSS._io],word 128 mov [edi+TSS._ss0], os_data mov ebx, [pl0_stack] - add ebx, 0x2000-512 + add ebx, RING0_STACK_SIZE mov [edi+TSS._esp0],ebx mov ecx, edi ;ecx - address of application TSS diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 8992964f2b..c59ea33e70 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -432,7 +432,7 @@ B32: mov cr0,eax call init_kernel_heap - stdcall kernel_alloc, 0x2000 + stdcall kernel_alloc, RING0_STACK_SIZE+512 mov [os_stack], eax call init_LFB @@ -618,7 +618,7 @@ include 'vmodeld.inc' mov dword [SLOT_BASE+256+APPDATA.app_name+4], dword 'DLE ' mov edi, [os_stack] mov dword [SLOT_BASE+256+APPDATA.pl0_stack], edi - add edi, 0x2000-512 + add edi, RING0_STACK_SIZE mov dword [SLOT_BASE+256+APPDATA.fpu_state], edi mov esi, fpu_data @@ -654,7 +654,7 @@ include 'vmodeld.inc' mov [edi+TSS._eip],osloop mov [edi+TSS._eflags],dword 0x11202 ; sti and resume mov eax, [os_stack] - add eax, 0x2000-512 + add eax, RING0_STACK_SIZE mov [edi+TSS._esp], eax mov [edi+TSS._cs],os_code mov [edi+TSS._ss],os_data