From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cUaPD-0004fU-DT for mharc-grub-devel@gnu.org; Fri, 20 Jan 2017 09:43:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUUFp-0006mv-Oi for grub-devel@gnu.org; Fri, 20 Jan 2017 03:09:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUUFl-0005b0-O1 for grub-devel@gnu.org; Fri, 20 Jan 2017 03:09:01 -0500 Received: from g2t2353.austin.hpe.com ([15.233.44.26]:50092) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUUFl-0005Y2-IN for grub-devel@gnu.org; Fri, 20 Jan 2017 03:08:57 -0500 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id 1F0BA49 for ; Fri, 20 Jan 2017 08:08:49 +0000 (UTC) Received: from hpe.com (unknown [15.119.158.60]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id ACAFD46; Fri, 20 Jan 2017 08:08:48 +0000 (UTC) From: Ken Lin To: grub-devel@gnu.org Cc: kengyu@hpe.com, clayc@hpe.com, michael.ruan@hpe.com, ljk@hpe.com, Ken Lin Subject: [RFC 0/2] UEFI-based HTTP Boot Date: Fri, 20 Jan 2017 09:13:19 +0800 Message-Id: <1484874801-15420-1-git-send-email-ken.lin@hpe.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 15.233.44.26 X-Mailman-Approved-At: Fri, 20 Jan 2017 09:43:04 -0500 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2017 08:09:03 -0000 This RFC patchset is stacked on the previous HTTP boot patchset: https://lists.gnu.org/archive/html/grub-devel/2016-12/msg00088.html It re-uses some code from it, e.g. the DCHPACK with vendor_class_identifier=3DHTTPClient. Instead of implementing HTTP and HTTPS boot totally from software, UEFI firmware already defines APIs for HTTP(s). Please check UEFI spec. 2.5 and plus for the detail: 28.6 EFI HTTP Protocols Then why two implementations? For older UEFI firmwares (UEFI 2.4 and olde= r), the HTTP(s) APIs are not available. In the case, Grub can fall back to the software-based implementation. In the first patch of this patchset, grub-core/net/drivers/efi/efihttp.c:= 76 to 81 is the code to query if the HTTP Protocol is supported by the UEFI firmwa= re. This patchset was tested on QEMU+OVMF and it works flawlessly. The main goals of this RFC is to ask for opinions and suggestion to make the first patch modularized as much as possible. In the second patch, there is some codes related TCP re-transmission that need to pass by for the HTTP Boot to work. More details are described in the logs of each patch.=20 Ken Lin (2): net: add efihttp to do HTTP(S) Boot by UEFI HTTP Protocol net: workaround to bypass corruption of the efihttp function pointer grub-core/Makefile.core.def | 1 + grub-core/net/bootp.c | 6 + grub-core/net/drivers/efi/efihttp.c | 386 ++++++++++++++++++++++++++++++= ++++++ grub-core/net/drivers/efi/efinet.c | 1 + grub-core/net/net.c | 39 +++- include/grub/efi/api.h | 17 ++ include/grub/efi/http.h | 221 +++++++++++++++++++++ include/grub/err.h | 3 +- include/grub/net.h | 1 + 9 files changed, 672 insertions(+), 3 deletions(-) create mode 100755 grub-core/net/drivers/efi/efihttp.c create mode 100755 include/grub/efi/http.h --=20 2.7.4