2 Opal Password PEI driver which is used to unlock Opal Password for S3.
4 Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _OPAL_PASSWORD_PEI_H_
10 #define _OPAL_PASSWORD_PEI_H_
14 #include <Library/DebugLib.h>
15 #include <Library/IoLib.h>
16 #include <Library/PciLib.h>
17 #include <Library/BaseLib.h>
18 #include <Library/BaseMemoryLib.h>
19 #include <Library/MemoryAllocationLib.h>
20 #include <Library/PeimEntryPoint.h>
21 #include <Library/PeiServicesLib.h>
22 #include <Library/LockBoxLib.h>
23 #include <Library/TcgStorageOpalLib.h>
24 #include <Library/Tcg2PhysicalPresenceLib.h>
25 #include <Library/PeiServicesTablePointerLib.h>
27 #include <Protocol/StorageSecurityCommand.h>
29 #include <Ppi/IoMmu.h>
30 #include <Ppi/StorageSecurityCommand.h>
32 #include "OpalPasswordCommon.h"
36 // The generic command timeout value (unit in us) for Storage Security Command
37 // PPI ReceiveData/SendData services
39 #define SSC_PPI_GENERIC_TIMEOUT 30000000
43 #define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')
47 EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Sscp
;
48 OPAL_DEVICE_LOCKBOX_DATA
*Device
;
50 EDKII_PEI_STORAGE_SECURITY_CMD_PPI
*SscPpi
;
54 #define OPAL_PEI_DEVICE_FROM_THIS(a) \
55 CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)
59 #endif // _OPAL_PASSWORD_PEI_H_