[PATCH v5 03/20] net/http: check result of grub_netbuff_put() in http_receive()

2023-04-25 Thread Robbie Harwood
Co-authored-by: Peter Jones Signed-off-by: Peter Jones Signed-off-by: Robbie Harwood --- grub-core/net/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c index df690acf67..406777b01b 100644 --- a/grub-core/net/http.c +++ b/g

[PATCH v5 18/20] http: Prepend prefix when the HTTP path is relative

2023-04-25 Thread Robbie Harwood
From: Javier Martinez Canillas There are two different HTTP drivers that can be used when requesting an HTTP resource: the efi/http that uses the EFI_HTTP_PROTOCOL and the http that uses GRUB's HTTP and TCP/IP implementation. The efi/http driver appends a prefix that is defined in the variable h

[PATCH v5 08/20] efinet Configure network from UEFI device path

2023-04-25 Thread Robbie Harwood
From: Michael Chang The PXE Base Code protocol used to obtain cached PXE DHCPACK packet is no longer provided for HTTP Boot. Instead, we have to get the HTTP boot information from the device path nodes defined in following UEFI Specification sections. 9.3.5.12 IPv4 Device Path 9.3.5.13

[PATCH v5 05/20] efinet: add structures for PXE messages

2023-04-25 Thread Robbie Harwood
From: Michael Chang When grub2 image is booted from UEFI IPv6 PXE, the DHCPv6 Reply packet is cached in firmware buffer which can be obtained by PXE Base Code protocol. The network interface can be setup through the parameters in that obtained packet. Augment existing structures to represent th

[PATCH v5 09/20] efinet: set DNS server from UEFI protocol

2023-04-25 Thread Robbie Harwood
From: Michael Chang In the URI device path node, any name rather than address can be used for looking up the resources so that DNS service become needed to get answer of the name's address. Unfortunately, DNS is not defined in any of the device path nodes so that we use the EFI_IP4_CONFIG2_PROTO

[PATCH v5 16/20] Prepend prefix when HTTP path is relative

2023-04-25 Thread Robbie Harwood
From: Stephen Benjamin This sets a couple of variables. With the url http://www.example.com/foo/bar : http_path: /foo/bar http_url: http://www.example.com/foo/bar Resolves: rhbz#1616395 Co-authored-by: Javier Martinez Canillas Co-authored-by: Robbie Harwood Signed-off-by: Peter Jones Signed-

[PATCH v5 04/20] efinet + bootp: add net_bootp6 command supporting dhcpv6

2023-04-25 Thread Robbie Harwood
From: Peter Jones Implement new net_bootp6 command for IPv6 network auto configuration via the DHCPv6 protocol (RFC3315). Signed-off-by: Peter Jones Co-authored-by: Michael Chang Signed-off-by: Michael Chang Signed-off-by: Ken Lin Co-authored-by: Robbie Harwood Signed-off-by: Robbie Harwood

[PATCH v5 14/20] use fw_path prefix when fallback searching for grub config

2023-04-25 Thread Robbie Harwood
From: Mark Salter When PXE booting via UEFI firmware, grub was searching for grub.cfg in the fw_path directory where the grub application was found. If that didn't exist, a fallback search would look for config file names based on MAC and IP address. However, the search would look in the prefix

[PATCH v5 07/20] bootp: Process DHCPACK packet during HTTP Boot

2023-04-25 Thread Robbie Harwood
From: Michael Chang The vendor class identifier with the string "HTTPClient" is used to denote the packet as responding to HTTP boot request. In DHCP4 config, the filename for HTTP boot is the URL of the boot file, while for PXE boot it is the path to the boot file. As a consequence, the next-s

[PATCH v5 17/20] efi/http: Enclose literal IPv6 addresses in square brackets

