+OpalPasswordStorageSecurityPpiNotify (
+  IN EFI_PEI_SERVICES             **PeiServices,
+  IN EFI_PEI_NOTIFY_DESCRIPTOR    *NotifyDesc,
+  IN VOID                         *Ppi
    )
  {
-  EFI_STATUS                        Status;
-  EFI_BOOT_MODE                     BootMode;
+  OPAL_PEI_DRIVER_PRIVATE_DATA    *Private;
- Status = PeiServicesGetBootMode (&BootMode);
-  ASSERT_EFI_ERROR (Status);
-  if (BootMode != BOOT_ON_S3_RESUME) {
-    return EFI_UNSUPPORTED;
-  }
+  DEBUG ((DEBUG_INFO, "%a entered at S3 resume!\n", __FUNCTION__));
- DEBUG ((DEBUG_INFO, "%a() - enter at S3 resume\n", __FUNCTION__));
+  Private = OPAL_PEI_PRIVATE_DATA_FROM_THIS_NOTIFY (NotifyDesc);
+  UnlockOpalPasswordDevices (Private);
In this Notify callback, we could use the 3rd parameter "Ppi" to get the Ssc PPI instance to perform unlock operation. With this change, the OPAL_PEI_DRIVER_PRIVATE_DATA is not needed any more and IsSscInstanceHandled() is not needed as well.

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to