From nobody Thu May 9 00:58:59 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+94815+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+94815+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1665178481; cv=none; d=zohomail.com; s=zohoarc; b=Rb1TLrtF55ocjHEVEUzVnGPuF+cfsxGxoTChAodC50imAW9ilvdb0zfxlQtatnH6eoOfD6WmJzKIw55OFIV7V6BiBFk4cIxxkcIJ8RIpjh3JJ2D1V2BW+yGUiYh1CjX9+Z7O6CiBkkTK1DMJLe+D8D1gwZzER+WU5040J255BJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665178481; 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=MQkgd0/C4v8GnmmrCnhYU4/9XB4tlEyZHVv/zz1ZdCc=; b=BkTCVTPY8MWgNd7NEJpEEfefTWWcYZ8NfeSezH42+EBcf9CTnQrW/Je9hul1qvWpl4CNqBwcMDxUXRt6ESVD8j8PqhBg/j4SA5N7jSY6RQBenc6n6IWKfO9jsvLr/uBf8l1XGKg52XApQ3+uwqtt/W8/7wHTwcil7kyDpyAlSpY= 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+94815+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 1665178481663983.0860470415257; Fri, 7 Oct 2022 14:34:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OBkIYY1788612xb4biGg94Ct; Fri, 07 Oct 2022 14:34:41 -0700 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.262.1665178478972669259 for ; Fri, 07 Oct 2022 14:34:40 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="287069048" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="287069048" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 14:34:40 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10493"; a="658479323" X-IronPort-AV: E=Sophos;i="5.95,167,1661842800"; d="scan'208";a="658479323" X-Received: from fmbiosdev02.amr.corp.intel.com ([10.80.127.10]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2022 14:34:40 -0700 From: "Saloni Kasbekar" To: devel@edk2.groups.io Cc: Saloni Kasbekar , Jian J Wang , Liming Gao Subject: [edk2-devel] [[edk2-staging/HttpProxy PATCH v2] 1/6] MdeModulePkg/Library: Support multi-URI HTTP Boot device path Date: Fri, 7 Oct 2022 14:34:25 -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: nlcxQmXGlEiO1b5B1rCHVOasx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1665178481; bh=IURdvuTJBQcxnFNb5AnrBnnu5wF6GsbRFp/ASeYb9Jo=; h=Cc:Date:From:Reply-To:Subject:To; b=H8VswVZtE8PacTYjd7B0Juhj78a7nMhyKMZG0tQA5EbRMBlMy65goSV6JO7opJ8NGXe yrbbC7LuD3v78EbQlPRs5o7sz2gx7WSBm2VaOm2FNVWgqdQa1OL1o2Gpiv2v5xgtvrBjP OR5VvX+KSSHd75361SDZ5oW8KCMaIUHlDl0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665178481971100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3951 Process device path with proxy server and endpoint server included. Update comment for sample HTTP Boot 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..108efd8096 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 (#94815): https://edk2.groups.io/g/devel/message/94815 Mute This Topic: https://groups.io/mt/94189611/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-