From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by mx.groups.io with SMTP id smtpd.web12.30879.1658769144102914275 for ; Mon, 25 Jul 2022 10:12:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K8oWQxIs; spf=pass (domain: gmail.com, ip: 209.85.160.177, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qt1-f177.google.com with SMTP id g24so8734336qtu.2 for ; Mon, 25 Jul 2022 10:12:23 -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=Bu/5DPYkOH9B/C8O8Fu0NNhHJw/3yz7kb0t942S/7D4=; b=K8oWQxIs3RadQCDVf/KBWKu48pIlRH0BzAzxb14OnL6qJUxDAP+81/5RSXxR6yvRrg 16CK42P/yaWFofYvRKrkNHfZwopzAn+eyft5gmrd+AP58JGfbHk0Mn2ePGB43tdsQ5Yq ojEBNdEmPS3yy+LeBbVS0gVQdbuo4doDJ2+MmqreZGbbWmY4Py/aUohLV9KvCZPU7f0p FYL51yhPJs19SNFlElJSDuqnzzMPloU2trSIfKIoI2E9/7eKyAvI4VfBxiAe5SmRB6Md d7yTcJkzqTRgAN2ji/xrj/lwnCB85npGsQPtdpg/1lCxGCyLEyJR/c9Gmwnx+ebdaXJJ K68g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bu/5DPYkOH9B/C8O8Fu0NNhHJw/3yz7kb0t942S/7D4=; b=2pm/M/1i0IDzqXZP/XPjfJJbViEQ522VWMwCTYhTjAtVpnBPvVYwIeiZv6TyRIPxmT RkFfeaWriEu0gaSXGMxNV6OR/nDCIrXYBJiUWwMoW+ptOykZCyecmcJ+ooZ9Tst5JD+w 4mPN0F1mD5qg88s9fOicOMcy5EOE0tuPZ2ObKeMrGFYzZU2APoI8ZXrWuTLsuzd1QScW 8dMa4Q4BwYMZaWDlCY1SMnGHxDIdS1m/v7W0LRGU/YvPJhgm9Lwunkyg5bVVt9iHjjGE uUqXW8AfjHivzL1yweqT7zZNWzAF8cslWbXKdhlUarKQ4Z8q3U5G4HBH5lMsAwelm6/B y8+w== X-Gm-Message-State: AJIora+49BNXnTcXb1uO8R4XliNQvmOl7LKpt7udmVZBgNfTrQXCyKxA s9Yz260WeZjocCu2E4VHjJgpJvZ/oFtCfQ== X-Google-Smtp-Source: AGRyM1ug57stnguGqBKV8W3mAzRwXrs5ekCo2dCc0NgDeBuKnpetPKgFwSJpN8ZZmLclmpBJVHNO8A== X-Received: by 2002:ac8:5bc8:0:b0:31e:e5bd:ef3b with SMTP id b8-20020ac85bc8000000b0031ee5bdef3bmr11336589qtb.94.1658769142927; Mon, 25 Jul 2022 10:12:22 -0700 (PDT) Return-Path: Received: from aturtleortwo-benjamindomain.. ([2607:f2c0:e98c:e:a64b:352b:84cb:57f4]) by smtp.gmail.com with ESMTPSA id x7-20020ac87307000000b0031ee34ca176sm7716456qto.59.2022.07.25.10.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 10:12:22 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Sai Chaganty , Isaac Oram , Nate DeSimone , Ankit Sinha , Liming Gao , Dandan Bi Subject: [PATCH v1 2/3] UserAuthFeaturePkg: Included DXE versions are mutually exclusive Date: Mon, 25 Jul 2022 13:12:06 -0400 Message-Id: <20220725171207.3154408-2-benjamin.doron00@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220725171207.3154408-1-benjamin.doron00@gmail.com> References: <20220725171207.3154408-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 an "already started" assert. Therefore, 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: Isaac Oram Cc: Nate DeSimone Cc: Ankit Sinha 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 = | 9 ++++++--- Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.ds= c | 3 +++ Features/Intel/UserInterface/UserAuthFeaturePkg/UserAuthFeaturePkg.dec = | 3 ++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Fea= tures/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc index 908fe4d1f7a9..8924dadcaa18 100644 --- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc +++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc @@ -79,6 +79,7 @@ #=0D gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable = |TRUE=0D gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable = |TRUE=0D + gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 = |FALSE=0D gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnable= |TRUE=0D =0D #=0D diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.= dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc index d59e3e61b9b9..5365f0a1b844 100644 --- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc +++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc @@ -75,6 +75,7 @@ =0D gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable = |FALSE=0D gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable = |FALSE=0D + gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 = |FALSE=0D gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnable= |FALSE=0D =0D #=0D diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMe= mory.fdf b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemo= ry.fdf index 030dcbe763d8..827deb08de7e 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf @@ -7,6 +7,9 @@ #=0D ##=0D =0D -INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf= =0D -INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf= =0D -INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf= =0D +!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 =3D=3D TRUE=0D + INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.in= f=0D +!else=0D + INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.i= nf=0D +!endif=0D + INF UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.in= f=0D diff --git a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAu= thFeature.dsc b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/Use= rAuthFeature.dsc index 2f39a5580caf..022678d5c852 100644 --- a/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatu= re.dsc +++ b/Features/Intel/UserInterface/UserAuthFeaturePkg/Include/UserAuthFeatu= re.dsc @@ -72,6 +72,9 @@ UserAuthFeaturePkg/Library/UserPasswordUiLib/UserPasswordUiLib.inf=0D =0D # Add components here that should be included in the package build.=0D +!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUseVersion1 =3D=3D TRUE=0D UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationDxe.inf=0D +!else=0D UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthentication2Dxe.inf=0D +!endif=0D UserAuthFeaturePkg/UserAuthenticationDxeSmm/UserAuthenticationSmm.inf=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.36.1