]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
add assertion to ensure HwErr type variable range is less than or equal to VariableSt...
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / EmuRuntimeDxe / EmuVariable.c
index 228d7d8cffadcb8cdb4ec00f3303591a19466eb9..2da9a7c3084eb5da687cd55fb47b768d765a2633 100644 (file)
@@ -1313,6 +1313,14 @@ InitializeVariableStore (
 {\r
   VARIABLE_STORE_HEADER *VariableStore;\r
 \r
+  //\r
+  // Note that in EdkII variable driver implementation, Hardware Error Record type variable\r
+  // is stored with common variable in the same NV region. So the platform integrator should\r
+  // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of \r
+  // PcdFlashNvStorageVariableSize.\r
+  //\r
+  ASSERT (FixedPcdGet32(PcdHwErrStorageSize) <= FixedPcdGet32(PcdFlashNvStorageVariableSize));\r
+\r
   //\r
   // Allocate memory for volatile variable store\r
   //\r