TianoCore EDK2 master
|
#include <Uefi/UefiBaseType.h>
#include <Protocol/MmCpu.h>
#include <Library/DebugLib.h>
#include <Library/MmSaveStateLib.h>
#include <Library/MmServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
Go to the source code of this file.
Data Structures | |
struct | CPU_MM_SAVE_STATE_REGISTER_RANGE |
struct | CPU_MM_SAVE_STATE_LOOKUP_ENTRY |
Macros | |
#define | MM_REGISTER_RANGE(Start, End) { Start, End, End - Start + 1 } |
Functions | |
UINT8 | MmSaveStateGetRegisterLma (VOID) |
UINTN | MmSaveStateGetRegisterIndex (IN EFI_MM_SAVE_STATE_REGISTER Register, IN UINTN RegOffset) |
EFI_STATUS | MmSaveStateReadRegisterByIndex (IN UINTN CpuIndex, IN UINTN RegisterIndex, IN UINTN Width, OUT VOID *Buffer) |
SMRAM Save State Map header file.
Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MmSaveState.h.
#define MM_REGISTER_RANGE | ( | Start, | |
End | |||
) | { Start, End, End - Start + 1 } |
Definition at line 21 of file MmSaveState.h.
UINTN MmSaveStateGetRegisterIndex | ( | IN EFI_MM_SAVE_STATE_REGISTER | Register, |
IN UINTN | RegOffset | ||
) |
Read information from the CPU save state.
Register | Specifies the CPU register to read form the save state. |
RegOffset | Offset for the next register index. |
0 | Register is not valid |
>0 | Index into mCpuWidthOffset[] associated with Register |
Definition at line 35 of file MmSaveStateCommon.c.
UINT8 MmSaveStateGetRegisterLma | ( | VOID | ) |
Returns LMA value of the Processor.
UINT8 | returns LMA bit value. |
Definition at line 277 of file AmdMmSaveState.c.
EFI_STATUS MmSaveStateReadRegisterByIndex | ( | IN UINTN | CpuIndex, |
IN UINTN | RegisterIndex, | ||
IN UINTN | Width, | ||
OUT VOID * | Buffer | ||
) |
Read a CPU Save State register on the target processor.
This function abstracts the differences that whether the CPU Save State register is in the IA32 CPU Save State Map or X64 CPU Save State Map.
This function supports reading a CPU Save State register in SMBase relocation handler.
[in] | CpuIndex | Specifies the zero-based index of the CPU save state. |
[in] | RegisterIndex | Index into mCpuWidthOffset[] look up table. |
[in] | Width | The number of bytes to read from the CPU save state. |
[out] | Buffer | Upon return, this holds the CPU register value read from the save state. |
EFI_SUCCESS | The register was read from Save State. |
EFI_NOT_FOUND | The register is not defined for the Save State of Processor. |
EFI_INVALID_PARAMTER | This or Buffer is NULL. |
Definition at line 73 of file MmSaveStateCommon.c.