]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.h
SecurityPkg: Apply uncrustify changes
[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 34//\r
a3efbc29
HW
35// The generic command timeout value (unit in us) for Storage Security Command\r
36// PPI ReceiveData/SendData services\r
112e584b 37//\r
c411b485 38#define SSC_PPI_GENERIC_TIMEOUT 30000000\r
112e584b
SZ
39\r
40#pragma pack(1)\r
41\r
c411b485 42#define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')\r
112e584b
SZ
43\r
44typedef struct {\r
a3efbc29
HW
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
112e584b
SZ
51} OPAL_PEI_DEVICE;\r
52\r
a3efbc29
HW
53#define OPAL_PEI_DEVICE_FROM_THIS(a) \\r
54 CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)\r
112e584b
SZ
55\r
56#pragma pack()\r
57\r
112e584b 58#endif // _OPAL_PASSWORD_PEI_H_\r