TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmProfile.h File Reference

Go to the source code of this file.

Functions

VOID ActivateSmmProfile (IN UINTN CpuIndex)
 
VOID InitSmmProfile (UINT32 Cr3)
 
VOID SmmProfileRecordSmiNum (VOID)
 
VOID SmmProfilePFHandler (UINTN Rip, UINTN ErrorCode)
 
VOID SmmProfileStart (VOID)
 
VOID EFIAPI PageFaultIdtHandlerSmmProfile (VOID)
 
VOID CheckFeatureSupported (IN UINTN CpuIndex)
 
VOID InitProtectedMemRange (VOID)
 
VOID SmmProfileUpdateMemoryAttributes (VOID)
 
UINTN GetCpuIndex (VOID)
 
VOID GuardPagePFHandler (UINTN ErrorCode)
 

Variables

BOOLEAN mXdSupported
 
BOOLEAN mXdEnabled
 
BOOLEAN mSmmProfileEnabled
 
BOOLEAN mSetupDebugTrap
 
UINT32 mSmiCommandPort
 

Detailed Description

SMM profile header file.

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

Definition in file SmmProfile.h.

Function Documentation

◆ ActivateSmmProfile()

VOID ActivateSmmProfile ( IN UINTN  CpuIndex)

Initialize processor environment for SMM profile.

Parameters
CpuIndexThe index of the processor.

Definition at line 1007 of file SmmProfile.c.

◆ CheckFeatureSupported()

VOID CheckFeatureSupported ( IN UINTN  CpuIndex)

Check if feature is supported by a processor.

Parameters
CpuIndexThe index of the CPU.

Definition at line 859 of file SmmProfile.c.

◆ GetCpuIndex()

UINTN GetCpuIndex ( VOID  )

Get CPU Index from APIC ID.

Definition at line 166 of file SmmProfile.c.

◆ GuardPagePFHandler()

VOID GuardPagePFHandler ( UINTN  ErrorCode)

Handler for Page Fault triggered by Guard page.

Parameters
ErrorCodeThe Error code of exception.

Definition at line 1208 of file SmmProfile.c.

◆ InitProtectedMemRange()

VOID InitProtectedMemRange ( VOID  )

Initialize the protected memory ranges and the 4KB-page mapped memory ranges.

Definition at line 420 of file SmmProfile.c.

◆ InitSmmProfile()

VOID InitSmmProfile ( UINT32  Cr3)

Initialize SMM profile in SMM CPU entry point.

Parameters
[in]Cr3The base address of the page tables to use in SMM.

Definition at line 1036 of file SmmProfile.c.

◆ PageFaultIdtHandlerSmmProfile()

VOID EFIAPI PageFaultIdtHandlerSmmProfile ( VOID  )

Page fault IDT handler for SMM Profile.

◆ SmmProfilePFHandler()

VOID SmmProfilePFHandler ( UINTN  Rip,
UINTN  ErrorCode 
)

The Page fault handler to save SMM profile data.

Parameters
RipThe RIP when exception happens.
ErrorCodeThe Error code of exception.

Definition at line 1249 of file SmmProfile.c.

◆ SmmProfileRecordSmiNum()

VOID SmmProfileRecordSmiNum ( VOID  )

Increase SMI number in each SMI entry.

Definition at line 991 of file SmmProfile.c.

◆ SmmProfileStart()

VOID SmmProfileStart ( VOID  )

Updates page table to make some memory ranges (like system memory) absent and make some memory ranges (like MMIO) present and execute disable. It also update 2MB-page to 4KB-page for some memory ranges.

Definition at line 682 of file SmmProfile.c.

◆ SmmProfileUpdateMemoryAttributes()

VOID SmmProfileUpdateMemoryAttributes ( VOID  )

This function updates memory attribute according to mProtectionMemRangeCount.

Definition at line 597 of file SmmProfile.c.

Variable Documentation

◆ mSetupDebugTrap

BOOLEAN mSetupDebugTrap
extern

Definition at line 56 of file SmmProfile.c.

◆ mSmiCommandPort

UINT32 mSmiCommandPort
extern

Definition at line 123 of file SmmProfile.c.

◆ mSmmProfileEnabled

BOOLEAN mSmmProfileEnabled
extern

Definition at line 46 of file SmmProfile.c.

◆ mXdEnabled

BOOLEAN mXdEnabled
extern

Definition at line 36 of file SmmProfile.c.

◆ mXdSupported

BOOLEAN mXdSupported
extern

Definition at line 31 of file SmmProfile.c.