\r
Copyright (c) 2021, ARM Ltd. All rights reserved.<BR>\r
Copyright (c) 2021, Semihalf All rights reserved.<BR>\r
+Copyright (c) 2021, Ampere Computing LLC. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
@param[in] ImageHandle The image handle of the driver.\r
@param[in] SystemTable The system table.\r
\r
- @retval EFI_ALREADY_STARTED The driver already exists in system.\r
- @retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack of resources.\r
- @retval EFI_SUCCESS All the related protocols are installed on the driver.\r
- @retval Others Fail to get the SecureBootEnable variable.\r
+ @retval EFI_SUCCESS The secure default keys are initialized successfully.\r
+ @retval EFI_UNSUPPORTED One of the secure default keys already exists.\r
+ @retval EFI_NOT_FOUND One of the PK, KEK, or DB default keys is not found.\r
+ @retval Others Fail to initialize the secure default keys.\r
\r
**/\r
EFI_STATUS\r
}\r
\r
Status = SecureBootInitDbtDefault ();\r
- if (EFI_ERROR (Status)) {\r
+ if (Status == EFI_NOT_FOUND) {\r
DEBUG ((DEBUG_INFO, "%a: dbtDefault not initialized\n", __FUNCTION__));\r
+ } else if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbtDefault: %r\n", __FUNCTION__, Status));\r
+ return Status;\r
}\r
\r
Status = SecureBootInitDbxDefault ();\r
- if (EFI_ERROR (Status)) {\r
+ if (Status == EFI_NOT_FOUND) {\r
DEBUG ((DEBUG_INFO, "%a: dbxDefault not initialized\n", __FUNCTION__));\r
+ } else if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbxDefault: %r\n", __FUNCTION__, Status));\r
+ return Status;\r
}\r
\r
- return Status;\r
+ return EFI_SUCCESS;\r
}\r