10 Commits

Author SHA1 Message Date
Isaac Oram
63f9e0d918 Features/Intel: Reduce duplicate code
Enable simpler initialation of the MinPlatformPkg feature
selection PCD.  Most features and boards don't benefit from
initializing these.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-08-31 18:42:40 -07:00
Isaac Oram
f0d3ca1894 UserAuthFeaturePkg: Use MinPlatformPkg build include files
Use the MinPlatformPkg common core build files to build libraries
needed by this feature.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-02-02 15:26:20 -08:00
Isaac Oram
c51e90eb23 UserAuthFeaturePkg: Fix all relative package paths
Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel
which was functional, but interferes with the proper functioning
of packaging tools.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2022-02-02 15:26:20 -08:00
Isaac Oram
0b4770e1ca UserAuthFeaturePkg/PlatformPasswordLibNull: Add UEFI app support
Enable library use with UEFI_APPLICATION components similarly to the
other libraries in the package.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Guillermo Antonio Palomino Sosa <guillermo.a.palomino.sosa@intel.com>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2022-01-21 11:56:43 -08:00
Nate DeSimone
15d8aa1828 UserAuthFeaturePkg: VerifyPassword() allows one extra password attempt
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3756

If the password provided by the user is incorrect, then the VerifyPassword()
function is supposed to return EFI_SECURITY_VIOLATION if the user has not
exceeded the maximum number of password guesses (currently set to 3). If the
number of password guesses has been exceeded, then VerifyPassword() shall return
EFI_ACCESS_DENIED. UserAuthenticationDxe uses EFI_ACCESS_DENIED as the signal
that the number of guesses has been exceeded for the purposes of triggering a
forced reboot.

VerifyPassword() checks if the number of password guess attempts has exceeded
the maximum allowed before checking if the current password guess is correct. If
it has, then VerifyPassword() immediately returns EFI_ACCESS_DENIED. This
behavior is correct since it is possible for VerifyPassword() to be called again
after the maximum number of attempts has been exceeded. However, if the user
guesses incorrectly, then VerifyPassword() will always return
EFI_SECURITY_VIOLATION. This is where the bug is. It is possible that after the
current attempt, the maximum allowed number of attempts is exceeded. Therefore,
VerifyPassword() should check the number of attempts again, after checking if
the password is correct.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Jadhav Manoj D <manoj.d.jadhav@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2021-12-07 16:54:51 -08:00
Shi, Hao
23ca68c23d UserAuthFeaturePkg/UserAuthenticationDxeSmm: The SMI to handle the user authentication should be unregister before booting to OS
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3648

Register SmmExitBootServices and SmmLegacyBoot callback function to unregister this handler.

Signed-off-by: Hao Shi <hao.shi@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2021-10-13 09:52:55 +08:00
Dandan Bi
e3f2c32217 Features/UserInterface: Consume MdeLibs.dsc.inc for RegisterFilterLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.

So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2021-03-31 14:20:12 +08:00
Liu, Zhiguang
4472034ad3 Features/Intel/UserInterface/UserAuthFeaturePkg: Add RngLib instance to DSC
The UserAuthFeaturePkg build currently fails since it does not specify
a RngLib instance and OpensslLib links against RngLib.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2020-10-27 13:46:06 +08:00
Michael Kubacki
9cc828d9d4 Features/Intel: Add a Performance Impact section to Readme.md files
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2417

Performance impact is an important consideration for feature
integration. This new section captures the general expectation
for overall boot performance impact due to using an advanced
feature.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>
2020-01-31 15:25:13 -08:00
Michael Kubacki
0110a8cf76 Features/Intel/UserAuthFeaturePkg: Add initial package
Adds a new feature package for the User Authentication feature.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2019-12-06 17:37:59 -08:00