diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-26 02:59:28 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-08-26 02:59:28 +0000 |
commit | 48cd992ac738da11878f2996f33f90efe0875b8e (patch) | |
tree | 2509a97fcd2c0e8e000e9645ea99b89c3649f6b1 /MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | |
parent | e77d8dd3ce2da2e758b7d41bd56a2d5ae4429cea (diff) |
add assertion to ensure HwErr type variable range is less than or equal to VariableStore range.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9199 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index aadda4b58..e52477784 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -2247,6 +2247,14 @@ VariableCommonInitialize ( EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock, TPL_NOTIFY);
//
+ // Note that in EdkII variable driver implementation, Hardware Error Record type variable
+ // is stored with common variable in the same NV region. So the platform integrator should
+ // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of
+ // PcdFlashNvStorageVariableSize.
+ //
+ ASSERT (FixedPcdGet32(PcdHwErrStorageSize) <= FixedPcdGet32(PcdFlashNvStorageVariableSize));
+
+ //
// Allocate memory for volatile variable store, note that there is a scratch space to store scratch data.
//
ScratchSize = MAX(FixedPcdGet32(PcdMaxVariableSize), FixedPcdGet32(PcdMaxHardwareErrorVariableSize));
|