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

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI SmmAccess2DxeOpen (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
STATIC EFI_STATUS EFIAPI SmmAccess2DxeClose (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
STATIC EFI_STATUS EFIAPI SmmAccess2DxeLock (IN EFI_SMM_ACCESS2_PROTOCOL *This)
 
STATIC EFI_STATUS EFIAPI SmmAccess2DxeGetCapabilities (IN CONST EFI_SMM_ACCESS2_PROTOCOL *This, IN OUT UINTN *SmramMapSize, IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap)
 
EFI_STATUS EFIAPI SmmAccess2DxeEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC EFI_SMM_ACCESS2_PROTOCOL mAccess2
 

Detailed Description

A DXE_DRIVER providing SMRAM access by producing EFI_SMM_ACCESS2_PROTOCOL.

Q35 TSEG is expected to have been verified and set up by the SmmAccessPei driver.

Copyright (C) 2013, 2015, Red Hat, Inc.
Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.

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

Definition in file SmmAccess2Dxe.c.

Function Documentation

◆ SmmAccess2DxeClose()

STATIC EFI_STATUS EFIAPI SmmAccess2DxeClose ( IN EFI_SMM_ACCESS2_PROTOCOL This)

Inhibits access to the SMRAM.

This function "closes" SMRAM so that it is not visible while outside of SMM. The function should return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM.

Parameters
[in]ThisThe EFI_SMM_ACCESS2_PROTOCOL instance.
Return values
EFI_SUCCESSThe operation was successful.
EFI_UNSUPPORTEDThe system does not support opening and closing of SMRAM.
EFI_DEVICE_ERRORSMRAM cannot be closed.

Definition at line 65 of file SmmAccess2Dxe.c.

◆ SmmAccess2DxeEntryPoint()

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

Definition at line 138 of file SmmAccess2Dxe.c.

◆ SmmAccess2DxeGetCapabilities()

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

Queries the memory controller for the possible regions that will support SMRAM.

Parameters
[in]ThisThe EFI_SMM_ACCESS2_PROTOCOL instance.
[in,out]SmramMapSizeA pointer to the size, in bytes, of the SmramMemoryMap buffer.
[in,out]SmramMapA pointer to the buffer in which firmware places the current memory map.
Return values
EFI_SUCCESSThe chipset supported the given resource.
EFI_BUFFER_TOO_SMALLThe SmramMap parameter was too small. The current buffer size needed to hold the memory map is returned in SmramMapSize.

Definition at line 111 of file SmmAccess2Dxe.c.

◆ SmmAccess2DxeLock()

STATIC EFI_STATUS EFIAPI SmmAccess2DxeLock ( IN EFI_SMM_ACCESS2_PROTOCOL This)

Inhibits access to the SMRAM.

This function prohibits access to the SMRAM region. This function is usually implemented such that it is a write-once operation.

Parameters
[in]ThisThe EFI_SMM_ACCESS2_PROTOCOL instance.
Return values
EFI_SUCCESSThe device was successfully locked.
EFI_UNSUPPORTEDThe system does not support locking of SMRAM.

Definition at line 86 of file SmmAccess2Dxe.c.

◆ SmmAccess2DxeOpen()

STATIC EFI_STATUS EFIAPI SmmAccess2DxeOpen ( IN EFI_SMM_ACCESS2_PROTOCOL This)

Opens the SMRAM area to be accessible by a boot-service driver.

This function "opens" SMRAM so that it is visible while not inside of SMM. The function should return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the SMRAM configuration is locked.

Parameters
[in]ThisThe EFI_SMM_ACCESS2_PROTOCOL instance.
Return values
EFI_SUCCESSThe operation was successful.
EFI_UNSUPPORTEDThe system does not support opening and closing of SMRAM.
EFI_DEVICE_ERRORSMRAM cannot be opened, perhaps because it is locked.

Definition at line 41 of file SmmAccess2Dxe.c.

Variable Documentation

◆ mAccess2

Initial value:
= {
}
STATIC EFI_STATUS EFIAPI SmmAccess2DxeGetCapabilities(IN CONST EFI_SMM_ACCESS2_PROTOCOL *This, IN OUT UINTN *SmramMapSize, IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap)
STATIC EFI_STATUS EFIAPI SmmAccess2DxeLock(IN EFI_SMM_ACCESS2_PROTOCOL *This)
Definition: SmmAccess2Dxe.c:86
STATIC EFI_STATUS EFIAPI SmmAccess2DxeOpen(IN EFI_SMM_ACCESS2_PROTOCOL *This)
Definition: SmmAccess2Dxe.c:41
STATIC EFI_STATUS EFIAPI SmmAccess2DxeClose(IN EFI_SMM_ACCESS2_PROTOCOL *This)
Definition: SmmAccess2Dxe.c:65

Definition at line 126 of file SmmAccess2Dxe.c.