summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shim.c b/shim.c
index b562bcd5..eafbfa33 100644
--- a/shim.c
+++ b/shim.c
@@ -39,6 +39,7 @@
#include "PeImage.h"
#include "shim.h"
#include "netboot.h"
+#include "httpboot.h"
#include "shim_cert.h"
#include "replacements.h"
#include "tpm.h"
@@ -1722,6 +1723,17 @@ EFI_STATUS start_image(EFI_HANDLE image_handle, CHAR16 *ImagePath)
}
data = sourcebuffer;
datasize = sourcesize;
+#if defined(ENABLE_HTTPBOOT)
+ } else if (find_httpboot(li->DeviceHandle)) {
+ efi_status = httpboot_fetch_buffer (image_handle, &sourcebuffer,
+ &sourcesize);
+ if (efi_status != EFI_SUCCESS) {
+ perror(L"Unable to fetch HTTP image: %r\n", efi_status);
+ return efi_status;
+ }
+ data = sourcebuffer;
+ datasize = sourcesize;
+#endif
} else {
/*
* Read the new executable off disk