• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Implementation of Opal password support library.
3 
4 Copyright (c) 2016, 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
9 
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.
12 
13 **/
14 
15 #ifndef _DXE_OPAL_NOTIFY_H_
16 #define _DXE_OPAL_NOTIFY_H_
17 
18 #include <PiDxe.h>
19 #include <PiSmm.h>
20 
21 #include <Uefi/UefiAcpiDataTable.h>
22 #include <Guid/PiSmmCommunicationRegionTable.h>
23 #include <Library/DebugLib.h>
24 #include <Library/BaseMemoryLib.h>
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Library/UefiLib.h>
27 #include <Library/OpalPasswordSupportLib.h>
28 #include <Library/DevicePathLib.h>
29 #include <Library/MemoryAllocationLib.h>
30 
31 #include <Protocol/SmmCommunication.h>
32 #include <Protocol/SmmBase2.h>
33 
34 
35 #pragma pack(1)
36 
37 typedef struct {
38   UINTN       Function;
39   EFI_STATUS  ReturnStatus;
40   UINT8       Data[1];
41 } OPAL_SMM_COMMUNICATE_HEADER;
42 
43 typedef struct {
44   UINT8                      Password[32];
45   UINT8                      PasswordLength;
46 
47   EFI_DEVICE_PATH_PROTOCOL   OpalDevicePath;
48 } OPAL_COMM_DEVICE_LIST;
49 
50 #pragma pack()
51 
52 #define SMM_FUNCTION_SET_OPAL_PASSWORD        1
53 
54 #define OPAL_PASSWORD_NOTIFY_PROTOCOL_GUID {0x0ff2ddd0, 0xefc9, 0x4f49, { 0x99, 0x7a, 0xcb, 0x59, 0x44, 0xe6, 0x97, 0xd3 } }
55 
56 #endif
57