mirror of
https://github.com/reactos/reactos.git
synced 2025-05-16 15:50:24 +00:00
MSVC compatibility for NCITool, fix more svn:ignore stuff..., enable interrupts during APC delivery and syscall calling, because the functions are probably expecting them to be enabled at that time.
svn path=/trunk/; revision=13110
This commit is contained in:
parent
ecac8a6e91
commit
fc779d75d9
2 changed files with 28 additions and 1 deletions
|
@ -105,10 +105,10 @@ _KiSystemService:
|
|||
#endif
|
||||
|
||||
/* Load the segment registers */
|
||||
sti
|
||||
movw $KERNEL_DS, %bx
|
||||
movw %bx, %ds
|
||||
movw %bx, %es
|
||||
movw %bx, %gs
|
||||
|
||||
/* Save the old trap frame pointer where EDX would be saved */
|
||||
movl KTHREAD_TRAP_FRAME(%esi), %ebx
|
||||
|
@ -192,6 +192,7 @@ KeReturnFromSystemCall:
|
|||
_KiServiceExit:
|
||||
|
||||
/* Get the Current Thread */
|
||||
cli
|
||||
movl %fs:KPCR_CURRENT_THREAD, %esi
|
||||
|
||||
/* Deliver APCs only if we were called from user mode */
|
||||
|
@ -213,10 +214,12 @@ _KiServiceExit:
|
|||
pushl %eax
|
||||
|
||||
/* Deliver APCs */
|
||||
sti
|
||||
pushl %ebx
|
||||
pushl $0
|
||||
pushl $UserMode
|
||||
call _KiDeliverApc@12
|
||||
cli
|
||||
|
||||
/* Return to old IRQL */
|
||||
popl %ecx
|
||||
|
|
|
@ -46,21 +46,45 @@
|
|||
* This stubs calls into KUSER_SHARED_DATA where either a
|
||||
* sysenter or interrupt is performed, depending on CPU support.
|
||||
*/
|
||||
#if defined(__GNUC__)
|
||||
#define UserModeStub_x86 " movl $0x%x, %%eax\n" \
|
||||
" movl $KUSER_SHARED_SYSCALL, %%ecx\n" \
|
||||
" call *%%ecx\n" \
|
||||
" ret $0x%x\n\n"
|
||||
#elif defined(_MSC_VER)
|
||||
#define UserModeStub_x86 " asm { \n" \
|
||||
" mov eax, %xh\n" \
|
||||
" mov ecx, KUSER_SHARED_SYSCALL\n" \
|
||||
" call [ecx]\n" \
|
||||
" ret %xh\n" \
|
||||
" }\n"
|
||||
#else
|
||||
#error Unknown compiler for inline assembler
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This stub calls KiSystemService directly with a fake INT2E stack.
|
||||
* Because EIP is pushed during the call, the handler will return here.
|
||||
*/
|
||||
#if defined(__GNUC__)
|
||||
#define KernelModeStub_x86 " movl $0x%x, %%eax\n" \
|
||||
" leal 4(%%esp), %%edx\n" \
|
||||
" pushfl\n" \
|
||||
" pushl $KERNEL_CS\n" \
|
||||
" call _KiSystemService\n" \
|
||||
" ret $0x%x\n\n"
|
||||
#elif defined(_MSC_VER)
|
||||
#define KernelModeStub_x86 " asm { \n" \
|
||||
" mov eax, %xh\n" \
|
||||
" lea edx, [esp+4]\n" \
|
||||
" pushf\n" \
|
||||
" push KERNEL_CS\n" \
|
||||
" call _KiSystemService\n" \
|
||||
" ret %xh\n" \
|
||||
" }\n"
|
||||
#else
|
||||
#error Unknown compiler for inline assembler
|
||||
#endif
|
||||
|
||||
/***** Arch Dependent Stuff ******/
|
||||
//#ifdef _M_IX86
|
||||
|
|
Loading…
Reference in a new issue