diff options
-rw-r--r-- | UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index 474aea3..b8f76f1 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -60,13 +60,13 @@ GetSupportPcds ( VOID
)
{
- UINTN BitMaskSize;
UINT8 *SupportBitMask;
- BitMaskSize = PcdGetSize (PcdCpuFeaturesSupport);
- SupportBitMask = AllocateZeroPool (BitMaskSize);
+ SupportBitMask = AllocateCopyPool (
+ PcdGetSize (PcdCpuFeaturesSupport),
+ PcdGetPtr (PcdCpuFeaturesSupport)
+ );
ASSERT (SupportBitMask != NULL);
- SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesSupport);
return SupportBitMask;
}
@@ -81,13 +81,13 @@ GetConfigurationPcds ( VOID
)
{
- UINTN BitMaskSize;
UINT8 *SupportBitMask;
- BitMaskSize = PcdGetSize (PcdCpuFeaturesUserConfiguration);
- SupportBitMask = AllocateZeroPool (BitMaskSize);
+ SupportBitMask = AllocateCopyPool (
+ PcdGetSize (PcdCpuFeaturesUserConfiguration),
+ PcdGetPtr (PcdCpuFeaturesUserConfiguration)
+ );
ASSERT (SupportBitMask != NULL);
- SupportBitMask = (UINT8 *) PcdGetPtr (PcdCpuFeaturesUserConfiguration);
return SupportBitMask;
}
|