MdeModulePkg/DxeIpl: Support Capsule On Disk.
https://github.com/tianocore/tianocore.github.io/wiki/UEFI-Capsule- on-Disk-Introducation If Capsule On Disk mode, call Capsule On Disk Load PPI to load capsules. When it fails, still goes to Firmware Update boot path. BDS will clear corresponding indicator and reboot later on. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Responsibility of this module is to load the DXE Core from a Firmware Volume.
|
||||
|
||||
Copyright (c) 2016 HP Development Company, L.P.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
@@ -265,7 +265,9 @@ DxeLoadCore (
|
||||
UINTN DataSize;
|
||||
EFI_PEI_S3_RESUME2_PPI *S3Resume;
|
||||
EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery;
|
||||
EFI_PEI_CAPSULE_ON_DISK_PPI *PeiCapsuleOnDisk;
|
||||
EFI_MEMORY_TYPE_INFORMATION MemoryData[EfiMaxMemoryType + 1];
|
||||
VOID *CapsuleOnDiskModePpi;
|
||||
|
||||
//
|
||||
// if in S3 Resume, restore configure
|
||||
@@ -330,6 +332,32 @@ DxeLoadCore (
|
||||
//
|
||||
// Now should have a HOB with the DXE core
|
||||
//
|
||||
} else if (BootMode == BOOT_ON_FLASH_UPDATE) {
|
||||
//
|
||||
// If Capsule On Disk mode, call storage stack to read Capsule Relocation file
|
||||
// IoMmmu is highly recommmended to enable before reading
|
||||
//
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEdkiiPeiBootInCapsuleOnDiskModePpiGuid,
|
||||
0,
|
||||
NULL,
|
||||
&CapsuleOnDiskModePpi
|
||||
);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = PeiServicesLocatePpi (
|
||||
&gEdkiiPeiCapsuleOnDiskPpiGuid,
|
||||
0,
|
||||
NULL,
|
||||
(VOID **) &PeiCapsuleOnDisk
|
||||
);
|
||||
|
||||
//
|
||||
// Whether failed, still goes to Firmware Update boot path. BDS will clear corresponding indicator and reboot later on
|
||||
//
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PeiCapsuleOnDisk->LoadCapsuleOnDisk (PeiServices, PeiCapsuleOnDisk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (GetFirstGuidHob ((CONST EFI_GUID *)&gEfiMemoryTypeInformationGuid) == NULL) {
|
||||
|
Reference in New Issue
Block a user