* [Patch 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix build failure for VS2012 and GCC49.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
@ 2018-10-25 2:25 ` Eric Dong
2018-10-25 2:25 ` [Patch 2/6] UefiCpuPkg/CpuCommonFeaturesLib: Remove white space at line end Eric Dong
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Laszlo Ersek, Dandan Bi
Code initialized in function can't be correctly detected by build tool.
Add code to clearly initialize the local variable before use it.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index 7a5939c966..173f2edbea 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -1029,6 +1029,7 @@ SetProcessorRegister (
InitApicId = GetInitialApicId ();
RegisterTable = NULL;
+ ProcIndex = (UINTN)-1;
for (Index = 0; Index < AcpiCpuData->NumberOfCpus; Index++) {
if (RegisterTables[Index].InitialApicId == InitApicId) {
RegisterTable = &RegisterTables[Index];
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Patch 2/6] UefiCpuPkg/CpuCommonFeaturesLib: Remove white space at line end.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
2018-10-25 2:25 ` [Patch 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix build failure for VS2012 and GCC49 Eric Dong
@ 2018-10-25 2:25 ` Eric Dong
2018-10-25 2:25 ` [Patch 3/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix ECC issues Eric Dong
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Laszlo Ersek, Dandan Bi
Remove extra white space at the end of line.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
index f8bee53819..57648352ec 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
@@ -328,7 +328,7 @@ LmceInitialize (
MSR_IA32_FEATURE_CONTROL_REGISTER *MsrRegister;
//
- // The scope of FastStrings bit in the MSR_IA32_MISC_ENABLE is core for below processor type, only program
+ // The scope of FastStrings bit in the MSR_IA32_MISC_ENABLE is core for below processor type, only program
// MSR_IA32_MISC_ENABLE for thread 0 in each core.
//
if (IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Patch 3/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix ECC issues.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
2018-10-25 2:25 ` [Patch 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix build failure for VS2012 and GCC49 Eric Dong
2018-10-25 2:25 ` [Patch 2/6] UefiCpuPkg/CpuCommonFeaturesLib: Remove white space at line end Eric Dong
@ 2018-10-25 2:25 ` Eric Dong
2018-10-25 2:25 ` [Patch 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Remove white space at line end Eric Dong
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Dandan Bi, Ruiyu Ni, Laszlo Ersek
Changes include:
1. Remove extra white space at the end of line.
2. Add comments for the new add function parameter.
3. Update IN OUT tag for function parameter.
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
.../PeiRegisterCpuFeaturesLib.c | 2 ++
.../RegisterCpuFeaturesLib.c | 24 +++++++++++-----------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
index a688e03152..4bab2837cc 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
@@ -146,6 +146,8 @@ GetProcessorInformation (
@param[in] Procedure A pointer to the function to be run on
enabled APs of the system.
+ @param[in] MpEvent The Event used to sync the result.
+
**/
VOID
StartupAPsWorker (
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
index 5b49bc4504..b6e108b8ad 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c
@@ -160,7 +160,7 @@ DetectFeatureScope (
/**
Clear dependence for the specified type.
- @param[in] CurrentFeature Cpu feature need to clear.
+ @param[in] CpuFeature Cpu feature need to clear.
@param[in] Before Before or after dependence relationship.
**/
@@ -202,14 +202,14 @@ ClearFeatureScope (
/**
Base on dependence relationship to asjust feature dependence.
- ONLY when the feature before(or after) the find feature also has
+ ONLY when the feature before(or after) the find feature also has
dependence with the find feature. In this case, driver need to base
on dependce relationship to decide how to insert current feature and
adjust the feature dependence.
- @param[in] PreviousFeature CPU feature current before the find one.
- @param[in] CurrentFeature Cpu feature need to adjust.
- @param[in] Before Before or after dependence relationship.
+ @param[in, out] PreviousFeature CPU feature current before the find one.
+ @param[in, out] CurrentFeature Cpu feature need to adjust.
+ @param[in] Before Before or after dependence relationship.
@retval TRUE means the current feature dependence has been adjusted.
@@ -239,7 +239,7 @@ AdjustFeaturesDependence (
}
//
- // If both feature have dependence, keep the one which needs use more
+ // If both feature have dependence, keep the one which needs use more
// processors and clear the dependence for the other one.
//
if (PreDependType >= CurrentDependType) {
@@ -254,10 +254,10 @@ AdjustFeaturesDependence (
/**
Base on dependence relationship to asjust feature order.
- @param[in] FeatureList Pointer to CPU feature list
- @param[in] FindEntry The entry this feature depend on.
- @param[in] CurrentEntry The entry for this feature.
- @param[in] Before Before or after dependence relationship.
+ @param[in] FeatureList Pointer to CPU feature list
+ @param[in, out] FindEntry The entry this feature depend on.
+ @param[in, out] CurrentEntry The entry for this feature.
+ @param[in] Before Before or after dependence relationship.
**/
VOID
@@ -279,8 +279,8 @@ AdjustEntry (
// base on dependence type of feature A and B to update the logic here.
// For example, feature A has package type dependence and feature B has core type dependence,
// because package type dependence need to wait for more processors which has strong dependence
- // than core type dependence. So driver will adjust the feature order to B -> A -> C. and driver
- // will remove the feature dependence in feature B.
+ // than core type dependence. So driver will adjust the feature order to B -> A -> C. and driver
+ // will remove the feature dependence in feature B.
// Driver just needs to make sure before feature C been executed, feature A has finished its task
// in all all thread. Feature A finished in all threads also means feature B have finshed in all
// threads.
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Patch 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Remove white space at line end.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
` (2 preceding siblings ...)
2018-10-25 2:25 ` [Patch 3/6] UefiCpuPkg/RegisterCpuFeaturesLib: Fix ECC issues Eric Dong
@ 2018-10-25 2:25 ` Eric Dong
2018-10-25 2:26 ` [Patch 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code Eric Dong
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Laszlo Ersek, Dandan Bi
Remove extra white space at the end of line.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
index fec53c522f..5193fea2b3 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
@@ -346,7 +346,7 @@ ProgramProcessorRegister (
// n * P(0) n * P(1) ... n * P(n)
//
ASSERT (
- (ApLocation != NULL) &&
+ (ApLocation != NULL) &&
(CpuStatus->ValidCoreCountPerPackage != 0) &&
(CpuFlags->SemaphoreCount) != NULL
);
@@ -428,7 +428,7 @@ ProgramProcessorRegister (
/**
Set Processor register for one AP.
-
+
@param PreSmmRegisterTable Use pre Smm register table or register table.
**/
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Patch 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
` (3 preceding siblings ...)
2018-10-25 2:25 ` [Patch 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Remove white space at line end Eric Dong
@ 2018-10-25 2:26 ` Eric Dong
2018-10-25 5:50 ` Ni, Ruiyu
2018-10-25 2:26 ` [Patch 6/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix build failure for VS2012 and GCC49 Eric Dong
2018-10-25 5:50 ` [Patch 0/6] Fix coding style issues Ni, Ruiyu
6 siblings, 1 reply; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:26 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Laszlo Ersek, Dandan Bi
Remove useless code after change 93324390.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +---------
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 16 ----------------
2 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index 42b040531e..abcc3eea05 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -1272,7 +1272,6 @@ InitializeSmmCpuSemaphores (
UINTN TotalSize;
UINTN GlobalSemaphoresSize;
UINTN CpuSemaphoresSize;
- UINTN MsrSemahporeSize;
UINTN SemaphoreSize;
UINTN Pages;
UINTN *SemaphoreBlock;
@@ -1282,8 +1281,7 @@ InitializeSmmCpuSemaphores (
ProcessorCount = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
GlobalSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_GLOBAL) / sizeof (VOID *)) * SemaphoreSize;
CpuSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_CPU) / sizeof (VOID *)) * ProcessorCount * SemaphoreSize;
- MsrSemahporeSize = MSR_SPIN_LOCK_INIT_NUM * SemaphoreSize;
- TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize + MsrSemahporeSize;
+ TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize;
DEBUG((EFI_D_INFO, "One Semaphore Size = 0x%x\n", SemaphoreSize));
DEBUG((EFI_D_INFO, "Total Semaphores Size = 0x%x\n", TotalSize));
Pages = EFI_SIZE_TO_PAGES (TotalSize);
@@ -1311,12 +1309,6 @@ InitializeSmmCpuSemaphores (
SemaphoreAddr += ProcessorCount * SemaphoreSize;
mSmmCpuSemaphores.SemaphoreCpu.Present = (BOOLEAN *)SemaphoreAddr;
- SemaphoreAddr = (UINTN)SemaphoreBlock + GlobalSemaphoresSize + CpuSemaphoresSize;
- mSmmCpuSemaphores.SemaphoreMsr.Msr = (SPIN_LOCK *)SemaphoreAddr;
- mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter =
- ((UINTN)SemaphoreBlock + Pages * SIZE_4KB - SemaphoreAddr) / SemaphoreSize;
- ASSERT (mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter >= MSR_SPIN_LOCK_INIT_NUM);
-
mPFLock = mSmmCpuSemaphores.SemaphoreGlobal.PFLock;
mConfigSmmCodeAccessCheckLock = mSmmCpuSemaphores.SemaphoreGlobal.CodeAccessCheckLock;
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index e2970308fe..61d4bd3085 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -347,13 +347,6 @@ typedef struct {
volatile BOOLEAN *CandidateBsp;
} SMM_DISPATCHER_MP_SYNC_DATA;
-#define MSR_SPIN_LOCK_INIT_NUM 15
-
-typedef struct {
- SPIN_LOCK *SpinLock;
- UINT32 MsrIndex;
-} MP_MSR_LOCK;
-
#define SMM_PSD_OFFSET 0xfb00
///
@@ -376,21 +369,12 @@ typedef struct {
volatile BOOLEAN *Present;
} SMM_CPU_SEMAPHORE_CPU;
-///
-/// All MSRs semaphores' pointer and counter
-///
-typedef struct {
- SPIN_LOCK *Msr;
- UINTN AvailableCounter;
-} SMM_CPU_SEMAPHORE_MSR;
-
///
/// All semaphores' information
///
typedef struct {
SMM_CPU_SEMAPHORE_GLOBAL SemaphoreGlobal;
SMM_CPU_SEMAPHORE_CPU SemaphoreCpu;
- SMM_CPU_SEMAPHORE_MSR SemaphoreMsr;
} SMM_CPU_SEMAPHORES;
extern IA32_DESCRIPTOR gcSmiGdtr;
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code.
2018-10-25 2:26 ` [Patch 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code Eric Dong
@ 2018-10-25 5:50 ` Ni, Ruiyu
0 siblings, 0 replies; 9+ messages in thread
From: Ni, Ruiyu @ 2018-10-25 5:50 UTC (permalink / raw)
To: Eric Dong, edk2-devel; +Cc: Laszlo Ersek, Dandan Bi
On 10/25/2018 10:26 AM, Eric Dong wrote:
> Remove useless code after change 93324390.
>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Dong <eric.dong@intel.com>
> ---
> UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +---------
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 16 ----------------
> 2 files changed, 1 insertion(+), 25 deletions(-)
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> index 42b040531e..abcc3eea05 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
> @@ -1272,7 +1272,6 @@ InitializeSmmCpuSemaphores (
> UINTN TotalSize;
> UINTN GlobalSemaphoresSize;
> UINTN CpuSemaphoresSize;
> - UINTN MsrSemahporeSize;
> UINTN SemaphoreSize;
> UINTN Pages;
> UINTN *SemaphoreBlock;
> @@ -1282,8 +1281,7 @@ InitializeSmmCpuSemaphores (
> ProcessorCount = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
> GlobalSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_GLOBAL) / sizeof (VOID *)) * SemaphoreSize;
> CpuSemaphoresSize = (sizeof (SMM_CPU_SEMAPHORE_CPU) / sizeof (VOID *)) * ProcessorCount * SemaphoreSize;
> - MsrSemahporeSize = MSR_SPIN_LOCK_INIT_NUM * SemaphoreSize;
> - TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize + MsrSemahporeSize;
> + TotalSize = GlobalSemaphoresSize + CpuSemaphoresSize;
> DEBUG((EFI_D_INFO, "One Semaphore Size = 0x%x\n", SemaphoreSize));
> DEBUG((EFI_D_INFO, "Total Semaphores Size = 0x%x\n", TotalSize));
> Pages = EFI_SIZE_TO_PAGES (TotalSize);
> @@ -1311,12 +1309,6 @@ InitializeSmmCpuSemaphores (
> SemaphoreAddr += ProcessorCount * SemaphoreSize;
> mSmmCpuSemaphores.SemaphoreCpu.Present = (BOOLEAN *)SemaphoreAddr;
>
> - SemaphoreAddr = (UINTN)SemaphoreBlock + GlobalSemaphoresSize + CpuSemaphoresSize;
> - mSmmCpuSemaphores.SemaphoreMsr.Msr = (SPIN_LOCK *)SemaphoreAddr;
> - mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter =
> - ((UINTN)SemaphoreBlock + Pages * SIZE_4KB - SemaphoreAddr) / SemaphoreSize;
> - ASSERT (mSmmCpuSemaphores.SemaphoreMsr.AvailableCounter >= MSR_SPIN_LOCK_INIT_NUM);
> -
> mPFLock = mSmmCpuSemaphores.SemaphoreGlobal.PFLock;
> mConfigSmmCodeAccessCheckLock = mSmmCpuSemaphores.SemaphoreGlobal.CodeAccessCheckLock;
>
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> index e2970308fe..61d4bd3085 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
> @@ -347,13 +347,6 @@ typedef struct {
> volatile BOOLEAN *CandidateBsp;
> } SMM_DISPATCHER_MP_SYNC_DATA;
>
> -#define MSR_SPIN_LOCK_INIT_NUM 15
> -
> -typedef struct {
> - SPIN_LOCK *SpinLock;
> - UINT32 MsrIndex;
> -} MP_MSR_LOCK;
> -
> #define SMM_PSD_OFFSET 0xfb00
>
> ///
> @@ -376,21 +369,12 @@ typedef struct {
> volatile BOOLEAN *Present;
> } SMM_CPU_SEMAPHORE_CPU;
>
> -///
> -/// All MSRs semaphores' pointer and counter
> -///
> -typedef struct {
> - SPIN_LOCK *Msr;
> - UINTN AvailableCounter;
> -} SMM_CPU_SEMAPHORE_MSR;
> -
> ///
> /// All semaphores' information
> ///
> typedef struct {
> SMM_CPU_SEMAPHORE_GLOBAL SemaphoreGlobal;
> SMM_CPU_SEMAPHORE_CPU SemaphoreCpu;
> - SMM_CPU_SEMAPHORE_MSR SemaphoreMsr;
> } SMM_CPU_SEMAPHORES;
>
> extern IA32_DESCRIPTOR gcSmiGdtr;
>
Reviewed-by: Ruiyu Ni <ruiyu.nI@intel.com>
--
Thanks,
Ray
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Patch 6/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix build failure for VS2012 and GCC49.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
` (4 preceding siblings ...)
2018-10-25 2:26 ` [Patch 5/6] UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code Eric Dong
@ 2018-10-25 2:26 ` Eric Dong
2018-10-25 5:50 ` [Patch 0/6] Fix coding style issues Ni, Ruiyu
6 siblings, 0 replies; 9+ messages in thread
From: Eric Dong @ 2018-10-25 2:26 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni, Laszlo Ersek, Dandan Bi
Code initialized in function can't be correctly detected by build tool.
Add code to clearly initialize the local variable before use it.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
index 5193fea2b3..a45e2dd3d7 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
@@ -451,6 +451,7 @@ SetRegister (
InitApicId = GetInitialApicId ();
RegisterTable = NULL;
+ ProcIndex = (UINTN)-1;
for (Index = 0; Index < mAcpiCpuData.NumberOfCpus; Index++) {
if (RegisterTables[Index].InitialApicId == InitApicId) {
RegisterTable = &RegisterTables[Index];
--
2.15.0.windows.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Patch 0/6] Fix coding style issues.
2018-10-25 2:25 [Patch 0/6] Fix coding style issues Eric Dong
` (5 preceding siblings ...)
2018-10-25 2:26 ` [Patch 6/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix build failure for VS2012 and GCC49 Eric Dong
@ 2018-10-25 5:50 ` Ni, Ruiyu
6 siblings, 0 replies; 9+ messages in thread
From: Ni, Ruiyu @ 2018-10-25 5:50 UTC (permalink / raw)
To: Eric Dong, edk2-devel
On 10/25/2018 10:25 AM, Eric Dong wrote:
> Fixed ECC issues caused by change serial from d5aa2078 to d28daadd.
>
> Eric Dong (6):
> UefiCpuPkg/RegisterCpuFeaturesLib: Fix build failure for VS2012 and
> GCC49.
> UefiCpuPkg/CpuCommonFeaturesLib: Remove white space at line end.
> UefiCpuPkg/RegisterCpuFeaturesLib: Fix ECC issues.
> UefiCpuPkg/PiSmmCpuDxeSmm: Remove white space at line end.
> UefiCpuPkg/PiSmmCpuDxeSmm: Clean up useless code.
> UefiCpuPkg/PiSmmCpuDxeSmm: Fix build failure for VS2012 and GCC49.
>
> .../Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +-
> .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 +
> .../PeiRegisterCpuFeaturesLib.c | 2 ++
> .../RegisterCpuFeaturesLib.c | 24 +++++++++++-----------
> UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 5 +++--
> UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +--------
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 16 ---------------
> 7 files changed, 20 insertions(+), 40 deletions(-)
>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
--
Thanks,
Ray
^ permalink raw reply [flat|nested] 9+ messages in thread