📄 reboot.c
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
// File: reboot.c
//
// This file implement Vr4131 SoC specific OALIoCtlxxxx functions.
//
#include <windows.h>
#include <ceddk.h>
#include <nkintr.h>
#include <oal.h>
#include <vr4131.h>
//------------------------------------------------------------------------------
//
// Function: OALIoCtlHalReboot
//
//
BOOL OALIoCtlHalReboot(
UINT32 code, VOID *pInpBuffer, UINT32 inpSize, VOID *pOutBuffer,
UINT32 outSize, UINT32 *pOutSize
) {
VR4131_PMU_REGS *pPMURegs = OALPAtoUA(VR4131_REG_PA_PMU);
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"+OALIoCtlHalReboot\r\n"));
// Let do reset
RETAILMSG(TRUE, (L"*** RESET ***\r\n"));
SETREG16(&pPMURegs->PMUCNT2, PMU_SOFTRST);
while (TRUE);
// Should never get to this point...
OALMSG(OAL_IOCTL&&OAL_FUNC, (L"-OALIoCtlHalReboot\r\n"));
return TRUE;
}
//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -