/** Register security handler for deferred image load. @param[in] ImageHandle ImageHandle of the loaded driver. @param[in] SystemTable Pointer to the EFI System Table. @retval EFI_SUCCESS The handlers were registered successfully. **/ EFI_STATUS EFIAPI DxeDeferImageLoadLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { VOID *Registration; // // Register user manager notification function. // EfiCreateProtocolNotifyEvent ( &gEfiUserManagerProtocolGuid, TPL_CALLBACK, FindUserManagerProtocol, NULL, &Registration ); return RegisterSecurity2Handler ( DxeDeferImageLoadHandler, EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD ); }
/** Register image authenticaion status check handler. @param ImageHandle ImageHandle of the loaded driver. @param SystemTable Pointer to the EFI System Table. @retval EFI_SUCCESS The handlers were registered successfully. **/ EFI_STATUS EFIAPI DxeImageAuthenticationStatusLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { return RegisterSecurity2Handler ( DxeImageAuthenticationStatusHandler, EFI_AUTH_OPERATION_AUTHENTICATION_STATE ); }
/** Register the security handler to provide TPM measure boot service. @param ImageHandle ImageHandle of the loaded driver. @param SystemTable Pointer to the EFI System Table. @retval EFI_SUCCESS Register successfully. @retval EFI_OUT_OF_RESOURCES No enough memory to register this handler. **/ EFI_STATUS EFIAPI DxeTpmMeasureBootLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_HOB_GUID_TYPE *GuidHob; GuidHob = NULL; GuidHob = GetFirstGuidHob (&gMeasuredFvHobGuid); if (GuidHob != NULL) { mMeasuredHobData = GET_GUID_HOB_DATA (GuidHob); } return RegisterSecurity2Handler ( DxeTpmMeasureBootHandler, EFI_AUTH_OPERATION_MEASURE_IMAGE | EFI_AUTH_OPERATION_IMAGE_REQUIRED ); }