TianoCore EDK2 master
|
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/SmmAccess2.h>
#include "SmramInternal.h"
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 |
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.
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.
[in] | This | The EFI_SMM_ACCESS2_PROTOCOL instance. |
EFI_SUCCESS | The operation was successful. |
EFI_UNSUPPORTED | The system does not support opening and closing of SMRAM. |
EFI_DEVICE_ERROR | SMRAM cannot be closed. |
Definition at line 65 of file SmmAccess2Dxe.c.
EFI_STATUS EFIAPI SmmAccess2DxeEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Definition at line 138 of file SmmAccess2Dxe.c.
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.
[in] | This | The EFI_SMM_ACCESS2_PROTOCOL instance. |
[in,out] | SmramMapSize | A pointer to the size, in bytes, of the SmramMemoryMap buffer. |
[in,out] | SmramMap | A pointer to the buffer in which firmware places the current memory map. |
EFI_SUCCESS | The chipset supported the given resource. |
EFI_BUFFER_TOO_SMALL | The 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.
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.
[in] | This | The EFI_SMM_ACCESS2_PROTOCOL instance. |
EFI_SUCCESS | The device was successfully locked. |
EFI_UNSUPPORTED | The system does not support locking of SMRAM. |
Definition at line 86 of file SmmAccess2Dxe.c.
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.
[in] | This | The EFI_SMM_ACCESS2_PROTOCOL instance. |
EFI_SUCCESS | The operation was successful. |
EFI_UNSUPPORTED | The system does not support opening and closing of SMRAM. |
EFI_DEVICE_ERROR | SMRAM cannot be opened, perhaps because it is locked. |
Definition at line 41 of file SmmAccess2Dxe.c.
STATIC EFI_SMM_ACCESS2_PROTOCOL mAccess2 |
Definition at line 126 of file SmmAccess2Dxe.c.