1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! Communication3 Protocol
//!
//! Provides a means of communicating between drivers outside of MM and MMI handlers inside of MM, for communication
//! buffer that is compliant with EFI_MM_COMMUNICATE_HEADER_V3.
//!
//! See <https://uefi.org/specs/PI/1.9/V4_UEFI_Protocols.html#efi-mm-communication3-protocol>
//!
//! ## License
//!
//! Copyright (C) Microsoft Corporation. All rights reserved.
//!
//! SPDX-License-Identifier: BSD-2-Clause-Patent
//!
use c_void;
use efi;
pub const PROTOCOL_GUID: Guid =
from_fields;
pub const COMMUNICATE_HEADER_V3_GUID: Guid =
from_fields;
/// Sends/receives a message for a registered handler.
///
/// This protocol provides runtime services for communicating between DXE drivers and a registered MMI handler.
///
/// Usage is similar to EFI_MM_COMMUNICATION_PROTOCOL.Communicate() except for the notes below:
///
/// - Communication buffer transfer to MM core should start with self::EfiMmCommunicateHeader.
/// - With the updated header, the header_guid field is redefine as header GUID for MM core to differentiate the
/// header format.
/// - The message_guid field is moved to be after the header_guid field to allow for decent alignment and message
/// disambiguation.
/// - The message_data field is replaced with a flexible array to allow users not having to consume extra data
/// during communicate.
/// - Instead of passing just the physical address via the comm_buffer parameter, the caller must pass both the
/// physical and the virtual addresses of the communication buffer.
/// - If no virtual remapping has taken place, the physical address will be equal to the virtual address, and so the
/// caller is required to pass the same value for both parameters.
///
/// @param this The protocol instance.
/// @param comm_buffer_physical Physical address of the buffer to convey into MMRAM, of which content must
/// start with self::EfiMmCommunicateHeader.
/// @param comm_buffer_virtual Virtual address of the buffer to convey into MMRAM, of which content must
/// start with self::EfiMmCommunicateHeader.
///
/// @retval Status::SUCCESS The message was successfully posted.
/// @retval Status::INVALID_PARAMETER comm_buffer_physical was null or comm_buffer_virtual was null.
/// @retval Status::BAD_BUFFER_SIZE The buffer is too large for the MM implementation.
/// If this error is returned, the message_length field
/// in the comm_buffer header, is updated to reflect the maximum payload
/// size the implementation can accommodate.
/// @retval Status::ACCESS_DENIED The communicate buffer parameters are in an address range that cannot be
/// accessed by the MM environment.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.9, Section IV-5.7.6
pub type Communicate3 = extern "efiapi" fn ;