summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe/HttpBootDxe.h
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2016-03-22 13:30:58 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-04-11 09:49:05 +0800
commit587d204ccda4b507be4f9f42e8c9d226fd755be0 (patch)
tree56f5d7668645348a3f4ec16055df3e84db72452f /NetworkPkg/HttpBootDxe/HttpBootDxe.h
parent64ee6ed72ad5c1e4b7c9a96f419c3592e93314ad (diff)
downloadedk2-587d204ccda4b507be4f9f42e8c9d226fd755be0.tar.gz
edk2-587d204ccda4b507be4f9f42e8c9d226fd755be0.tar.bz2
edk2-587d204ccda4b507be4f9f42e8c9d226fd755be0.zip
NetworkPkg: Add RAM disk boot support to HTTP Boot driver.
This patch updates the HTTP Boot driver to support the download and boot a RAM disk image from HTTP server. The HTTP RAM disk boot is described in section 23.7 "HTTP Boot" in UEFI 2.6. HTTP server could provide either an UEFI image or a RAM disk image for the HTTP boot client to use. The RAM disk image must contain a UEFI compliant file system in it. HTTP boot driver will identify the image type either by the "Content-Type" entity header filed or by the file name extension as below: "application/efi" or *.efi -> EFI Image *.iso -> CD/DVD Image *.img -> Virtual Disk Image Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Diffstat (limited to 'NetworkPkg/HttpBootDxe/HttpBootDxe.h')
-rw-r--r--NetworkPkg/HttpBootDxe/HttpBootDxe.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
index b3e2576e1e..76b794321e 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h
+++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h
@@ -55,6 +55,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/Http.h>
#include <Protocol/Ip4Config2.h>
#include <Protocol/Ip6Config.h>
+#include <Protocol/RamDisk.h>
//
// Produced Protocols
//
@@ -71,6 +72,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define HTTP_BOOT_DXE_VERSION 0xa
//
+// Provisional Standard Media Types defined in
+// http://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml
+//
+#define HTTP_CONTENT_TYPE_APP_EFI "application/efi"
+
+//
// Protocol instances
//
extern EFI_DRIVER_BINDING_PROTOCOL gHttpBootDxeDriverBinding;
@@ -83,6 +90,13 @@ extern EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName;
typedef struct _HTTP_BOOT_PRIVATE_DATA HTTP_BOOT_PRIVATE_DATA;
typedef struct _HTTP_BOOT_VIRTUAL_NIC HTTP_BOOT_VIRTUAL_NIC;
+typedef enum {
+ ImageTypeEfi,
+ ImageTypeVirtualCd,
+ ImageTypeVirtualDisk,
+ ImageTypeMax
+} HTTP_BOOT_IMAGE_TYPE;
+
//
// Include files with internal function prototypes
//
@@ -166,6 +180,11 @@ struct _HTTP_BOOT_PRIVATE_DATA {
EFI_IP_ADDRESS GatewayIp;
EFI_IP_ADDRESS ServerIp;
UINT16 Port;
+
+ //
+ // The URI string attempt to download through HTTP, may point to
+ // the memory in cached DHCP offer, or to the memory in FilePathUri.
+ //
CHAR8 *BootFileUri;
VOID *BootFileUriParser;
UINTN BootFileSize;