From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.12092.1688607650391055225 for ; Wed, 05 Jul 2023 18:40:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=d/9zSTqy; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id F051920A1057; Wed, 5 Jul 2023 18:40:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F051920A1057 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1688607649; bh=TSktMU7ILgRQ3pFGcgdOk0ASZeaBocrP9Vzyg2NRxC8=; h=From:To:Cc:Subject:Date:From; b=d/9zSTqypItBXLxHRA7zQIgZpOMOd81kqS1nG1BzrOicHEM5CDYJl+HrXyn+GUbMn mWswYCZRA/TvI2SEZD0r/6QCOkeBTxUiGLuZDK2t1LUuR/v8uXCSDPAfF8CzeOufZl 2MkgF6efPJptm+97NzEbQTh3TQAn8QnHOCXIe7ak= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Isaac Oram , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg: Fix build errors in SmmVariableWriteLib Date: Wed, 5 Jul 2023 21:40:28 -0400 Message-ID: <20230706014028.194-1-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.41.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki Commit `b71f2bd` introduced a couple build errors in VariableWritelib. This change adds the SMM Services Table (`gSmst`) and MM Services Table (`gMmst`) calls needed to register the protocol notify in the Traditional and Standalone MM services constructors. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVa= riableWriteLibConstructor.c | 6 +++++- Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmV= ariableWriteLibConstructor.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/St= andaloneMmVariableWriteLibConstructor.c b/Platform/Intel/MinPlatformPkg/L= ibrary/SmmVariableWriteLib/StandaloneMmVariableWriteLibConstructor.c index 8c2b7d18f5f8..447d358a3104 100644 --- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/Standalon= eMmVariableWriteLibConstructor.c +++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/Standalon= eMmVariableWriteLibConstructor.c @@ -74,7 +74,11 @@ StandaloneMmVariableWriteLibConstructor ( // // Register VarLibExitBootServicesCallback for gEdkiiSmmExitBootServic= esProtocolGuid. // - Status =3D SmmRegisterProtocolNotify (&gEdkiiSmmExitBootServicesProtoc= olGuid, VarLibExitBootServicesCallback, &Registration); + Status =3D gMmst->MmRegisterProtocolNotify ( + &gEdkiiSmmExitBootServicesProtocolGuid, + VarLibExitBootServicesCallback, + &Registration + ); ASSERT_EFI_ERROR (Status); =20 return Status; diff --git a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/Tr= aditionalMmVariableWriteLibConstructor.c b/Platform/Intel/MinPlatformPkg/= Library/SmmVariableWriteLib/TraditionalMmVariableWriteLibConstructor.c index abc1e25cde6c..413930d465eb 100644 --- a/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/Tradition= alMmVariableWriteLibConstructor.c +++ b/Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/Tradition= alMmVariableWriteLibConstructor.c @@ -74,7 +74,11 @@ TraditionalMmVariableWriteLibConstructor ( // // Register VarLibExitBootServicesCallback for gEdkiiSmmExitBootServic= esProtocolGuid. // - Status =3D SmmRegisterProtocolNotify (&gEdkiiSmmExitBootServicesProtoc= olGuid, VarLibExitBootServicesCallback, &Registration); + Status =3D gSmst->SmmRegisterProtocolNotify ( + &gEdkiiSmmExitBootServicesProtocolGuid, + VarLibExitBootServicesCallback, + &Registration + ); ASSERT_EFI_ERROR (Status); =20 return Status; --=20 2.41.0.windows.1