summaryrefslogtreecommitdiffstats
path: root/qemu/roms/ipxe/src/arch/x86_64/include/bits
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/roms/ipxe/src/arch/x86_64/include/bits')
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/byteswap.h47
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/compiler.h17
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/entropy.h12
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/hyperv.h75
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/linux_api.h6
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/nap.h12
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/profile.h29
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/reboot.h12
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/sanboot.h12
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/smbios.h10
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/stdint.h21
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/strings.h78
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/time.h12
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/timer.h10
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/uaccess.h10
-rw-r--r--qemu/roms/ipxe/src/arch/x86_64/include/bits/umalloc.h10
16 files changed, 0 insertions, 373 deletions
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/byteswap.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/byteswap.h
deleted file mode 100644
index d8c5098ef..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/byteswap.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H
-
-/** @file
- *
- * Byte-order swapping functions
- *
- */
-
-#include <stdint.h>
-
-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 %k0" : "=r" ( x ) : "0" ( x ) );
- return x;
-}
-
-static inline __attribute__ (( always_inline )) void
-__bswap_32s ( uint32_t *x ) {
- __asm__ ( "bswapl %k0" : "=r" ( *x ) : "0" ( *x ) );
-}
-
-static inline __attribute__ (( always_inline, const )) uint64_t
-__bswap_variable_64 ( uint64_t x ) {
- __asm__ ( "bswapq %q0" : "=r" ( x ) : "0" ( x ) );
- return x;
-}
-
-static inline __attribute__ (( always_inline )) void
-__bswap_64s ( uint64_t *x ) {
- __asm__ ( "bswapq %q0" : "=r" ( *x ) : "0" ( *x ) );
-}
-
-#endif /* _BITS_BYTESWAP_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/compiler.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/compiler.h
deleted file mode 100644
index f70b2e517..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/compiler.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _BITS_COMPILER_H
-#define _BITS_COMPILER_H
-
-/** Dummy relocation type */
-#define RELOC_TYPE_NONE R_X86_64_NONE
-
-#ifndef ASSEMBLY
-
-/** Declare a function with standard calling conventions */
-#define __asmcall __attribute__ (( regparm(0) ))
-
-/** Declare a function with libgcc implicit linkage */
-#define __libgcc
-
-#endif /* ASSEMBLY */
-
-#endif /* _BITS_COMPILER_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/entropy.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/entropy.h
deleted file mode 100644
index a9b3bc10e..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/entropy.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_ENTROPY_H
-#define _BITS_ENTROPY_H
-
-/** @file
- *
- * x86_64-specific entropy API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_ENTROPY_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/hyperv.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/hyperv.h
deleted file mode 100644
index 845c182f7..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/hyperv.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _BITS_HYPERV_H
-#define _BITS_HYPERV_H
-
-/** @file
- *
- * Hyper-V interface
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stddef.h>
-#include <stdint.h>
-#include <ipxe/io.h>
-
-/**
- * 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;
- register uint64_t rcx asm ( "rcx" );
- register uint64_t rdx asm ( "rdx" );
- register uint64_t r8 asm ( "r8" );
- uint64_t in_phys;
- uint64_t out_phys;
- 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 ) );
- rcx = code;
- rdx = in_phys;
- r8 = out_phys;
- __asm__ __volatile__ ( "call *%4"
- : "=a" ( result ), "+r" ( rcx ), "+r" ( rdx ),
- "+r" ( r8 )
- : "m" ( hypercall )
- : "r9", "r10", "r11", "xmm0", "xmm1", "xmm2",
- "xmm3", "xmm4", "xmm5" );
- 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 {
- uint64_t qword[ ( bit / 64 ) + 1 ];
- } *qwords = bits;
-
- /* Set bit using "lock bts". Inform compiler that any memory
- * from the start of the bit field up to and including the
- * qword 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" ( *qwords ) : "Ir" ( bit ) );
-}
-
-#endif /* _BITS_HYPERV_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/linux_api.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/linux_api.h
deleted file mode 100644
index 589fb5808..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/linux_api.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _X86_64_LINUX_API_H
-#define _X86_64_LINUX_API_H
-
-#define __SYSCALL_mmap __NR_mmap
-
-#endif /* _X86_64_LINUX_API_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/nap.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/nap.h
deleted file mode 100644
index 8b42c0a4a..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/nap.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_NAP_H
-#define _BITS_NAP_H
-
-/** @file
- *
- * x86_64-specific CPU sleeping API implementations
- *
- */
-
-#include <ipxe/efi/efix86_nap.h>
-
-#endif /* _BITS_MAP_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/profile.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/profile.h
deleted file mode 100644
index b7c74fbe7..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/profile.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _BITS_PROFILE_H
-#define _BITS_PROFILE_H
-
-/** @file
- *
- * Profiling
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#include <stdint.h>
-
-/**
- * Get profiling timestamp
- *
- * @ret timestamp Timestamp
- */
-static inline __attribute__ (( always_inline )) uint64_t
-profile_timestamp ( void ) {
- uint32_t eax;
- uint32_t edx;
-
- /* Read timestamp counter */
- __asm__ __volatile__ ( "rdtsc" : "=a" ( eax ), "=d" ( edx ) );
- return ( ( ( ( uint64_t ) edx ) << 32 ) | eax );
-}
-
-#endif /* _BITS_PROFILE_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/reboot.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/reboot.h
deleted file mode 100644
index f9bcd6a7b..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/reboot.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_REBOOT_H
-#define _BITS_REBOOT_H
-
-/** @file
- *
- * x86_64-specific reboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_REBOOT_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/sanboot.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/sanboot.h
deleted file mode 100644
index dcab830f6..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/sanboot.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_SANBOOT_H
-#define _BITS_SANBOOT_H
-
-/** @file
- *
- * x86_64-specific sanboot API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_SANBOOT_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/smbios.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/smbios.h
deleted file mode 100644
index 2f0118d02..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/smbios.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _BITS_SMBIOS_H
-#define _BITS_SMBIOS_H
-
-/** @file
- *
- * i386-specific SMBIOS API implementations
- *
- */
-
-#endif /* _BITS_SMBIOS_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/stdint.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/stdint.h
deleted file mode 100644
index 9eb72e9c4..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/stdint.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _BITS_STDINT_H
-#define _BITS_STDINT_H
-
-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/x86_64/include/bits/strings.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/strings.h
deleted file mode 100644
index 3b7911f3b..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/strings.h
+++ /dev/null
@@ -1,78 +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 __ffsll ( long long value ){
- long 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__ ( "bsfq %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 __ffsl ( long value ) {
-
- return __ffsll ( value );
-}
-
-/**
- * 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 ){
- long 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__ ( "bsrq %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 __flsl ( long value ) {
-
- return __flsll ( value );
-}
-
-#endif /* _BITS_STRINGS_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/time.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/time.h
deleted file mode 100644
index aa74fac8c..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/time.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H
-
-/** @file
- *
- * x86_64-specific time API implementations
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-
-#endif /* _BITS_TIME_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/timer.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/timer.h
deleted file mode 100644
index dfa6c270c..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/timer.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _BITS_TIMER_H
-#define _BITS_TIMER_H
-
-/** @file
- *
- * x86_64-specific timer API implementations
- *
- */
-
-#endif /* _BITS_TIMER_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/uaccess.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/uaccess.h
deleted file mode 100644
index 455829242..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/uaccess.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _BITS_UACCESS_H
-#define _BITS_UACCESS_H
-
-/** @file
- *
- * x86_64-specific user access API implementations
- *
- */
-
-#endif /* _BITS_UACCESS_H */
diff --git a/qemu/roms/ipxe/src/arch/x86_64/include/bits/umalloc.h b/qemu/roms/ipxe/src/arch/x86_64/include/bits/umalloc.h
deleted file mode 100644
index 12bf949d1..000000000
--- a/qemu/roms/ipxe/src/arch/x86_64/include/bits/umalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _BITS_UMALLOC_H
-#define _BITS_UMALLOC_H
-
-/** @file
- *
- * x86_64-specific user memory allocation API implementations
- *
- */
-
-#endif /* _BITS_UMALLOC_H */