diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-11-28 19:43:16 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-11-29 10:32:02 +0800 |
commit | ff5a4bcff3e2afe4a94e62d457ccfc5361590067 (patch) | |
tree | 413eca9a95863006bd5a60b5f704c8c1f889cefe /ShellPkg/DynamicCommand | |
parent | 68b07ebae5d7c4124ff7b2a8d35e2f8b6cda18b8 (diff) | |
download | edk2-ff5a4bcff3e2afe4a94e62d457ccfc5361590067.tar.gz |
ShellPkg/DynamicCommand: Fix bug that cannot start in boot
When dynamic command drivers are built into FV and start during
boot, they fails. Because Shell protocol doesn't exist during boot.
The patch sets Shell protocol and also set PcdShellLibAutoInitialize
to FALSE to ensure that
1. Shell protocol check doesn't happen in driver's entry point.
2. Driver can get the Shell protocol in DynamicCommand.Handler().
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/DynamicCommand')
-rw-r--r-- | ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c | 1 | ||||
-rw-r--r-- | ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c index 6f3997fff4..b10c59f49c 100644 --- a/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c +++ b/ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.c @@ -38,6 +38,7 @@ DpCommandHandler ( )
{
gEfiShellParametersProtocol = ShellParameters;
+ gEfiShellProtocol = Shell;
return RunDp (gImageHandle, SystemTable);
}
diff --git a/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c b/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c index 928ef08468..9e6489dd6f 100644 --- a/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c +++ b/ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.c @@ -39,6 +39,7 @@ TftpCommandHandler ( )
{
gEfiShellParametersProtocol = ShellParameters;
+ gEfiShellProtocol = Shell;
return RunTftp (gImageHandle, SystemTable);
}
|