diff --git a/kernel/branches/kolibri-process/boot/shutdown.inc b/kernel/branches/kolibri-process/boot/shutdown.inc index 3dd29c2a05..ce0589f280 100644 --- a/kernel/branches/kolibri-process/boot/shutdown.inc +++ b/kernel/branches/kolibri-process/boot/shutdown.inc @@ -182,7 +182,7 @@ restart_kernel_4000: pop es mov cx, 0x8000 push cx - push 0x7000 + push 0x7100 pop ds xor si, si xor di, di diff --git a/kernel/branches/kolibri-process/core/sys32.inc b/kernel/branches/kolibri-process/core/sys32.inc index ba42dd7ec6..bc1701f4ab 100644 --- a/kernel/branches/kolibri-process/core/sys32.inc +++ b/kernel/branches/kolibri-process/core/sys32.inc @@ -748,7 +748,6 @@ destroy_thread: .xd1: ;release slot - bts [thr_slot_map], esi mov ecx, [.process] diff --git a/kernel/branches/kolibri-process/core/v86.inc b/kernel/branches/kolibri-process/core/v86.inc index c306369cc7..6288cc047f 100644 --- a/kernel/branches/kolibri-process/core/v86.inc +++ b/kernel/branches/kolibri-process/core/v86.inc @@ -109,9 +109,10 @@ v86_create: add eax, edx loop @b - mov eax, sys_proc-OS_BASE+PROC.pdt_0 - - mov cr3, eax + mov eax, sys_proc + push ebx + call set_cr3 + pop ebx popfd pop edi @@ -773,13 +774,13 @@ end if mov [tss._esp0], eax pop eax mov [ecx+APPDATA.process], eax + mov [current_process], eax pop ebx mov dword [ecx+APPDATA.io_map+4], ebx mov dword [page_tabs + (tss._io_map_1 shr 10)], ebx pop ebx mov dword [ecx+APPDATA.io_map], ebx mov dword [page_tabs + (tss._io_map_0 shr 10)], ebx - mov [current_process], eax mov eax, [eax+PROC.pdt_0_phys] mov cr3, eax sti diff --git a/kernel/branches/kolibri-process/data32.inc b/kernel/branches/kolibri-process/data32.inc index 63489f1883..d1217ce5e9 100644 --- a/kernel/branches/kolibri-process/data32.inc +++ b/kernel/branches/kolibri-process/data32.inc @@ -177,7 +177,7 @@ kernel_file_load: dd 0 ; subfunction dq 0 ; offset in file dd 0x30000 ; number of bytes to read - dd OS_BASE + 0x70000 ; buffer for data + dd OS_BASE + 0x71000 ; buffer for data db '/RD/1/KERNEL.MNT',0 dev_data_path db '/RD/1/DRIVERS/DEVICES.DAT',0 diff --git a/kernel/branches/kolibri-process/kernel.asm b/kernel/branches/kolibri-process/kernel.asm index 368d32ffb7..59a1a87577 100644 --- a/kernel/branches/kolibri-process/kernel.asm +++ b/kernel/branches/kolibri-process/kernel.asm @@ -1180,6 +1180,10 @@ proc setup_os_slot mov [edx + APPDATA.process], sys_proc + lea ebx, [edx+APPDATA.list] + lea ecx, [sys_proc+PROC.thr_list] + list_add_tail ebx, ecx + mov eax, edx shr eax, 3 add eax, CURRENT_TASK - (SLOT_BASE shr 3) diff --git a/kernel/branches/kolibri-process/kernel32.inc b/kernel/branches/kolibri-process/kernel32.inc index b94a722e2b..cc947991e0 100644 --- a/kernel/branches/kolibri-process/kernel32.inc +++ b/kernel/branches/kolibri-process/kernel32.inc @@ -99,11 +99,11 @@ struct DBG_REGS ends struct PROC - list LHEAD ; - thr_list LHEAD ; - heap_lock MUTEX ; - heap_base rd 1 ; - heap_top rd 1 ; + list LHEAD + thr_list LHEAD + heap_lock MUTEX + heap_base rd 1 + heap_top rd 1 mem_used rd 1 dlls_list_ptr rd 1 pdt_0_phys rd 1