2023-04-25 Thread Robbie Harwood
From: Javier Martinez Canillas According to RFC 2732 (https://www.ietf.org/rfc/rfc2732.txt), literal IPv6 addresses must be enclosed in square brackets. But GRUB currently does not do this and is causing HTTP servers to send Bad Request (400) responses. For example, the following is the HTTP str

[PATCH v5 02/20] net: read bracketed ipv6 addrs and port numbers

2023-04-25 Thread Robbie Harwood
Allow specifying port numbers for http and tftp paths and allow ipv6 addresses to be recognized with brackets around them, which is required to specify a port number. Co-authored-by: Aaron Miller Signed-off-by: Aaron Miller Co-authored-by: Peter Jones Signed-off-by: Peter Jones Signed-off-by:

[PATCH v5 12/20] efi/http: match protocol+hostname of boot url in root_url

2023-04-25 Thread Robbie Harwood
From: Peter Jones This lets you write config files that don't know urls. Signed-off-by: Peter Jones Signed-off-by: Robbie Harwood --- grub-core/net/efi/http.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/grub-core/net/efi/http.c b/grub-core/net/efi/http.c index 037

[PATCH v5 01/20] Revert "net/http: Allow use of non-standard TCP/IP ports"

2023-04-25 Thread Robbie Harwood
The notation introduced in ac8a37dda0eabdd80506bebe4fb9a5a9fd227935 ("net/http: Allow use of non-standard TCP/IP ports") contradicts that used in downstream distributions including Fedora, RHEL, Debian, Ubuntu, and others. Revert it and apply the downstream notation (which was originally proposed

[PATCH v5 20/20] efinet: Add DHCP proxy support

2023-04-25 Thread Robbie Harwood
From: Ian Page Hands If a proxyDHCP configuration is used, the server name, server IP and boot file values should be taken from the DHCP proxy offer instead of the DHCP server ack packet. Signed-off-by: Ian Page Hands Co-authored-by: Robbie Harwood Signed-off-by: Robbie Harwood --- grub-core

[PATCH v5 13/20] Add fw_path variable to detect config file on efi

2023-04-25 Thread Robbie Harwood
From: Paulo Flabiano Smorigo This patch makes grub look for its config file on efi where the app was found. Resolves: rhbz#857936, rhbz#1616395 Co-authored-by: Matthew Garrett Co-authored-by: Javier Martinez Canillas Co-authored-by: Robbie Harwood Signed-off-by: Paulo Flabiano Smorigo Signed-

[PATCH v5 15/20] Try mac/guid/etc before grub.cfg on tftp config files

2023-04-25 Thread Robbie Harwood
From: Peter Jones Signed-off-by: Peter Jones Signed-off-by: Robbie Harwood --- grub-core/kern/ieee1275/init.c | 28 +++ grub-core/net/net.c| 2 +- grub-core/normal/main.c| 129 + 3 files changed, 82 insertions(+), 77 deletions(-) diff

[PATCH v5 06/20] grub.texi: Add net_bootp6 doumentation

2023-04-25 Thread Robbie Harwood
From: Michael Chang Update grub documentation for net_bootp6 command. Signed-off-by: Michael Chang Signed-off-by: Ken Lin Signed-off-by: Robbie Harwood --- docs/grub.texi | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index bca1407bf3..

[PATCH v5 11/20] efinet: also use the firmware acceleration for http

2023-04-25 Thread Robbie Harwood
From: Peter Jones Signed-off-by: Peter Jones Signed-off-by: Robbie Harwood --- grub-core/net/efi/net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/net/efi/net.c b/grub-core/net/efi/net.c index 012dc654c5..9ea7ed141f 100644 --- a/grub-core/net/efi/net.c +++

[PATCH v5 19/20] normal/main: Discover the device to read the config from as a fallback

2023-04-25 Thread Robbie Harwood
From: Javier Martinez Canillas When core.img is generated locally, the grub2-probe tool figures out the device and partition that needs to be read to parse the GRUB configuration file. But in some cases the core.img can't be generated on the host and instead has to be done at package build time.

[PATCH v5 00/20] UEFI networking support including ipv6 + dhcpv6

2023-04-25 Thread Robbie Harwood
This series is an omnibus of changes we carry for networking that has accumulated since at least 2015. While most of it did not receive review when previously posted, one did, so I'm using that as an excuse to call this v4. At the start, this includes a proposed revert of ac8a37dda0eabdd80506bebe

Re: [PATCH v15 00/10] Add LoongArch support

2023-04-25 Thread Daniel Kiper
On Tue, Apr 18, 2023 at 08:04:07PM +0800, Xiaotian Wu wrote: > LoongArch is a new Loongson 3A5000 CPU instruction set, you can read > documents [1] or visit the development community [2] to get more information. > > [1]: https://loongson.github.io/LoongArch-Documentation/README-EN.html > [2]: https