]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/MmCommunication.h
MdePkg Base.h: Use correct style to check the defined macro
[mirror_edk2.git] / MdePkg / Include / Protocol / MmCommunication.h
index 16450e3445b0aa09b36489524e653752d49eae63..34c3e2b5a9e3a39a7117702a29090ea6b672d03b 100644 (file)
@@ -5,13 +5,7 @@
   handlers inside of MM.\r
 \r
   Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -55,18 +49,28 @@ typedef struct _EFI_MM_COMMUNICATION_PROTOCOL  EFI_MM_COMMUNICATION_PROTOCOL;
 \r
   @param[in] This                The EFI_MM_COMMUNICATION_PROTOCOL instance.\r
   @param[in] CommBuffer          A pointer to the buffer to convey into MMRAM.\r
-  @param[in] CommSize            The size of the data buffer being passed in.On exit, the size of data\r
+  @param[in] CommSize            The size of the data buffer being passed in. On exit, the size of data\r
                                  being returned. Zero if the handler does not wish to reply with any data.\r
+                                 This parameter is optional and may be NULL.\r
 \r
   @retval EFI_SUCCESS            The message was successfully posted.\r
   @retval EFI_INVALID_PARAMETER  The CommBuffer was NULL.\r
+  @retval EFI_BAD_BUFFER_SIZE    The buffer is too large for the MM implementation.\r
+                                 If this error is returned, the MessageLength field\r
+                                 in the CommBuffer header or the integer pointed by\r
+                                 CommSize, are updated to reflect the maximum payload\r
+                                 size the implementation can accommodate.\r
+  @retval EFI_ACCESS_DENIED      The CommunicateBuffer parameter or CommSize parameter,\r
+                                 if not omitted, are in address range that cannot be\r
+                                 accessed by the MM environment.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_MM_COMMUNICATE)(\r
   IN CONST EFI_MM_COMMUNICATION_PROTOCOL   *This,\r
   IN OUT VOID                              *CommBuffer,\r
-  IN OUT UINTN                             *CommSize\r
+  IN OUT UINTN                             *CommSize OPTIONAL\r
   );\r
 \r
 ///\r