feat: [EHL] enable BoardNotifyPhase during FWU (#1939)

The FSP may request for a reboot when some features are
enable/disable. The SiliconInit FW update is one case for the
"FSP requested boot". Without the patch, SBL has no way to
get the notification from CallFspNotifyPhase.

The patch introduces a feature, PcdEnableFwuNotify,
to allow SBL to keep BoardNotifyPhase during firmware update.

On EHL, the feature can be enabled by "disable BIOS Lock".

Verify: EHL-CRB

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
This commit is contained in:
stanley 2023-07-15 06:50:01 +08:00 committed by GitHub
parent 41075531d9
commit 8cc2cab427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 3 deletions

View File

@ -245,6 +245,7 @@
gPlatformModuleTokenSpaceGuid.PcdLegacyEfSegmentEnabled | TRUE | BOOLEAN | 0x20000214
gPlatformModuleTokenSpaceGuid.PcdEnableDts | FALSE | BOOLEAN | 0x20000215
gPlatformModuleTokenSpaceGuid.PcdEnablePciePm | FALSE | BOOLEAN | 0x20000222
gPlatformModuleTokenSpaceGuid.PcdEnableFwuNotify | FALSE | BOOLEAN | 0x20000225
[PcdsDynamic]
gPlatformModuleTokenSpaceGuid.PcdFspResetStatus | 0 | UINT32 | 0x20000224
gPlatformModuleTokenSpaceGuid.PcdFspResetStatus | 0 | UINT32 | 0x20000224

View File

@ -346,6 +346,7 @@
gPlatformModuleTokenSpaceGuid.PcdEnableDts | $(ENABLE_DTS)
gPlatformModuleTokenSpaceGuid.PcdEnablePciePm | $(ENABLE_PCIE_PM)
gPlatformCommonLibTokenSpaceGuid.PcdFspNoEop | $(HAVE_NO_FSP_EOP)
gPlatformModuleTokenSpaceGuid.PcdEnableFwuNotify | $(ENABLE_FWU_NOTIFY)
!ifdef $(S3_DEBUG)
gPlatformModuleTokenSpaceGuid.PcdS3DebugEnabled | $(S3_DEBUG)

View File

@ -557,7 +557,7 @@ SecStartup (
AddMeasurePoint (0x30B0);
if (!EFI_ERROR (Status)) {
if (BootMode != BOOT_ON_FLASH_UPDATE) {
if (FeaturePcdGet(PcdEnableFwuNotify) || (BootMode != BOOT_ON_FLASH_UPDATE)) {
BoardNotifyPhase (PostPciEnumeration);
AddMeasurePoint (0x30C0);
}

View File

@ -1,6 +1,6 @@
## @file
#
# Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@ -152,6 +152,7 @@
gPlatformCommonLibTokenSpaceGuid.PcdBuildSmmHobs
gPlatformCommonLibTokenSpaceGuid.PcdBootPerformanceMask
gPlatformModuleTokenSpaceGuid.PcdSblResiliencyEnabled
gPlatformModuleTokenSpaceGuid.PcdEnableFwuNotify
[Depex]
TRUE

View File

@ -56,6 +56,8 @@ class Board(BaseBoard):
# 0: Disable 1: Enable 2: Auto (disable for UEFI payload, enable for others)
self.ENABLE_SMM_REBASE = 2
self.ENABLE_FRAMEBUFFER_INIT = 1
# allow FSP notify during FWU
self.ENABLE_FWU_NOTIFY = 1
# EHL FSP Ready To Boot does not call EOP
self.HAVE_NO_FSP_EOP = 1

View File

@ -1890,6 +1890,7 @@ UpdateFspConfig (
if (GetBootMode () == BOOT_ON_FLASH_UPDATE) {
Fspscfg->PchLockDownBiosInterface = FALSE;
Fspscfg->PchLockDownBiosLock = FALSE;
Fspscfg->RtcBiosInterfaceLock = FALSE;
Fspscfg->PchSbAccessUnlock = TRUE;
Fspscfg->SkipMpInit = TRUE;