public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhang, Hongbin1" <hongbin1.zhang@intel.com>
To: devel@edk2.groups.io
Cc: "Zhang, Hongbin1" <hongbin1.zhang@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Duggapu Chinni B <chinni.b.duggapu@intel.com>,
	Ray Han Lim Ng <ray.han.lim.ng@intel.com>,
	Star Zeng <star.zeng@intel.com>, Ted Kuo <ted.kuo@intel.com>,
	Ashraf Ali S <ashraf.ali.s@intel.com>,
	Susovan Mohapatra <susovan.mohapatra@intel.com>
Subject: [edk2-devel] [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions
Date: Fri, 25 Aug 2023 11:15:22 +0800	[thread overview]
Message-ID: <20230825031522.1241-1-hongbin1.zhang@intel.com> (raw)

FSP-SMM module need get and set FspSmmInit upd data pointer functions
to get and set upd settings.

Signed-off-by: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Ray Han Lim Ng <ray.han.lim.ng@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Susovan Mohapatra <susovan.mohapatra@intel.com>
---
 IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 41 ++++++++++++++++++++
 IntelFsp2Pkg/Include/Library/FspCommonLib.h          | 22 +++++++++++
 2 files changed, 63 insertions(+)

diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
index 6f6a086111..d33d01fe22 100644
--- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
+++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
@@ -372,6 +372,47 @@ GetFspSiliconInitUpdDataPointer (
   return FspData->SiliconInitUpdPtr;
 }
 
+/**
+  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.
 
diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
index 13b67f8822..12d993b7cc 100644
--- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
+++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
@@ -192,6 +192,28 @@ GetFspSiliconInitUpdDataPointer (
   VOID
   );
 
+/**
+  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.
 
-- 
2.37.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108029): https://edk2.groups.io/g/devel/message/108029
Mute This Topic: https://groups.io/mt/100950055/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



             reply	other threads:[~2023-08-25  4:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  3:15 Zhang, Hongbin1 [this message]
2023-08-25  4:06 ` [edk2-devel] [PATCH v1] IntelFsp2Pkg: Add get and set FspSmmInit upd data pointer functions Chiu, Chasel
2023-08-25  5:32   ` Ashraf Ali S
2023-08-28 21:42 ` Chiu, Chasel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230825031522.1241-1-hongbin1.zhang@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox