summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
diff options
context:
space:
mode:
authorAbdul Lateef Attar <abdattar@amd.com>2023-04-07 09:59:07 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-03 03:01:10 +0000
commitfbb6f18e1c5a342285aafcdee5b53b66bf07989c (patch)
tree9b16dbd6a578e692da28d0a2d9752d7064fa5039 /UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
parent065fa2dcc20ceb97011575b0b8cf8f2596f35371 (diff)
downloadedk2-fbb6f18e1c5a342285aafcdee5b53b66bf07989c.tar.gz
edk2-fbb6f18e1c5a342285aafcdee5b53b66bf07989c.tar.bz2
edk2-fbb6f18e1c5a342285aafcdee5b53b66bf07989c.zip
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>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h56
1 files changed, 2 insertions, 54 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index 8020e36df3..654935dc76 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -3,6 +3,7 @@ Agent Module to load other modules to deploy SMM Entry Vector for X86 CPU.
Copyright (c) 2009 - 2023, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
+Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -52,6 +53,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/RegisterCpuFeaturesLib.h>
#include <Library/PerformanceLib.h>
#include <Library/CpuPageTableLib.h>
+#include <Library/MmSaveStateLib.h>
#include <AcpiCpuData.h>
#include <CpuHotPlugData.h>
@@ -372,60 +374,6 @@ ExecuteFirstSmiInit (
VOID
);
-/**
-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.
-
-@param[in] CpuIndex Specifies the zero-based index of the CPU save state.
-@param[in] RegisterIndex Index into mSmmCpuWidthOffset[] look up table.
-@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_NOT_FOUND The register is not defined for the Save State of Processor.
-@retval EFI_INVALID_PARAMETER Buffer is NULL, or Width does not meet requirement per Register type.
-
-**/
-EFI_STATUS
-EFIAPI
-ReadSaveStateRegister (
- IN UINTN CpuIndex,
- IN EFI_SMM_SAVE_STATE_REGISTER Register,
- IN UINTN Width,
- OUT VOID *Buffer
- );
-
-/**
-Write value to 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 writing a CPU Save State register in SMBase relocation handler.
-
-@param[in] CpuIndex Specifies the zero-based index of the CPU save state.
-@param[in] RegisterIndex Index into mSmmCpuWidthOffset[] look up table.
-@param[in] Width The number of bytes to read from 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_NOT_FOUND The register is not defined for the Save State of Processor.
-@retval EFI_INVALID_PARAMETER ProcessorIndex or Width is not correct.
-
-**/
-EFI_STATUS
-EFIAPI
-WriteSaveStateRegister (
- IN UINTN CpuIndex,
- IN EFI_SMM_SAVE_STATE_REGISTER Register,
- IN UINTN Width,
- IN CONST VOID *Buffer
- );
-
extern BOOLEAN mSmmRelocated;
extern volatile BOOLEAN *mSmmInitialized;
extern UINT32 mBspApicId;