]>
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 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __SMM_CPU_PLATFORM_HOOK_LIB_H__
16 #define __SMM_CPU_PLATFORM_HOOK_LIB_H__
19 /// SMM Page Size Type
29 Checks if platform produces a valid SMI.
31 This function checks if platform produces a valid SMI. This function is
32 called at SMM entry to detect if this is a spurious SMI. This function
33 must be implemented in an MP safe way because it is called by multiple CPU
36 @retval TRUE There is a valid SMI
37 @retval FALSE There is no valid SMI
47 Clears platform top level SMI status bit.
49 This function clears platform top level SMI status bit.
51 @retval TRUE The platform top level SMI status is cleared.
52 @retval FALSE The platform top level SMI status cannot be cleared.
57 ClearTopLevelSmiStatus (
62 Performs platform specific way of SMM BSP election.
64 This function performs platform specific way of SMM BSP election.
66 @param IsBsp Output parameter. TRUE: the CPU this function executes
67 on is elected to be the SMM BSP. FALSE: the CPU this
68 function executes on is to be SMM AP.
70 @retval EFI_SUCCESS The function executes successfully.
71 @retval EFI_NOT_READY The function does not determine whether this CPU should be
72 BSP or AP. This may occur if hardware init sequence to
73 enable the determination is yet to be done, or the function
74 chooses not to do BSP election and will let SMM CPU driver to
75 use its default BSP election process.
76 @retval EFI_DEVICE_ERROR The function cannot determine whether this CPU should be
77 BSP or AP due to hardware error.
82 PlatformSmmBspElection (
87 Get platform page table attribute .
89 This function gets page table attribute of platform.
91 @param Address Input parameter. Obtain the page table entries attribute on this address.
92 @param PageSize Output parameter. The size of the page.
93 @param NumOfPages Output parameter. Number of page.
94 @param PageAttribute Output parameter. Paging Attributes (WB, UC, etc).
96 @retval EFI_SUCCESS The platform page table attribute from the address is determined.
97 @retval EFI_UNSUPPORTED The platform does not support getting page table attribute for the address.
102 GetPlatformPageTableAttribute (
104 OUT SMM_PAGE_SIZE_TYPE
*PageSize
,
105 OUT UINTN
*NumOfPages
,
106 OUT UINTN
*PageAttribute