From: "Benjamin Doron" <benjamin.doron00@gmail.com>
To: devel@edk2.groups.io
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Dandan Bi <dandan.bi@intel.com>
Subject: [edk2-platforms][PATCH v1 2/2] UserAuthFeaturePkg: Included DXE versions are mutually exclusive
Date: Thu, 2 Sep 2021 13:37:08 -0400 [thread overview]
Message-ID: <20210902173708.4289-2-benjamin.doron00@gmail.com> (raw)
In-Reply-To: <20210902173708.4289-1-benjamin.doron00@gmail.com>
Versions of the DXE module perform nearly identical functions, and are
therefore mutually exclusive. Including both modules results in at least
a duplicate HII package and possibly an "already started" assert.
Therefore, we add a new PCD to determine which module will be included.
However, now a second bug can be seen: version 2 does not challenge for
the password. An RSC handler to hook UiApp entry is probably needed, as
in version 1.
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
---
Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 1 +
Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc | 1 +
Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf | 4 +++-
Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc | 3 +++
Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec | 3 ++-
5 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index e9fabaade16f..aabde1a3b417 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -52,6 +52,7 @@
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |TRUE
gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |TRUE
gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |TRUE
+ gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 |FALSE
gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |TRUE
gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable |FALSE
gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 3a6556cb0936..47df12e7a751 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -40,5 +40,6 @@
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |FALSE
gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |FALSE
gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |FALSE
+ gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 |FALSE
gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |FALSE
gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable |FALSE
diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf
index f0b33aa44c9f..a3af61bfb70f 100644
--- a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf
@@ -6,7 +6,9 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
-
+!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 == TRUE
INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf
+!else
INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf
+!endif
INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf
diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
index d4f7a5ed2311..9b8c5ca63cd5 100644
--- a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
@@ -125,8 +125,11 @@
UserInterface/UserAuthFeaturePkg/Library/UserPasswordUiLib/UserPasswordUiLib.inf
# Add components here that should be included in the package build.
+!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 == TRUE
UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf
+!else
UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf
+!endif
UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf
###################################################################################################
diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec
index a9174edd5486..209a0ba6a6c7 100644
--- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec
+++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec
@@ -38,8 +38,9 @@
gUserAuthenticationGuid = { 0xee24a7f7, 0x606b, 0x4724, { 0xb3, 0xc9, 0xf5, 0xae, 0x4a, 0x3b, 0x81, 0x65}}
[PcdsFeatureFlag]
- ## This PCD specifies whether StatusCode is reported via USB3 Serial port.
+ ## This PCD specifies whether user authentication feature is enabled.
gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable|FALSE|BOOLEAN|0xA0000001
+ gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1|FALSE|BOOLEAN|0xA0000002
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
## Indicate whether the password is cleared.
--
2.31.1
prev parent reply other threads:[~2021-09-02 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 17:37 [edk2-platforms][PATCH v1 1/2] AcpiDebugFeaturePkg: Included modules are mutually exclusive Benjamin Doron
2021-09-02 17:37 ` Benjamin Doron [this message]
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=20210902173708.4289-2-benjamin.doron00@gmail.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