You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
Stop TCO Timer in Beginning of FWU PLD
Stop TCO timer in beginning of FWU PLD to ensure it is started without error Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
This commit is contained in:
@@ -289,8 +289,9 @@ NormalBootPath (
|
||||
PrintStackHeapInfo ();
|
||||
DEBUG_CODE_END ();
|
||||
|
||||
// Stop timer so boot retries stop
|
||||
if (PcdGetBool (PcdSblResiliencyEnabled)) {
|
||||
// FWU payload is the only payload in SBL scope, so stop TCO
|
||||
// timer if another payload is set to be launched
|
||||
if (PcdGetBool (PcdSblResiliencyEnabled) && GetBootMode () != BOOT_ON_FLASH_UPDATE) {
|
||||
StopTcoTimer ();
|
||||
ClearFailedBootCount ();
|
||||
}
|
||||
@@ -362,8 +363,9 @@ S3ResumePath (
|
||||
|
||||
AddMeasurePoint (0x31F0);
|
||||
|
||||
// Stop timer so boot retries stop
|
||||
if (PcdGetBool (PcdSblResiliencyEnabled)) {
|
||||
// FWU payload is the only payload in SBL scope, so stop TCO
|
||||
// timer if another payload is set to be launched
|
||||
if (PcdGetBool (PcdSblResiliencyEnabled) && GetBootMode () != BOOT_ON_FLASH_UPDATE) {
|
||||
StopTcoTimer ();
|
||||
ClearFailedBootCount ();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#include <Guid/OsBootOptionGuid.h>
|
||||
#include <Library/BootGuardLib.h>
|
||||
#include <Library/WatchDogTimerLib.h>
|
||||
#include <Library/TcoTimerLib.h>
|
||||
#include "FirmwareUpdateHelper.h"
|
||||
|
||||
UINT32 mSblImageBiosRgnOffset;
|
||||
@@ -1769,6 +1770,14 @@ PayloadMain (
|
||||
//
|
||||
(VOID) PcdSet32S (PcdFwUpdStatusBase, mSblImageBiosRgnOffset + (FlashMap->RomSize - (~RsvdBase + 1)));
|
||||
|
||||
//
|
||||
// Stop TCO timer here as SPI read/write timings are highly variable
|
||||
//
|
||||
if (PcdGetBool (PcdSblResiliencyEnabled)) {
|
||||
StopTcoTimer ();
|
||||
ClearFailedBootCount ();
|
||||
}
|
||||
|
||||
//
|
||||
// Perform firmware recovery/update
|
||||
//
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
TimerLib
|
||||
BootGuardLib
|
||||
WatchDogTimerLib
|
||||
TcoTimerLib
|
||||
|
||||
[Guids]
|
||||
gLoaderMemoryMapInfoGuid
|
||||
|
||||
Reference in New Issue
Block a user