1 /** @file
2   Opal Password common header file.
3 
4 Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7 **/
8 
9 #ifndef _OPAL_PASSWORD_COMMON_H_
10 #define _OPAL_PASSWORD_COMMON_H_
11 
12 #define OPAL_MAX_PASSWORD_SIZE      32
13 
14 #define OPAL_DEVICE_TYPE_UNKNOWN    0x0
15 #define OPAL_DEVICE_TYPE_ATA        0x1
16 #define OPAL_DEVICE_TYPE_NVME       0x2
17 
18 typedef struct {
19   UINT16            Segment;
20   UINT8             Bus;
21   UINT8             Device;
22   UINT8             Function;
23   UINT8             Reserved;
24 } OPAL_PCI_DEVICE;
25 
26 typedef struct {
27   UINT32                      Length;
28   OPAL_PCI_DEVICE             Device;
29   UINT8                       PasswordLength;
30   UINT8                       Password[OPAL_MAX_PASSWORD_SIZE];
31   UINT16                      OpalBaseComId;
32   UINT32                      DevicePathLength;
33   EFI_DEVICE_PATH_PROTOCOL    DevicePath[];
34 } OPAL_DEVICE_LOCKBOX_DATA;
35 
36 #define OPAL_DEVICE_LOCKBOX_GUID  { 0x56a77f0d, 0x6f05, 0x4d47, { 0xb9, 0x11, 0x4f, 0xd, 0xec, 0x5c, 0x58, 0x61 } }
37 
38 #endif // _OPAL_PASSWORD_COMMON_H_
39