From bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 Mon Sep 17 00:00:00 2001 From: RajithaY Date: Tue, 25 Apr 2017 03:31:15 -0700 Subject: 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 --- .../ipxe/src/arch/i386/include/bits/byteswap.h | 70 ---------------- .../ipxe/src/arch/i386/include/bits/compiler.h | 41 ---------- .../roms/ipxe/src/arch/i386/include/bits/entropy.h | 14 ---- qemu/roms/ipxe/src/arch/i386/include/bits/hyperv.h | 72 ----------------- .../ipxe/src/arch/i386/include/bits/linux_api.h | 6 -- qemu/roms/ipxe/src/arch/i386/include/bits/nap.h | 15 ---- .../roms/ipxe/src/arch/i386/include/bits/profile.h | 28 ------- qemu/roms/ipxe/src/arch/i386/include/bits/reboot.h | 14 ---- .../roms/ipxe/src/arch/i386/include/bits/sanboot.h | 14 ---- qemu/roms/ipxe/src/arch/i386/include/bits/smbios.h | 14 ---- qemu/roms/ipxe/src/arch/i386/include/bits/stdint.h | 23 ------ .../roms/ipxe/src/arch/i386/include/bits/strings.h | 94 ---------------------- qemu/roms/ipxe/src/arch/i386/include/bits/time.h | 14 ---- qemu/roms/ipxe/src/arch/i386/include/bits/timer.h | 15 ---- .../roms/ipxe/src/arch/i386/include/bits/uaccess.h | 14 ---- .../roms/ipxe/src/arch/i386/include/bits/umalloc.h | 14 ---- 16 files changed, 462 deletions(-) delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/byteswap.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/compiler.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/entropy.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/hyperv.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/linux_api.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/nap.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/profile.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/reboot.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/sanboot.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/smbios.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/stdint.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/strings.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/time.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/timer.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/uaccess.h delete mode 100644 qemu/roms/ipxe/src/arch/i386/include/bits/umalloc.h (limited to 'qemu/roms/ipxe/src/arch/i386/include/bits') diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/byteswap.h b/qemu/roms/ipxe/src/arch/i386/include/bits/byteswap.h deleted file mode 100644 index 53b6a454d..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/byteswap.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _BITS_BYTESWAP_H -#define _BITS_BYTESWAP_H - -/** @file - * - * Byte-order swapping functions - * - */ - -#include - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -static inline __attribute__ (( always_inline, const )) uint16_t -__bswap_variable_16 ( uint16_t x ) { - __asm__ ( "xchgb %b0,%h0" : "=q" ( x ) : "0" ( x ) ); - return x; -} - -static inline __attribute__ (( always_inline )) void -__bswap_16s ( uint16_t *x ) { - __asm__ ( "rorw $8, %0" : "+m" ( *x ) ); -} - -static inline __attribute__ (( always_inline, const )) uint32_t -__bswap_variable_32 ( uint32_t x ) { - __asm__ ( "bswapl %0" : "=r" ( x ) : "0" ( x ) ); - return x; -} - -static inline __attribute__ (( always_inline )) void -__bswap_32s ( uint32_t *x ) { - __asm__ ( "bswapl %0" : "=r" ( *x ) : "0" ( *x ) ); -} - -static inline __attribute__ (( always_inline, const )) uint64_t -__bswap_variable_64 ( uint64_t x ) { - uint32_t in_high = ( x >> 32 ); - uint32_t in_low = ( x & 0xffffffffUL ); - uint32_t out_high; - uint32_t out_low; - - __asm__ ( "bswapl %0\n\t" - "bswapl %1\n\t" - "xchgl %0,%1\n\t" - : "=r" ( out_high ), "=r" ( out_low ) - : "0" ( in_high ), "1" ( in_low ) ); - - return ( ( ( ( uint64_t ) out_high ) << 32 ) | - ( ( uint64_t ) out_low ) ); -} - -static inline __attribute__ (( always_inline )) void -__bswap_64s ( uint64_t *x ) { - struct { - uint32_t __attribute__ (( may_alias )) low; - uint32_t __attribute__ (( may_alias )) high; - } __attribute__ (( may_alias )) *dwords = ( ( void * ) x ); - uint32_t discard; - - __asm__ ( "movl %0,%2\n\t" - "bswapl %2\n\t" - "xchgl %2,%1\n\t" - "bswapl %2\n\t" - "movl %2,%0\n\t" - : "+m" ( dwords->low ), "+m" ( dwords->high ), - "=r" ( discard ) ); -} - -#endif /* _BITS_BYTESWAP_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/compiler.h b/qemu/roms/ipxe/src/arch/i386/include/bits/compiler.h deleted file mode 100644 index 87201135f..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/compiler.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _BITS_COMPILER_H -#define _BITS_COMPILER_H - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -/** Dummy relocation type */ -#define RELOC_TYPE_NONE R_386_NONE - -#ifndef ASSEMBLY - -/** Declare a function with standard calling conventions */ -#define __asmcall __attribute__ (( cdecl, regparm(0) )) - -/** - * Declare a function with libgcc implicit linkage - * - * It seems as though gcc expects its implicit arithmetic functions to - * be cdecl, even if -mrtd is specified. This is somewhat - * inconsistent; for example, if -mregparm=3 is used then the implicit - * functions do become regparm(3). - * - * The implicit calls to memcpy() and memset() which gcc can generate - * do not seem to have this inconsistency; -mregparm and -mrtd affect - * them in the same way as any other function. - * - * Update (25/4/14): it appears that more recent gcc versions do allow - * -mrtd to affect calls to the implicit arithmetic functions. There - * is nothing obvious in the gcc changelogs to indicate precisely when - * this happened. From experimentation with available gcc versions, - * the change occurred sometime between v4.6.3 and v4.7.2. We assume - * that only versions up to v4.6.x require the special treatment. - */ -#if ( __GNUC__ < 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ <= 6 ) ) -#define __libgcc __attribute__ (( cdecl )) -#else -#define __libgcc -#endif - -#endif /* ASSEMBLY */ - -#endif /* _BITS_COMPILER_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/entropy.h b/qemu/roms/ipxe/src/arch/i386/include/bits/entropy.h deleted file mode 100644 index bfeb5e3b5..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/entropy.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_ENTROPY_H -#define _BITS_ENTROPY_H - -/** @file - * - * i386-specific entropy API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_ENTROPY_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/hyperv.h b/qemu/roms/ipxe/src/arch/i386/include/bits/hyperv.h deleted file mode 100644 index 3565c8a83..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/hyperv.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _BITS_HYPERV_H -#define _BITS_HYPERV_H - -/** @file - * - * Hyper-V interface - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include -#include -#include - -/** - * Issue hypercall - * - * @v hv Hyper-V hypervisor - * @v code Call code - * @v in Input parameters - * @v out Output parameters - * @ret status Status code - */ -static inline __attribute__ (( always_inline )) int -hv_call ( struct hv_hypervisor *hv, unsigned int code, const void *in, - void *out ) { - void *hypercall = hv->hypercall; - uint32_t in_phys; - uint32_t out_phys; - uint32_t discard_ecx; - uint32_t discard_edx; - uint16_t result; - - in_phys = ( ( __builtin_constant_p ( in ) && ( in == NULL ) ) - ? 0 : virt_to_phys ( in ) ); - out_phys = ( ( __builtin_constant_p ( out ) && ( out == NULL ) ) - ? 0 : virt_to_phys ( out ) ); - __asm__ __volatile__ ( "call *%9" - : "=a" ( result ), "=c" ( discard_ecx ), - "=d" ( discard_edx ) - : "d" ( 0 ), "a" ( code ), - "b" ( 0 ), "c" ( in_phys ), - "D" ( 0 ), "S" ( out_phys ), - "m" ( hypercall ) ); - return result; -} - -/** - * Set bit atomically - * - * @v bits Bit field - * @v bit Bit to set - */ -static inline __attribute__ (( always_inline )) void -hv_set_bit ( void *bits, unsigned int bit ) { - struct { - uint32_t dword[ ( bit / 32 ) + 1 ]; - } *dwords = bits; - - /* Set bit using "lock bts". Inform compiler that any memory - * from the start of the bit field up to and including the - * dword containing this bit may be modified. (This is - * overkill but shouldn't matter in practice since we're - * unlikely to subsequently read other bits from the same bit - * field.) - */ - __asm__ __volatile__ ( "lock bts %1, %0" - : "+m" ( *dwords ) : "Ir" ( bit ) ); -} - -#endif /* _BITS_HYPERV_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/linux_api.h b/qemu/roms/ipxe/src/arch/i386/include/bits/linux_api.h deleted file mode 100644 index dc6e7416e..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/linux_api.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _I386_LINUX_API_H -#define _I386_LINUX_API_H - -#define __SYSCALL_mmap __NR_mmap2 - -#endif /* _I386_LINUX_API_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/nap.h b/qemu/roms/ipxe/src/arch/i386/include/bits/nap.h deleted file mode 100644 index e8bcfd13b..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/nap.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _BITS_NAP_H -#define _BITS_NAP_H - -/** @file - * - * i386-specific CPU sleeping API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include -#include - -#endif /* _BITS_MAP_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/profile.h b/qemu/roms/ipxe/src/arch/i386/include/bits/profile.h deleted file mode 100644 index e184d7b51..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/profile.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _BITS_PROFILE_H -#define _BITS_PROFILE_H - -/** @file - * - * Profiling - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -/** - * Get profiling timestamp - * - * @ret timestamp Timestamp - */ -static inline __attribute__ (( always_inline )) uint64_t -profile_timestamp ( void ) { - uint64_t tsc; - - /* Read timestamp counter */ - __asm__ __volatile__ ( "rdtsc" : "=A" ( tsc ) ); - return tsc; -} - -#endif /* _BITS_PROFILE_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/reboot.h b/qemu/roms/ipxe/src/arch/i386/include/bits/reboot.h deleted file mode 100644 index 803dacfe4..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/reboot.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_REBOOT_H -#define _BITS_REBOOT_H - -/** @file - * - * i386-specific reboot API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_REBOOT_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/sanboot.h b/qemu/roms/ipxe/src/arch/i386/include/bits/sanboot.h deleted file mode 100644 index f02d2e649..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/sanboot.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_SANBOOT_H -#define _BITS_SANBOOT_H - -/** @file - * - * i386-specific sanboot API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_SANBOOT_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/smbios.h b/qemu/roms/ipxe/src/arch/i386/include/bits/smbios.h deleted file mode 100644 index 2ab31e74b..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/smbios.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_SMBIOS_H -#define _BITS_SMBIOS_H - -/** @file - * - * i386-specific SMBIOS API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_SMBIOS_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/stdint.h b/qemu/roms/ipxe/src/arch/i386/include/bits/stdint.h deleted file mode 100644 index fe1f9946a..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/stdint.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _BITS_STDINT_H -#define _BITS_STDINT_H - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -typedef __SIZE_TYPE__ size_t; -typedef signed long ssize_t; -typedef signed long off_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long long uint64_t; - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; -typedef signed long long int64_t; - -typedef unsigned long physaddr_t; -typedef unsigned long intptr_t; - -#endif /* _BITS_STDINT_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/strings.h b/qemu/roms/ipxe/src/arch/i386/include/bits/strings.h deleted file mode 100644 index 453545f00..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/strings.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _BITS_STRINGS_H -#define _BITS_STRINGS_H - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -/** - * Find first (i.e. least significant) set bit - * - * @v value Value - * @ret lsb Least significant bit set in value (LSB=1), or zero - */ -static inline __attribute__ (( always_inline )) int __ffsl ( long value ) { - long lsb_minus_one; - - /* If the input value is zero, the BSF instruction returns - * ZF=0 and leaves an undefined value in the output register. - * Perform this check in C rather than asm so that it can be - * omitted in cases where the compiler is able to prove that - * the input is non-zero. - */ - if ( value ) { - __asm__ ( "bsfl %1, %0" - : "=r" ( lsb_minus_one ) - : "rm" ( value ) ); - return ( lsb_minus_one + 1 ); - } else { - return 0; - } -} - -/** - * Find first (i.e. least significant) set bit - * - * @v value Value - * @ret lsb Least significant bit set in value (LSB=1), or zero - */ -static inline __attribute__ (( always_inline )) int __ffsll ( long long value ){ - unsigned long high = ( value >> 32 ); - unsigned long low = ( value >> 0 ); - - if ( low ) { - return ( __ffsl ( low ) ); - } else if ( high ) { - return ( 32 + __ffsl ( high ) ); - } else { - return 0; - } -} - -/** - * Find last (i.e. most significant) set bit - * - * @v value Value - * @ret msb Most significant bit set in value (LSB=1), or zero - */ -static inline __attribute__ (( always_inline )) int __flsl ( long value ) { - long msb_minus_one; - - /* If the input value is zero, the BSR instruction returns - * ZF=0 and leaves an undefined value in the output register. - * Perform this check in C rather than asm so that it can be - * omitted in cases where the compiler is able to prove that - * the input is non-zero. - */ - if ( value ) { - __asm__ ( "bsrl %1, %0" - : "=r" ( msb_minus_one ) - : "rm" ( value ) ); - return ( msb_minus_one + 1 ); - } else { - return 0; - } -} - -/** - * Find last (i.e. most significant) set bit - * - * @v value Value - * @ret msb Most significant bit set in value (LSB=1), or zero - */ -static inline __attribute__ (( always_inline )) int __flsll ( long long value ){ - unsigned long high = ( value >> 32 ); - unsigned long low = ( value >> 0 ); - - if ( high ) { - return ( 32 + __flsl ( high ) ); - } else if ( low ) { - return ( __flsl ( low ) ); - } else { - return 0; - } -} - -#endif /* _BITS_STRINGS_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/time.h b/qemu/roms/ipxe/src/arch/i386/include/bits/time.h deleted file mode 100644 index 6a5d63d32..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/time.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_TIME_H -#define _BITS_TIME_H - -/** @file - * - * i386-specific time API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_TIME_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/timer.h b/qemu/roms/ipxe/src/arch/i386/include/bits/timer.h deleted file mode 100644 index f7d86d78c..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/timer.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _BITS_TIMER_H -#define _BITS_TIMER_H - -/** @file - * - * i386-specific timer API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include -#include - -#endif /* _BITS_TIMER_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/uaccess.h b/qemu/roms/ipxe/src/arch/i386/include/bits/uaccess.h deleted file mode 100644 index aac09ba95..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/uaccess.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_UACCESS_H -#define _BITS_UACCESS_H - -/** @file - * - * i386-specific user access API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_UACCESS_H */ diff --git a/qemu/roms/ipxe/src/arch/i386/include/bits/umalloc.h b/qemu/roms/ipxe/src/arch/i386/include/bits/umalloc.h deleted file mode 100644 index 113f16fd1..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/bits/umalloc.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _BITS_UMALLOC_H -#define _BITS_UMALLOC_H - -/** @file - * - * i386-specific user memory allocation API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#include - -#endif /* _BITS_UMALLOC_H */ -- cgit 1.2.3-korg