mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 20:50:41 +00:00
[NTOS:KE/x64] Add KiNmiInterruptHandler
So far it only calls KiHandleNmi. It will also handle processor freeze later. TODO: Pass TF_WITH_EF to directly generate a KEXCEPTION_FRAME
This commit is contained in:
parent
1dc8d80ca1
commit
d96f01b5dc
2 changed files with 26 additions and 2 deletions
|
@ -192,14 +192,30 @@ KiDebugTrapOrFaultKMode:
|
|||
ExitTrap TF_SAVE_ALL
|
||||
ENDFUNC
|
||||
|
||||
EXTERN KiNmiInterruptHandler:PROC
|
||||
|
||||
FUNC KiNmiInterruptWithEf
|
||||
/* Generate a KEXCEPTION_FRAME on the stack */
|
||||
GENERATE_EXCEPTION_FRAME
|
||||
|
||||
/* Call the C handler */
|
||||
lea rcx, [rsp + KEXCEPTION_FRAME_LENGTH]
|
||||
lea rdx, [rsp]
|
||||
call KiNmiInterruptHandler
|
||||
|
||||
/* Restore the registers from the KEXCEPTION_FRAME */
|
||||
RESTORE_EXCEPTION_STATE
|
||||
|
||||
/* Return */
|
||||
ret
|
||||
ENDFUNC
|
||||
|
||||
PUBLIC KiNmiInterrupt
|
||||
FUNC KiNmiInterrupt
|
||||
/* Push pseudo error code */
|
||||
EnterTrap TF_SAVE_ALL
|
||||
|
||||
UNIMPLEMENTED KiNmiInterrupt
|
||||
int 3
|
||||
call KiNmiInterruptWithEf
|
||||
|
||||
/* Return */
|
||||
ExitTrap TF_SAVE_ALL
|
||||
|
|
|
@ -84,6 +84,14 @@ KiDpcInterruptHandler(VOID)
|
|||
KeLowerIrql(OldIrql);
|
||||
}
|
||||
|
||||
VOID
|
||||
KiNmiInterruptHandler(
|
||||
_In_ PKTRAP_FRAME TrapFrame,
|
||||
_In_ PKEXCEPTION_FRAME ExceptionFrame)
|
||||
{
|
||||
KiHandleNmi();
|
||||
}
|
||||
|
||||
#define MAX_SYSCALL_PARAMS 16
|
||||
|
||||
NTSTATUS
|
||||
|
|
Loading…
Reference in a new issue