UefiCpuPkg: Singularize function name
Change GetSupportPcds and GetConfigurationPcds to be singular Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
41b4600c30
commit
7d3a7c22a6
@ -56,7 +56,7 @@ SetSettingPcd (
|
|||||||
@return The pointer to CPU feature bits mask buffer.
|
@return The pointer to CPU feature bits mask buffer.
|
||||||
**/
|
**/
|
||||||
UINT8 *
|
UINT8 *
|
||||||
GetSupportPcds (
|
GetSupportPcd (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ GetSupportPcds (
|
|||||||
@return The pointer to CPU feature bits mask buffer.
|
@return The pointer to CPU feature bits mask buffer.
|
||||||
**/
|
**/
|
||||||
UINT8 *
|
UINT8 *
|
||||||
GetConfigurationPcds (
|
GetConfigurationPcd (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -180,8 +180,8 @@ CpuInitDataInitialize (
|
|||||||
//
|
//
|
||||||
// Get support and configuration PCDs
|
// Get support and configuration PCDs
|
||||||
//
|
//
|
||||||
CpuFeaturesData->SupportPcds = GetSupportPcds ();
|
CpuFeaturesData->SupportPcd = GetSupportPcd ();
|
||||||
CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds ();
|
CpuFeaturesData->ConfigurationPcd = GetConfigurationPcd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -321,7 +321,7 @@ CollectProcessorData (
|
|||||||
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
|
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
|
||||||
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
|
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
|
||||||
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
||||||
if (IsBitMaskMatch (CpuFeaturesData->SupportPcds, CpuFeature->FeatureMask)) {
|
if (IsBitMaskMatch (CpuFeaturesData->SupportPcd, CpuFeature->FeatureMask)) {
|
||||||
if (CpuFeature->SupportFunc == NULL) {
|
if (CpuFeature->SupportFunc == NULL) {
|
||||||
//
|
//
|
||||||
// If SupportFunc is NULL, then the feature is supported.
|
// If SupportFunc is NULL, then the feature is supported.
|
||||||
@ -444,29 +444,29 @@ AnalysisProcessorFeatures (
|
|||||||
CPU_FEATURES_DATA *CpuFeaturesData;
|
CPU_FEATURES_DATA *CpuFeaturesData;
|
||||||
|
|
||||||
CpuFeaturesData = GetCpuFeaturesData ();
|
CpuFeaturesData = GetCpuFeaturesData ();
|
||||||
CpuFeaturesData->CapabilityPcds = AllocatePool (CpuFeaturesData->BitMaskSize);
|
CpuFeaturesData->CapabilityPcd = AllocatePool (CpuFeaturesData->BitMaskSize);
|
||||||
ASSERT (CpuFeaturesData->CapabilityPcds != NULL);
|
ASSERT (CpuFeaturesData->CapabilityPcd != NULL);
|
||||||
SetMem (CpuFeaturesData->CapabilityPcds, CpuFeaturesData->BitMaskSize, 0xFF);
|
SetMem (CpuFeaturesData->CapabilityPcd, CpuFeaturesData->BitMaskSize, 0xFF);
|
||||||
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
|
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
|
||||||
CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber];
|
CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber];
|
||||||
//
|
//
|
||||||
// Calculate the last capability on all processors
|
// Calculate the last capability on all processors
|
||||||
//
|
//
|
||||||
SupportedMaskAnd (CpuFeaturesData->CapabilityPcds, CpuInitOrder->FeaturesSupportedMask);
|
SupportedMaskAnd (CpuFeaturesData->CapabilityPcd, CpuInitOrder->FeaturesSupportedMask);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Calculate the last setting
|
// Calculate the last setting
|
||||||
//
|
//
|
||||||
|
|
||||||
CpuFeaturesData->SettingPcds = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcds);
|
CpuFeaturesData->SettingPcd = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcd);
|
||||||
ASSERT (CpuFeaturesData->SettingPcds != NULL);
|
ASSERT (CpuFeaturesData->SettingPcd != NULL);
|
||||||
SupportedMaskAnd (CpuFeaturesData->SettingPcds, CpuFeaturesData->ConfigurationPcds);
|
SupportedMaskAnd (CpuFeaturesData->SettingPcd, CpuFeaturesData->ConfigurationPcd);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Save PCDs and display CPU PCDs
|
// Save PCDs and display CPU PCDs
|
||||||
//
|
//
|
||||||
SetCapabilityPcd (CpuFeaturesData->CapabilityPcds);
|
SetCapabilityPcd (CpuFeaturesData->CapabilityPcd);
|
||||||
SetSettingPcd (CpuFeaturesData->SettingPcds);
|
SetSettingPcd (CpuFeaturesData->SettingPcd);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dump the last CPU feature list
|
// Dump the last CPU feature list
|
||||||
@ -476,8 +476,8 @@ AnalysisProcessorFeatures (
|
|||||||
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
|
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
|
||||||
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
|
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
|
||||||
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
||||||
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {
|
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {
|
||||||
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcds)) {
|
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcd)) {
|
||||||
DEBUG ((DEBUG_INFO, "[Enable ] "));
|
DEBUG ((DEBUG_INFO, "[Enable ] "));
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((DEBUG_INFO, "[Disable ] "));
|
DEBUG ((DEBUG_INFO, "[Disable ] "));
|
||||||
@ -489,13 +489,13 @@ AnalysisProcessorFeatures (
|
|||||||
Entry = Entry->ForwardLink;
|
Entry = Entry->ForwardLink;
|
||||||
}
|
}
|
||||||
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n"));
|
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n"));
|
||||||
DumpCpuFeatureMask (CpuFeaturesData->SupportPcds);
|
DumpCpuFeatureMask (CpuFeaturesData->SupportPcd);
|
||||||
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n"));
|
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n"));
|
||||||
DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcds);
|
DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcd);
|
||||||
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n"));
|
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n"));
|
||||||
DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcds);
|
DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcd);
|
||||||
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n"));
|
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n"));
|
||||||
DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);
|
DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);
|
||||||
);
|
);
|
||||||
|
|
||||||
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
|
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
|
||||||
@ -506,7 +506,7 @@ AnalysisProcessorFeatures (
|
|||||||
// Insert each feature into processor's order list
|
// Insert each feature into processor's order list
|
||||||
//
|
//
|
||||||
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
||||||
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {
|
if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {
|
||||||
CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature);
|
CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature);
|
||||||
ASSERT (CpuFeatureInOrder != NULL);
|
ASSERT (CpuFeatureInOrder != NULL);
|
||||||
InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link);
|
InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link);
|
||||||
@ -520,13 +520,13 @@ AnalysisProcessorFeatures (
|
|||||||
Entry = GetFirstNode (&CpuInitOrder->OrderList);
|
Entry = GetFirstNode (&CpuInitOrder->OrderList);
|
||||||
while (!IsNull (&CpuInitOrder->OrderList, Entry)) {
|
while (!IsNull (&CpuInitOrder->OrderList, Entry)) {
|
||||||
CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
|
||||||
if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcds)) {
|
if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcd)) {
|
||||||
Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE);
|
Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
//
|
//
|
||||||
// Clean the CpuFeatureInOrder->FeatureMask in setting PCD.
|
// Clean the CpuFeatureInOrder->FeatureMask in setting PCD.
|
||||||
//
|
//
|
||||||
SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureInOrder->FeatureMask);
|
SupportedMaskCleanBit (CpuFeaturesData->SettingPcd, CpuFeatureInOrder->FeatureMask);
|
||||||
if (CpuFeatureInOrder->FeatureName != NULL) {
|
if (CpuFeatureInOrder->FeatureName != NULL) {
|
||||||
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));
|
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));
|
||||||
} else {
|
} else {
|
||||||
@ -553,7 +553,7 @@ AnalysisProcessorFeatures (
|
|||||||
// again during initialize the features.
|
// again during initialize the features.
|
||||||
//
|
//
|
||||||
DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n"));
|
DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n"));
|
||||||
DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);
|
DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Dump the RegisterTable
|
// Dump the RegisterTable
|
||||||
|
@ -59,10 +59,10 @@ typedef struct {
|
|||||||
LIST_ENTRY FeatureList;
|
LIST_ENTRY FeatureList;
|
||||||
|
|
||||||
CPU_FEATURES_INIT_ORDER *InitOrder;
|
CPU_FEATURES_INIT_ORDER *InitOrder;
|
||||||
UINT8 *SupportPcds;
|
UINT8 *SupportPcd;
|
||||||
UINT8 *CapabilityPcds;
|
UINT8 *CapabilityPcd;
|
||||||
UINT8 *ConfigurationPcds;
|
UINT8 *ConfigurationPcd;
|
||||||
UINT8 *SettingPcds;
|
UINT8 *SettingPcd;
|
||||||
|
|
||||||
CPU_REGISTER_TABLE *RegisterTable;
|
CPU_REGISTER_TABLE *RegisterTable;
|
||||||
CPU_REGISTER_TABLE *PreSmmRegisterTable;
|
CPU_REGISTER_TABLE *PreSmmRegisterTable;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user