From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web12.35400.1629176925377860614 for ; Mon, 16 Aug 2021 22:08:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tCrTYDr/; spf=pass (domain: gmail.com, ip: 209.85.216.50, mailfrom: kuqin12@gmail.com) Received: by mail-pj1-f50.google.com with SMTP id u21-20020a17090a8915b02901782c36f543so3018948pjn.4 for ; Mon, 16 Aug 2021 22:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V2dGANkrx9VOlZ6HRJG2OcpE1tQo5t5GwKp70EvIUR4=; b=tCrTYDr/glnJwlDpV52gLZ7rOFtnjfkMZI1gamLHspTIo7J6hpHxuCMcq3c9sCOM1D QWSisPCcbK+OGq/v2gUuxbe7teK8EMahIj30zP/q28ctCtJLgPdEavZ/UQtw/kNP7M15 3b64EOrqa7pj3qNk1mt5sz8qQBu5ghKLkxLY/L55Kq0ASC4qxb5udWFa8xIBk9jHu+6N YiEV8gLhsZHIXMfEEdg6xbalU+iojvEZx7GlanCTRkpQKDQI6BVFiUNOgDTz7LYLABIE KLiB64eG11Z4DDbm81xPI2p7+oclOENgq7ClMPP9fBrKtDMD3c4mQ7zV9DtD3FZQotqx JIjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V2dGANkrx9VOlZ6HRJG2OcpE1tQo5t5GwKp70EvIUR4=; b=pUeqGyWo9kSQg7ioJMaF9zLwlCK6oN+8Mn+svm5CCchLxN3LxdPXVOyLVkMdZOMYuD 0OzysWeqK1TFVkSqTEi7qUyR69YPj0BhPJjEFZfyj/zpsTqEkIIxuMSkqs+ypzDJOixN rYqsw4rxyKfjNhNYxfzHNdsGe+E28ad3Vyh5NVgZOlW+k75nQNN/NhD8FQPdyFT77+Yt n29vc0FR2Ido7LX8nkJzUNEa+w7VG6MQuNeOha9bMqIP+SMnPWmtW4pAbJITn6/nVLx5 NU7peMnEB6IkhOAHZHoG1g+2iNFVcupytYtqxvsKnDlchVN7Nd/Zl3y0zXwCPFvA3Gai 8+KA== X-Gm-Message-State: AOAM530hqRd4vXPrK2MSWvkavlO94eXAHFuAwV7CxrIhTfO7ecNTpZKD t8f+3aw3o764zlFbWVjnYOEOVgctFvdAfA== X-Google-Smtp-Source: ABdhPJzJLSFQA62ML8kySUu/BX7gWT37rMIkpCxAUlMyGOY5pGifg4iBb8btjN49zDX+zIa6ih8k9w== X-Received: by 2002:a63:6983:: with SMTP id e125mr1720643pgc.389.1629176924755; Mon, 16 Aug 2021 22:08:44 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([50.35.88.161]) by smtp.gmail.com with ESMTPSA id i5sm737965pjk.47.2021.08.16.22.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 22:08:44 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Andrew Fish , Leif Lindholm , Hao A Wu , =?UTF-8?q?Marvin=20H=C3=A4user?= , Bret Barkelew , Michael Kubacki , Ard Biesheuvel , Sami Mujawar , Jiewen Yao , Supreeth Venkatesh , Jian J Wang , Eric Dong , Ray Ni Subject: [PATCH v3 0/7] New MM Communicate header and interfaces Date: Mon, 16 Aug 2021 22:08:00 -0700 Message-Id: <20210817050807.766-1-kuqin12@gmail.com> X-Mailer: git-send-email 2.32.0.windows.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3430 This patch series is a follow up of previous submission: https://edk2.groups.io/g/devel/message/77017 Since the submission of previous patch series, there were suggestions made to change the entire existing MM communicate header in order to leverage compilers to catch all potential code that referenced the original header. However, although such header structure and/or name change would break compilers, there are cases where the OFFSET_OF Data fields is calculated without involving the header structure at all. Thus patch series v3 introduced MM communicate interface v3 (both protocol and PPI) to consume the corresponding new header structure. The new structure fixed ambiguious data field size caused by UINTN, as well as integrated flexible arrays for data fields, while maintaining the backwards compatibility for all existing codebases. A specified GUID is used to differentiate old MM headers from newly defined v3 header. The specification change is also included in this patch series v3, where the standalone MM IPL in PEI phase is specified to install new PPI v3 after setting MM foundation. v3 patch changes include feedback for v1 series: a. Introduced v3 MM comminucate protocol and PPI; b. Applied flexible arrays to new communicate header structures; Patch v3 branch: https://github.com/kuqin12/edk2/tree/BZ3398-MmCommunicate-Length-v3 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Andrew Fish Cc: Leif Lindholm Cc: Hao A Wu Cc: Marvin Häuser Cc: Bret Barkelew Cc: Michael Kubacki Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Jiewen Yao Cc: Supreeth Venkatesh Cc: Jian J Wang Cc: Eric Dong Cc: Ray Ni Kun Qin (7): EDK2 Code First: PI Specification: New communicate header and interfaces MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATE_HEADER_V3 to MdePkg MdePkg: MmCommunication: Introduce EFI_MM_COMMUNICATION3_PROTOCOL to MdePkg MdePkg: MmCommunication: Introduce EFI_PEI_MM_COMMUNICATION3_PPI to MdePkg MdeModulePkg: PiSmmCore: Added parser of new MM communicate header StandaloneMmPkg: StandaloneMmCore: Parsing new MM communicate header MdeModulePkg: PiSmmIpl: Update MessageLength calculation for MmCommunicate MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 42 ++- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 187 +++++++++++++ StandaloneMmPkg/Core/StandaloneMmCore.c | 34 ++- CodeFirst/BZ3430-SpecChange.md | 277 ++++++++++++++++++++ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 1 + MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 2 + MdePkg/Include/Pi/PiMultiPhase.h | 55 ++++ MdePkg/Include/Ppi/MmCommunication3.h | 58 ++++ MdePkg/Include/Protocol/MmCommunication3.h | 70 +++++ MdePkg/MdePkg.dec | 11 + StandaloneMmPkg/Core/StandaloneMmCore.inf | 1 + 11 files changed, 720 insertions(+), 18 deletions(-) create mode 100644 CodeFirst/BZ3430-SpecChange.md create mode 100644 MdePkg/Include/Ppi/MmCommunication3.h create mode 100644 MdePkg/Include/Protocol/MmCommunication3.h -- 2.32.0.windows.1