MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement.

REF? https://bugzilla.tianocore.org/show_bug.cgi?id=3912

UefiCpuPkg define a new Protocol with the new services
SmmWaitForAllProcessor(), which can be used by SMI handler
to optionally wait for other APs to complete SMM rendezvous in
relaxed AP mode.

VariableSmm and VariableStandaloneMM driver in MdeModulePkg need
to use this services but MdeModulePkg can't depend on UefiCpuPkg.

Thus, the solution is moving SmmCpuRendezvouslib.h from UefiCpuPkg
to MdePkg and creating SmmCpuRendezvousLib NullLib version
implementation in MdePkg as dependency for the pkg that can't
depend on UefiCpuPkg.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>

Signed-off-by: Zhihao Li <zhihao.li@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Li, Zhihao
2022-04-25 16:47:27 +08:00
committed by mergify[bot]
parent 247a0fc65e
commit 8079d4dc4f
7 changed files with 63 additions and 6 deletions

View File

@@ -0,0 +1,29 @@
/** @file
SMM CPU Rendezvous sevice implement.
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h>
#include <Library/SmmCpuRendezvousLib.h>
/**
This routine wait for all AP processors to arrive in SMM.
@param[in] BlockingMode Blocking mode or non-blocking mode.
@retval EFI_SUCCESS All avaiable APs arrived.
@retval EFI_TIMEOUT Wait for all APs until timeout.
@retval OTHER Fail to register SMM CPU Rendezvous service Protocol.
**/
EFI_STATUS
EFIAPI
SmmWaitForAllProcessor (
IN BOOLEAN BlockingMode
)
{
ASSERT (FALSE);
return EFI_SUCCESS;
}