diff options
author | RajithaY <rajithax.yerrumsetty@intel.com> | 2017-04-25 03:31:15 -0700 |
---|---|---|
committer | Rajitha Yerrumchetty <rajithax.yerrumsetty@intel.com> | 2017-05-22 06:48:08 +0000 |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/ipxe/src/image/embedded.c | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/ipxe/src/image/embedded.c')
-rw-r--r-- | qemu/roms/ipxe/src/image/embedded.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/qemu/roms/ipxe/src/image/embedded.c b/qemu/roms/ipxe/src/image/embedded.c deleted file mode 100644 index 48dd86851..000000000 --- a/qemu/roms/ipxe/src/image/embedded.c +++ /dev/null @@ -1,91 +0,0 @@ -/** @file - * - * Embedded image support - * - * Embedded images are images built into the iPXE binary and do not require - * fetching over the network. - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include <string.h> -#include <ipxe/image.h> -#include <ipxe/uaccess.h> -#include <ipxe/init.h> - -/* Raw image data for all embedded images */ -#undef EMBED -#define EMBED( _index, _path, _name ) \ - extern char embedded_image_ ## _index ## _data[]; \ - extern char embedded_image_ ## _index ## _len[]; \ - __asm__ ( ".section \".rodata\", \"a\", @progbits\n\t" \ - "\nembedded_image_" #_index "_data:\n\t" \ - ".incbin \"" _path "\"\n\t" \ - "\nembedded_image_" #_index "_end:\n\t" \ - ".equ embedded_image_" #_index "_len, " \ - "( embedded_image_" #_index "_end - " \ - " embedded_image_" #_index "_data )\n\t" \ - ".previous\n\t" ); -EMBED_ALL - -/* Image structures for all embedded images */ -#undef EMBED -#define EMBED( _index, _path, _name ) { \ - .refcnt = REF_INIT ( ref_no_free ), \ - .name = _name, \ - .data = ( userptr_t ) ( embedded_image_ ## _index ## _data ), \ - .len = ( size_t ) embedded_image_ ## _index ## _len, \ -}, -static struct image embedded_images[] = { - EMBED_ALL -}; - -/** - * Register all embedded images - */ -static void embedded_init ( void ) { - int i; - struct image *image; - void *data; - int rc; - - /* Skip if we have no embedded images */ - if ( ! sizeof ( embedded_images ) ) - return; - - /* Fix up data pointers and register images */ - for ( i = 0 ; i < ( int ) ( sizeof ( embedded_images ) / - sizeof ( embedded_images[0] ) ) ; i++ ) { - image = &embedded_images[i]; - - /* virt_to_user() cannot be used in a static - * initialiser, so we cast the pointer to a userptr_t - * in the initialiser and fix it up here. (This will - * actually be a no-op on most platforms.) - */ - data = ( ( void * ) image->data ); - image->data = virt_to_user ( data ); - - DBG ( "Embedded image \"%s\": %zd bytes at %p\n", - image->name, image->len, data ); - - if ( ( rc = register_image ( image ) ) != 0 ) { - DBG ( "Could not register embedded image \"%s\": " - "%s\n", image->name, strerror ( rc ) ); - return; - } - } - - /* Select the first image */ - image = &embedded_images[0]; - if ( ( rc = image_select ( image ) ) != 0 ) { - DBG ( "Could not select embedded image \"%s\": %s\n", - image->name, strerror ( rc ) ); - return; - } -} - -/** Embedded image initialisation function */ -struct init_fn embedded_init_fn __init_fn ( INIT_LATE ) = { - .initialise = embedded_init, -}; |