[NTOSKRNL]

Fix build with MSVC

svn path=/branches/cmake-bringup/; revision=50692
This commit is contained in:
Timo Kreuzer 2011-02-14 13:45:15 +00:00
parent e29077a3cf
commit 0ea1c67bac
4 changed files with 10 additions and 8 deletions

View file

@ -1,5 +1,6 @@
#ifdef _M_IX86
EXTERN _KiSystemService:PROC
#define KUSER_SHARED_SYSCALL HEX(7ffe0300)
#define KGDT_R0_CODE 8
MACRO(STUBCODE_U, SyscallId, StackBytes)
@ -17,6 +18,7 @@ MACRO(STUBCODE_K, SyscallId, StackBytes)
ret StackBytes
ENDM
#elif defined(_M_AMD64)
EXTERN KiSystemService:PROC
MACRO(STUBCODE_U, SyscallId, StackBytes)
mov eax, SyscallId
mov r10, rcx

View file

@ -2,8 +2,6 @@
#include <asm.inc>
#include <syscalls.inc>
EXTERN _KiSystemService
.code
SyscallId = 0

View file

@ -6,7 +6,7 @@
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
* Timo Kreuzer (timo.kreuzer@reactos.org)
*/
// Arguments for idt
#define INT_32_DPL0 HEX(08E00)
#define INT_32_DPL3 HEX(0EE00)
@ -43,7 +43,7 @@
#else
#define LOCK
#define ACQUIRE_SPINLOCK(x, y)
#define RELEASE_SPINLOCK(x)
#define RELEASE_SPINLOCK(x)
#endif
//
@ -138,7 +138,7 @@ MACRO(KiEnterTrap, Flags)
if (Flags AND KI_DONT_SAVE_SEGS)
/* Initialize TrapFrame segment registers with sane values */
mov eax, 0x23
mov eax, KGDT_R3_DATA OR 3
mov ecx, fs
mov [esp + KTRAP_FRAME_DS], eax
mov [esp + KTRAP_FRAME_ES], eax

View file

@ -15,6 +15,8 @@
EXTERN _MmGrowKernelStack@4:PROC
EXTERN _KeUserCallbackDispatcher:PROC
EXTERN @KiServiceExit@8:PROC
EXTERN _KeGetCurrentIrql@0:PROC
EXTERN _KeBugCheckEx@20:PROC
/* FUNCTIONS ****************************************************************/
.code
@ -30,7 +32,7 @@ _KiGetUserModeStackAddress@0:
/*++
* @name KiCallUserMode
* @name KiCallUserMode
*
* The KiSwitchToUserMode routine sets up a Trap Frame and a Callback stack
* for the purpose of switching to user mode. The actual final jump is done
@ -406,7 +408,7 @@ NoStack:
ret 12
/*++
* @name KeSwitchKernelStack
* @name KeSwitchKernelStack
*
* The KeSwitchKernelStack routine switches from the current thread's stack
* to the new specified base and limit.
@ -419,7 +421,7 @@ NoStack:
*
* @return The previous Stack Base of the thread.
*
* @remark This routine should typically only be used when converting from a
* @remark This routine should typically only be used when converting from a
* non-GUI to a GUI Thread. The caller is responsible for freeing the
* previous stack. The new stack values MUST be valid before calling
* this routine.