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 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _OPAL_PASSWORD_PEI_H_
16 #define _OPAL_PASSWORD_PEI_H_
20 #include <Library/DebugLib.h>
21 #include <Library/IoLib.h>
22 #include <Library/PciLib.h>
23 #include <Library/BaseLib.h>
24 #include <Library/BaseMemoryLib.h>
25 #include <Library/MemoryAllocationLib.h>
26 #include <Library/PeimEntryPoint.h>
27 #include <Library/PeiServicesLib.h>
28 #include <Library/LockBoxLib.h>
29 #include <Library/TcgStorageOpalLib.h>
30 #include <Library/Tcg2PhysicalPresenceLib.h>
31 #include <Library/PeiServicesTablePointerLib.h>
33 #include <Protocol/StorageSecurityCommand.h>
35 #include <Ppi/IoMmu.h>
36 #include <Ppi/StorageSecurityCommand.h>
38 #include "OpalPasswordCommon.h"
42 // The generic command timeout value (unit in us) for Storage Security Command
43 // PPI ReceiveData/SendData services
45 #define SSC_PPI_GENERIC_TIMEOUT 30000000
49 #define OPAL_PEI_DEVICE_SIGNATURE SIGNATURE_32 ('o', 'p', 'd', 's')
53 EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Sscp
;
54 OPAL_DEVICE_LOCKBOX_DATA
*Device
;
56 EDKII_PEI_STORAGE_SECURITY_CMD_PPI
*SscPpi
;
60 #define OPAL_PEI_DEVICE_FROM_THIS(a) \
61 CR (a, OPAL_PEI_DEVICE, Sscp, OPAL_PEI_DEVICE_SIGNATURE)
65 #endif // _OPAL_PASSWORD_PEI_H_