From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: wei6.xu@intel.com) Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Mon, 24 Jun 2019 23:54:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 23:54:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,415,1557212400"; d="scan'208";a="336749670" Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga005.jf.intel.com with ESMTP; 24 Jun 2019 23:54:09 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Chao B Zhang Subject: [edk2-devel][Patch 2/6] MdeModulePkg/BdsDxe: Support Capsule On Disk. Date: Tue, 25 Jun 2019 14:53:58 +0800 Message-Id: <20190625065402.19296-3-wei6.xu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190625065402.19296-1-wei6.xu@intel.com> References: <20190625065402.19296-1-wei6.xu@intel.com> REF: https://github.com/tianocore/tianocore.github.io/wiki/ UEFI-Capsule-on-Disk-Introducation Set EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED bit of "OsIndicationsSupported" variable to indicate the Capsule On Disk is supported or not, according to PcdCapsuleOnDiskSupport. Cc: Jian J Wang Cc: Hao A Wu Cc: Chao B Zhang Signed-off-by: Wei6 Xu --- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 3 ++- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf index 6913389d34..3d13c725ce 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -3,11 +3,11 @@ # # When DxeCore dispatching all DXE driver, this module will produce architecture protocol # gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry # interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered. # -# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## [Defines] @@ -93,10 +93,11 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport ## CONSUMES [Depex] TRUE [UserExtensions.TianoCore."ExtraFiles"] diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index 9d312bd982..2a4ae9f488 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -3,11 +3,11 @@ When this module was dispatched by DxeCore, gEfiBdsArchProtocolGuid will be installed which contains interface of BdsEntry. After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked to enter BDS phase. -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -550,10 +550,14 @@ BdsFormalizeOSIndicationVariable ( EfiBootManagerFreeLoadOption (&BootManagerMenu); } else { OsIndicationSupport = EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY; } + if (PcdGetBool(PcdCapsuleOnDiskSupport)) { + OsIndicationSupport |= EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED; + } + Status = gRT->SetVariable ( EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME, &gEfiGlobalVariableGuid, EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS, sizeof(UINT64), -- 2.16.2.windows.1