本文整理汇总了C++中CPU_SPECIFIC_SERVICES::GetMinMaxNbFrequency方法的典型用法代码示例。如果您正苦于以下问题:C++ CPU_SPECIFIC_SERVICES::GetMinMaxNbFrequency方法的具体用法?C++ CPU_SPECIFIC_SERVICES::GetMinMaxNbFrequency怎么用?C++ CPU_SPECIFIC_SERVICES::GetMinMaxNbFrequency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPU_SPECIFIC_SERVICES
的用法示例。
在下文中一共展示了CPU_SPECIFIC_SERVICES::GetMinMaxNbFrequency方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCpuServicesOfSocket
/**
* Multisocket call to loop through all possible socket locations and Nb Pstates,
* comparing the NB frequencies to determine the slowest system and P0 frequency
*
* @param[in] PlatformConfig Platform profile/build option config structure.
* @param[out] MinSysNbFreq NB frequency numerator for the system in MHz
* @param[out] MinP0NbFreq NB frequency numerator for P0 in MHz
* @param[in] StdHeader Config handle for library and services
*/
VOID
GetMinNbCofMulti (
IN PLATFORM_CONFIGURATION *PlatformConfig,
OUT UINT32 *MinSysNbFreq,
OUT UINT32 *MinP0NbFreq,
IN AMD_CONFIG_PARAMS *StdHeader
)
{
UINT32 Socket;
UINT32 Module;
UINT32 CurrMinFreq;
UINT32 CurrMaxFreq;
PCI_ADDR PciAddress;
AGESA_STATUS Ignored;
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
AGESA_STATUS AgesaStatus;
*MinSysNbFreq = 0xFFFFFFFF;
*MinP0NbFreq = 0xFFFFFFFF;
for (Socket = 0; Socket < GetPlatformNumberOfSockets (); Socket++) {
if (IsProcessorPresent (Socket, StdHeader)) {
GetCpuServicesOfSocket (Socket, (CONST CPU_SPECIFIC_SERVICES **)&FamilySpecificServices, StdHeader);
for (Module = 0; Module < GetPlatformNumberOfModules (); Module++) {
if (GetPciAddress (StdHeader, Socket, Module, &PciAddress, &Ignored )) {
break;
}
}
AgesaStatus = FamilySpecificServices->GetMinMaxNbFrequency (FamilySpecificServices,
PlatformConfig,
&PciAddress,
&CurrMinFreq,
&CurrMaxFreq,
StdHeader);
ASSERT (AgesaStatus == AGESA_SUCCESS);
ASSERT ((CurrMinFreq != 0) && (CurrMaxFreq != 0));
// Determine the slowest NB Pmin frequency
if (CurrMinFreq < *MinSysNbFreq) {
*MinSysNbFreq = CurrMinFreq;
}
// Determine the slowest NB P0 frequency
if (CurrMaxFreq < *MinP0NbFreq) {
*MinP0NbFreq = CurrMaxFreq;
}
}
}
}
示例2: GetCpuServicesOfCurrentCore
/**
* Single socket call to loop through all Nb Pstates, comparing the NB frequencies
* to determine the slowest in the system. This routine also returns the NB P0 frequency.
*
* @param[in] PlatformConfig Platform profile/build option config structure.
* @param[out] MinSysNbFreq NB frequency numerator for the system in MHz
* @param[out] MinP0NbFreq NB frequency numerator for P0 in MHz
* @param[in] StdHeader Config handle for library and services
*/
VOID
GetMinNbCofSingle (
IN PLATFORM_CONFIGURATION *PlatformConfig,
OUT UINT32 *MinSysNbFreq,
OUT UINT32 *MinP0NbFreq,
IN AMD_CONFIG_PARAMS *StdHeader
)
{
PCI_ADDR PciAddress;
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
PciAddress.AddressValue = MAKE_SBDFO (0, 0, 24, 0, 0);
GetCpuServicesOfCurrentCore ((const CPU_SPECIFIC_SERVICES **) &FamilySpecificServices, StdHeader);
FamilySpecificServices->GetMinMaxNbFrequency (FamilySpecificServices,
PlatformConfig,
&PciAddress,
MinSysNbFreq,
MinP0NbFreq,
StdHeader);
}
示例3: GetCpuServicesOfCurrentCore
/**
* Single socket call to loop through all Nb Pstates, comparing the NB frequencies
* to determine the slowest in the system. This routine also returns the NB P0 frequency.
*
* @param[in] PlatformConfig Platform profile/build option config structure.
* @param[out] MinSysNbFreq NB frequency numerator for the system in MHz
* @param[out] MinP0NbFreq NB frequency numerator for P0 in MHz
* @param[in] StdHeader Config handle for library and services
*/
VOID
GetMinNbCofSingle (
IN PLATFORM_CONFIGURATION *PlatformConfig,
OUT UINT32 *MinSysNbFreq,
OUT UINT32 *MinP0NbFreq,
IN AMD_CONFIG_PARAMS *StdHeader
)
{
PCI_ADDR PciAddress;
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
AGESA_STATUS AgesaStatus;
PciAddress.AddressValue = MAKE_SBDFO (0, 0, 24, 0, 0);
GetCpuServicesOfCurrentCore (&FamilySpecificServices, StdHeader);
AgesaStatus = FamilySpecificServices->GetMinMaxNbFrequency (FamilySpecificServices,
PlatformConfig,
&PciAddress,
MinSysNbFreq,
MinP0NbFreq,
StdHeader);
ASSERT (AgesaStatus == AGESA_SUCCESS);
ASSERT ((MinSysNbFreq != 0) && (MinP0NbFreq != 0));
}