From ed149d5104f35ab52edd7579f2c956382e7d617f Mon Sep 17 00:00:00 2001 From: kavsrf Date: Fri, 16 Jun 2017 21:15:04 +0300 Subject: BML flags added --- DcsBoot/DcsBoot.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'DcsBoot') diff --git a/DcsBoot/DcsBoot.c b/DcsBoot/DcsBoot.c index de79e93..f897a48 100644 --- a/DcsBoot/DcsBoot.c +++ b/DcsBoot/DcsBoot.c @@ -18,6 +18,7 @@ https://opensource.org/licenses/LGPL-3.0 #include #include #include +#include #include "DcsConfig.h" #include #include @@ -37,6 +38,11 @@ DoExecCmd() if (!EFI_ERROR(res)) { res = FileOpenRoot(gFileRootHandle, &gFileRoot); if (!EFI_ERROR(res)) { + UINT32 lockFlags = 0; + // Lock EFI boot variables + InitBml(); + lockFlags = ConfigReadInt("DcsBmlLockFlags", BML_LOCK_SETVARIABLE | BML_SET_BOOTNEXT | BML_UPDATE_BOOTORDER); + BmlLock(lockFlags); res = EfiExec(NULL, gEfiExecCmd); AsciiSPrint(gDoExecCmdMsg, sizeof(gDoExecCmdMsg), "\nCan't exec %s start partition %g\n", gEfiExecCmd, gEfiExecPartGuid); } else { -- cgit v1.2.3