summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2016-08-19 10:32:30 +0800
committerJeff Fan <jeff.fan@intel.com>2016-08-19 15:11:01 +0800
commit8cce3c9a70b6406542ca3dac4223cdf5af4f7779 (patch)
treec2c16f166ed5841a62765c815e581a4bdc71939a /UefiCpuPkg
parent1de28466b043003d389407661d3e01aee286345c (diff)
UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized
Cc: Feng Tian <feng.tian@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Library/MpInitLib/Microcode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 0fd8e8c51b..5bb0145c87 100644
--- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
+++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
@@ -92,6 +92,7 @@ MicrocodeDetect (
PlatformId = (UINT8) PlatformIdMsr.Bits.PlatformId;
LatestRevision = 0;
+ MicrocodeData = NULL;
MicrocodeEnd = (UINTN) (MicrocodePatchAddress + MicrocodePatchRegionSize);
MicrocodeEntryPoint = (CPU_MICROCODE_HEADER *) (UINTN) MicrocodePatchAddress;
do {
@@ -198,6 +199,7 @@ MicrocodeDetect (
// Revision. A processor with no loaded update is considered to have a
// revision equal to zero.
//
+ ASSERT (MicrocodeData != NULL);
AsmWriteMsr64 (
MSR_IA32_BIOS_UPDT_TRIG,
(UINT64) (UINTN) MicrocodeData