# In IA64 platforms, this value should be larger than 128KB.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000|UINT32|0x30000004\r
\r
- ## The size of reserved HwErr variable space. This space is located at NV variable range.\r
- # HwErr type variable is stored with common non-volatile variables in NV region.\r
+ ## The size of reserved HwErr variable space. Note that this value must be less than or equal to PcdFlashNvStorageVariableSize\r
+ # In EdkII implementation, HwErr type variable is stored with common non-volatile variables in the same NV region.\r
+ # so the platform integrator should ensure this value is less than or equal to PcdFlashNvStorageVariableSize.\r
# this value is used to guarantee the space of HwErr type variable and not populated by common variable.\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x8000|UINT32|0x30000006\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdHwErrStorageSize|0x0000|UINT32|0x30000006\r
\r
## The size of volatile buffer. This buffer is used to store VOLATILE attribute variable.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x10000|UINT32|0x30000005\r
{\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
\r
EfiInitializeLock(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock, TPL_NOTIFY);\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, note that there is a scratch space to store scratch data.\r
//\r