Author: tkreuzer
Date: Fri Dec 31 15:12:00 2010
New Revision: 50233
URL:
http://svn.reactos.org/svn/reactos?rev=50233&view=rev
Log:
[CMAKE]
Some amd64 compilation fixes
Modified:
branches/cmake-bringup/ntoskrnl/ke/amd64/thrdini.c
branches/cmake-bringup/ntoskrnl/ke/amd64/trap.S
Modified: branches/cmake-bringup/ntoskrnl/ke/amd64/thrdini.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/ke/amd64…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/ke/amd64/thrdini.c [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/ke/amd64/thrdini.c [iso-8859-1] Fri Dec 31 15:12:00
2010
@@ -12,24 +12,9 @@
#define NDEBUG
#include <debug.h>
-typedef struct _KSWITCHFRAME
-{
- PVOID ExceptionList;
- BOOLEAN ApcBypassDisable;
- PVOID RetAddr;
-} KSWITCHFRAME, *PKSWITCHFRAME;
-
-typedef struct _KSTART_FRAME
-{
- PKSYSTEM_ROUTINE SystemRoutine;
- PKSTART_ROUTINE StartRoutine;
- PVOID StartContext;
- BOOLEAN UserThread;
-} KSTART_FRAME, *PKSTART_FRAME;
-
typedef struct _KUINIT_FRAME
{
- KSWITCHFRAME CtxSwitchFrame;
+ KSWITCH_FRAME CtxSwitchFrame;
KSTART_FRAME StartFrame;
KTRAP_FRAME TrapFrame;
//FX_SAVE_AREA FxSaveArea;
@@ -37,7 +22,7 @@
typedef struct _KKINIT_FRAME
{
- KSWITCHFRAME CtxSwitchFrame;
+ KSWITCH_FRAME CtxSwitchFrame;
KSTART_FRAME StartFrame;
//FX_SAVE_AREA FxSaveArea;
} KKINIT_FRAME, *PKKINIT_FRAME;
@@ -55,7 +40,7 @@
//PFX_SAVE_AREA FxSaveArea;
//PFXSAVE_FORMAT FxSaveFormat;
PKSTART_FRAME StartFrame;
- PKSWITCHFRAME CtxSwitchFrame;
+ PKSWITCH_FRAME CtxSwitchFrame;
PKTRAP_FRAME TrapFrame;
CONTEXT LocalContext;
PCONTEXT Context = NULL;
@@ -140,7 +125,7 @@
Thread->PreviousMode = UserMode;
/* Tell KiThreadStartup of that too */
- StartFrame->UserThread = TRUE;
+// StartFrame->UserThread = TRUE;
}
else
{
@@ -170,18 +155,18 @@
Thread->PreviousMode = KernelMode;
/* Tell KiThreadStartup of that too */
- StartFrame->UserThread = FALSE;
+// StartFrame->UserThread = FALSE;
}
/* Now setup the remaining data for KiThreadStartup */
- StartFrame->StartContext = StartContext;
- StartFrame->StartRoutine = StartRoutine;
- StartFrame->SystemRoutine = SystemRoutine;
+// StartFrame->StartContext = StartContext;
+// StartFrame->StartRoutine = StartRoutine;
+// StartFrame->SystemRoutine = SystemRoutine;
/* And set up the Context Switch Frame */
- CtxSwitchFrame->RetAddr = KiThreadStartup;
- CtxSwitchFrame->ApcBypassDisable = TRUE;
- CtxSwitchFrame->ExceptionList = EXCEPTION_CHAIN_END;;
+// CtxSwitchFrame->RetAddr = KiThreadStartup;
+// CtxSwitchFrame->ApcBypassDisable = TRUE;
+// CtxSwitchFrame->ExceptionList = EXCEPTION_CHAIN_END;;
/* Save back the new value of the kernel stack. */
Thread->KernelStack = (PVOID)CtxSwitchFrame;
Modified: branches/cmake-bringup/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/ke/amd64…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Fri Dec 31 15:12:00 2010
@@ -76,7 +76,7 @@
#define TRAPFLAG_SYSTEMSERVICE (TRAPFLAG_VOLATILES|TRAPFLAG_DEBUG)
#define TRAPFLAG_ALL HEX(ff)
-/*
+/*
* Stack Layout:
* |-------------------|
* | KTRAP_FRAME |
@@ -89,7 +89,7 @@
*/
/*
- * ENTER_TRAP_FRAME - Allocate SIZE_KTRAP_FRAME and save registers to it
+ * ENTER_TRAP_FRAME - Allocate KTRAP_FRAME_LENGTH and save registers to it
*/
MACRO(ENTER_TRAP_FRAME, Flags)
LOCAL dont_swap
@@ -107,8 +107,8 @@
endif
/* Make room for a KTRAP_FRAME */
- sub rsp, (SIZE_KTRAP_FRAME - SIZE_INITIAL_FRAME)
- .allocstack (SIZE_KTRAP_FRAME - SIZE_INITIAL_FRAME)
+ sub rsp, (KTRAP_FRAME_LENGTH - SIZE_INITIAL_FRAME)
+ .allocstack (KTRAP_FRAME_LENGTH - SIZE_INITIAL_FRAME)
.endprolog
/* Save rbp */
@@ -278,12 +278,12 @@
.PROC InternalDispatchException
/* Allocate stack space for EXCEPTION_RECORD and KEXCEPTION_FRAME */
- sub rsp, SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME
- .allocstack (SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME)
+ sub rsp, EXCEPTION_RECORD_LENGTH + KEXCEPTION_FRAME_LENGTH
+ .allocstack (EXCEPTION_RECORD_LENGTH + KEXCEPTION_FRAME_LENGTH)
.endprolog
/* Set up EXCEPTION_RECORD */
- lea rcx, [rsp + SIZE_KEXCEPTION_FRAME]
+ lea rcx, [rsp + KEXCEPTION_FRAME_LENGTH]
mov [rcx + EXCEPTION_RECORD_ExceptionCode], eax
xor rax, rax
mov [rcx + EXCEPTION_RECORD_ExceptionFlags], eax
@@ -341,7 +341,7 @@
movdqa xmm14, [rsp + KEXCEPTION_FRAME_Xmm14]
movdqa xmm15, [rsp + KEXCEPTION_FRAME_Xmm15]
- add rsp, SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME
+ add rsp, EXCEPTION_RECORD_LENGTH + KEXCEPTION_FRAME_LENGTH
ret
.ENDP InternalDispatchException
@@ -516,7 +516,7 @@
KiInvalidOpcodeKernel:
/* Kernel mode fault */
-
+
/* Dispatch the exception */
mov eax, STATUS_ILLEGAL_INSTRUCTION
mov edx, 3
@@ -837,7 +837,7 @@
mov r10, 0
mov r11, 0
call InternalDispatchException
-
+
LEAVE_TRAP_FRAME
iretq
.ENDP KiRaiseAssertion