]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmCommunication.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmCommunication.h
CommitLineData
709f55c0 1/** @file\r
2 EFI SMM Communication Protocol as defined in the PI 1.2 specification.\r
3\r
4 This protocol provides a means of communicating between drivers outside of SMM and SMI \r
5 handlers inside of SMM. \r
6\r
9df063a0
HT
7 Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
8 This program and the accompanying materials \r
709f55c0 9 are licensed and made available under the terms and conditions of the BSD License \r
10 which accompanies this distribution. The full text of the license may be found at \r
11 http://opensource.org/licenses/bsd-license.php \r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
15\r
16**/\r
17\r
18#ifndef _SMM_COMMUNICATION_H_\r
19#define _SMM_COMMUNICATION_H_\r
20\r
21#define EFI_SMM_COMMUNICATION_PROTOCOL_GUID \\r
22 { \\r
23 0xc68ed8e2, 0x9dc6, 0x4cbd, { 0x9d, 0x94, 0xdb, 0x65, 0xac, 0xc5, 0xc3, 0x32 } \\r
24 }\r
25\r
26///\r
27/// To avoid confusion in interpreting frames, the communication buffer should always \r
28/// begin with EFI_SMM_COMMUNICATE_HEADER\r
29///\r
30typedef struct {\r
31 ///\r
32 /// Allows for disambiguation of the message format.\r
33 ///\r
34 EFI_GUID HeaderGuid;\r
35 ///\r
36 /// Describes the size of Data (in bytes) and does not include the size of the header.\r
37 ///\r
38 UINTN MessageLength;\r
39 ///\r
40 /// Designates an array of bytes that is MessageLength in size.\r
41 ///\r
42 UINT8 Data[1];\r
43} EFI_SMM_COMMUNICATE_HEADER;\r
44\r
45typedef struct _EFI_SMM_COMMUNICATION_PROTOCOL EFI_SMM_COMMUNICATION_PROTOCOL;\r
46\r
47/**\r
48 Communicates with a registered handler.\r
49 \r
50 This function provides a service to send and receive messages from a registered UEFI service.\r
51\r
52 @param[in] This The EFI_SMM_COMMUNICATION_PROTOCOL instance.\r
53 @param[in] CommBuffer A pointer to the buffer to convey into SMRAM.\r
54 @param[in] CommSize The size of the data buffer being passed in.On exit, the size of data\r
55 being returned. Zero if the handler does not wish to reply with any data.\r
56\r
57 @retval EFI_SUCCESS The message was successfully posted.\r
58 @retval EFI_INVALID_PARAMETER The CommBuffer was NULL.\r
59**/\r
60typedef\r
61EFI_STATUS\r
d64527e5 62(EFIAPI *EFI_SMM_COMMUNICATE2)(\r
709f55c0 63 IN CONST EFI_SMM_COMMUNICATION_PROTOCOL *This,\r
64 IN OUT VOID *CommBuffer,\r
65 IN OUT UINTN *CommSize\r
66 );\r
67\r
68///\r
69/// EFI SMM Communication Protocol provides runtime services for communicating\r
70/// between DXE drivers and a registered SMI handler.\r
71///\r
72struct _EFI_SMM_COMMUNICATION_PROTOCOL {\r
d64527e5 73 EFI_SMM_COMMUNICATE2 Communicate;\r
709f55c0 74};\r
75\r
76extern EFI_GUID gEfiSmmCommunicationProtocolGuid;\r
77\r
78#endif\r
79\r