本文整理汇总了C++中CPU_SPECIFIC_SERVICES::GetWarmResetFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ CPU_SPECIFIC_SERVICES::GetWarmResetFlag方法的具体用法?C++ CPU_SPECIFIC_SERVICES::GetWarmResetFlag怎么用?C++ CPU_SPECIFIC_SERVICES::GetWarmResetFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPU_SPECIFIC_SERVICES
的用法示例。
在下文中一共展示了CPU_SPECIFIC_SERVICES::GetWarmResetFlag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCpuServicesOfCurrentCore
/**
* This function will get the CPU register warm reset bits.
*
* Note: This function will be called by UEFI BIOS's
* The UEFI wrapper code should register this function, to be called back later point
* in time, before the wrapper code does warm reset.
*
* @param[in] StdHeader Config handle for library and services
* @param[out] Request Indicate warm reset status
*
*---------------------------------------------------------------------------------------
**/
VOID
GetWarmResetFlag (
IN AMD_CONFIG_PARAMS *StdHeader,
OUT WARM_RESET_REQUEST *Request
)
{
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
FamilySpecificServices = NULL;
GetCpuServicesOfCurrentCore (&FamilySpecificServices, StdHeader);
FamilySpecificServices->GetWarmResetFlag (FamilySpecificServices, StdHeader, Request);
switch (StdHeader->Func) {
case AMD_INIT_RESET:
Request->PostStage = (UINT8) WR_STATE_RESET;
break;
case AMD_INIT_EARLY:
Request->PostStage = (UINT8) WR_STATE_EARLY;
break;
case AMD_INIT_POST:
// Fall through to default case
default:
Request->PostStage = (UINT8) WR_STATE_POST;
break;
}
}
示例2: switch
/**
* Is this boot a warm reset?
*
* This function reads the CPU register warm reset bit that is preserved after a warm reset.
* Which in fact gets set before issuing warm reset. We just use the BSP's register always.
*
* @param[in] StdHeader Config handle for library and services
*
* @retval TRUE Warm Reset
* @retval FALSE Not Warm Reset
*
*/
BOOLEAN
IsWarmReset (
IN AMD_CONFIG_PARAMS *StdHeader
)
{
UINT8 PostStage;
WARM_RESET_REQUEST Request;
BOOLEAN WarmReset;
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
FamilySpecificServices = NULL;
switch (StdHeader->Func) {
case AMD_INIT_RESET:
PostStage = WR_STATE_RESET;
break;
case AMD_INIT_EARLY:
PostStage = WR_STATE_EARLY;
break;
case AMD_INIT_POST:
default:
PostStage = WR_STATE_POST;
break;
}
GetCpuServicesOfCurrentCore (&FamilySpecificServices, StdHeader);
FamilySpecificServices->GetWarmResetFlag (FamilySpecificServices, StdHeader, &Request);
if (Request.StateBits >= PostStage) {
WarmReset = TRUE;
} else {
WarmReset = FALSE;
}
return WarmReset;
}