]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
1) Fix the bug that Variable Cache Search does not be protected by lock during boot...
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2008 10:10:16 +0000 (10:10 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2008 10:10:16 +0000 (10:10 +0000)
commitfdb7765f2d0a835ca93abb63969fe802c12f3560
treec7602ea9c8b3f45113793043b9ca1ce677a179ea
parentaec072adb2af2bd1cc0677a25d4a099c8779c10d
1) Fix the bug that Variable Cache Search does not be protected by lock during boot time. It potentially results in the info from GetVariable() is not correct.
2) Check the integrity of Variable header. In original implementation, if not whole header is correct, then the variable will be treat as invalid. typically, if the NameSize has been programed but the DataSize not, then the variable storage would failed to set new variable.
3) Change the Variable Header Alignment from 1 to 4 bytes on x86. It avoids the DataSize or NameSize cross two blocks. For example, in original implementation, if the NameSize crosses two block, when the FLASH manipulation is interrupted after programed HSB of NameSize and prior to program LSB of NameSize on next block, then the invalid variable header will result in the Variable Storgae broken.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4538 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h