60#define PIO_THRESHOLD 0x10000
68#define X86_IOREADX( _api_func, _suffix, _type ) \
69static _type x86_ ## _api_func ( volatile _type *io_addr ) { \
70 if ( ( ( intptr_t ) io_addr ) < PIO_THRESHOLD ) { \
71 return in ## _suffix ( io_addr ); \
73 return read ## _suffix ( io_addr ); \
86#define X86_IOWRITEX( _api_func, _suffix, _type ) \
87static void x86_ ## _api_func ( _type data, volatile _type *io_addr ) { \
88 if ( ( ( intptr_t ) io_addr ) < PIO_THRESHOLD ) { \
89 out ## _suffix ( data, io_addr ); \
91 write ## _suffix ( data, io_addr ); \
110 "movq (%1), %%mm0\n\t"
111 "movq %%mm0, (%%esp)\n\t"
115 :
"=A" (
data ) :
"r" ( io_addr ) );
130 "movq (%%esp), %%mm0\n\t"
131 "movq %%mm0, (%1)\n\t"
135 : :
"A" (
data ),
"r" ( io_addr ) );
__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))
unsigned long long uint64_t
uint8_t data[48]
Additional event data.
#define __unused
Declare a variable or data structure as unused.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define outb(data, io_addr)
#define ioread16(io_addr)
void mb(void)
Memory barrier.
#define outw(data, io_addr)
unsigned long phys_to_bus(unsigned long phys_addr)
Convert physical address to a bus address.
#define insw(io_addr, data, count)
#define outl(data, io_addr)
void iodelay(void)
Slow down I/O.
#define outsl(io_addr, data, count)
#define insb(io_addr, data, count)
#define PROVIDE_IOAPI(_subsys, _api_func, _func)
Provide an I/O API implementation.
unsigned long bus_to_phys(unsigned long bus_addr)
Convert bus address to a physical address.
#define insl(io_addr, data, count)
#define outsw(io_addr, data, count)
#define outsb(io_addr, data, count)
#define ioread32(io_addr)
#define iowrite8(data, io_addr)
#define iowrite16(data, io_addr)
#define writeq(data, io_addr)
#define PROVIDE_IOAPI_INLINE(_subsys, _api_func)
Provide a static inline I/O API implementation.
#define iowrite32(data, io_addr)
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
static __unused void i386_writeq(uint64_t data, volatile uint64_t *io_addr)
Write 64-bit qword to memory-mapped device.
static __unused uint64_t i386_readq(volatile uint64_t *io_addr)
Read 64-bit qword from memory-mapped device.
#define X86_IOREADX(_api_func, _suffix, _type)
Read from I/O-mapped or memory-mapped device.
#define X86_IOWRITEX(_api_func, _suffix, _type)
Write to I/O-mapped or memory-mapped device.