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