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

Go to the source code of this file.

Functions

VOID SyncRegionState2SmramDesc (IN BOOLEAN OrLogic, IN UINT64 Value)
 
EFI_STATUS EFIAPI Open (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
EFI_STATUS EFIAPI Close (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
EFI_STATUS EFIAPI Lock (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
EFI_STATUS EFIAPI GetCapabilities (IN CONST EFI_SMM_ACCESS2_PROTOCOL *This, IN OUT UINTN *SmramMapSize, IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap)
 
EFI_STATUS EFIAPI SmmAccessEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

SMM_ACCESS_PRIVATE_DATA mSmmAccess
 

Detailed Description

This driver publishes the SMM Access 2 Protocol.

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

Definition in file SmmAccessDxe.c.

Function Documentation

◆ Close()

EFI_STATUS EFIAPI Close ( IN EFI_SMM_ACCESS2_PROTOCOL This)

This routine accepts a request to "close" a region of SMRAM. The region could be legacy AB or TSEG near top of physical memory. The use of "close" means that the memory is only visible from SMM agents, not from BS or RT code.

Parameters
ThisPointer to the SMM Access Interface.
Return values
EFI_SUCCESSThe region was successfully closed.
EFI_DEVICE_ERRORThe region could not be closed because locked by chipset.
EFI_INVALID_PARAMETERThe descriptor index was out of bounds.

Definition at line 90 of file SmmAccessDxe.c.

◆ GetCapabilities()

EFI_STATUS EFIAPI GetCapabilities ( IN CONST EFI_SMM_ACCESS2_PROTOCOL This,
IN OUT UINTN SmramMapSize,
IN OUT EFI_SMRAM_DESCRIPTOR SmramMap 
)

This routine services a user request to discover the SMRAM capabilities of this platform. This will report the possible ranges that are possible for SMRAM access, based upon the memory controller capabilities.

Parameters
ThisPointer to the SMRAM Access Interface.
SmramMapSizePointer to the variable containing size of the buffer to contain the description information.
SmramMapBuffer containing the data describing the Smram region descriptors.
Return values
EFI_BUFFER_TOO_SMALLThe user did not provide a sufficient buffer.
EFI_SUCCESSThe user provided a sufficiently-sized buffer.

Definition at line 166 of file SmmAccessDxe.c.

◆ Lock()

EFI_STATUS EFIAPI Lock ( IN EFI_SMM_ACCESS2_PROTOCOL This)

This routine accepts a request to "lock" SMRAM. The region could be legacy AB or TSEG near top of physical memory. The use of "lock" means that the memory can no longer be opened to BS state.

Parameters
ThisPointer to the SMM Access Interface.
Return values
EFI_SUCCESSThe region was successfully locked.
EFI_DEVICE_ERRORThe region could not be locked because at least one range is still open.
EFI_INVALID_PARAMETERThe descriptor index was out of bounds.

Definition at line 133 of file SmmAccessDxe.c.

◆ Open()

EFI_STATUS EFIAPI Open ( IN EFI_SMM_ACCESS2_PROTOCOL This)

This routine accepts a request to "open" a region of SMRAM. The region could be legacy ABSEG, HSEG, or TSEG near top of physical memory. The use of "open" means that the memory is visible from all boot-service and SMM agents.

Parameters
ThisPointer to the SMM Access Interface.
Return values
EFI_SUCCESSThe region was successfully opened.
EFI_DEVICE_ERRORThe region could not be opened because locked by chipset.
EFI_INVALID_PARAMETERThe descriptor index was out of bounds.

Definition at line 52 of file SmmAccessDxe.c.

◆ SmmAccessEntryPoint()

EFI_STATUS EFIAPI SmmAccessEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

This function installs EFI_SMM_ACCESS_PROTOCOL.

Parameters
ImageHandleHandle for the image of this driver
SystemTablePointer to the EFI System Table
Return values
EFI_UNSUPPORTEDThere's no Intel ICH on this platform
Returns
The status returned from InstallProtocolInterface().

Definition at line 199 of file SmmAccessDxe.c.

◆ SyncRegionState2SmramDesc()

VOID SyncRegionState2SmramDesc ( IN BOOLEAN  OrLogic,
IN UINT64  Value 
)

Update region state from SMRAM description

Parameters
[in]OrLogicIndicate to use OR if true or AND if false.
[in]ValueThe value to set to region state based on OrLogic.

Definition at line 21 of file SmmAccessDxe.c.

Variable Documentation

◆ mSmmAccess

Definition at line 11 of file SmmAccessDxe.c.