]>
Commit | Line | Data |
---|---|---|
112e584b SZ |
1 | /** @file\r |
2 | Opal Password PEI driver which is used to unlock Opal Password for S3.\r | |
3 | \r | |
a3efbc29 | 4 | Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r |
112e584b SZ |
5 | This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _OPAL_PASSWORD_PEI_H_\r | |
16 | #define _OPAL_PASSWORD_PEI_H_\r | |
17 | \r | |
18 | #include <PiPei.h>\r | |
112e584b SZ |
19 | \r |
20 | #include <Library/DebugLib.h>\r | |
21 | #include <Library/IoLib.h>\r | |
22 | #include <Library/PciLib.h>\r | |
23 | #include <Library/BaseLib.h>\r | |
24 | #include <Library/BaseMemoryLib.h>\r | |
25 | #include <Library/MemoryAllocationLib.h>\r | |
26 | #include <Library/PeimEntryPoint.h>\r | |
27 | #include <Library/PeiServicesLib.h>\r | |
112e584b SZ |
28 | #include <Library/LockBoxLib.h>\r |
29 | #include <Library/TcgStorageOpalLib.h>\r | |
30 | #include <Library/Tcg2PhysicalPresenceLib.h>\r | |
a3efbc29 | 31 | #include <Library/PeiServicesTablePointerLib.h>\r |
112e584b SZ |
32 | \r |
33 | #include <Protocol/StorageSecurityCommand.h>\r | |
34 | \r | |
35 | #include <Ppi/IoMmu.h>\r | |
a3efbc29 | 36 | #include <Ppi/StorageSecurityCommand.h>\r |
112e584b SZ |
37 | \r |
38 | #include "OpalPasswordCommon.h"\r | |
112e584b | 39 | \r |
112e584b SZ |
40 | \r |
41 | //\r | |
a3efbc29 HW |
42 | // The generic command timeout value (unit in us) for Storage Security Command\r |
43 | // PPI ReceiveData/SendData services\r | |
112e584b | 44 | //\r |
a3efbc29 | 45 | #define SSC_PPI_GENERIC_TIMEOUT 30000000\r |
112e584b SZ |
46 | \r |
47 | #pragma pack(1)\r | |
48 | \r | |
a3efbc29 | 49 | #define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')\r |
112e584b SZ |
50 | \r |
51 | typedef struct {\r | |
a3efbc29 HW |
52 | UINTN Signature;\r |
53 | EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Sscp;\r | |
54 | OPAL_DEVICE_LOCKBOX_DATA *Device;\r | |
55 | VOID *Context;\r | |
56 | EDKII_PEI_STORAGE_SECURITY_CMD_PPI *SscPpi;\r | |
57 | UINTN DeviceIndex;\r | |
112e584b SZ |
58 | } OPAL_PEI_DEVICE;\r |
59 | \r | |
a3efbc29 HW |
60 | #define OPAL_PEI_DEVICE_FROM_THIS(a) \\r |
61 | CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)\r | |
112e584b SZ |
62 | \r |
63 | #pragma pack()\r | |
64 | \r | |
112e584b SZ |
65 | #endif // _OPAL_PASSWORD_PEI_H_\r |
66 | \r |