From 02dab4284760ead01742123500104b64fdc92964 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Thu, 29 Mar 2007 07:48:48 +0000 Subject: Variable driver: add checking to make sure flash is properly initialized PxeBc driver: fix the issue that the giaddr is wrongly interpreted to "gateway address" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2515 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'EdkModulePkg/Universal/Variable/RuntimeDxe') diff --git a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c index e224558651..589217a992 100644 --- a/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/EdkModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -1403,6 +1403,15 @@ Returns: sizeof (UINT32), (UINT8 *) &VariableStoreEntry.Length ); + // + // As Variables are stored in NV storage, which are slow devices,such as flash. + // Variable operation may skip checking variable program result to improve performance, + // We can assume Variable program is OK through some check point. + // Variable Store Size Setting should be the first Variable write operation, + // We can assume all Read/Write is OK if we can set Variable store size successfully. + // If write fail, we will assert here + // + ASSERT(VariableStoreHeader->Size == VariableStoreEntry.Length); if (EFI_ERROR (Status)) { return Status; -- cgit v1.2.3