]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / UefiCpuPkg / Library / SmmCpuPlatformHookLibNull / SmmCpuPlatformHookLibNull.c
CommitLineData
2b63446b
MK
1/** @file\r
2SMM CPU Platform Hook NULL library instance.\r
3\r
4Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
0acd8697 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
2b63446b
MK
6\r
7**/\r
8#include <PiSmm.h>\r
9#include <Library/SmmCpuPlatformHookLib.h>\r
10\r
11/**\r
12 Checks if platform produces a valid SMI.\r
13\r
14 This function checks if platform produces a valid SMI. This function is\r
15 called at SMM entry to detect if this is a spurious SMI. This function\r
16 must be implemented in an MP safe way because it is called by multiple CPU\r
17 threads.\r
18\r
19 @retval TRUE There is a valid SMI\r
20 @retval FALSE There is no valid SMI\r
21\r
22**/\r
23BOOLEAN\r
24EFIAPI\r
25PlatformValidSmi (\r
26 VOID\r
27 )\r
28{\r
29 return TRUE;\r
30}\r
31\r
32/**\r
33 Clears platform top level SMI status bit.\r
34\r
35 This function clears platform top level SMI status bit.\r
36\r
37 @retval TRUE The platform top level SMI status is cleared.\r
38 @retval FALSE The platform top level SMI status cannot be cleared.\r
39\r
40**/\r
41BOOLEAN\r
42EFIAPI\r
43ClearTopLevelSmiStatus (\r
44 VOID\r
45 )\r
46{\r
47 return TRUE;\r
48}\r
49\r
50/**\r
51 Performs platform specific way of SMM BSP election.\r
52\r
53 This function performs platform specific way of SMM BSP election.\r
54\r
55 @param IsBsp Output parameter. TRUE: the CPU this function executes\r
56 on is elected to be the SMM BSP. FALSE: the CPU this\r
57 function executes on is to be SMM AP.\r
58\r
59 @retval EFI_SUCCESS The function executes successfully.\r
60 @retval EFI_NOT_READY The function does not determine whether this CPU should be\r
61 BSP or AP. This may occur if hardware init sequence to\r
62 enable the determination is yet to be done, or the function\r
63 chooses not to do BSP election and will let SMM CPU driver to\r
64 use its default BSP election process.\r
65 @retval EFI_DEVICE_ERROR The function cannot determine whether this CPU should be\r
66 BSP or AP due to hardware error.\r
67\r
68**/\r
69EFI_STATUS\r
70EFIAPI\r
71PlatformSmmBspElection (\r
053e878b 72 OUT BOOLEAN *IsBsp\r
2b63446b
MK
73 )\r
74{\r
75 return EFI_NOT_READY;\r
76}\r
77\r
78/**\r
79 Get platform page table attribute.\r
80\r
81 This function gets page table attribute of platform.\r
82\r
83 @param Address Input parameter. Obtain the page table entries attribute on this address.\r
84 @param PageSize Output parameter. The size of the page.\r
85 @param NumOfPages Output parameter. Number of page.\r
86 @param PageAttribute Output parameter. Paging Attributes (WB, UC, etc).\r
87\r
88 @retval EFI_SUCCESS The platform page table attribute from the address is determined.\r
89 @retval EFI_UNSUPPORTED The platform does not support getting page table attribute for the address.\r
90\r
91**/\r
92EFI_STATUS\r
93EFIAPI\r
94GetPlatformPageTableAttribute (\r
053e878b
MK
95 IN UINT64 Address,\r
96 IN OUT SMM_PAGE_SIZE_TYPE *PageSize,\r
97 IN OUT UINTN *NumOfPages,\r
98 IN OUT UINTN *PageAttribute\r
2b63446b
MK
99 )\r
100{\r
101 return EFI_UNSUPPORTED;\r
102}\r