This commit is contained in:
parent
6402a0d0a4
commit
d5dd87b889
@ -23,6 +23,7 @@ list(APPEND XTOSKRNL_SOURCE
|
|||||||
${XTOSKRNL_SOURCE_DIR}/ke/kprocess.c
|
${XTOSKRNL_SOURCE_DIR}/ke/kprocess.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/ke/krnlinit.c
|
${XTOSKRNL_SOURCE_DIR}/ke/krnlinit.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/ke/kthread.c
|
${XTOSKRNL_SOURCE_DIR}/ke/kthread.c
|
||||||
|
${XTOSKRNL_SOURCE_DIR}/ke/panic.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/ke/semphore.c
|
${XTOSKRNL_SOURCE_DIR}/ke/semphore.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/ke/spinlock.c
|
${XTOSKRNL_SOURCE_DIR}/ke/spinlock.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/ke/timer.c
|
${XTOSKRNL_SOURCE_DIR}/ke/timer.c
|
||||||
|
65
xtoskrnl/ke/panic.c
Normal file
65
xtoskrnl/ke/panic.c
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/ke/panic.c
|
||||||
|
* DESCRIPTION: System shutdown and kernel panic mechanism
|
||||||
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xtos.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crashes the system upon detecting a fatal error in which either it is unable to recover or continue to run system.
|
||||||
|
*
|
||||||
|
* @param Code
|
||||||
|
* Specifies the reason for the kernel panic.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
KePanic(IN ULONG Code)
|
||||||
|
{
|
||||||
|
KePanicEx(Code, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crashes the system upon detecting a fatal error in which either it is unable to recover or continue to run system.
|
||||||
|
*
|
||||||
|
* @param Code
|
||||||
|
* Specifies the reason for the kernel panic.
|
||||||
|
*
|
||||||
|
* @param Parameter1
|
||||||
|
* Supplies additional information about the kernel panic.
|
||||||
|
*
|
||||||
|
* @param Parameter2
|
||||||
|
* Supplies additional information about the kernel panic.
|
||||||
|
*
|
||||||
|
* @param Parameter3
|
||||||
|
* Supplies additional information about the kernel panic.
|
||||||
|
*
|
||||||
|
* @param Parameter4
|
||||||
|
* Supplies additional information about the kernel panic.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
VOID
|
||||||
|
KePanicEx(IN ULONG Code,
|
||||||
|
IN ULONG_PTR Parameter1,
|
||||||
|
IN ULONG_PTR Parameter2,
|
||||||
|
IN ULONG_PTR Parameter3,
|
||||||
|
IN ULONG_PTR Parameter4)
|
||||||
|
{
|
||||||
|
KeDbgPrint(L"Fatal System Error: 0x%08lx\nKernel Panic!\n\n", Code);
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
ArClearInterruptFlag();
|
||||||
|
ArHalt();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user