From d888aca21b2bb3da2d2013bd1b570145f146165e Mon Sep 17 00:00:00 2001 From: Doczom Date: Sat, 18 Dec 2021 11:12:02 +0000 Subject: [PATCH] small update loader drivers git-svn-id: svn://kolibrios.org@9438 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/memory.inc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/kernel/trunk/core/memory.inc b/kernel/trunk/core/memory.inc index e77b1ac42e..6014f69a92 100644 --- a/kernel/trunk/core/memory.inc +++ b/kernel/trunk/core/memory.inc @@ -1225,6 +1225,28 @@ f68: mov [esp+SYSCALL_STACK._eax], eax ret +; prototype function for get list services and unload driver +;.30: ;get list services +; +; ret +;.31: ;unload driver ecx = handl driver edx = cmdline +; cmp edx, OS_BASE +; jae .fail +; test ecx, OS_BASE ; when OS_BASE = 0x80000000 +; jz .fail +; mov eax, [ecx+SRV.entry] +; push ecx +; push edx +; push DRV_EXIT +; call eax +; ; push eax ; +; ; push eax ; +; lea esp, [esp+8] +; push ecx +; mov ebx, [ecx+SRV.base] +; stdcall kernel_free, ebx +; mov [esp+SYSCALL_STACK._eax], eax +; ret .fail: mov [esp+SYSCALL_STACK._eax], eax ret @@ -1271,6 +1293,7 @@ proc load_pe_driver stdcall, file:dword, cmdline:dword test eax, eax jz .fail_init + mov [eax+SRV.base], ebx mov [eax+SRV.entry], esi pop esi ret