--- /dev/null
+/** @file\r
+\r
+ Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef TDX_MAILBOX_LIB_H_\r
+#define TDX_MAILBOX_LIB_H_\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Uefi/UefiBaseType.h>\r
+#include <Uefi/UefiSpec.h>\r
+#include <Pi/PiPeiCis.h>\r
+#include <Library/DebugLib.h>\r
+#include <Protocol/DebugSupport.h>\r
+\r
+/**\r
+ This function will be called by BSP to get the CPU number.\r
+\r
+ @retval CPU number\r
+**/\r
+UINT32\r
+EFIAPI\r
+GetCpusNum (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Get the address of Td mailbox.\r
+**/\r
+volatile VOID *\r
+EFIAPI\r
+GetTdxMailBox (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function will be called by BSP to wakeup APs the are spinning on mailbox\r
+ in protected mode\r
+\r
+ @param[in] Command Command to send APs\r
+ @param[in] WakeupVector If used, address for APs to start executing\r
+ @param[in] WakeArgsX Args to pass to APs for excuting commands\r
+**/\r
+VOID\r
+EFIAPI\r
+MpSendWakeupCommand (\r
+ IN UINT16 Command,\r
+ IN UINT64 WakeupVector,\r
+ IN UINT64 WakeupArgs1,\r
+ IN UINT64 WakeupArgs2,\r
+ IN UINT64 WakeupArgs3,\r
+ IN UINT64 WakeupArgs4\r
+ );\r
+\r
+/**\r
+ BSP wait until all the APs arriving. It means the task triggered by BSP is started.\r
+**/\r
+VOID\r
+EFIAPI\r
+MpSerializeStart (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ BSP wait until all the APs arriving. It means the task triggered by BSP is ended.\r
+**/\r
+VOID\r
+EFIAPI\r
+MpSerializeEnd (\r
+ VOID\r
+ );\r
+\r
+#endif\r