TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmCpuFeaturesLibNoStm.c File Reference
#include <PiMm.h>
#include <Library/SmmCpuFeaturesLib.h>
#include "CpuFeaturesLib.h"

Go to the source code of this file.

Functions

VOID FinishSmmCpuFeaturesInitializeProcessor (VOID)
 
UINTN EFIAPI SmmCpuFeaturesGetSmiHandlerSize (VOID)
 
VOID EFIAPI SmmCpuFeaturesInstallSmiHandler (IN UINTN CpuIndex, IN UINT32 SmBase, IN VOID *SmiStack, IN UINTN StackSize, IN UINTN GdtBase, IN UINTN GdtSize, IN UINTN IdtBase, IN UINTN IdtSize, IN UINT32 Cr3)
 

Detailed Description

The CPU specific programming for PiSmmCpuDxeSmm module when STM support is not included.

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

Definition in file SmmCpuFeaturesLibNoStm.c.

Function Documentation

◆ FinishSmmCpuFeaturesInitializeProcessor()

VOID FinishSmmCpuFeaturesInitializeProcessor ( VOID  )

Internal worker function that is called to complete CPU initialization at the end of SmmCpuFeaturesInitializeProcessor().

Definition at line 20 of file SmmCpuFeaturesLibNoStm.c.

◆ SmmCpuFeaturesGetSmiHandlerSize()

UINTN EFIAPI SmmCpuFeaturesGetSmiHandlerSize ( VOID  )

Return the size, in bytes, of a custom SMI Handler in bytes. If 0 is returned, then a custom SMI handler is not provided by this library, and the default SMI handler must be used.

Return values
0Use the default SMI handler.
>0 Use the SMI handler installed by SmmCpuFeaturesInstallSmiHandler() The caller is required to allocate enough SMRAM for each CPU to support the size of the custom SMI handler.

Definition at line 38 of file SmmCpuFeaturesLibNoStm.c.

◆ SmmCpuFeaturesInstallSmiHandler()

VOID EFIAPI SmmCpuFeaturesInstallSmiHandler ( IN UINTN  CpuIndex,
IN UINT32  SmBase,
IN VOID *  SmiStack,
IN UINTN  StackSize,
IN UINTN  GdtBase,
IN UINTN  GdtSize,
IN UINTN  IdtBase,
IN UINTN  IdtSize,
IN UINT32  Cr3 
)

Install a custom SMI handler for the CPU specified by CpuIndex. This function is only called if SmmCpuFeaturesGetSmiHandlerSize() returns a size is greater than zero and is called by the CPU that was elected as monarch during System Management Mode initialization.

Parameters
[in]CpuIndexThe index of the CPU to install the custom SMI handler. The value must be between 0 and the NumberOfCpus field in the System Management System Table (SMST).
[in]SmBaseThe SMBASE address for the CPU specified by CpuIndex.
[in]SmiStackThe stack to use when an SMI is processed by the the CPU specified by CpuIndex.
[in]StackSizeThe size, in bytes, if the stack used when an SMI is processed by the CPU specified by CpuIndex.
[in]GdtBaseThe base address of the GDT to use when an SMI is processed by the CPU specified by CpuIndex.
[in]GdtSizeThe size, in bytes, of the GDT used when an SMI is processed by the CPU specified by CpuIndex.
[in]IdtBaseThe base address of the IDT to use when an SMI is processed by the CPU specified by CpuIndex.
[in]IdtSizeThe size, in bytes, of the IDT used when an SMI is processed by the CPU specified by CpuIndex.
[in]Cr3The base address of the page tables to use when an SMI is processed by the CPU specified by CpuIndex.

Definition at line 72 of file SmmCpuFeaturesLibNoStm.c.