TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmStmSupport.c File Reference
#include <PiMm.h>
#include <Library/DebugLib.h>
#include "SmmStm.h"

Go to the source code of this file.

Macros

#define IA32_PG_P   BIT0
 
#define IA32_PG_RW   BIT1
 
#define IA32_PG_PS   BIT7
 

Functions

VOID StmGen4GPageTable (IN UINTN PageTableBase)
 
UINT32 EFIAPI SmmStmExceptionHandler (IN OUT STM_PROTECTION_EXCEPTION_STACK_FRAME Context)
 

Detailed Description

SMM STM support functions

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

Definition in file SmmStmSupport.c.

Macro Definition Documentation

◆ IA32_PG_P

#define IA32_PG_P   BIT0

Page Table Entry

Definition at line 17 of file SmmStmSupport.c.

◆ IA32_PG_PS

#define IA32_PG_PS   BIT7

Definition at line 19 of file SmmStmSupport.c.

◆ IA32_PG_RW

#define IA32_PG_RW   BIT1

Definition at line 18 of file SmmStmSupport.c.

Function Documentation

◆ SmmStmExceptionHandler()

UINT32 EFIAPI SmmStmExceptionHandler ( IN OUT STM_PROTECTION_EXCEPTION_STACK_FRAME  Context)

This is SMM exception handle. Consumed by STM when exception happen.

Parameters
ContextSTM protection exception stack frame
Returns
the EBX value for STM reference. EBX = 0: resume SMM guest using register state found on exception stack. EBX = 1 to 0x0F: EBX contains a BIOS error code which the STM must record in the TXT.ERRORCODE register and subsequently reset the system via TXT.CMD.SYS_RESET. The value of the TXT.ERRORCODE register is calculated as follows: TXT.ERRORCODE = (EBX & 0x0F) | STM_CRASH_BIOS_PANIC EBX = 0x10 to 0xFFFFFFFF - reserved, do not use.

Definition at line 65 of file SmmStmSupport.c.

◆ StmGen4GPageTable()

VOID StmGen4GPageTable ( IN UINTN  PageTableBase)

Create 4G page table for STM. 4M Non-PAE page table in IA32 version.

Parameters
PageTableBaseThe page table base in MSEG

Definition at line 30 of file SmmStmSupport.c.