1 /* $Id: continue.c,v 1.1 2004/07/02 00:47:57 royce Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/ps/i386/continue.c
6 * PURPOSE: i386 implementation of NtContinue()
7 * PROGRAMMER: Royce Mitchell III, kjk_hyperion
12 /* INCLUDES ****************************************************************/
14 #include <ddk/ntddk.h>
15 #include <internal/ke.h>
16 #include <internal/ob.h>
17 #include <internal/ps.h>
18 #include <internal/ob.h>
19 #include <internal/pool.h>
20 #include <ntos/minmax.h>
21 #include <internal/ldr.h>
22 #include <rosrtl/string.h>
25 #include <internal/debug.h>
30 KeRosTrapReturn ( PKTRAP_FRAME TrapFrame
, PKTRAP_FRAME PrevTrapFrame
);
33 KeRosDumpStackFrames ( PULONG Frame
, ULONG FrameCount
);
43 PKTRAP_FRAME TrapFrame
= KeGetCurrentThread()->TrapFrame
;
44 PKTRAP_FRAME PrevTrapFrame
= (PKTRAP_FRAME
)TrapFrame
->Edx
;
46 DPRINT1("NtContinue: Context: Eip=0x%x, Esp=0x%x\n", Context
->Eip
, Context
->Esp
);
48 __asm__("mov %%ebp, %%ebx" : "=b" (Frame
) : );
49 DbgPrint ( "NtContinue(): Ebp=%x, prev/TF=%x/%x\n", Frame
, Frame
[0], TrapFrame
);
50 KeRosDumpStackFrames(NULL
,5);
52 if ( Context
== NULL
)
54 DPRINT1("NtContinue called with NULL Context\n");
55 return STATUS_INVALID_PARAMETER
;
58 if ( TrapFrame
== NULL
)
60 CPRINT("NtContinue called but TrapFrame was NULL\n");
65 * Copy the supplied context over the register information that was saved
66 * on entry to kernel mode, it will then be restored on exit
67 * FIXME: Validate the context
69 KeContextToTrapFrame ( Context
, TrapFrame
);
71 KeRosTrapReturn ( TrapFrame
, PrevTrapFrame
);
73 return STATUS_SUCCESS
; /* this doesn't actually happen b/c KeRosTrapReturn() won't return */
81 PKTRAP_FRAME TrapFrame
= KeGetCurrentThread()->TrapFrame
;
83 __asm__("mov %%ebp, %%ebx" : "=b" (Frame
) : );
84 DbgPrint ( "NtContinue(): Ebp=%x, prev/TF=%x/%x\n", Frame
, Frame
[0], TrapFrame
);
87 * Copy the supplied context over the register information that was saved
88 * on entry to kernel mode, it will then be restored on exit
89 * FIXME: Validate the context
91 if ( TrapFrame
== NULL
)
93 CPRINT("NtContinue called but TrapFrame was NULL\n");
96 KeContextToTrapFrame ( Context
, TrapFrame
);
97 return(STATUS_SUCCESS
);