MdeModulePkg: Update UefiBootManagerLib to support HTTP boot option creation

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17849 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ruiyu Ni 2015-07-07 05:43:00 +00:00 committed by niruiyu
parent 3e2744e41f
commit ebf735f119
2 changed files with 12 additions and 1 deletions

View File

@ -69,6 +69,8 @@ EfiBootManagerRegisterLegacyBootSupport (
@retval MessageNetworkBoot If given device path contains MESSAGING_DEVICE_PATH type device path node @retval MessageNetworkBoot If given device path contains MESSAGING_DEVICE_PATH type device path node
and its last device path node's subtype is MSG_MAC_ADDR_DP, MSG_VLAN_DP, and its last device path node's subtype is MSG_MAC_ADDR_DP, MSG_VLAN_DP,
MSG_IPv4_DP or MSG_IPv6_DP. MSG_IPv4_DP or MSG_IPv6_DP.
@retval MessageHttpBoot If given device path contains MESSAGING_DEVICE_PATH type device path node
and its last device path node's subtype is MSG_URI_DP.
@retval UnsupportedBoot If tiven device path doesn't match the above condition, it's not supported. @retval UnsupportedBoot If tiven device path doesn't match the above condition, it's not supported.
**/ **/
@ -113,7 +115,7 @@ BmDevicePathType (
// If the device path not only point to driver device, it is not a messaging device path, // If the device path not only point to driver device, it is not a messaging device path,
// //
if (!IsDevicePathEndType (NextNode)) { if (!IsDevicePathEndType (NextNode)) {
break; continue;
} }
switch (DevicePathSubType (Node)) { switch (DevicePathSubType (Node)) {
@ -139,6 +141,10 @@ BmDevicePathType (
case MSG_IPv6_DP: case MSG_IPv6_DP:
return BmMessageNetworkBoot; return BmMessageNetworkBoot;
break; break;
case MSG_URI_DP:
return BmMessageHttpBoot;
break;
} }
} }
} }
@ -686,6 +692,10 @@ BmGetMiscDescription (
Description = L"Network"; Description = L"Network";
break; break;
case BmMessageHttpBoot:
Description = L"Http";
break;
default: default:
Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **) &Fs); Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **) &Fs);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {

View File

@ -91,6 +91,7 @@ typedef enum {
BmMessageUsbBoot, BmMessageUsbBoot,
BmMessageScsiBoot, BmMessageScsiBoot,
BmMessageNetworkBoot, BmMessageNetworkBoot,
BmMessageHttpBoot,
BmMiscBoot BmMiscBoot
} BM_BOOT_TYPE; } BM_BOOT_TYPE;