mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
userland: freestanding gem5 checkpoint restore examples
This commit is contained in:
10
lkmc/m5ops.h
10
lkmc/m5ops.h
@@ -14,11 +14,11 @@
|
||||
* D means RDI which is the first argument of a Linux C function call,
|
||||
* and S means RSI is the second one: these are also used by gem5 as arguments of the m5ops.
|
||||
*/
|
||||
#define LKMC_M5OPS_CHECKPOINT_ASM mov $0, %%rdi; mov $0, %%rsi; .word 0x040F; .word 0x0043
|
||||
#define LKMC_M5OPS_DUMPSTATS_ASM mov $0, %%rdi; mov $0, %%rsi; .word 0x040F; .word 0x0041
|
||||
#define LKMC_M5OPS_EXIT_ASM mov $0, %%rdi; .word 0x040F; .word 0x0021
|
||||
#define LKMC_M5OPS_FAIL_1_ASM mov $0, %%rdi; mov $1, %%rsi; .word 0x040F; .word 0x0022
|
||||
#define LKMC_M5OPS_RESETSTATS_ASM mov $0, %%rdi; mov $0, %%rsi; .word 0x040F; .word 0x0040
|
||||
#define LKMC_M5OPS_CHECKPOINT_ASM mov $0, %rdi; mov $0, %rsi; .word 0x040F; .word 0x0043
|
||||
#define LKMC_M5OPS_DUMPSTATS_ASM mov $0, %rdi; mov $0, %rsi; .word 0x040F; .word 0x0041
|
||||
#define LKMC_M5OPS_EXIT_ASM mov $0, %rdi; .word 0x040F; .word 0x0021
|
||||
#define LKMC_M5OPS_FAIL_1_ASM mov $0, %rdi; mov $1, %rsi; .word 0x040F; .word 0x0022
|
||||
#define LKMC_M5OPS_RESETSTATS_ASM mov $0, %rdi; mov $0, %rsi; .word 0x040F; .word 0x0040
|
||||
|
||||
#define LKMC_M5OPS_CHECKPOINT __asm__ __volatile__ (".word 0x040F; .word 0x0043;" : : "D" (0), "S" (0) :)
|
||||
#define LKMC_M5OPS_DUMPSTATS __asm__ __volatile__ (".word 0x040F; .word 0x0041;" : : "D" (0), "S" (0) :)
|
||||
|
||||
Reference in New Issue
Block a user