kolibri-process: fix shutdown/restart

git-svn-id: svn://kolibrios.org@5122 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2014-09-14 10:45:14 +00:00
parent 305be12d23
commit e147a8e695
6 changed files with 16 additions and 12 deletions

View File

@ -182,7 +182,7 @@ restart_kernel_4000:
pop es pop es
mov cx, 0x8000 mov cx, 0x8000
push cx push cx
push 0x7000 push 0x7100
pop ds pop ds
xor si, si xor si, si
xor di, di xor di, di

View File

@ -748,7 +748,6 @@ destroy_thread:
.xd1: .xd1:
;release slot ;release slot
bts [thr_slot_map], esi bts [thr_slot_map], esi
mov ecx, [.process] mov ecx, [.process]

View File

@ -109,9 +109,10 @@ v86_create:
add eax, edx add eax, edx
loop @b loop @b
mov eax, sys_proc-OS_BASE+PROC.pdt_0 mov eax, sys_proc
push ebx
mov cr3, eax call set_cr3
pop ebx
popfd popfd
pop edi pop edi
@ -773,13 +774,13 @@ end if
mov [tss._esp0], eax mov [tss._esp0], eax
pop eax pop eax
mov [ecx+APPDATA.process], eax mov [ecx+APPDATA.process], eax
mov [current_process], eax
pop ebx pop ebx
mov dword [ecx+APPDATA.io_map+4], ebx mov dword [ecx+APPDATA.io_map+4], ebx
mov dword [page_tabs + (tss._io_map_1 shr 10)], ebx mov dword [page_tabs + (tss._io_map_1 shr 10)], ebx
pop ebx pop ebx
mov dword [ecx+APPDATA.io_map], ebx mov dword [ecx+APPDATA.io_map], ebx
mov dword [page_tabs + (tss._io_map_0 shr 10)], ebx mov dword [page_tabs + (tss._io_map_0 shr 10)], ebx
mov [current_process], eax
mov eax, [eax+PROC.pdt_0_phys] mov eax, [eax+PROC.pdt_0_phys]
mov cr3, eax mov cr3, eax
sti sti

View File

@ -177,7 +177,7 @@ kernel_file_load:
dd 0 ; subfunction dd 0 ; subfunction
dq 0 ; offset in file dq 0 ; offset in file
dd 0x30000 ; number of bytes to read 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 db '/RD/1/KERNEL.MNT',0
dev_data_path db '/RD/1/DRIVERS/DEVICES.DAT',0 dev_data_path db '/RD/1/DRIVERS/DEVICES.DAT',0

View File

@ -1180,6 +1180,10 @@ proc setup_os_slot
mov [edx + APPDATA.process], sys_proc 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 mov eax, edx
shr eax, 3 shr eax, 3
add eax, CURRENT_TASK - (SLOT_BASE shr 3) add eax, CURRENT_TASK - (SLOT_BASE shr 3)

View File

@ -99,11 +99,11 @@ struct DBG_REGS
ends ends
struct PROC struct PROC
list LHEAD ; list LHEAD
thr_list LHEAD ; thr_list LHEAD
heap_lock MUTEX ; heap_lock MUTEX
heap_base rd 1 ; heap_base rd 1
heap_top rd 1 ; heap_top rd 1
mem_used rd 1 mem_used rd 1
dlls_list_ptr rd 1 dlls_list_ptr rd 1
pdt_0_phys rd 1 pdt_0_phys rd 1