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