MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
SmramBase should be got from mLMFAConfigurationTable.
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
index feb846e..2601275 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
@@ -263,6 +263,7 @@ EFI_PHYSICAL_ADDRESS mSmramCacheBase;
UINT64 mSmramCacheSize;
EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader;
+EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *mLMFAConfigurationTable = NULL;
//
// Table of Protocol notification and GUIDed Event notifications that the SMM IPL requires
@@ -841,7 +842,7 @@ GetPeCoffImageFixLoadingAssignedAddress(
FixLoadingAddress = 0;
Status = EFI_NOT_FOUND;
- SmramBase = mCurrentSmramRange->CpuStart;
+ SmramBase = mLMFAConfigurationTable->SmramBase;
//
// Get PeHeader pointer
//
@@ -1519,7 +1520,6 @@ SmmIplEntry (
UINT64 MaxSize;
VOID *Registration;
UINT64 SmmCodeSize;
- EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *LMFAConfigurationTable;
EFI_CPU_ARCH_PROTOCOL *CpuArch;
EFI_STATUS SetAttrStatus;
EFI_SMRAM_DESCRIPTOR *SmramRangeSmmDriver;
@@ -1623,14 +1623,14 @@ SmmIplEntry (
//
Status = EfiGetSystemConfigurationTable (
&gLoadFixedAddressConfigurationTableGuid,
- (VOID **) &LMFAConfigurationTable
+ (VOID **) &mLMFAConfigurationTable
);
- if (!EFI_ERROR (Status) && LMFAConfigurationTable != NULL) {
- LMFAConfigurationTable->SmramBase = mCurrentSmramRange->CpuStart;
+ if (!EFI_ERROR (Status) && mLMFAConfigurationTable != NULL) {
+ mLMFAConfigurationTable->SmramBase = mCurrentSmramRange->CpuStart;
//
// Print the SMRAM base
//
- DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \n", LMFAConfigurationTable->SmramBase));
+ DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \n", mLMFAConfigurationTable->SmramBase));
}
//
--
2.8.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Star Zeng <star.zeng@intel.com> Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao Sent: Monday, April 24, 2017 4:58 PM To: edk2-devel@lists.01.org Cc: Zeng, Star <star.zeng@intel.com> Subject: [edk2] [Patch] MdeModulePkg PiSmmIpl: Fix the issue in LMFA feature SmramBase should be got from mLMFAConfigurationTable. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> --- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c index feb846e..2601275 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c @@ -263,6 +263,7 @@ EFI_PHYSICAL_ADDRESS mSmramCacheBase; UINT64 mSmramCacheSize; EFI_SMM_COMMUNICATE_HEADER mCommunicateHeader; +EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *mLMFAConfigurationTable = NULL; // // Table of Protocol notification and GUIDed Event notifications that the SMM IPL requires @@ -841,7 +842,7 @@ GetPeCoffImageFixLoadingAssignedAddress( FixLoadingAddress = 0; Status = EFI_NOT_FOUND; - SmramBase = mCurrentSmramRange->CpuStart; + SmramBase = mLMFAConfigurationTable->SmramBase; // // Get PeHeader pointer // @@ -1519,7 +1520,6 @@ SmmIplEntry ( UINT64 MaxSize; VOID *Registration; UINT64 SmmCodeSize; - EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *LMFAConfigurationTable; EFI_CPU_ARCH_PROTOCOL *CpuArch; EFI_STATUS SetAttrStatus; EFI_SMRAM_DESCRIPTOR *SmramRangeSmmDriver; @@ -1623,14 +1623,14 @@ SmmIplEntry ( // Status = EfiGetSystemConfigurationTable ( &gLoadFixedAddressConfigurationTableGuid, - (VOID **) &LMFAConfigurationTable + (VOID **) &mLMFAConfigurationTable ); - if (!EFI_ERROR (Status) && LMFAConfigurationTable != NULL) { - LMFAConfigurationTable->SmramBase = mCurrentSmramRange->CpuStart; + if (!EFI_ERROR (Status) && mLMFAConfigurationTable != NULL) { + mLMFAConfigurationTable->SmramBase = + mCurrentSmramRange->CpuStart; // // Print the SMRAM base // - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is %x. \n", LMFAConfigurationTable->SmramBase)); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: TSEG BASE is + %x. \n", mLMFAConfigurationTable->SmramBase)); } // -- 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.