]>
Commit | Line | Data |
---|---|---|
c8570424 AB |
1 | /** @file\r |
2 | EFI MM Communication Protocol 2 as defined in the PI 1.7 errata A specification.\r | |
3 | \r | |
4 | This protocol provides a means of communicating between drivers outside of MM and MMI\r | |
5 | handlers inside of MM.\r | |
6 | \r | |
7 | Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r | |
8 | Copyright (c) 2019, Arm Limited. All rights reserved.<BR>\r | |
9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
10 | \r | |
11 | **/\r | |
12 | \r | |
13 | #ifndef _MM_COMMUNICATION2_H_\r | |
14 | #define _MM_COMMUNICATION2_H_\r | |
15 | \r | |
16 | #include <Protocol/MmCommunication.h>\r | |
17 | \r | |
18 | #define EFI_MM_COMMUNICATION2_PROTOCOL_GUID \\r | |
19 | { \\r | |
20 | 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 } \\r | |
21 | }\r | |
22 | \r | |
2f88bd3a | 23 | typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTOCOL;\r |
c8570424 AB |
24 | \r |
25 | /**\r | |
26 | Communicates with a registered handler.\r | |
27 | \r | |
28 | This function provides a service to send and receive messages from a registered UEFI service.\r | |
29 | \r | |
30 | @param[in] This The EFI_MM_COMMUNICATION_PROTOCOL instance.\r | |
31 | @param[in] CommBufferPhysical Physical address of the MM communication buffer\r | |
32 | @param[in] CommBufferVirtual Virtual address of the MM communication buffer\r | |
33 | @param[in] CommSize The size of the data buffer being passed in. On exit, the size of data\r | |
34 | being returned. Zero if the handler does not wish to reply with any data.\r | |
35 | This parameter is optional and may be NULL.\r | |
36 | \r | |
37 | @retval EFI_SUCCESS The message was successfully posted.\r | |
38 | @retval EFI_INVALID_PARAMETER CommBufferPhysical was NULL or CommBufferVirtual was NULL.\r | |
39 | @retval EFI_BAD_BUFFER_SIZE The buffer is too large for the MM implementation.\r | |
40 | If this error is returned, the MessageLength field\r | |
41 | in the CommBuffer header or the integer pointed by\r | |
42 | CommSize, are updated to reflect the maximum payload\r | |
43 | size the implementation can accommodate.\r | |
44 | @retval EFI_ACCESS_DENIED The CommunicateBuffer parameter or CommSize parameter,\r | |
45 | if not omitted, are in address range that cannot be\r | |
46 | accessed by the MM environment.\r | |
47 | \r | |
48 | **/\r | |
49 | typedef\r | |
50 | EFI_STATUS\r | |
51 | (EFIAPI *EFI_MM_COMMUNICATE2)(\r | |
52 | IN CONST EFI_MM_COMMUNICATION2_PROTOCOL *This,\r | |
53 | IN OUT VOID *CommBufferPhysical,\r | |
54 | IN OUT VOID *CommBufferVirtual,\r | |
55 | IN OUT UINTN *CommSize OPTIONAL\r | |
56 | );\r | |
57 | \r | |
58 | ///\r | |
59 | /// EFI MM Communication Protocol provides runtime services for communicating\r | |
60 | /// between DXE drivers and a registered MMI handler.\r | |
61 | ///\r | |
62 | struct _EFI_MM_COMMUNICATION2_PROTOCOL {\r | |
2f88bd3a | 63 | EFI_MM_COMMUNICATE2 Communicate;\r |
c8570424 AB |
64 | };\r |
65 | \r | |
2f88bd3a | 66 | extern EFI_GUID gEfiMmCommunication2ProtocolGuid;\r |
c8570424 AB |
67 | \r |
68 | #endif\r |