From b1e558f6369fc85ae053e0c16ffcd600880fe78d Mon Sep 17 00:00:00 2001 From: "Zhang, Hongbin1" Date: Thu, 24 Aug 2023 20:15:22 -0700 Subject: IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions FSP-SMM module need get and set FspSmmInit upd data pointer functions to get and set upd settings. Signed-off-by: Hongbin1 Zhang Cc: Chasel Chiu Cc: Nate DeSimone Cc: Duggapu Chinni B Cc: Ray Han Lim Ng Cc: Star Zeng Cc: Ted Kuo Cc: Ashraf Ali S Cc: Susovan Mohapatra Reviewed-by: S Ashraf Ali Reviewed-by: Chasel Chiu --- IntelFsp2Pkg/Include/Library/FspCommonLib.h | 22 ++++++++++++ .../Library/BaseFspCommonLib/FspCommonLib.c | 41 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) (limited to 'IntelFsp2Pkg') diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h b/IntelFsp2Pkg/Include/Library/FspCommonLib.h index 13b67f8..12d993b 100644 --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h @@ -193,6 +193,28 @@ GetFspSiliconInitUpdDataPointer ( ); /** + This function sets the smm init UPD data pointer. + + @param[in] SmmInitUpdPtr smm init UPD data pointer. +**/ +VOID +EFIAPI +SetFspSmmInitUpdDataPointer ( + IN VOID *SmmInitUpdPtr + ); + +/** + This function gets the smm init UPD data pointer. + + @return smm init UPD data pointer. +**/ +VOID * +EFIAPI +GetFspSmmInitUpdDataPointer ( + VOID + ); + +/** Set FSP measurement point timestamp. @param[in] Id Measurement point ID. diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c index 6f6a086..d33d01f 100644 --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c @@ -373,6 +373,47 @@ GetFspSiliconInitUpdDataPointer ( } /** + This function sets the FspSmmInit UPD data pointer. + + @param[in] SmmInitUpdPtr FspSmmInit UPD data pointer. +**/ +VOID +EFIAPI +SetFspSmmInitUpdDataPointer ( + IN VOID *SmmInitUpdPtr + ) +{ + FSP_GLOBAL_DATA *FspData; + + // + // Get the FSP Global Data Pointer + // + FspData = GetFspGlobalDataPointer (); + + // + // Set the FspSmmInit UPD data pointer. + // + FspData->SmmInitUpdPtr = SmmInitUpdPtr; +} + +/** + This function gets the FspSmmInit UPD data pointer. + + @return FspSmmInit UPD data pointer. +**/ +VOID * +EFIAPI +GetFspSmmInitUpdDataPointer ( + VOID + ) +{ + FSP_GLOBAL_DATA *FspData; + + FspData = GetFspGlobalDataPointer (); + return FspData->SmmInitUpdPtr; +} + +/** Set FSP measurement point timestamp. @param[in] Id Measurement point ID. -- cgit v1.1