+ DepexBuffer = NULL;\r
+ SizeOfBuffer = 0;\r
+ Status = Fv->ReadSection (\r
+ Fv,\r
+ &NameGuid,\r
+ EFI_SECTION_PEI_DEPEX,\r
+ 0,\r
+ &DepexBuffer,\r
+ &SizeOfBuffer,\r
+ &AuthenticationStatus\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // If PEI depex section is found, this FV image will be ignored in DXE phase.\r
+ // Now, DxeCore doesn't support FV image with more one type DEPEX section.\r
+ //\r
+ FreePool (DepexBuffer);\r
+ continue;\r
+ }\r
+\r
+ //\r
+ // Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has SMM depex section.\r
+ //\r
+ DepexBuffer = NULL;\r
+ SizeOfBuffer = 0;\r
+ Status = Fv->ReadSection (\r
+ Fv,\r
+ &NameGuid,\r
+ EFI_SECTION_SMM_DEPEX,\r
+ 0,\r
+ &DepexBuffer,\r
+ &SizeOfBuffer,\r
+ &AuthenticationStatus\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // If SMM depex section is found, this FV image will be ignored in DXE phase.\r
+ // Now, DxeCore doesn't support FV image with more one type DEPEX section.\r
+ //\r
+ FreePool (DepexBuffer);\r
+ continue;\r
+ }\r
+\r
+ //\r
+ // Check if this EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE file has DXE depex section.\r
+ //\r
+ DepexBuffer = NULL;\r
+ SizeOfBuffer = 0;\r
+ Status = Fv->ReadSection (\r
+ Fv,\r
+ &NameGuid,\r
+ EFI_SECTION_DXE_DEPEX,\r
+ 0,\r
+ &DepexBuffer,\r
+ &SizeOfBuffer,\r
+ &AuthenticationStatus\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // If no depex section, produce a firmware volume block protocol for it so it gets dispatched from. \r
+ //\r
+ CoreProcessFvImageFile (Fv, FvHandle, &NameGuid);\r
+ } else {\r
+ //\r
+ // If depex section is found, this FV image will be dispatched until its depex is evaluated to TRUE.\r
+ //\r
+ FreePool (DepexBuffer);\r
+ CoreAddToDriverList (Fv, FvHandle, &NameGuid, Type);\r
+ }\r