TianoCore EDK2 master
|
#include <PiSmm.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/SmmServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/SmmMemLib.h>
#include <Library/LockBoxLib.h>
#include <Protocol/SmmReadyToLock.h>
#include <Protocol/SmmCommunication.h>
#include <Protocol/LockBox.h>
#include <Guid/SmmLockBox.h>
Go to the source code of this file.
Functions | |
VOID | SmmLockBoxSave (IN EFI_SMM_LOCK_BOX_PARAMETER_SAVE *LockBoxParameterSave) |
VOID | SmmLockBoxSetAttributes (IN EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES *LockBoxParameterSetAttributes) |
VOID | SmmLockBoxUpdate (IN EFI_SMM_LOCK_BOX_PARAMETER_UPDATE *LockBoxParameterUpdate) |
VOID | SmmLockBoxRestore (IN EFI_SMM_LOCK_BOX_PARAMETER_RESTORE *LockBoxParameterRestore) |
VOID | SmmLockBoxRestoreAllInPlace (IN EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE *LockBoxParameterRestoreAllInPlace) |
EFI_STATUS EFIAPI | SmmLockBoxHandler (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL) |
EFI_STATUS EFIAPI | SmmReadyToLockEventNotify (IN CONST EFI_GUID *Protocol, IN VOID *Interface, IN EFI_HANDLE Handle) |
EFI_STATUS EFIAPI | SmmLockBoxEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
BOOLEAN | mLocked = FALSE |
LockBox SMM driver.
Caution: This module requires additional review when modified. This driver will have external input - communicate buffer in SMM mode. This external input must be validated carefully to avoid security issue like buffer overflow, integer overflow.
SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave() will receive untrusted input and do basic validation.
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SmmLockBox.c.
EFI_STATUS EFIAPI SmmLockBoxEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry Point for LockBox SMM driver.
[in] | ImageHandle | Image handle of this driver. |
[in] | SystemTable | A Pointer to the EFI System Table. |
EFI_SUCEESS |
Definition at line 401 of file SmmLockBox.c.
EFI_STATUS EFIAPI SmmLockBoxHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Dispatch function for a Software SMI handler.
Caution: This function may receive untrusted input. Communicate buffer and buffer size are external input, so this function will do basic validation.
DispatchHandle | The unique handle assigned to this handler by SmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment. |
CommBufferSize | The size of the CommBuffer. |
EFI_SUCCESS | Command is handled successfully. |
Definition at line 272 of file SmmLockBox.c.
VOID SmmLockBoxRestore | ( | IN EFI_SMM_LOCK_BOX_PARAMETER_RESTORE * | LockBoxParameterRestore | ) |
Dispatch function for SMM lock box restore.
Caution: This function may receive untrusted input. Restore buffer and length are external input, so this function will validate it is in SMRAM.
LockBoxParameterRestore | parameter of lock box restore |
Definition at line 192 of file SmmLockBox.c.
VOID SmmLockBoxRestoreAllInPlace | ( | IN EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE * | LockBoxParameterRestoreAllInPlace | ) |
Dispatch function for SMM lock box restore all in place.
LockBoxParameterRestoreAllInPlace | parameter of lock box restore all in place |
Definition at line 243 of file SmmLockBox.c.
VOID SmmLockBoxSave | ( | IN EFI_SMM_LOCK_BOX_PARAMETER_SAVE * | LockBoxParameterSave | ) |
Dispatch function for SMM lock box save.
Caution: This function may receive untrusted input. Restore buffer and length are external input, so this function will validate it is in SMRAM.
LockBoxParameterSave | parameter of lock box save |
Definition at line 46 of file SmmLockBox.c.
VOID SmmLockBoxSetAttributes | ( | IN EFI_SMM_LOCK_BOX_PARAMETER_SET_ATTRIBUTES * | LockBoxParameterSetAttributes | ) |
Dispatch function for SMM lock box set attributes.
LockBoxParameterSetAttributes | parameter of lock box set attributes |
Definition at line 97 of file SmmLockBox.c.
VOID SmmLockBoxUpdate | ( | IN EFI_SMM_LOCK_BOX_PARAMETER_UPDATE * | LockBoxParameterUpdate | ) |
Dispatch function for SMM lock box update.
Caution: This function may receive untrusted input. Restore buffer and length are external input, so this function will validate it is in SMRAM.
LockBoxParameterUpdate | parameter of lock box update |
Definition at line 136 of file SmmLockBox.c.
EFI_STATUS EFIAPI SmmReadyToLockEventNotify | ( | IN CONST EFI_GUID * | Protocol, |
IN VOID * | Interface, | ||
IN EFI_HANDLE | Handle | ||
) |
Smm Ready To Lock event notification handler.
It sets a flag indicating that SMRAM has been locked.
[in] | Protocol | Points to the protocol's unique identifier. |
[in] | Interface | Points to the interface instance. |
[in] | Handle | The handle on which the interface was installed. |
EFI_SUCCESS | Notification handler runs successfully. |
Definition at line 380 of file SmmLockBox.c.
BOOLEAN mLocked = FALSE |
Definition at line 34 of file SmmLockBox.c.