Message ID | 20190116212221.7460-3-ard.biesheuvel@linaro.org |
---|---|
State | Accepted |
Commit | c5386c78984bb681184f3ea249abfc8ba5efc3b9 |
Headers | show |
Series | Various Packages: add MM_STANDALONE support | expand |
Reviewed-by: Jian J Wang <jian.j.wang@intel.com> > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: Thursday, January 17, 2019 5:22 AM > To: edk2-devel@lists.01.org > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting > <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J > <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao, > Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star > <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja > <jagadeesh.ujja@arm.com> > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by > MM_STANDALONE modules > > Add MM_STANDALONE to the list of module types that are permitted to > link to this library. Also, since the constructor prototype is > different between MM_STANDALONE and DXE_DRIVER type libraries, > convert the library into BASE type. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c | 9 +++++- > --- > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++-- > 2 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > index 0c6ded22f3e6..b2493a029393 100644 > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > KIND, EITHER EXPRESS OR IMPLIED. > > **/ > > +#include <Uefi/UefiBaseType.h> > + > BOOLEAN mUserPhysicalPresence = FALSE; > > /** > @@ -53,15 +55,14 @@ UserPhysicalPresent ( > @retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully. > > **/ > -EFI_STATUS > +RETURN_STATUS > EFIAPI > PlatformSecureLibNullConstructor ( > - IN EFI_HANDLE ImageHandle, > - IN EFI_SYSTEM_TABLE *SystemTable > + VOID > ) > { > > mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence); > > - return EFI_SUCCESS; > + return RETURN_SUCCESS; > } > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > index 979a33705de0..70051a27a0a9 100644 > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > @@ -21,9 +21,9 @@ [Defines] > BASE_NAME = PlatformSecureLibNull > MODULE_UNI_FILE = PlatformSecureLibNull.uni > FILE_GUID = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF > - MODULE_TYPE = DXE_DRIVER > + MODULE_TYPE = BASE > VERSION_STRING = 1.0 > - LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > DXE_SMM_DRIVER DXE_DRIVER > + LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE > CONSTRUCTOR = PlatformSecureLibNullConstructor > > # > -- > 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On Fri, 18 Jan 2019 at 08:06, Wang, Jian J <jian.j.wang@intel.com> wrote: > > > > Reviewed-by: Jian J Wang <jian.j.wang@intel.com> > Chao, Jiewen, do you have any objections to this patch? > > > -----Original Message----- > > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > > Sent: Thursday, January 17, 2019 5:22 AM > > To: edk2-devel@lists.01.org > > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D > > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting > > <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J > > <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao, > > Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star > > <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja > > <jagadeesh.ujja@arm.com> > > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by > > MM_STANDALONE modules > > > > Add MM_STANDALONE to the list of module types that are permitted to > > link to this library. Also, since the constructor prototype is > > different between MM_STANDALONE and DXE_DRIVER type libraries, > > convert the library into BASE type. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > --- > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c | 9 +++++- > > --- > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++-- > > 2 files changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > index 0c6ded22f3e6..b2493a029393 100644 > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > > KIND, EITHER EXPRESS OR IMPLIED. > > > > **/ > > > > +#include <Uefi/UefiBaseType.h> > > + > > BOOLEAN mUserPhysicalPresence = FALSE; > > > > /** > > @@ -53,15 +55,14 @@ UserPhysicalPresent ( > > @retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully. > > > > **/ > > -EFI_STATUS > > +RETURN_STATUS > > EFIAPI > > PlatformSecureLibNullConstructor ( > > - IN EFI_HANDLE ImageHandle, > > - IN EFI_SYSTEM_TABLE *SystemTable > > + VOID > > ) > > { > > > > mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence); > > > > - return EFI_SUCCESS; > > + return RETURN_SUCCESS; > > } > > diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > index 979a33705de0..70051a27a0a9 100644 > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > @@ -21,9 +21,9 @@ [Defines] > > BASE_NAME = PlatformSecureLibNull > > MODULE_UNI_FILE = PlatformSecureLibNull.uni > > FILE_GUID = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF > > - MODULE_TYPE = DXE_DRIVER > > + MODULE_TYPE = BASE > > VERSION_STRING = 1.0 > > - LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > > DXE_SMM_DRIVER DXE_DRIVER > > + LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER > > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE > > CONSTRUCTOR = PlatformSecureLibNullConstructor > > > > # > > -- > > 2.17.1 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: Friday, January 18, 2019 3:13 AM > To: Wang, Jian J <jian.j.wang@intel.com> > Cc: edk2-devel@lists.01.org; Kinney, Michael D > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, > Ting <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Zhang, Chao B > <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wu, Hao > A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>; Achin Gupta > <achin.gupta@arm.com>; Jagadeesh Ujja <jagadeesh.ujja@arm.com> > Subject: Re: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by > MM_STANDALONE modules > > On Fri, 18 Jan 2019 at 08:06, Wang, Jian J <jian.j.wang@intel.com> wrote: > > > > > > > > Reviewed-by: Jian J Wang <jian.j.wang@intel.com> > > > > Chao, Jiewen, do you have any objections to this patch? > > > > > > -----Original Message----- > > > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > > > Sent: Thursday, January 17, 2019 5:22 AM > > > To: edk2-devel@lists.01.org > > > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D > > > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, > Ting > > > <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J > > > <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; > Yao, > > > Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; > Zeng, Star > > > <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; > Jagadeesh Ujja > > > <jagadeesh.ujja@arm.com> > > > Subject: [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: permit use by > > > MM_STANDALONE modules > > > > > > Add MM_STANDALONE to the list of module types that are permitted to > > > link to this library. Also, since the constructor prototype is > > > different between MM_STANDALONE and DXE_DRIVER type libraries, > > > convert the library into BASE type. > > > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > > --- > > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > | 9 +++++- > > > --- > > > SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | > 4 ++-- > > > 2 files changed, 7 insertions(+), 6 deletions(-) > > > > > > diff --git > a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > > index 0c6ded22f3e6..b2493a029393 100644 > > > --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > > +++ > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c > > > @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF > ANY > > > KIND, EITHER EXPRESS OR IMPLIED. > > > > > > **/ > > > > > > +#include <Uefi/UefiBaseType.h> > > > + > > > BOOLEAN mUserPhysicalPresence = FALSE; > > > > > > /** > > > @@ -53,15 +55,14 @@ UserPhysicalPresent ( > > > @retval EFI_SUCCESS PcdUserPhysicalPresence is got > successfully. > > > > > > **/ > > > -EFI_STATUS > > > +RETURN_STATUS > > > EFIAPI > > > PlatformSecureLibNullConstructor ( > > > - IN EFI_HANDLE ImageHandle, > > > - IN EFI_SYSTEM_TABLE *SystemTable > > > + VOID > > > ) > > > { > > > > > > mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence); > > > > > > - return EFI_SUCCESS; > > > + return RETURN_SUCCESS; > > > } > > > diff --git > a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > > index 979a33705de0..70051a27a0a9 100644 > > > --- > a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > > +++ > b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf > > > @@ -21,9 +21,9 @@ [Defines] > > > BASE_NAME = PlatformSecureLibNull > > > MODULE_UNI_FILE = PlatformSecureLibNull.uni > > > FILE_GUID = > 7FA68D82-10A4-4e71-9524-D3D9500D3CDF > > > - MODULE_TYPE = DXE_DRIVER > > > + MODULE_TYPE = BASE > > > VERSION_STRING = 1.0 > > > - LIBRARY_CLASS = > PlatformSecureLib|DXE_RUNTIME_DRIVER > > > DXE_SMM_DRIVER DXE_DRIVER > > > + LIBRARY_CLASS = > PlatformSecureLib|DXE_RUNTIME_DRIVER > > > DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE > > > CONSTRUCTOR = > PlatformSecureLibNullConstructor > > > > > > # > > > -- > > > 2.17.1 > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c index 0c6ded22f3e6..b2493a029393 100644 --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ +#include <Uefi/UefiBaseType.h> + BOOLEAN mUserPhysicalPresence = FALSE; /** @@ -53,15 +55,14 @@ UserPhysicalPresent ( @retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully. **/ -EFI_STATUS +RETURN_STATUS EFIAPI PlatformSecureLibNullConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + VOID ) { mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence); - return EFI_SUCCESS; + return RETURN_SUCCESS; } diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf index 979a33705de0..70051a27a0a9 100644 --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf @@ -21,9 +21,9 @@ [Defines] BASE_NAME = PlatformSecureLibNull MODULE_UNI_FILE = PlatformSecureLibNull.uni FILE_GUID = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF - MODULE_TYPE = DXE_DRIVER + MODULE_TYPE = BASE VERSION_STRING = 1.0 - LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER + LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE CONSTRUCTOR = PlatformSecureLibNullConstructor #
Add MM_STANDALONE to the list of module types that are permitted to link to this library. Also, since the constructor prototype is different between MM_STANDALONE and DXE_DRIVER type libraries, convert the library into BASE type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c | 9 +++++---- SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel