Skip to content

MdeModulePkg/CapsuleOnDisk: Skip network boot options when searching for ESP#12433

Open
anandhkrishnau wants to merge 1 commit intotianocore:masterfrom
anandhkrishnau:Anandh/FixCapsuleApp
Open

MdeModulePkg/CapsuleOnDisk: Skip network boot options when searching for ESP#12433
anandhkrishnau wants to merge 1 commit intotianocore:masterfrom
anandhkrishnau:Anandh/FixCapsuleApp

Conversation

@anandhkrishnau
Copy link
Copy Markdown
Contributor

Description

When CapsuleApp or DxeCapsuleLibFmp searches for an EFI System Partition (ESP) to write capsule-on-disk data, it iterates through all active boot options in BootOrder. If network boot options (HTTP Boot, PXE) appear before disk-based options, EfiBootManagerConnectDevicePath() is called on each network device path, triggering actual HTTP/PXE boot attempts that are slow and always fail since network devices cannot contain an ESP.

Add IsNetworkBootDevicePath() to detect device paths containing MSG_MAC_ADDR_DP, MSG_IPv4_DP, MSG_IPv6_DP, or MSG_URI_DP nodes and skip them during the boot option iteration in both:

  • CapsuleApp (GetUpdateFileSystem)
  • DxeCapsuleLibFmp (GetEfiSysPartitionFromActiveBootOption)

This avoids unnecessary network connection attempts and significantly reduces capsule-on-disk provisioning time on systems with network boot options enabled.

  • Breaking change? No
  • Impacts security? No
  • Includes tests? No (validated manually on target hardware)

How This Was Tested

Tested with HTTP and PXE boot options enabled.
Verified CapsuleApp no longer triggers network boot attempts during
capsule-on-disk provisioning.

Integration Instructions

N/A

When CapsuleApp or DxeCapsuleLibFmp searches for an EFI System Partition
(ESP) to write capsule-on-disk data, it iterates through all active boot
options in BootOrder. If network boot options (HTTP Boot, PXE) appear
before disk-based options, EfiBootManagerConnectDevicePath() is called on
each network device path, triggering actual HTTP/PXE boot attempts that
are slow and always fail since network devices cannot contain an ESP.

Add IsNetworkBootDevicePath() to detect device paths containing
MSG_MAC_ADDR_DP, MSG_IPv4_DP, MSG_IPv6_DP, or MSG_URI_DP nodes and
skip them during the boot option iteration in both:
 - CapsuleApp (GetUpdateFileSystem)
 - DxeCapsuleLibFmp (GetEfiSysPartitionFromActiveBootOption)

This avoids unnecessary network connection attempts and significantly
reduces capsule-on-disk provisioning time on systems with network boot
options enabled.

Signed-off-by: default avatarAnandh krishnau U <anandhkrishanu@ami.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant