From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <liming.gao@intel.com>, Ting Ye <ting.ye@intel.com>,
Gang Wei <gang.wei@intel.com>, Jian Wang <jian.j.wang@intel.com>,
Chao Zhang <chao.b.zhang@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>, Hao Wu <hao.a.wu@intel.com>,
Star Zeng <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
Date: Wed, 16 Jan 2019 22:22:19 +0100 [thread overview]
Message-ID: <20190116212221.7460-3-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20190116212221.7460-1-ard.biesheuvel@linaro.org>
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
next prev parent reply other threads:[~2019-01-16 21:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 21:22 [PATCH 0/4] Various Packages: add MM_STANDALONE support Ard Biesheuvel
2019-01-16 21:22 ` [PATCH 1/4] CryptoPkg/SmmCryptLib: permit use by MM_STANDALONE modules Ard Biesheuvel
2019-01-18 7:05 ` Wang, Jian J
2019-01-18 11:12 ` Ard Biesheuvel
2019-01-21 12:36 ` Ard Biesheuvel
2019-01-21 12:40 ` Gao, Liming
2019-01-21 12:40 ` Ard Biesheuvel
2019-01-22 2:42 ` Ye, Ting
2019-01-16 21:22 ` Ard Biesheuvel [this message]
2019-01-18 7:06 ` [PATCH 2/4] SecurityPkg/PlatformSecureLibNull: " Wang, Jian J
2019-01-18 11:13 ` Ard Biesheuvel
2019-01-18 15:01 ` Yao, Jiewen
2019-01-16 21:22 ` [PATCH 3/4] MdeModulePkg/VarCheckLib: " Ard Biesheuvel
2019-01-18 7:06 ` Wang, Jian J
2019-01-18 8:15 ` Zeng, Star
2019-01-18 10:45 ` Zeng, Star
2019-01-16 21:22 ` [PATCH 4/4] MdePkg/UefiDevicePathLib: " Ard Biesheuvel
2019-01-18 11:07 ` Ard Biesheuvel
2019-01-21 12:37 ` Gao, Liming
2019-01-21 12:43 ` [PATCH 0/4] Various Packages: add MM_STANDALONE support Ard Biesheuvel
2019-01-21 12:49 ` Gao, Liming
2019-01-21 14:34 ` Ard Biesheuvel
2019-02-28 14:53 ` Ard Biesheuvel
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=20190116212221.7460-3-ard.biesheuvel@linaro.org \
--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