44 #define PROFILE_COUNT 4096 87 :
"=a" ( timestamp_lo ),
91 if (
sizeof (
timestamp ) >
sizeof ( timestamp_lo ) )
111 :
"=a" (
stopped ),
"=d" ( discard_d ),
#define VIRT_CALL(function)
Call C function from real-mode code.
unsigned long long uint64_t
Self-test infrastructure.
const char * name
Test set name.
A data structure for storing profiling information.
static void profile_stop(struct profiler *profiler)
Stop profiling.
static struct profiler p2r_profiler __profiler
Protected-to-real mode transition profiler.
static void profile_stop_at(struct profiler *profiler, unsigned long stopped)
Stop profiling.
static int started
"startup() has been called" flag
#define __asmcall
Declare a function with standard calling conventions.
struct self_test librm_test __self_test
Real mode transition self-test.
#define __used
Declare a function as used.
static __asmcall __used void librm_test_call(struct i386_all_regs *ix86 __unused)
Dummy function for profiling tests.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define PROFILE_COUNT
Number of sample iterations for profiling.
uint64_t timestamp
Timestamp.
static void profile_start(struct profiler *profiler)
Start profiling.
REQUIRING_SYMBOL(librm_test)
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
#define __unused
Declare a variable or data structure as unused.
static void profile_start_at(struct profiler *profiler, unsigned long started)
Start profiling.
__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 void librm_test_exec(void)
Perform real mode transition self-tests.
#define REAL_CODE(asm_code_str)
unsigned long stopped
Stop timestamp.