]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDhcp4.h
NetworkPkg/HttpBootDxe: Add RISC-V architecture for EDK2 CI.
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDhcp4.h
index 27d949850ab3b1efb3117f97740ef31fde7ac97a..606a466aaed8a838e198140869505b2bc1b100e1 100644 (file)
@@ -1,14 +1,9 @@
 /** @file\r
   Functions declaration related with DHCPv4 for HTTP boot driver.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -28,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME   2\r
 \r
 ///\r
-/// HTTP Tag definition that identifies the processor \r
+/// HTTP Tag definition that identifies the processor\r
 /// and programming environment of the client system.\r
 /// These identifiers are defined by IETF:\r
 /// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml\r
@@ -41,13 +36,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_ARM\r
 #elif defined (MDE_CPU_AARCH64)\r
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_AARCH64\r
+#elif defined (MDE_CPU_RISCV64)\r
+#define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_RISCV64\r
 #elif defined (MDE_CPU_EBC)\r
 #define EFI_HTTP_BOOT_CLIENT_SYSTEM_ARCHITECTURE    HTTP_CLIENT_ARCH_EBC\r
 #endif\r
 \r
 /// DHCP offer types among HTTP boot.\r
 /// Dhcp4 and Dhcp6 share this definition, and corresponding\r
-/// relatioinship is as follows:\r
+/// relationship is as follows:\r
 ///   Dhcp4Discover <> Dhcp6Solicit\r
 ///   Dhcp4Offer    <> Dhcp6Advertise\r
 ///   Dhcp4Request  <> Dhcp6Request\r
@@ -178,10 +175,12 @@ typedef struct {
   UINT32         Reserved;\r
 } HTTP_BOOT_VENDOR_OPTION;\r
 \r
+#define HTTP_CACHED_DHCP4_PACKET_MAX_SIZE  (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + HTTP_BOOT_DHCP4_PACKET_MAX_SIZE)\r
+\r
 typedef union {\r
   EFI_DHCP4_PACKET        Offer;\r
   EFI_DHCP4_PACKET        Ack;\r
-  UINT8                   Buffer[HTTP_BOOT_DHCP4_PACKET_MAX_SIZE];\r
+  UINT8                   Buffer[HTTP_CACHED_DHCP4_PACKET_MAX_SIZE];\r
 } HTTP_BOOT_DHCP4_PACKET;\r
 \r
 typedef struct {\r
@@ -234,7 +233,7 @@ HttpBootDhcp4Dora (
 \r
 /**\r
   This function will register the default DNS addresses to the network device.\r
-  \r
+\r
   @param[in]  Private             The pointer to HTTP_BOOT_PRIVATE_DATA.\r
   @param[in]  DataLength          Size of the buffer pointed to by DnsServerData in bytes.\r
   @param[in]  DnsServerData       Point a list of DNS server address in an array\r