]>
git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h
2 Public include file for the SMM CPU Platform Hook Library.
4 Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __SMM_CPU_PLATFORM_HOOK_LIB_H__
10 #define __SMM_CPU_PLATFORM_HOOK_LIB_H__
13 /// SMM Page Size Type
23 Checks if platform produces a valid SMI.
25 This function checks if platform produces a valid SMI. This function is
26 called at SMM entry to detect if this is a spurious SMI. This function
27 must be implemented in an MP safe way because it is called by multiple CPU
30 @retval TRUE There is a valid SMI
31 @retval FALSE There is no valid SMI
41 Clears platform top level SMI status bit.
43 This function clears platform top level SMI status bit.
45 @retval TRUE The platform top level SMI status is cleared.
46 @retval FALSE The platform top level SMI status cannot be cleared.
51 ClearTopLevelSmiStatus (
56 Performs platform specific way of SMM BSP election.
58 This function performs platform specific way of SMM BSP election.
60 @param IsBsp Output parameter. TRUE: the CPU this function executes
61 on is elected to be the SMM BSP. FALSE: the CPU this
62 function executes on is to be SMM AP.
64 @retval EFI_SUCCESS The function executes successfully.
65 @retval EFI_NOT_READY The function does not determine whether this CPU should be
66 BSP or AP. This may occur if hardware init sequence to
67 enable the determination is yet to be done, or the function
68 chooses not to do BSP election and will let SMM CPU driver to
69 use its default BSP election process.
70 @retval EFI_DEVICE_ERROR The function cannot determine whether this CPU should be
71 BSP or AP due to hardware error.
76 PlatformSmmBspElection (
81 Get platform page table attribute .
83 This function gets page table attribute of platform.
85 @param Address Input parameter. Obtain the page table entries attribute on this address.
86 @param PageSize Output parameter. The size of the page.
87 @param NumOfPages Output parameter. Number of page.
88 @param PageAttribute Output parameter. Paging Attributes (WB, UC, etc).
90 @retval EFI_SUCCESS The platform page table attribute from the address is determined.
91 @retval EFI_UNSUPPORTED The platform does not support getting page table attribute for the address.
96 GetPlatformPageTableAttribute (
98 OUT SMM_PAGE_SIZE_TYPE
*PageSize
,
99 OUT UINTN
*NumOfPages
,
100 OUT UINTN
*PageAttribute