]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Opal Password PEI driver which is used to unlock Opal Password for S3.\r | |
3 | \r | |
4 | Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | **/\r | |
8 | \r | |
9 | #ifndef _OPAL_PASSWORD_PEI_H_\r | |
10 | #define _OPAL_PASSWORD_PEI_H_\r | |
11 | \r | |
12 | #include <PiPei.h>\r | |
13 | \r | |
14 | #include <Library/DebugLib.h>\r | |
15 | #include <Library/IoLib.h>\r | |
16 | #include <Library/PciLib.h>\r | |
17 | #include <Library/BaseLib.h>\r | |
18 | #include <Library/BaseMemoryLib.h>\r | |
19 | #include <Library/MemoryAllocationLib.h>\r | |
20 | #include <Library/PeimEntryPoint.h>\r | |
21 | #include <Library/PeiServicesLib.h>\r | |
22 | #include <Library/LockBoxLib.h>\r | |
23 | #include <Library/TcgStorageOpalLib.h>\r | |
24 | #include <Library/Tcg2PhysicalPresenceLib.h>\r | |
25 | #include <Library/PeiServicesTablePointerLib.h>\r | |
26 | \r | |
27 | #include <Protocol/StorageSecurityCommand.h>\r | |
28 | \r | |
29 | #include <Ppi/IoMmu.h>\r | |
30 | #include <Ppi/StorageSecurityCommand.h>\r | |
31 | \r | |
32 | #include "OpalPasswordCommon.h"\r | |
33 | \r | |
34 | //\r | |
35 | // The generic command timeout value (unit in us) for Storage Security Command\r | |
36 | // PPI ReceiveData/SendData services\r | |
37 | //\r | |
38 | #define SSC_PPI_GENERIC_TIMEOUT 30000000\r | |
39 | \r | |
40 | #pragma pack(1)\r | |
41 | \r | |
42 | #define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')\r | |
43 | \r | |
44 | typedef struct {\r | |
45 | UINTN Signature;\r | |
46 | EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Sscp;\r | |
47 | OPAL_DEVICE_LOCKBOX_DATA *Device;\r | |
48 | VOID *Context;\r | |
49 | EDKII_PEI_STORAGE_SECURITY_CMD_PPI *SscPpi;\r | |
50 | UINTN DeviceIndex;\r | |
51 | } OPAL_PEI_DEVICE;\r | |
52 | \r | |
53 | #define OPAL_PEI_DEVICE_FROM_THIS(a) \\r | |
54 | CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)\r | |
55 | \r | |
56 | #pragma pack()\r | |
57 | \r | |
58 | #endif // _OPAL_PASSWORD_PEI_H_\r |