ReactOS  0.4.14-dev-98-gb0d4763
misc.c File Reference
#include <hal.h>
#include <debug.h>
Include dependency graph for misc.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI HalpCheckPowerButton (VOID)
 
PVOID NTAPI HalpMapPhysicalMemory64 (IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPage)
 
VOID NTAPI HalpUnmapVirtualAddress (IN PVOID VirtualAddress, IN ULONG NumberPages)
 
VOID NTAPI HalHandleNMI (IN PVOID NmiInfo)
 
UCHAR FASTCALL HalSystemVectorDispatchEntry (IN ULONG Vector, OUT PKINTERRUPT_ROUTINE **FlatDispatch, OUT PKINTERRUPT_ROUTINE *NoConnection)
 
VOID NTAPI KeFlushWriteBuffer (VOID)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file misc.c.

Function Documentation

◆ HalHandleNMI()

VOID NTAPI HalHandleNMI ( IN PVOID  NmiInfo)

Definition at line 53 of file misc.c.

54 {
55  UCHAR ucStatus;
56 
57  /* Get the NMI Flag */
58  ucStatus = READ_PORT_UCHAR((PUCHAR)0x61);
59 
60  /* Display NMI failure string */
61  HalDisplayString ("\r\n*** Hardware Malfunction\r\n\r\n");
62  HalDisplayString ("Call your hardware vendor for support\r\n\r\n");
63 
64  /* Check for parity error */
65  if (ucStatus & 0x80)
66  {
67  /* Display message */
68  HalDisplayString ("NMI: Parity Check / Memory Parity Error\r\n");
69  }
70 
71  /* Check for I/O failure */
72  if (ucStatus & 0x40)
73  {
74  /* Display message */
75  HalDisplayString ("NMI: Channel Check / IOCHK\r\n");
76  }
77 
78  /* Halt the system */
79  HalDisplayString("\r\n*** The system has halted ***\r\n");
80  //KeEnterKernelDebugger();
81 }
unsigned char * PUCHAR
Definition: retypes.h:3
UCHAR NTAPI READ_PORT_UCHAR(PUCHAR Address)
Definition: mach.c:528
unsigned char UCHAR
Definition: xmlstorage.h:181
NTHALAPI VOID NTAPI HalDisplayString(PUCHAR String)

Referenced by KiTrap02Handler().

◆ HalpCheckPowerButton()

VOID NTAPI HalpCheckPowerButton ( VOID  )

Definition at line 20 of file misc.c.

21 {
22  /* Nothing to do on non-ACPI */
23  return;
24 }

Referenced by HalpRegisterKdSupportFunctions().

◆ HalpMapPhysicalMemory64()

PVOID NTAPI HalpMapPhysicalMemory64 ( IN PHYSICAL_ADDRESS  PhysicalAddress,
IN ULONG  NumberPage 
)

Definition at line 28 of file misc.c.

30 {
31  /* Use kernel memory manager I/O map facilities */
33  NumberPage << PAGE_SHIFT,
34  MmNonCached);
35 }
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061

Referenced by HalpAcpiCopyBiosTable(), HalpAcpiFindRsdtPhase0(), HalpAcpiGetTableFromBios(), HalpAcpiTableCacheInit(), HalpReboot(), HalpRegisterKdSupportFunctions(), and HalpSetupAcpiPhase0().

◆ HalpUnmapVirtualAddress()

VOID NTAPI HalpUnmapVirtualAddress ( IN PVOID  VirtualAddress,
IN ULONG  NumberPages 
)

Definition at line 39 of file misc.c.

41 {
42  /* Use kernel memory manager I/O map facilities */
43  MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
44 }
#define PAGE_SHIFT
Definition: env_spec_w32.h:45
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193

Referenced by HalpAcpiGetTable(), HalpAcpiGetTableFromBios(), HalpAcpiTableCacheInit(), and HalpRegisterKdSupportFunctions().

◆ HalSystemVectorDispatchEntry()

UCHAR FASTCALL HalSystemVectorDispatchEntry ( IN ULONG  Vector,
OUT PKINTERRUPT_ROUTINE **  FlatDispatch,
OUT PKINTERRUPT_ROUTINE NoConnection 
)

Definition at line 88 of file misc.c.

91 {
92  /* Not implemented on x86 */
93  return FALSE;
94 }

◆ KeFlushWriteBuffer()

VOID NTAPI KeFlushWriteBuffer ( VOID  )

Definition at line 101 of file misc.c.

102 {
103  /* Not implemented on x86 */
104  return;
105 }