]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/MmCommunication.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Ppi / MmCommunication.h
CommitLineData
f86de758
KQ
1/** @file\r
2 EFI MM Communication PPI definition.\r
3\r
4 This PPI provides a means of communicating between drivers outside\r
5 of MM and MMI handlers inside of MM in PEI phase.\r
6\r
7 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
8 Copyright (c) Microsoft Corporation.\r
9\r
10 SPDX-License-Identifier: BSD-2-Clause-Patent\r
11\r
12**/\r
13\r
f86de758
KQ
14#ifndef MM_COMMUNICATION_PPI_H_\r
15#define MM_COMMUNICATION_PPI_H_\r
16\r
17#define EFI_PEI_MM_COMMUNICATION_PPI_GUID \\r
18 { \\r
19 0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } \\r
20 }\r
21\r
2f88bd3a 22typedef struct _EFI_PEI_MM_COMMUNICATION_PPI EFI_PEI_MM_COMMUNICATION_PPI;\r
f86de758
KQ
23\r
24/**\r
25 Communicates with a registered handler.\r
26\r
27 This function provides a service to send and receive messages from a registered PEI service.\r
28 The EFI_PEI_MM_COMMUNICATION_PPI driver is responsible for doing any of the copies such that\r
29 the data lives in PEI-service-accessible RAM.\r
30\r
31 A given implementation of the EFI_PEI_MM_COMMUNICATION_PPI may choose to use the\r
32 EFI_MM_CONTROL_PPI for effecting the mode transition, or it may use some other method.\r
33\r
34 The agent invoking the communication interface must be physical/virtually 1:1 mapped.\r
35\r
36 To avoid confusion in interpreting frames, the CommBuffer parameter should always begin with\r
37 EFI_MM_COMMUNICATE_HEADER. The header data is mandatory for messages sent into the MM agent.\r
38\r
39 Once inside of MM, the MM infrastructure will call all registered handlers with the same\r
40 HandlerType as the GUID specified by HeaderGuid and the CommBuffer pointing to Data.\r
41\r
42 This function is not reentrant.\r
43\r
44 @param[in] This The EFI_PEI_MM_COMMUNICATION_PPI instance.\r
45 @param[in] CommBuffer Pointer to the buffer to convey into MMRAM.\r
46 @param[in] CommSize The size of the data buffer being passed in. On exit, the\r
47 size of data being returned. Zero if the handler does not\r
48 wish to reply with any data.\r
49\r
50 @retval EFI_SUCCESS The message was successfully posted.\r
51 @retval EFI_INVALID_PARAMETER The buffer was NULL.\r
52**/\r
53typedef\r
54EFI_STATUS\r
55(EFIAPI *EFI_PEI_MM_COMMUNICATE)(\r
56 IN CONST EFI_PEI_MM_COMMUNICATION_PPI *This,\r
57 IN OUT VOID *CommBuffer,\r
58 IN OUT UINTN *CommSize\r
59 );\r
60\r
61///\r
62/// EFI MM Communication PPI provides services for communicating between PEIM and a registered\r
63/// MMI handler.\r
64///\r
65struct _EFI_PEI_MM_COMMUNICATION_PPI {\r
2f88bd3a 66 EFI_PEI_MM_COMMUNICATE Communicate;\r
f86de758
KQ
67};\r
68\r
2f88bd3a 69extern EFI_GUID gEfiPeiMmCommunicationPpiGuid;\r
f86de758
KQ
70\r
71#endif\r