TianoCore EDK2 master
Loading...
Searching...
No Matches
HddPasswordDxe.h
Go to the documentation of this file.
1
10#ifndef _HDD_PASSWORD_DXE_H_
11#define _HDD_PASSWORD_DXE_H_
12
13#include <Uefi.h>
14
18#include <Protocol/PciIo.h>
20
21#include <Guid/MdeModuleHii.h>
22#include <Guid/EventGroup.h>
24
25#include <Library/DebugLib.h>
26#include <Library/BaseLib.h>
34#include <Library/HiiLib.h>
36#include <Library/PrintLib.h>
37#include <Library/UefiLib.h>
38#include <Library/LockBoxLib.h>
40#include <Library/PciLib.h>
42
43#include "HddPasswordCommon.h"
45
46//
47// This is the generated IFR binary data for each formset defined in VFR.
48// This data array is ready to be used as input of HiiAddPackages() to
49// create a packagelist (which contains Form packages, String packages, etc).
50//
51extern UINT8 HddPasswordBin[];
52
53//
54// This is the generated String package data for all .UNI files.
55// This data array is ready to be used as input of HiiAddPackages() to
56// create a packagelist (which contains Form packages, String packages, etc).
57//
58extern UINT8 HddPasswordDxeStrings[];
59
60#define HDD_PASSWORD_DXE_PRIVATE_SIGNATURE SIGNATURE_32 ('H', 'D', 'D', 'P')
61
63 LIST_ENTRY Link;
64 EFI_HANDLE Controller;
65 UINTN Bus;
66 UINTN Device;
67 UINTN Function;
68 UINT16 Port;
69 UINT16 PortMultiplierPort;
70 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
71 CHAR16 HddString[64];
72 CHAR8 Password[HDD_PASSWORD_MAX_LENGTH];
73 EFI_STRING_ID TitleToken;
74 EFI_STRING_ID TitleHelpToken;
75
76 HDD_PASSWORD_CONFIG IfrData;
77 EFI_ATA_PASS_THRU_PROTOCOL *AtaPassThru;
79
81 UINTN Signature;
82 EFI_HANDLE DriverHandle;
83 EFI_HII_HANDLE HiiHandle;
87
88#define HDD_PASSWORD_DXE_PRIVATE_FROM_THIS(a) CR (a, HDD_PASSWORD_DXE_PRIVATE_DATA, ConfigAccess, HDD_PASSWORD_DXE_PRIVATE_SIGNATURE)
89
90#define PASSWORD_SALT_SIZE 32
91
92#define HDD_PASSWORD_REQUEST_VARIABLE_NAME L"HddPasswordRequest"
93
94//
95// It needs to be locked before EndOfDxe.
96//
97#define HDD_PASSWORD_VARIABLE_NAME L"HddPassword"
98
99#pragma pack(1)
100
101typedef struct {
102 HDD_PASSWORD_DEVICE Device;
103 HDD_PASSWORD_REQUEST Request;
105
106//
107// It will be used to validate HDD password when the device is at frozen state.
108//
109typedef struct {
110 HDD_PASSWORD_DEVICE Device;
111 UINT8 PasswordHash[SHA256_DIGEST_SIZE];
112 UINT8 PasswordSalt[PASSWORD_SALT_SIZE];
114
118typedef struct {
119 VENDOR_DEVICE_PATH VendorDevicePath;
122
123#pragma pack()
124
125//
126// Time out value for ATA pass through protocol
127//
128#define ATA_TIMEOUT EFI_TIMER_PERIOD_SECONDS (3)
129
130typedef struct {
131 UINT32 Address;
134
135#endif
UINT64 UINTN
#define SHA256_DIGEST_SIZE
Definition: BaseCryptLib.h:44
S3_BOOT_SCRIPT_LIB_WIDTH
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
VOID * EFI_HII_HANDLE