MdeModulePkg/BdsDxe: Fix calling PlatformBootManagerWaitCallback on 0

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2266

Commit 2de1f611be introduced a regression
whereas platforms that did set PcdPlatformBootTimeOut to 0 are now getting
an unexpected call to PlatformBootManagerWaitCallback().

This patch also ensures that, if PcdPlatformBootTimeOut is 0xFFFF we don't
call PlatformBootManagerWaitCallback() with a zero argument as doing so
would produce an unwarranted jump to full progress completion which is
likely to throw off users.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Laszlo Ersek 2019-10-11 23:43:37 +08:00 committed by Liming Gao
parent a1f94045ff
commit 4d05a4b709
1 changed files with 11 additions and 1 deletions

View File

@ -341,7 +341,17 @@ BdsWait (
TimeoutRemain--; TimeoutRemain--;
} }
} }
PlatformBootManagerWaitCallback (0);
//
// If the platform configured a nonzero and finite time-out, and we have
// actually reached that, report 100% completion to the platform.
//
// Note that the (TimeoutRemain == 0) condition excludes
// PcdPlatformBootTimeOut=0xFFFF, and that's deliberate.
//
if (PcdGet16 (PcdPlatformBootTimeOut) != 0 && TimeoutRemain == 0) {
PlatformBootManagerWaitCallback (0);
}
DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n")); DEBUG ((EFI_D_INFO, "[Bds]Exit the waiting!\n"));
} }