summaryrefslogtreecommitdiff
path: root/roms/ipxe/src/image/efi_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'roms/ipxe/src/image/efi_image.c')
-rw-r--r--roms/ipxe/src/image/efi_image.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/roms/ipxe/src/image/efi_image.c b/roms/ipxe/src/image/efi_image.c
index 47580c0db..b7d8f9c6e 100644
--- a/roms/ipxe/src/image/efi_image.c
+++ b/roms/ipxe/src/image/efi_image.c
@@ -29,12 +29,10 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_utils.h>
#include <ipxe/efi/efi_strings.h>
#include <ipxe/efi/efi_wrap.h>
-#include <ipxe/efi/efi_pxe.h>
#include <ipxe/image.h>
#include <ipxe/init.h>
#include <ipxe/features.h>
#include <ipxe/uri.h>
-#include <ipxe/console.h>
FEATURE ( FEATURE_IMAGE, "EFI", DHCP_EB_FEATURE_EFI, 1 );
@@ -74,7 +72,8 @@ efi_image_path ( struct image *image, EFI_DEVICE_PATH_PROTOCOL *parent ) {
size_t len;
/* Calculate device path lengths */
- prefix_len = efi_devpath_len ( parent );
+ end = efi_devpath_end ( parent );
+ prefix_len = ( ( void * ) end - ( void * ) parent );
name_len = strlen ( image->name );
filepath_len = ( SIZE_OF_FILEPATH_DEVICE_PATH +
( name_len + 1 /* NUL */ ) * sizeof ( wchar_t ) );
@@ -160,13 +159,6 @@ static int efi_image_exec ( struct image *image ) {
goto err_file_install;
}
- /* Install PXE base code protocol */
- if ( ( rc = efi_pxe_install ( snpdev->handle, snpdev->netdev ) ) != 0 ){
- DBGC ( image, "EFIIMAGE %p could not install PXE protocol: "
- "%s\n", image, strerror ( rc ) );
- goto err_pxe_install;
- }
-
/* Install iPXE download protocol */
if ( ( rc = efi_download_install ( snpdev->handle ) ) != 0 ) {
DBGC ( image, "EFIIMAGE %p could not install iPXE download "
@@ -237,9 +229,6 @@ static int efi_image_exec ( struct image *image ) {
/* Wrap calls made by the loaded image (for debugging) */
efi_wrap ( handle );
- /* Reset console since image will probably use it */
- console_reset();
-
/* Start the image */
if ( ( efirc = bs->StartImage ( handle, NULL, NULL ) ) != 0 ) {
rc = -EEFI_START ( efirc );
@@ -277,8 +266,6 @@ static int efi_image_exec ( struct image *image ) {
err_image_path:
efi_download_uninstall ( snpdev->handle );
err_download_install:
- efi_pxe_uninstall ( snpdev->handle );
- err_pxe_install:
efi_file_uninstall ( snpdev->handle );
err_file_install:
err_no_snpdev: