diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-09 06:39:13 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-09 06:39:13 +0000 |
commit | 8a9e0b7274c69ac35067555f9cefef64140a56f4 (patch) | |
tree | 10cf62cdd8e46d19ab21ba432a13d1f2f0dd0981 /MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c | |
parent | 242d687699a0e5d9b509d3bc015ce22870e35a49 (diff) | |
download | edk2-platforms-8a9e0b7274c69ac35067555f9cefef64140a56f4.tar.xz |
1. retire the FvbServiceLib. Directly locating FVB protocol to access interfaces.
2. modify the method of getting right FVB protocol interface. move the notification event of FVB installation into variable driver. and also move ExitBootService event into variable driver.
3. use EFI_FVB2_WRITE_STATUS flag to distinct whether the FVB protocol supports writing operation or not.Currently, DxeCore installs FVB which has ~EFI_FVB2_WRITE_STATUS(that is, disable write) attrbiute. FvbRuntimeDxe driver should provide a full FVB protocol, which returns EFI_FVB2_WRITE_STATUS attribute to signify itself provide writable FVB protocol. So other modules which need write data by FVB protocol can locate it correctly.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7835 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c index 9c351a3547..df8607ff71 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c @@ -44,6 +44,7 @@ GetFvbHandleByAddress ( EFI_PHYSICAL_ADDRESS FvbBaseAddress;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
+ EFI_FVB_ATTRIBUTES_2 Attributes;
*FvbHandle = NULL;
//
@@ -72,6 +73,11 @@ GetFvbHandleByAddress ( Status = EFI_NOT_FOUND;
break;
}
+
+ Status = Fvb->GetAttributes (Fvb, &Attributes);
+ if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) {
+ continue;
+ }
//
// Compare the address and select the right one
//
|