mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
Merge 9db8b41adf into fb2ac429de
This commit is contained in:
commit
4290ff78e0
2 changed files with 13 additions and 0 deletions
|
|
@ -355,6 +355,17 @@ UefiMain (
|
||||||
EFI_HANDLE ConInHandle;
|
EFI_HANDLE ConInHandle;
|
||||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *OldConIn;
|
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *OldConIn;
|
||||||
SPLIT_LIST *Split;
|
SPLIT_LIST *Split;
|
||||||
|
UINT8 *SecureBoot;
|
||||||
|
|
||||||
|
// If Secure Boot is enabled, do not launch the UEFI shell
|
||||||
|
SecureBoot = NULL;
|
||||||
|
GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, (VOID **)&SecureBoot, NULL);
|
||||||
|
if ((SecureBoot != NULL) && (*SecureBoot == SECURE_BOOT_MODE_ENABLE)) {
|
||||||
|
FreePool (SecureBoot);
|
||||||
|
return EFI_SECURITY_VIOLATION;
|
||||||
|
} else if (SecureBoot != NULL) {
|
||||||
|
FreePool (SecureBoot);
|
||||||
|
}
|
||||||
|
|
||||||
if (PcdGet8 (PcdShellSupportLevel) > 3) {
|
if (PcdGet8 (PcdShellSupportLevel) > 3) {
|
||||||
return (EFI_UNSUPPORTED);
|
return (EFI_UNSUPPORTED);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
#include <Guid/ShellVariableGuid.h>
|
#include <Guid/ShellVariableGuid.h>
|
||||||
#include <Guid/ShellAliasGuid.h>
|
#include <Guid/ShellAliasGuid.h>
|
||||||
|
#include <Guid/GlobalVariable.h>
|
||||||
|
#include <Guid/ImageAuthentication.h>
|
||||||
|
|
||||||
#include <Protocol/LoadedImage.h>
|
#include <Protocol/LoadedImage.h>
|
||||||
#include <Protocol/SimpleTextOut.h>
|
#include <Protocol/SimpleTextOut.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue