* [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized
@ 2016-08-19 3:08 Jeff Fan
2016-08-19 3:09 ` Tian, Feng
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Fan @ 2016-08-19 3:08 UTC (permalink / raw)
To: edk2-devel; +Cc: Feng Tian, Dandan Bi
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>
---
UefiCpuPkg/Library/MpInitLib/Microcode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 0fd8e8c..5bb0145 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
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized
2016-08-19 3:08 [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized Jeff Fan
@ 2016-08-19 3:09 ` Tian, Feng
0 siblings, 0 replies; 2+ messages in thread
From: Tian, Feng @ 2016-08-19 3:09 UTC (permalink / raw)
To: Fan, Jeff, edk2-devel@ml01.01.org; +Cc: Bi, Dandan, Tian, Feng
Reviewed-by: Feng Tian <feng.tian@intel.com>
-----Original Message-----
From: Fan, Jeff
Sent: Friday, August 19, 2016 11:09 AM
To: edk2-devel@ml01.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Bi, Dandan <dandan.bi@intel.com>
Subject: [Patch v5] 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>
---
UefiCpuPkg/Library/MpInitLib/Microcode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/MpInitLib/Microcode.c
index 0fd8e8c..5bb0145 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
--
2.7.4.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-19 3:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 3:08 [Patch v5] UefiCpuPkg/MpInitLib: MicrocodeData used but maybe uninitialized Jeff Fan
2016-08-19 3:09 ` Tian, Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox