TianoCore EDK2 master
Loading...
Searching...
No Matches
SmramInternal.c File Reference

Go to the source code of this file.

Functions

VOID InitQ35TsegMbytes (VOID)
 
VOID InitQ35SmramAtDefaultSmbase (VOID)
 
VOID GetStates (OUT BOOLEAN *LockState, OUT BOOLEAN *OpenState)
 
EFI_STATUS SmramAccessOpen (OUT BOOLEAN *LockState, OUT BOOLEAN *OpenState)
 
EFI_STATUS SmramAccessClose (OUT BOOLEAN *LockState, OUT BOOLEAN *OpenState)
 
EFI_STATUS SmramAccessLock (OUT BOOLEAN *LockState, IN OUT BOOLEAN *OpenState)
 
EFI_STATUS SmramAccessGetCapabilities (IN OUT UINTN *SmramMapSize, IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap)
 

Variables

UINT16 mQ35TsegMbytes
 
STATIC BOOLEAN mQ35SmramAtDefaultSmbase
 

Detailed Description

Functions and types shared by the SMM accessor PEI and DXE modules.

Copyright (C) 2015, Red Hat, Inc. Copyright (c) 2024 Intel Corporation.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SmramInternal.c.

Function Documentation

◆ GetStates()

VOID GetStates ( OUT BOOLEAN *  LockState,
OUT BOOLEAN *  OpenState 
)

Read the MCH_SMRAM and ESMRAMC registers, and update the LockState and OpenState fields in the PEI_SMM_ACCESS_PPI / EFI_SMM_ACCESS2_PROTOCOL object, from the D_LCK and T_EN bits.

PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member functions can rely on the LockState and OpenState fields being up-to-date on entry, and they need to restore the same invariant on exit, if they touch the bits in question.

Parameters
[out]LockStateReflects the D_LCK bit on output; TRUE iff SMRAM is locked.
[out]OpenStateReflects the inverse of the T_EN bit on output; TRUE iff SMRAM is open.

Definition at line 66 of file SmramInternal.c.

◆ InitQ35SmramAtDefaultSmbase()

VOID InitQ35SmramAtDefaultSmbase ( VOID  )

Save PcdQ35SmramAtDefaultSmbase into mQ35SmramAtDefaultSmbase.

Definition at line 44 of file SmramInternal.c.

◆ InitQ35TsegMbytes()

VOID InitQ35TsegMbytes ( VOID  )

Save PcdQ35TsegMbytes into mQ35TsegMbytes.

Definition at line 33 of file SmramInternal.c.

◆ SmramAccessClose()

EFI_STATUS SmramAccessClose ( OUT BOOLEAN *  LockState,
OUT BOOLEAN *  OpenState 
)

Definition at line 114 of file SmramInternal.c.

◆ SmramAccessGetCapabilities()

EFI_STATUS SmramAccessGetCapabilities ( IN OUT UINTN SmramMapSize,
IN OUT EFI_SMRAM_DESCRIPTOR SmramMap 
)

Definition at line 167 of file SmramInternal.c.

◆ SmramAccessLock()

EFI_STATUS SmramAccessLock ( OUT BOOLEAN *  LockState,
IN OUT BOOLEAN *  OpenState 
)

Definition at line 133 of file SmramInternal.c.

◆ SmramAccessOpen()

EFI_STATUS SmramAccessOpen ( OUT BOOLEAN *  LockState,
OUT BOOLEAN *  OpenState 
)

Definition at line 92 of file SmramInternal.c.

Variable Documentation

◆ mQ35SmramAtDefaultSmbase

STATIC BOOLEAN mQ35SmramAtDefaultSmbase

Definition at line 27 of file SmramInternal.c.

◆ mQ35TsegMbytes

UINT16 mQ35TsegMbytes

Definition at line 21 of file SmramInternal.c.