mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
MdeModulePkg/DxeCapsuleLibFmp:Added PCD for EmbeddedDriver Support
Currently, there is no mechanism for platforms to enable or disable support for EmbeddedDrivers in capsule updates. This patch introduces a new PCD, PcdEmbeddedDriverSupport, allowing platforms to explicitly control whether capsules containing EmbeddedDrivers are supported. This ensures capsules with embedded drivers are rejected on platforms that do not support them. This is a breaking change.By default, PcdEmbeddedDriverSupport is set to FALSE which disables embedded driver support in capsule updates across all platforms unless explicitly enabled. Platforms must opt-in by setting the PcdEmbeddedDriverSupport to TRUE in order to enable support for capsules containing embedded drivers. Signed-off-by: Pavithra Gurulingappa <gpavithr@qti.qualcomm.com>
This commit is contained in:
parent
9c06ac56fb
commit
597d061e09
4 changed files with 21 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
Copyright (c) 2016 - 2024, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2024, Ampere Computing LLC. All rights reserved.<BR>
|
||||
Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
|
@ -246,6 +247,11 @@ ValidateFmpCapsule (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!PcdGetBool (PcdCapsuleEmbeddedDriverSupport) && (FmpCapsuleHeader->EmbeddedDriverCount != 0)) {
|
||||
DEBUG ((DEBUG_ERROR, "FMP Capsule with one or more embedded drivers is not supported by this platform\n"));
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
ItemOffsetList = (UINT64 *)(FmpCapsuleHeader + 1);
|
||||
|
||||
// No overflow
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
# Capsule library instance for DXE_DRIVER module types.
|
||||
#
|
||||
# Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
|
@ -68,6 +69,7 @@
|
|||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCodRelocationDevPath ## SOMETIMES_CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCoDRelocationFileName ## CONSUMES
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleEmbeddedDriverSupport ## CONSUMES
|
||||
|
||||
[FeaturePcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset ## CONSUMES
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
# Capsule library instance for DXE_RUNTIME_DRIVER module types.
|
||||
#
|
||||
# Copyright (c) 2016 - 2024, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
|
@ -70,5 +71,8 @@
|
|||
gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event
|
||||
gEdkiiCapsuleOnDiskNameGuid ## SOMETIMES_CONSUMES ## GUID
|
||||
|
||||
[Pcd]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleEmbeddedDriverSupport ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
gEfiVariableWriteArchProtocolGuid
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
# Copyright (c) Microsoft Corporation.<BR>
|
||||
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
|
||||
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
|
@ -1696,6 +1697,14 @@
|
|||
# @Prompt Enable Capsule On Disk support.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport|FALSE|BOOLEAN|0x0000002d
|
||||
|
||||
## Indicates whether the platform supports processing Capsules that include EmbeddedDrivers.
|
||||
# Default value is FALSE, meaning embedded drivers are not supported.
|
||||
# Platforms that require embedded driver support must explicitly opt-in by setting this PCD to TRUE.
|
||||
# TRUE - Capsule with EmbeddedDriver is supported.<BR>
|
||||
# FALSE - Capsule with EmbeddedDriver is not supported.<BR>
|
||||
# @Prompt Enable Capsule with EmbeddedDriver support.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleEmbeddedDriverSupport|FALSE|BOOLEAN|0x00010021
|
||||
|
||||
## Maximum permitted encapsulation levels of sections in a firmware volume,
|
||||
# in the DXE phase. Minimum value is 1. Sections nested more deeply are
|
||||
# rejected.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue