TianoCore EDK2 master
|
#include "MmSaveState.h"
#include <Register/Amd/SmramSaveStateMap.h>
#include <Library/BaseLib.h>
#include <Register/Amd/Msr.h>
Go to the source code of this file.
Macros | |
#define | AMD_MM_SAVE_STATE_REGISTER_SMMREVID_INDEX 1 |
#define | AMD_MM_SAVE_STATE_REGISTER_MAX_INDEX 2 |
#define | MM_CPU_OFFSET(Field) OFFSET_OF (AMD_SMRAM_SAVE_STATE_MAP, Field) |
Functions | |
EFI_STATUS EFIAPI | MmSaveStateReadRegister (IN UINTN CpuIndex, IN EFI_MM_SAVE_STATE_REGISTER Register, IN UINTN Width, OUT VOID *Buffer) |
EFI_STATUS EFIAPI | MmSaveStateWriteRegister (IN UINTN CpuIndex, IN EFI_MM_SAVE_STATE_REGISTER Register, IN UINTN Width, IN CONST VOID *Buffer) |
UINT8 | MmSaveStateGetRegisterLma (VOID) |
Variables | |
CONST CPU_MM_SAVE_STATE_LOOKUP_ENTRY | mCpuWidthOffset [] |
Provides services to access SMRAM Save State Map
Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmdMmSaveState.c.
#define AMD_MM_SAVE_STATE_REGISTER_MAX_INDEX 2 |
Definition at line 16 of file AmdMmSaveState.c.
#define AMD_MM_SAVE_STATE_REGISTER_SMMREVID_INDEX 1 |
Definition at line 15 of file AmdMmSaveState.c.
#define MM_CPU_OFFSET | ( | Field | ) | OFFSET_OF (AMD_SMRAM_SAVE_STATE_MAP, Field) |
Definition at line 19 of file AmdMmSaveState.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 EFIAPI MmSaveStateReadRegister | ( | IN UINTN | CpuIndex, |
IN EFI_MM_SAVE_STATE_REGISTER | Register, | ||
IN UINTN | Width, | ||
OUT VOID * | Buffer | ||
) |
Read a save state register on the target processor. If this function returns EFI_UNSUPPORTED, then the caller is responsible for reading the MM Save State register.
[in] | CpuIndex | The index of the CPU to read the Save State register. The value must be between 0 and the NumberOfCpus field in the System Management System Table (SMST). |
[in] | Register | The MM Save State register to read. |
[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_INVALID_PARAMTER | Buffer is NULL. |
EFI_UNSUPPORTED | This function does not support reading Register. |
EFI_NOT_FOUND | If desired Register not found. |
Definition at line 103 of file AmdMmSaveState.c.
EFI_STATUS EFIAPI MmSaveStateWriteRegister | ( | IN UINTN | CpuIndex, |
IN EFI_MM_SAVE_STATE_REGISTER | Register, | ||
IN UINTN | Width, | ||
IN CONST VOID * | Buffer | ||
) |
Writes a save state register on the target processor. If this function returns EFI_UNSUPPORTED, then the caller is responsible for writing the MM save state register.
[in] | CpuIndex | The index of the CPU to write the MM Save State. The value must be between 0 and the NumberOfCpus field in the System Management System Table (SMST). |
[in] | Register | The MM Save State register to write. |
[in] | Width | The number of bytes to write to the CPU save state. |
[in] | Buffer | Upon entry, this holds the new CPU register value. |
EFI_SUCCESS | The register was written to Save State. |
EFI_INVALID_PARAMTER | Buffer is NULL. |
EFI_UNSUPPORTED | This function does not support writing Register. |
EFI_NOT_FOUND | If desired Register not found. |
Definition at line 202 of file AmdMmSaveState.c.
CONST CPU_MM_SAVE_STATE_LOOKUP_ENTRY mCpuWidthOffset[] |
Definition at line 30 of file AmdMmSaveState.c.