TianoCore EDK2 master
Loading...
Searching...
No Matches
SecureBootDefaultKeysDxe.c
Go to the documentation of this file.
1
12#include <Library/BaseLib.h>
14#include <Library/DebugLib.h>
18#include <UefiSecureBoot.h>
21
35EFIAPI
37 IN EFI_HANDLE ImageHandle,
38 IN EFI_SYSTEM_TABLE *SystemTable
39 )
40{
41 EFI_STATUS Status;
42
43 Status = SecureBootInitPKDefault ();
44 if (EFI_ERROR (Status)) {
45 DEBUG ((DEBUG_ERROR, "%a: Cannot initialize PKDefault: %r\n", __func__, Status));
46 return Status;
47 }
48
49 Status = SecureBootInitKEKDefault ();
50 if (EFI_ERROR (Status)) {
51 DEBUG ((DEBUG_ERROR, "%a: Cannot initialize KEKDefault: %r\n", __func__, Status));
52 return Status;
53 }
54
55 Status = SecureBootInitDbDefault ();
56 if (EFI_ERROR (Status)) {
57 DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbDefault: %r\n", __func__, Status));
58 return Status;
59 }
60
61 Status = SecureBootInitDbtDefault ();
62 if (Status == EFI_NOT_FOUND) {
63 DEBUG ((DEBUG_INFO, "%a: dbtDefault not initialized\n", __func__));
64 } else if (EFI_ERROR (Status)) {
65 DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbtDefault: %r\n", __func__, Status));
66 return Status;
67 }
68
69 Status = SecureBootInitDbxDefault ();
70 if (Status == EFI_NOT_FOUND) {
71 DEBUG ((DEBUG_INFO, "%a: dbxDefault not initialized\n", __func__));
72 } else if (EFI_ERROR (Status)) {
73 DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbxDefault: %r\n", __func__, Status));
74 return Status;
75 }
76
77 return EFI_SUCCESS;
78}
#define IN
Definition: Base.h:279
#define DEBUG(Expression)
Definition: DebugLib.h:434
EFI_STATUS EFIAPI SecureBootDefaultKeysEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS SecureBootInitDbxDefault(IN VOID)
EFI_STATUS SecureBootInitDbDefault(IN VOID)
EFI_STATUS SecureBootInitDbtDefault(IN VOID)
EFI_STATUS SecureBootInitKEKDefault(IN VOID)
EFI_STATUS SecureBootInitPKDefault(IN VOID)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112