OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcFirmwarePasswordLib.c
Go to the documentation of this file.
1
15#include <Uefi.h>
16#include <Library/DebugLib.h>
17#include <Library/BaseMemoryLib.h>
18#include <Library/MemoryAllocationLib.h>
19#include <Library/UefiLib.h>
20#include <Library/UefiBootServicesTableLib.h>
21
23
25
26// AppleFirmwarePasswordCheck
34
35EFI_STATUS
36EFIAPI
39 IN OUT UINTN *Arg1
40 )
41{
42 return EFI_SUCCESS;
43}
44
45// OcFirmwarePasswordInstallProtocol
52
53EFI_STATUS
55 IN EFI_HANDLE ImageHandle,
56 IN EFI_SYSTEM_TABLE *SystemTable
57 )
58{
59 EFI_STATUS Status;
60
62
64
65 if (Private == NULL) {
66 return EFI_OUT_OF_RESOURCES;
67 }
68
71
72 // Install our protocol with dupe check enabled.
73
74 Status = gBS->InstallMultipleProtocolInterfaces (
75 &ImageHandle,
77 &Private->AppleFirmwarePassword,
78 NULL
79 );
80 if (EFI_ERROR (Status)) {
81 FreePool (Private);
82 }
83
84 return Status;
85}
EFI_GUID gAppleFirmwarePasswordProtocolGuid
A global variable storing the GUID of the _APPLE_FIRMWARE_PASSWORD_PROTOCOL.
#define APPLE_FIRMWARE_PASSWORD_PRIVATE_DATA_SIGNATURE
EFI_BOOT_SERVICES * gBS
EFI_STATUS OcFirmwarePasswordInstallProtocol(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI AppleFirmwarePasswordCheck(IN APPLE_FIRMWARE_PASSWORD_PROTOCOL *This, IN OUT UINTN *Arg1)
APPLE_FIRMWARE_PASSWORD_PROTOCOL AppleFirmwarePassword
The structure exposed by the APPLE_FIRMWARE_PASSWORD_PROTOCOL.
APPLE_FIRMWARE_PASSWORD_CHECK Check