From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by mx.groups.io with SMTP id smtpd.web08.378.1630604264720807167 for ; Thu, 02 Sep 2021 10:37:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Im1/yqY5; spf=pass (domain: gmail.com, ip: 209.85.222.174, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qk1-f174.google.com with SMTP id y144so2994609qkb.6 for ; Thu, 02 Sep 2021 10:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sUOP/San7OdhN7xwbosP74wc20vBctU87dwdk6X2VYM=; b=Im1/yqY5ouIuMTTYk7LOJEFdiaLkIpzrBYuym63oBR91iA76Ajv5wp3EIg3NIbkMlQ UHSWATCzKR68f3BHpO71QQtK3KYb/gC1cEjRdkqbdjgIf3mfX5Zh+tW3P3Yq///mShax /vB/czFi3AtCfTl7EQeldlMfrjTtQQxy+acrwr+Xm8xuebDM4E5QD+Y8khnqawlyANWd 5SpdQ/zsjcIIPolY7tHpt8yBJdaGb2m7TwsGc0pYiACx6RKJLxuJC2SY5PoRWofnSQXT 9srK528vAvWAxuXIGnGwqoBN0KOWAoA+B3AS/qJn4/HTpQbFt0BAKm55VI1EYBRD+hjc appA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sUOP/San7OdhN7xwbosP74wc20vBctU87dwdk6X2VYM=; b=hFXUH4XbnT+w5IoGs+ugUUZrhDcr1zH+ipoCco2q+ZbSmLwJIpt2w//gb0QjkjzOUh QDaARyNJiyjG+OcBK9IhjpPpL6GVjWJuhp9+P16rd2yx6ap6jC2lEtQzoHJ5trpdH+PJ TLsakSCc3astRtjoa7uZDvLexn3j0b8xLROWdjKoyPaidHgIlAPLJfrhnW9JdwJKSzJ7 VAsEfXsMfUX626g7AFUiOkiRue7ijGh6OSk4jwTTB8+sucMitrSEBN0SdZTAn2HC7pUe 9ygSOt7IgZiGt7RP4CQtRY1ZF+zYyO7Ln312li7h4pN6uGJcRMT8AjLCjjvJJ38zH0nK JxkQ== X-Gm-Message-State: AOAM530fn+i/Qq78sfoA3FGhWgLoNXTKuViFbDisSX9I6yldyO+jM43w 9TF/Mj5sBTRunD6k2fQQ/GOoP3ojFBQ= X-Google-Smtp-Source: ABdhPJxb4lb1MqfJomD3G6w78wHmz6OpaVk4sKIzrC50GP2mCUTZcOC5fte2bj57GstuXtvnXLRXPA== X-Received: by 2002:a05:620a:a93:: with SMTP id v19mr4424773qkg.185.1630604263779; Thu, 02 Sep 2021 10:37:43 -0700 (PDT) Return-Path: Received: from benjamind-benjamindomain.. ([2607:f2c0:e98c:24:56bd:6598:f34d:ffdf]) by smtp.gmail.com with ESMTPSA id 10sm1493301qtu.66.2021.09.02.10.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 10:37:43 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Liming Gao , Dandan Bi Subject: [edk2-platforms][PATCH v1 2/2] UserAuthFeaturePkg: Included DXE versions are mutually exclusive Date: Thu, 2 Sep 2021 13:37:08 -0400 Message-Id: <20210902173708.4289-2-benjamin.doron00@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210902173708.4289-1-benjamin.doron00@gmail.com> References: <20210902173708.4289-1-benjamin.doron00@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Benjamin Doron --- 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.ds= c | 3 +++ Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec = | 3 ++- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Fea= tures/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=0D gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable = |TRUE=0D gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable = |TRUE=0D + gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 = |FALSE=0D gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable = |TRUE=0D gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable = |FALSE=0D gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable = |FALSE=0D 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=0D gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable = |FALSE=0D gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable = |FALSE=0D + gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 = |FALSE=0D gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable = |FALSE=0D gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable = |FALSE=0D diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMe= mory.fdf b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemo= ry.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=0D #=0D ##=0D -=0D +!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 =3D=3D TRUE=0D INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthen= ticationDxe.inf=0D +!else=0D INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthen= tication2Dxe.inf=0D +!endif=0D INF UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthen= ticationSmm.inf=0D diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAu= thFeature.dsc b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/Use= rAuthFeature.dsc index d4f7a5ed2311..9b8c5ca63cd5 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatu= re.dsc +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatu= re.dsc @@ -125,8 +125,11 @@ UserInterface/UserAuthFeaturePkg/Library/UserPasswordUiLib/UserPasswordU= iLib.inf=0D =0D # Add components here that should be included in the package build.=0D +!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 =3D=3D TRUE=0D UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentica= tionDxe.inf=0D +!else=0D UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentica= tion2Dxe.inf=0D +!endif=0D UserInterface/UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentica= tionSmm.inf=0D =0D ##########################################################################= #########################=0D diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeatur= ePkg.dec b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeatureP= kg.dec index a9174edd5486..209a0ba6a6c7 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec @@ -38,8 +38,9 @@ gUserAuthenticationGuid =3D { 0xee24a7f7, 0x606b, 0x4724, { 0xb3, 0xc9, = 0xf5, 0xae, 0x4a, 0x3b, 0x81, 0x65}}=0D =0D [PcdsFeatureFlag]=0D - ## This PCD specifies whether StatusCode is reported via USB3 Serial por= t.=0D + ## This PCD specifies whether user authentication feature is enabled.=0D gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable|FAL= SE|BOOLEAN|0xA0000001=0D + gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1|FALSE|BOOLEAN|0xA000000= 2=0D =0D [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]=0D ## Indicate whether the password is cleared.=0D --=20 2.31.1