ReactOS 0.4.15-dev-7953-g1f49173
reboot.c File Reference
#include <hal.h>
Include dependency graph for reboot.c:

Go to the source code of this file.

Functions

static DECLSPEC_NORETURN VOID HalpFreezeSystem (VOID)
 
DECLSPEC_NORETURN VOID HalpReboot (VOID)
 
VOID NTAPI HalReturnToFirmware (_In_ FIRMWARE_REENTRY Action)
 

Function Documentation

◆ HalpFreezeSystem()

static DECLSPEC_NORETURN VOID HalpFreezeSystem ( VOID  )
static

Definition at line 17 of file reboot.c.

18{
19 /* Disable interrupts and halt the CPU */
20 _disable();
21 __halt();
23}
void __cdecl _disable(void)
Definition: intrin_arm.h:365
__INTRIN_INLINE void __halt(void)
Definition: intrin_x86.h:1714
#define UNREACHABLE

Referenced by HalReturnToFirmware().

◆ HalpReboot()

DECLSPEC_NORETURN VOID HalpReboot ( VOID  )

Definition at line 28 of file reboot.c.

29{
30 /* Disable interrupts */
31 _disable();
32
33 /* Flush write buffers */
35
36 /* Send the reset command */
40
41 /* Halt the CPU */
42 __halt();
44}
VOID NTAPI KeFlushWriteBuffer(VOID)
Definition: misc.c:39
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21
#define CPU_IO_o_RESET
Definition: cpu.h:10
#define PPI_IO_o_CONTROL
Definition: sysport.h:12
#define PPI_SHUTDOWN_0_ENABLE
Definition: sysport.h:16
#define PPI_SHUTDOWN_1_ENABLE
Definition: sysport.h:15
unsigned char * PUCHAR
Definition: typedefs.h:53

◆ HalReturnToFirmware()

VOID NTAPI HalReturnToFirmware ( _In_ FIRMWARE_REENTRY  Action)

Definition at line 51 of file reboot.c.

53{
54 switch (Action)
55 {
56 /* All recognized actions */
57 case HalHaltRoutine:
60
63 {
64 /* Acquire the display */
66
67 /* Call the internal reboot function */
68 HalpReboot();
69 }
70
71 /* Anything else */
72 default:
73 {
74 /* Print message and break */
75 DbgPrint("HalReturnToFirmware called!\n");
77 }
78 }
79}
#define DbgPrint
Definition: hal.h:12
DECLSPEC_NORETURN VOID HalpReboot(VOID)
Definition: reboot.c:25
static DECLSPEC_NORETURN VOID HalpFreezeSystem(VOID)
Definition: reboot.c:17
VOID NTAPI InbvAcquireDisplayOwnership(VOID)
Definition: inbv.c:290
NTSYSAPI void WINAPI DbgBreakPoint(void)
@ HalRestartRoutine
Definition: haltypes.h:36
@ HalHaltRoutine
Definition: haltypes.h:34
@ HalPowerDownRoutine
Definition: haltypes.h:35
@ HalRebootRoutine
Definition: haltypes.h:37
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510