[NTOS:KE/x64] Implement KiSetTrapContext

KiSetTrapContext is an asm wrapper around RtlSetUnwindContext, which first stores an exception frame to assure that all non-volatile registers were put on the stack, then calls RtlSetUnwindContext to update their first saving positions on the stack and finally restore the exception frame to potentially load any updated registers, that haven't been saved elsewhere on the stack.
This commit is contained in:
Timo Kreuzer 2018-05-15 14:06:27 +02:00
parent e801b7dda2
commit f1ed97d6cc
4 changed files with 58 additions and 3 deletions

View file

@ -1071,3 +1071,5 @@ OFFSET(KINTERRUPT_DispatchCount, KINTERRUPT, DispatchCount),
OFFSET(KINTERRUPT_TrapFrame, KINTERRUPT, TrapFrame),
OFFSET(KINTERRUPT_DispatchCode, KINTERRUPT, DispatchCode),
HEADER("Misc definitions"),
CONSTANT(MAX_SYSCALL_PARAM_SIZE),

View file

@ -254,6 +254,9 @@ Author:
#define CR0_CD HEX(40000000)
#define CR0_PG HEX(80000000)
/* Number of bytes reserved for syscall parameters */
#define MAX_SYSCALL_PARAM_SIZE (16 * 8)
#ifdef _ASM_
//
// CR4