TianoCore EDK2 master
No Matches
SmmCpuPlatformHookLib.h File Reference

Go to the source code of this file.


enum  SMM_PAGE_SIZE_TYPE { SmmPageSize4K , SmmPageSize2M , SmmPageSize1G , MaxSmmPageSizeType }


BOOLEAN EFIAPI ClearTopLevelSmiStatus (VOID)
EFI_STATUS EFIAPI GetPlatformPageTableAttribute (IN UINT64 Address, OUT SMM_PAGE_SIZE_TYPE *PageSize, OUT UINTN *NumOfPages, OUT UINTN *PageAttribute)

Detailed Description

Public include file for the SMM CPU Platform Hook Library.

Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SmmCpuPlatformHookLib.h.

Enumeration Type Documentation


SMM Page Size Type

Definition at line 15 of file SmmCpuPlatformHookLib.h.

Function Documentation

◆ ClearTopLevelSmiStatus()

BOOLEAN EFIAPI ClearTopLevelSmiStatus ( VOID  )

Clears platform top level SMI status bit.

This function clears platform top level SMI status bit.

Return values
TRUEThe platform top level SMI status is cleared.
FALSEThe platform top level SMI status cannot be cleared.

Definition at line 48 of file SmmCpuPlatformHookLibQemu.c.

◆ GetPlatformPageTableAttribute()

EFI_STATUS EFIAPI GetPlatformPageTableAttribute ( IN UINT64  Address,
OUT UINTN PageAttribute 

Get platform page table attribute .

This function gets page table attribute of platform.

AddressInput parameter. Obtain the page table entries attribute on this address.
PageSizeOutput parameter. The size of the page.
NumOfPagesOutput parameter. Number of page.
PageAttributeOutput parameter. Paging Attributes (WB, UC, etc).
Return values
EFI_SUCCESSThe platform page table attribute from the address is determined.
EFI_UNSUPPORTEDThe platform does not support getting page table attribute for the address.

◆ PlatformSmmBspElection()

EFI_STATUS EFIAPI PlatformSmmBspElection ( OUT BOOLEAN *  IsBsp)

Performs platform specific way of SMM BSP election.

This function performs platform specific way of SMM BSP election.

IsBspOutput parameter. TRUE: the CPU this function executes on is elected to be the SMM BSP. FALSE: the CPU this function executes on is to be SMM AP.
Return values
EFI_SUCCESSThe function executes successfully.
EFI_NOT_READYThe function does not determine whether this CPU should be BSP or AP. This may occur if hardware init sequence to enable the determination is yet to be done, or the function chooses not to do BSP election and will let SMM CPU driver to use its default BSP election process.
EFI_DEVICE_ERRORThe function cannot determine whether this CPU should be BSP or AP due to hardware error.

Definition at line 77 of file SmmCpuPlatformHookLibQemu.c.

◆ PlatformValidSmi()

BOOLEAN EFIAPI PlatformValidSmi ( VOID  )

Checks if platform produces a valid SMI.

This function checks if platform produces a valid SMI. This function is called at SMM entry to detect if this is a spurious SMI. This function must be implemented in an MP safe way because it is called by multiple CPU threads.

Return values
TRUEThere is a valid SMI
FALSEThere is no valid SMI

Definition at line 29 of file SmmCpuPlatformHookLibQemu.c.