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