]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.h
SecurityPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPassword / OpalPasswordPei.h
CommitLineData
112e584b
SZ
1/** @file\r
2 Opal Password PEI driver which is used to unlock Opal Password for S3.\r
3\r
a3efbc29 4Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>\r
289b714b 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
112e584b
SZ
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
112e584b
SZ
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
112e584b
SZ
22#include <Library/LockBoxLib.h>\r
23#include <Library/TcgStorageOpalLib.h>\r
24#include <Library/Tcg2PhysicalPresenceLib.h>\r
a3efbc29 25#include <Library/PeiServicesTablePointerLib.h>\r
112e584b
SZ
26\r
27#include <Protocol/StorageSecurityCommand.h>\r
28\r
29#include <Ppi/IoMmu.h>\r
a3efbc29 30#include <Ppi/StorageSecurityCommand.h>\r
112e584b
SZ
31\r
32#include "OpalPasswordCommon.h"\r
112e584b 33\r
112e584b
SZ
34\r
35//\r
a3efbc29
HW
36// The generic command timeout value (unit in us) for Storage Security Command\r
37// PPI ReceiveData/SendData services\r
112e584b 38//\r
a3efbc29 39#define SSC_PPI_GENERIC_TIMEOUT 30000000\r
112e584b
SZ
40\r
41#pragma pack(1)\r
42\r
a3efbc29 43#define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')\r
112e584b
SZ
44\r
45typedef struct {\r
a3efbc29
HW
46 UINTN Signature;\r
47 EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Sscp;\r
48 OPAL_DEVICE_LOCKBOX_DATA *Device;\r
49 VOID *Context;\r
50 EDKII_PEI_STORAGE_SECURITY_CMD_PPI *SscPpi;\r
51 UINTN DeviceIndex;\r
112e584b
SZ
52} OPAL_PEI_DEVICE;\r
53\r
a3efbc29
HW
54#define OPAL_PEI_DEVICE_FROM_THIS(a) \\r
55 CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)\r
112e584b
SZ
56\r
57#pragma pack()\r
58\r
112e584b
SZ
59#endif // _OPAL_PASSWORD_PEI_H_\r
60\r