From nobody Mon May 13 05:55:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94091+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94091+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1663797128; cv=none; d=zohomail.com; s=zohoarc; b=YPVvHWKEXpenFNz874FEcd/4CSGs15IHdr+JVs9/0jE2N3oT5kmGyNgFD3zRDX2JzbatbmjbLPnHa1rPyvTiIOL0+xSEbgimZ6eywP1g8bqNNLvYLvSbdRCE2puXyzqANI7qwUinpmdyznNbCr/J/p6qgF/2fwZwhWpnYWDsxS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663797128; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=fBIBEo+hNhWuSc1Xwow2ekB0ihtQ+bGl7Ar2D8FYicA=; b=fN0k1rPQeL+Eucb7+5+k3ZuAc53uvnJPkwT+l/RzNfRoDisdkLnUHveE9E4Uw54DXeKrWt9nCORwqgvvwIJgO/fU8XA2HuaBORAxL4vnjGwGn0gVkj/6kpLgAjtf544aeIJEKXv3OkVvQ8hm6ko8RCSMcS+6XHH54gRaWklNIoE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94091+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1663797128112698.9399443931118; Wed, 21 Sep 2022 14:52:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Gu1wYY1788612xlNqa4U0Bhx; Wed, 21 Sep 2022 14:52:06 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web08.392.1663797121780520189 for ; Wed, 21 Sep 2022 14:52:06 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="298850819" X-IronPort-AV: E=Sophos;i="5.93,334,1654585200"; d="scan'208";a="298850819" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 14:52:06 -0700 X-IronPort-AV: E=Sophos;i="5.93,334,1654585200"; d="scan'208";a="597172817" X-Received: from fmbiosdev02.amr.corp.intel.com ([10.80.127.10]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 14:52:05 -0700 From: "Saloni Kasbekar" To: devel@edk2.groups.io Cc: Saloni Kasbekar , Jian J Wang , Liming Gao Subject: [edk2-devel] [[edk2-staging/HttpProxy] 2/3] MdeModulePkg/Library: Add support for multi-URI device path Date: Wed, 21 Sep 2022 14:51:50 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,saloni.kasbekar@intel.com X-Gm-Message-State: IfCxIYsmbcokUhb8VPjONzAYx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663797126; bh=YgJ4w/Q9CwA0rZRzem0DjiiygRDIGBNCzdaSGzvDCMo=; h=Cc:Date:From:Reply-To:Subject:To; b=AZ/mNHz96gGPzHp3FwdxShfiGXfyVB/H9v4+OE5ZOgV5pJITamMd8LaF4iLYAuKA+UZ hN54f527+7F9KoYpa1VdCXJI0VCS3e35/Z8Y9F/7jPL8W6JzlEES8AUPOMPCikENEOmN3 Qd0fDIa9LEXxL17efZbVVl56nUO4RhmiMKs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663797129637100007 Content-Type: text/plain; charset="utf-8" Process device path with proxy server and endpoint server included. Update comment for sample HTTP device path. Cc: Jian J Wang Cc: Liming Gao Signed-off-by: Saloni Kasbekar --- .../Library/UefiBootManagerLib/BmBoot.c | 28 +++++++++++++++++++ .../UefiBootManagerLib/BmBootDescription.c | 4 +-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index 962892d38f..fdef1ba292 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1513,6 +1513,9 @@ BmExpandLoadFiles ( UINTN HandleCount; UINTN Index; EFI_DEVICE_PATH_PROTOCOL *Node; + URI_DEVICE_PATH *NullUriPath; + + NullUriPath =3D NULL; =20 // // Get file buffer from load file instance. @@ -1545,11 +1548,36 @@ BmExpandLoadFiles ( =20 for (Index =3D 0; Index < HandleCount; Index++) { if (BmMatchHttpBootDevicePath (DevicePathFromHandle (Handles[Index])= , FilePath)) { + // + // Matches HTTP Boot Device Path described as + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]= /Uri(...) + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]= /Uri(...) + // + Handle =3D Handles[Index]; + goto Done; + } + } + + NullUriPath =3D (URI_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_URI_DP, + (UINT16)(sizeof (URI_DEVICE_PATH)) + ); + for (Index =3D 0; Index < HandleCount; Index++) { + if (BmMatchHttpBootDevicePath (AppendDevicePathNode (DevicePathFromH= andle (Handles[Index]), (EFI_DEVICE_PATH_PROTOCOL *)NullUriPath), FilePath)= ) { + // + // Matches HTTP Boot Device Path described as + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]= /Uri(...)/Uri(...) + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]= /Uri(...)/Uri(...) + // Handle =3D Handles[Index]; break; } } =20 + FreePool (NullUriPath); + +Done: if (Handles !=3D NULL) { FreePool (Handles); } diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c b/= MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c index fac33b9ee9..19b7cd1457 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c @@ -412,8 +412,8 @@ BmGetNetworkDescription ( // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...) // // The HTTP device path is like: - // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]/Uri(.= ..) - // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]/Uri(.= ..) + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]/Uri(.= ..)[/Uri(...)] + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]/Uri(.= ..)[/Uri(...)] // while (!IsDevicePathEnd (DevicePath) && ((DevicePathType (DevicePath) !=3D MESSAGING_DEVICE_PATH) || --=20 2.36.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94091): https://edk2.groups.io/g/devel/message/94091 Mute This Topic: https://groups.io/mt/93837211/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-