Reviewed-by: Jian J Wang <[email protected]>


> -----Original Message-----
> From: Ard Biesheuvel [mailto:[email protected]]
> Sent: Thursday, January 17, 2019 5:22 AM
> To: [email protected]
> Cc: Ard Biesheuvel <[email protected]>; Kinney, Michael D
> <[email protected]>; Gao, Liming <[email protected]>; Ye, Ting
> <[email protected]>; Wei, Gang <[email protected]>; Wang, Jian J
> <[email protected]>; Zhang, Chao B <[email protected]>; Yao,
> Jiewen <[email protected]>; Wu, Hao A <[email protected]>; Zeng, Star
> <[email protected]>; Achin Gupta <[email protected]>; Jagadeesh Ujja
> <[email protected]>
> 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 <[email protected]>
> ---
>  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
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to