ReactOS  0.4.15-dev-1070-ge1a01de
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 {
30  UNREFERENCED_PARAMETER(NmiInfo);
31 #ifndef _MINIHAL_
32  SYSTEM_CONTROL_PORT_B_REGISTER SystemControl;
33 
34  /* Don't recurse */
35  if (HalpNMIInProgress++)
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? */
102  //if (!(KdDebuggerNotPresent) && (KdDebuggerEnabled)) KeEnterKernelDebugger();
103 #endif /* !_MINIHAL_ */
104 
105  /* Freeze the system */
106  while (TRUE)
107  NOTHING;
108 }
#define SYSTEM_CONTROL_PORT_B
Definition: halhw.h:127
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
BOOLEAN NTAPI InbvDisplayString(IN PCHAR String)
Definition: inbv.c:569
#define SCREEN_WIDTH
Definition: pc98video.c:27
VOID NTAPI InbvSolidColorFill(IN ULONG Left, IN ULONG Top, IN ULONG Right, IN ULONG Bottom, IN ULONG Color)
Definition: inbv.c:716
#define BV_COLOR_WHITE
Definition: display.h:30
BOOLEAN HalpNMIInProgress
Definition: nmi.c:18
#define ERROR_DBGBREAK(...)
Definition: debug.h:221
smooth NULL
Definition: ftsmooth.c:416
VOID NTAPI InbvSetTextColor(IN ULONG Color)
Definition: inbv.c:692
#define SCREEN_HEIGHT
Definition: pc98video.c:28
ULONG HalpBusType
Definition: bus.c:17
ULONG_PTR KiBugCheckData[5]
Definition: bug.c:31
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:528
#define NOTHING
Definition: env_spec_w32.h:461
BOOLEAN NTAPI InbvEnableDisplayString(IN BOOLEAN Enable)
Definition: inbv.c:606
BOOLEAN NTAPI InbvIsBootDriverInstalled(VOID)
Definition: inbv.c:630
BOOLEAN NTAPI InbvResetDisplay(VOID)
Definition: inbv.c:664
VOID NTAPI InbvInstallDisplayStringFilter(IN INBV_DISPLAY_STRING_FILTER Filter)
Definition: inbv.c:622
#define PPI_IO_i_PORT_B
Definition: sysport.h:19
KSERVICE_TABLE_DESCRIPTOR KeServiceDescriptorTable[SSDT_MAX_ENTRIES]
Definition: procobj.c:23
#define UNIMPLEMENTED
Definition: debug.h:115
#define ULONG_PTR
Definition: config.h:101
VOID NTAPI InbvSetScrollRegion(IN ULONG Left, IN ULONG Top, IN ULONG Right, IN ULONG Bottom)
Definition: inbv.c:681
#define BV_COLOR_RED
Definition: display.h:16
#define MACHINE_TYPE_EISA
Definition: ketypes.h:53
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
Definition: intrin_ppc.h:539

Variable Documentation

◆ HalpNMIInProgress

BOOLEAN HalpNMIInProgress

Definition at line 18 of file nmi.c.

Referenced by HalHandleNMI(), and HalpRestoreTrapHandlers().