MdePkg MmCommunication.h: Follow PI spec to update EFI_MM_COMMUNICATE
authorStar Zeng <star.zeng@intel.com>
Tue, 5 Dec 2017 03:23:18 +0000 (11:23 +0800)
committerStar Zeng <star.zeng@intel.com>
Thu, 7 Dec 2017 09:40:21 +0000 (17:40 +0800)
Follow PI spec (>= 1.5) to add new return status code description
and make CommSize OPTIONAL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Include/Protocol/MmCommunication.h

index 16450e3445b0aa09b36489524e653752d49eae63..774686ba3e7f3e2cd771baca8739faaa7aabbb77 100644 (file)
@@ -55,18 +55,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