UefiCpuPkg: Removes SmmCpuFeaturesReadSaveStateRegister
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4182 Removes SmmCpuFeaturesReadSaveStateRegister and SmmCpuFeaturesWirteSaveStateRegister function from SmmCpuFeaturesLib library. MmSaveStateLib library replaces the functionality of the above functions. Platform old/new need to use MmSaveStateLib library to read/write save state registers. Current implementation supports Intel and AMD. Cc: Paul Grimes <paul.grimes@amd.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Abdul Lateef Attar <abdattar@amd.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
065fa2dcc2
commit
fbb6f18e1c
@ -27,64 +27,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
// The mode of the CPU at the time an SMI occurs
|
||||
STATIC UINT8 mSmmSaveStateRegisterLma;
|
||||
|
||||
/**
|
||||
Read an SMM Save State register on the target processor. If this function
|
||||
returns EFI_UNSUPPORTED, then the caller is responsible for reading the
|
||||
SMM Save Sate register.
|
||||
|
||||
@param[in] CpuIndex The index of the CPU to read the SMM Save State. The
|
||||
value must be between 0 and the NumberOfCpus field in
|
||||
the System Management System Table (SMST).
|
||||
@param[in] Register The SMM Save State register to read.
|
||||
@param[in] Width The number of bytes to read from the CPU save state.
|
||||
@param[out] Buffer Upon return, this holds the CPU register value read
|
||||
from the save state.
|
||||
|
||||
@retval EFI_SUCCESS The register was read from Save State.
|
||||
@retval EFI_INVALID_PARAMTER Buffer is NULL.
|
||||
@retval EFI_UNSUPPORTED This function does not support reading Register.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmCpuFeaturesReadSaveStateRegister (
|
||||
IN UINTN CpuIndex,
|
||||
IN EFI_SMM_SAVE_STATE_REGISTER Register,
|
||||
IN UINTN Width,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
{
|
||||
return MmSaveStateReadRegister (CpuIndex, Register, Width, Buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
Writes an SMM Save State register on the target processor. If this function
|
||||
returns EFI_UNSUPPORTED, then the caller is responsible for writing the
|
||||
SMM Save Sate register.
|
||||
|
||||
@param[in] CpuIndex The index of the CPU to write the SMM Save State. The
|
||||
value must be between 0 and the NumberOfCpus field in
|
||||
the System Management System Table (SMST).
|
||||
@param[in] Register The SMM Save State register to write.
|
||||
@param[in] Width The number of bytes to write to the CPU save state.
|
||||
@param[in] Buffer Upon entry, this holds the new CPU register value.
|
||||
|
||||
@retval EFI_SUCCESS The register was written to Save State.
|
||||
@retval EFI_INVALID_PARAMTER Buffer is NULL.
|
||||
@retval EFI_UNSUPPORTED This function does not support writing Register.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
SmmCpuFeaturesWriteSaveStateRegister (
|
||||
IN UINTN CpuIndex,
|
||||
IN EFI_SMM_SAVE_STATE_REGISTER Register,
|
||||
IN UINTN Width,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
return MmSaveStateWriteRegister (CpuIndex, Register, Width, Buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
Performs library initialization.
|
||||
|
||||
|
Reference in New Issue
Block a user