]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/TdxMailboxLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / Include / Library / TdxMailboxLib.h
1 /** @file
2
3 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef TDX_MAILBOX_LIB_H_
10 #define TDX_MAILBOX_LIB_H_
11
12 #include <Library/BaseLib.h>
13 #include <Uefi/UefiBaseType.h>
14 #include <Uefi/UefiSpec.h>
15 #include <Pi/PiPeiCis.h>
16 #include <Library/DebugLib.h>
17 #include <Protocol/DebugSupport.h>
18
19 /**
20 This function will be called by BSP to get the CPU number.
21
22 @retval CPU number
23 **/
24 UINT32
25 EFIAPI
26 GetCpusNum (
27 VOID
28 );
29
30 /**
31 Get the address of Td mailbox.
32 **/
33 volatile VOID *
34 EFIAPI
35 GetTdxMailBox (
36 VOID
37 );
38
39 /**
40 This function will be called by BSP to wakeup APs the are spinning on mailbox
41 in protected mode
42
43 @param[in] Command Command to send APs
44 @param[in] WakeupVector If used, address for APs to start executing
45 @param[in] WakeArgsX Args to pass to APs for excuting commands
46 **/
47 VOID
48 EFIAPI
49 MpSendWakeupCommand (
50 IN UINT16 Command,
51 IN UINT64 WakeupVector,
52 IN UINT64 WakeupArgs1,
53 IN UINT64 WakeupArgs2,
54 IN UINT64 WakeupArgs3,
55 IN UINT64 WakeupArgs4
56 );
57
58 /**
59 BSP wait until all the APs arriving. It means the task triggered by BSP is started.
60 **/
61 VOID
62 EFIAPI
63 MpSerializeStart (
64 VOID
65 );
66
67 /**
68 BSP wait until all the APs arriving. It means the task triggered by BSP is ended.
69 **/
70 VOID
71 EFIAPI
72 MpSerializeEnd (
73 VOID
74 );
75
76 #endif