+ //\r
+ // Evaluate the authentication status of the Firmware Volume through\r
+ // Security Architectural Protocol\r
+ //\r
+ if (gSecurity != NULL) {\r
+ FvFileDevicePath = CoreFvToDevicePath (Fv, FvHandle, DriverName);\r
+ Status = gSecurity->FileAuthenticationState (\r
+ gSecurity,\r
+ AuthenticationStatus,\r
+ FvFileDevicePath\r
+ );\r
+ if (FvFileDevicePath != NULL) {\r
+ FreePool (FvFileDevicePath);\r
+ }\r
+\r
+ if (Status != EFI_SUCCESS) {\r
+ //\r
+ // Security check failed. The firmware volume should not be used for any purpose.\r
+ //\r
+ if (Buffer != NULL) {\r
+ FreePool (Buffer);\r
+ }\r
+ return Status;\r
+ }\r
+ }\r
+\r