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
15
#include <
IndustryStandard/Atapi.h
>
16
#include <
IndustryStandard/Pci.h
>
17
#include <
Protocol/AtaPassThru.h
>
18
#include <
Protocol/PciIo.h
>
19
#include <
Protocol/HiiConfigAccess.h
>
20
21
#include <
Guid/MdeModuleHii.h
>
22
#include <
Guid/EventGroup.h
>
23
#include <
Guid/S3StorageDeviceInitList.h
>
24
25
#include <
Library/DebugLib.h
>
26
#include <
Library/BaseLib.h
>
27
#include <
Library/BaseMemoryLib.h
>
28
#include <
Library/UefiRuntimeServicesTableLib.h
>
29
#include <
Library/UefiDriverEntryPoint.h
>
30
#include <
Library/UefiBootServicesTableLib.h
>
31
#include <
Library/DxeServicesTableLib.h
>
32
#include <
Library/MemoryAllocationLib.h
>
33
#include <
Library/UefiHiiServicesLib.h
>
34
#include <
Library/HiiLib.h
>
35
#include <
Library/DevicePathLib.h
>
36
#include <
Library/PrintLib.h
>
37
#include <
Library/UefiLib.h
>
38
#include <
Library/LockBoxLib.h
>
39
#include <
Library/S3BootScriptLib.h
>
40
#include <
Library/PciLib.h
>
41
#include <
Library/BaseCryptLib.h
>
42
43
#include "
HddPasswordCommon.h
"
44
#include "
HddPasswordHiiDataStruc.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
//
51
extern
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
//
58
extern
UINT8 HddPasswordDxeStrings[];
59
60
#define HDD_PASSWORD_DXE_PRIVATE_SIGNATURE SIGNATURE_32 ('H', 'D', 'D', 'P')
61
62
typedef
struct
_HDD_PASSWORD_CONFIG_FORM_ENTRY
{
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;
78
}
HDD_PASSWORD_CONFIG_FORM_ENTRY
;
79
80
typedef
struct
_HDD_PASSWORD_DXE_PRIVATE_DATA
{
81
UINTN
Signature;
82
EFI_HANDLE
DriverHandle;
83
EFI_HII_HANDLE
HiiHandle;
84
EFI_HII_CONFIG_ACCESS_PROTOCOL
ConfigAccess;
85
HDD_PASSWORD_CONFIG_FORM_ENTRY
*Current;
86
}
HDD_PASSWORD_DXE_PRIVATE_DATA
;
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
101
typedef
struct
{
102
HDD_PASSWORD_DEVICE
Device;
103
HDD_PASSWORD_REQUEST
Request;
104
}
HDD_PASSWORD_REQUEST_VARIABLE
;
105
106
//
107
// It will be used to validate HDD password when the device is at frozen state.
108
//
109
typedef
struct
{
110
HDD_PASSWORD_DEVICE
Device;
111
UINT8 PasswordHash[
SHA256_DIGEST_SIZE
];
112
UINT8 PasswordSalt[PASSWORD_SALT_SIZE];
113
}
HDD_PASSWORD_VARIABLE
;
114
118
typedef
struct
{
119
VENDOR_DEVICE_PATH
VendorDevicePath;
120
EFI_DEVICE_PATH_PROTOCOL
End;
121
}
HII_VENDOR_DEVICE_PATH
;
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
130
typedef
struct
{
131
UINT32 Address;
132
S3_BOOT_SCRIPT_LIB_WIDTH
Width;
133
}
HDD_HC_PCI_REGISTER_SAVE
;
134
135
#endif
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
Atapi.h
BaseCryptLib.h
SHA256_DIGEST_SIZE
#define SHA256_DIGEST_SIZE
Definition:
BaseCryptLib.h:44
BaseLib.h
BaseMemoryLib.h
DevicePathLib.h
DxeServicesTableLib.h
EventGroup.h
HddPasswordCommon.h
HddPasswordHiiDataStruc.h
HiiConfigAccess.h
HiiLib.h
MdeModuleHii.h
LockBoxLib.h
Pci.h
DebugLib.h
PciLib.h
AtaPassThru.h
PciIo.h
MemoryAllocationLib.h
PrintLib.h
S3BootScriptLib.h
S3_BOOT_SCRIPT_LIB_WIDTH
S3_BOOT_SCRIPT_LIB_WIDTH
Definition:
S3BootScriptLib.h:43
S3StorageDeviceInitList.h
Uefi.h
EFI_HANDLE
VOID * EFI_HANDLE
Definition:
UefiBaseType.h:33
UefiBootServicesTableLib.h
UefiDriverEntryPoint.h
UefiHiiServicesLib.h
EFI_HII_HANDLE
VOID * EFI_HII_HANDLE
Definition:
UefiInternalFormRepresentation.h:23
UefiLib.h
UefiRuntimeServicesTableLib.h
_EFI_ATA_PASS_THRU_PROTOCOL
Definition:
AtaPassThru.h:453
_EFI_HII_CONFIG_ACCESS_PROTOCOL
Definition:
HiiConfigAccess.h:215
_HDD_PASSWORD_CONFIG_FORM_ENTRY
Definition:
HddPasswordDxe.h:62
_HDD_PASSWORD_CONFIG
Definition:
HddPasswordHiiDataStruc.h:49
_HDD_PASSWORD_DXE_PRIVATE_DATA
Definition:
HddPasswordDxe.h:80
_LIST_ENTRY
Definition:
Base.h:247
EFI_DEVICE_PATH_PROTOCOL
Definition:
DevicePath.h:43
HDD_HC_PCI_REGISTER_SAVE
Definition:
HddPasswordDxe.h:130
HDD_PASSWORD_DEVICE
Definition:
HddPasswordCommon.h:35
HDD_PASSWORD_REQUEST_VARIABLE
Definition:
HddPasswordDxe.h:101
HDD_PASSWORD_REQUEST
Definition:
HddPasswordHiiDataStruc.h:43
HDD_PASSWORD_VARIABLE
Definition:
HddPasswordDxe.h:109
HII_VENDOR_DEVICE_PATH
Definition:
ConsolePrefDxe.c:33
VENDOR_DEVICE_PATH
Definition:
DevicePath.h:140
SecurityPkg
HddPassword
HddPasswordDxe.h
Generated on Fri Nov 15 2024 18:01:23 for TianoCore EDK2 by
1.9.6