ReactOS 0.4.15-dev-7958-gcd0bb1a
nmi.c File Reference
#include <hal.h>
#include <drivers/bootvid/display.h>
#include <debug.h>
Include dependency graph for nmi.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI HalHandleNMI (IN PVOID NmiInfo)
 

Variables

BOOLEAN HalpNMIInProgress
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file nmi.c.

Function Documentation

◆ HalHandleNMI()

VOID NTAPI HalHandleNMI ( IN PVOID  NmiInfo)

Definition at line 27 of file nmi.c.

29{
31#ifndef _MINIHAL_
33
34 /* Don't recurse */
37
38 /* Get NMI reason from hardware */
39#if defined(SARCH_PC98)
40 SystemControl.Bits = __inbyte(PPI_IO_i_PORT_B);
41#else
42 SystemControl.Bits = __inbyte(SYSTEM_CONTROL_PORT_B);
43#endif
44
45 /* Switch to boot video */
47 {
48 /* Acquire ownership */
51
52 /* Fill the screen */
55
56 /* Enable text */
60 }
61
62 /* Display NMI failure string */
63 InbvDisplayString("\r\n*** Hardware Malfunction\r\n\r\n");
64 InbvDisplayString("Call your hardware vendor for support\r\n\r\n");
65
66#if defined(SARCH_PC98)
67 /* Check for parity error */
68 if (SystemControl.MemoryParityCheck)
69 {
70 InbvDisplayString("NMI: Parity Check / Memory Parity Error\r\n");
71 }
72 if (SystemControl.ExtendedMemoryParityCheck)
73 {
74 InbvDisplayString("NMI: Parity Check / Extended Memory Parity Error\r\n");
75 }
76#else
77 /* Check for parity error */
78 if (SystemControl.ParityCheck)
79 {
80 InbvDisplayString("NMI: Parity Check / Memory Parity Error\r\n");
81 }
82
83 /* Check for I/O failure */
84 if (SystemControl.ChannelCheck)
85 {
86 InbvDisplayString("NMI: Channel Check / IOCHK\r\n");
87 }
88#endif
89
90 /* Check for EISA systems */
92 {
93 /* FIXME: Not supported */
95 }
96
97 /* Halt the system */
98 InbvDisplayString("\r\n*** The system has halted ***\r\n");
99
100 /* Enter the debugger if possible */
101 KiBugCheckData[0] = (ULONG_PTR)KeServiceDescriptorTable; /* NMI Corruption? */
104#endif /* !_MINIHAL_ */
105
106 /* Freeze the system */
107 while (TRUE)
108 NOTHING;
109}
#define UNIMPLEMENTED
Definition: debug.h:115
VOID NTAPI KeEnterKernelDebugger(VOID)
Definition: bug.c:1441
ULONG_PTR KiBugCheckData[5]
Definition: bug.c:31
ULONG HalpBusType
Definition: pcibus.c:18
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define ULONG_PTR
Definition: config.h:101
#define SYSTEM_CONTROL_PORT_B
Definition: halhw.h:127
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:290
VOID NTAPI InbvInstallDisplayStringFilter(_In_ INBV_DISPLAY_STRING_FILTER DisplayFilter)
Definition: inbv.c:387
VOID NTAPI InbvSetTextColor(_In_ ULONG Color)
Definition: inbv.c:460
BOOLEAN NTAPI InbvEnableDisplayString(_In_ BOOLEAN Enable)
Definition: inbv.c:370
BOOLEAN NTAPI InbvDisplayString(_In_ PCHAR String)
Definition: inbv.c:332
BOOLEAN NTAPI InbvResetDisplay(VOID)
Definition: inbv.c:431
VOID NTAPI InbvSetScrollRegion(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom)
Definition: inbv.c:448
VOID NTAPI InbvSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ ULONG Color)
Definition: inbv.c:485
BOOLEAN NTAPI InbvIsBootDriverInstalled(VOID)
Definition: inbv.c:396
#define NOTHING
Definition: input_list.c:10
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
Definition: intrin_ppc.h:539
BOOLEAN KdDebuggerNotPresent
Definition: kddata.c:81
BOOLEAN KdDebuggerEnabled
Definition: kddata.c:82
#define MACHINE_TYPE_EISA
Definition: ketypes.h:114
BOOLEAN HalpNMIInProgress
Definition: nmi.c:18
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define SCREEN_WIDTH
Definition: pc98video.c:27
#define SCREEN_HEIGHT
Definition: pc98video.c:28
KSERVICE_TABLE_DESCRIPTOR KeServiceDescriptorTable[SSDT_MAX_ENTRIES]
Definition: procobj.c:23
#define ERROR_DBGBREAK(...)
Definition: debug.h:221
#define BV_COLOR_WHITE
Definition: display.h:30
#define BV_COLOR_RED
Definition: display.h:16
#define PPI_IO_i_PORT_B
Definition: sysport.h:19

Referenced by KiTrap02Handler().

Variable Documentation

◆ HalpNMIInProgress

BOOLEAN HalpNMIInProgress

Definition at line 18 of file nmi.c.

Referenced by HalHandleNMI(), and HalpRestoreTrapHandlers().