TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmFuncsArch.c File Reference
#include "PiSmmCpuCommon.h"

Go to the source code of this file.

Functions

VOID EFIAPI InitializeIdtIst (IN EFI_EXCEPTION_TYPE ExceptionType, IN UINT8 Ist)
 
VOID * InitGdt (IN UINTN Cr3, OUT UINTN *GdtStepSize)
 
UINT16 GetProtectedModeCS (VOID)
 
VOID InitShadowStack (IN UINTN CpuIndex, IN VOID *ShadowStack)
 

Variables

EFI_PHYSICAL_ADDRESS mGdtBuffer
 
UINTN mGdtBufferSize
 
BOOLEAN mCetSupported
 
X86_ASSEMBLY_PATCH_LABEL mPatchCetPl0Ssp
 
X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSsp
 
X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSspTable
 
UINT32 mCetPl0Ssp
 
UINT32 mCetInterruptSsp
 
UINT32 mCetInterruptSspTable
 
UINTN mSmmInterruptSspTables
 

Detailed Description

SMM CPU misc functions for x64 arch specific.

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

Definition in file SmmFuncsArch.c.

Function Documentation

◆ GetProtectedModeCS()

UINT16 GetProtectedModeCS ( VOID  )

Get Protected mode code segment from current GDT table.

Returns
Protected mode code segment value.

Definition at line 109 of file SmmFuncsArch.c.

◆ InitGdt()

VOID * InitGdt ( IN UINTN  Cr3,
OUT UINTN GdtStepSize 
)

Initialize Gdt for all processors.

Parameters
[in]Cr3CR3 value.
[out]GdtStepSizeThe step size for GDT table.
Returns
GdtBase for processor 0. GdtBase for processor X is: GdtBase + (GdtStepSize * X)

Definition at line 56 of file SmmFuncsArch.c.

◆ InitializeIdtIst()

VOID EFIAPI InitializeIdtIst ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN UINT8  Ist 
)

Initialize IDT IST Field.

Parameters
[in]ExceptionTypeException type.
[in]IstIST value.

Definition at line 34 of file SmmFuncsArch.c.

◆ InitShadowStack()

VOID InitShadowStack ( IN UINTN  CpuIndex,
IN VOID *  ShadowStack 
)

Initialize the shadow stack related data structure.

Parameters
CpuIndexThe index of CPU.
ShadowStackThe bottom of the shadow stack for this CPU.

Definition at line 142 of file SmmFuncsArch.c.

Variable Documentation

◆ mCetInterruptSsp

UINT32 mCetInterruptSsp

Definition at line 20 of file SmmFuncsArch.c.

◆ mCetInterruptSspTable

UINT32 mCetInterruptSspTable

Definition at line 21 of file SmmFuncsArch.c.

◆ mCetPl0Ssp

UINT32 mCetPl0Ssp

Definition at line 19 of file SmmFuncsArch.c.

◆ mCetSupported

BOOLEAN mCetSupported
extern

Definition at line 94 of file PiSmmCpuCommon.c.

◆ mGdtBuffer

Definition at line 11 of file SmmFuncsArch.c.

◆ mGdtBufferSize

UINTN mGdtBufferSize

Definition at line 12 of file SmmFuncsArch.c.

◆ mPatchCetInterruptSsp

X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSsp

Definition at line 17 of file SmmFuncsArch.c.

◆ mPatchCetInterruptSspTable

X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSspTable

Definition at line 18 of file SmmFuncsArch.c.

◆ mPatchCetPl0Ssp

X86_ASSEMBLY_PATCH_LABEL mPatchCetPl0Ssp

Definition at line 16 of file SmmFuncsArch.c.

◆ mSmmInterruptSspTables

UINTN mSmmInterruptSspTables

Definition at line 23 of file SmmFuncsArch.c.