summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/m5/m5.c14
-rw-r--r--util/m5/m5op.h31
-rw-r--r--util/m5/m5op_alpha.S28
-rw-r--r--util/m5/m5op_sparc.S48
-rw-r--r--util/m5/m5op_x86.S30
5 files changed, 76 insertions, 75 deletions
diff --git a/util/m5/m5.c b/util/m5/m5.c
index bd39041d3..5b6c7a6aa 100644
--- a/util/m5/m5.c
+++ b/util/m5/m5.c
@@ -117,7 +117,7 @@ read_file(int dest_fid)
// Linux does demand paging.
memset(buf, 0, sizeof(buf));
- while ((len = m5_readfile(buf, sizeof(buf), offset)) > 0) {
+ while ((len = m5_read_file(buf, sizeof(buf), offset)) > 0) {
uint8_t *base = buf;
offset += len;
do {
@@ -158,7 +158,7 @@ write_file(const char *filename)
memset(buf, 0, sizeof(buf));
while ((len = read(src_fid, buf, sizeof(buf))) > 0) {
- bytes += m5_writefile(buf, len, offset, filename);
+ bytes += m5_write_file(buf, len, offset, filename);
offset += len;
}
fprintf(stderr, "written %d bytes\n", bytes);
@@ -209,7 +209,7 @@ do_dump_reset_stats(int argc, char *argv[])
{
uint64_t ints[2];
parse_int_args(argc, argv, ints, 2);
- m5_dumpreset_stats(ints[0], ints[1]);
+ m5_dump_reset_stats(ints[0], ints[1]);
}
void
@@ -265,7 +265,7 @@ do_addsymbol(int argc, char *argv[])
uint64_t addr = strtoul(argv[0], NULL, 0);
char *symbol = argv[1];
- m5_addsymbol(addr, symbol);
+ m5_add_symbol(addr, symbol);
}
@@ -275,7 +275,7 @@ do_loadsymbol(int argc, char *argv[])
if (argc > 0)
usage();
- m5_loadsymbol();
+ m5_load_symbol();
}
void
@@ -286,7 +286,7 @@ do_initparam(int argc, char *argv[])
uint64_t key_str[2];
parse_str_args_to_regs(argc, argv, key_str, 2);
- uint64_t val = m5_initparam(key_str[0], key_str[1]);
+ uint64_t val = m5_init_param(key_str[0], key_str[1]);
printf("%"PRIu64, val);
}
@@ -296,7 +296,7 @@ do_sw99param(int argc, char *argv[])
if (argc != 0)
usage();
- uint64_t param = m5_initparam(0, 0);
+ uint64_t param = m5_init_param(0, 0);
// run-time, rampup-time, rampdown-time, warmup-time, connections
printf("%"PRId64" %"PRId64" %"PRId64" %"PRId64" %"PRId64,
diff --git a/util/m5/m5op.h b/util/m5/m5op.h
index f2d85fe97..3a507e164 100644
--- a/util/m5/m5op.h
+++ b/util/m5/m5op.h
@@ -38,27 +38,28 @@ extern "C" {
#include <stdint.h>
-void arm(uint64_t address);
-void quiesce(void);
-void quiesceNs(uint64_t ns);
-void quiesceCycle(uint64_t cycles);
-uint64_t quiesceTime(void);
-uint64_t rpns();
-void wakeCPU(uint64_t cpuid);
+void m5_arm(uint64_t address);
+void m5_quiesce(void);
+void m5_quiesce_ns(uint64_t ns);
+void m5_quiesce_cycle(uint64_t cycles);
+uint64_t m5_quiesce_time(void);
+uint64_t m5_rpns();
+void m5_wake_cpu(uint64_t cpuid);
void m5_exit(uint64_t ns_delay);
void m5_fail(uint64_t ns_delay, uint64_t code);
-uint64_t m5_initparam(uint64_t key_str1, uint64_t key_str2);
+uint64_t m5_init_param(uint64_t key_str1, uint64_t key_str2);
void m5_checkpoint(uint64_t ns_delay, uint64_t ns_period);
void m5_reset_stats(uint64_t ns_delay, uint64_t ns_period);
void m5_dump_stats(uint64_t ns_delay, uint64_t ns_period);
-void m5_dumpreset_stats(uint64_t ns_delay, uint64_t ns_period);
-uint64_t m5_readfile(void *buffer, uint64_t len, uint64_t offset);
-uint64_t m5_writefile(void *buffer, uint64_t len, uint64_t offset, const char *filename);
-void m5_debugbreak(void);
-void m5_switchcpu(void);
-void m5_togglesync(void);
-void m5_addsymbol(uint64_t addr, char *symbol);
+void m5_dump_reset_stats(uint64_t ns_delay, uint64_t ns_period);
+uint64_t m5_read_file(void *buffer, uint64_t len, uint64_t offset);
+uint64_t m5_write_file(void *buffer, uint64_t len, uint64_t offset,
+ const char *filename);
+void m5_debug_break(void);
+void m5_switch_cpu(void);
+void m5_dist_toggle_sync(void);
+void m5_add_symbol(uint64_t addr, char *symbol);
void m5_loadsymbol();
void m5_panic(void);
void m5_work_begin(uint64_t workid, uint64_t threadid);
diff --git a/util/m5/m5op_alpha.S b/util/m5/m5op_alpha.S
index 91e1d5353..ad8875017 100644
--- a/util/m5/m5op_alpha.S
+++ b/util/m5/m5op_alpha.S
@@ -94,24 +94,24 @@ func:
.set noreorder
-SIMPLE_OP(arm, ARM(16))
-SIMPLE_OP(quiesce, QUIESCE)
-SIMPLE_OP(quiesceNs, QUIESCENS(16))
-SIMPLE_OP(quiesceCycle, QUIESCECYC(16))
-SIMPLE_OP(quiesceTime, QUIESCETIME)
-SIMPLE_OP(rpns, RPNS)
-SIMPLE_OP(wakeCPU, WAKE_CPU(16))
+SIMPLE_OP(m5_arm, ARM(16))
+SIMPLE_OP(m5_quiesce, QUIESCE)
+SIMPLE_OP(m5_quiesce_ns, QUIESCENS(16))
+SIMPLE_OP(m5_quiesce_cycle, QUIESCECYC(16))
+SIMPLE_OP(m5_quiesce_time, QUIESCETIME)
+SIMPLE_OP(m5_rpns, RPNS)
+SIMPLE_OP(m5_wake_cpu, WAKE_CPU(16))
SIMPLE_OP(m5_exit, M5EXIT(16))
-SIMPLE_OP(m5_initparam, INITPARAM(0))
-SIMPLE_OP(m5_loadsymbol, LOADSYMBOL(0))
+SIMPLE_OP(m5_init_param, INITPARAM(0))
+SIMPLE_OP(m5_load_symbol, LOADSYMBOL(0))
SIMPLE_OP(m5_reset_stats, RESET_STATS(16, 17))
SIMPLE_OP(m5_dump_stats, DUMP_STATS(16, 17))
-SIMPLE_OP(m5_dumpreset_stats, DUMPRST_STATS(16, 17))
+SIMPLE_OP(m5_dump_reset_stats, DUMPRST_STATS(16, 17))
SIMPLE_OP(m5_checkpoint, CHECKPOINT(16, 17))
-SIMPLE_OP(m5_readfile, READFILE)
-SIMPLE_OP(m5_debugbreak, DEBUGBREAK)
-SIMPLE_OP(m5_switchcpu, SWITCHCPU)
-SIMPLE_OP(m5_addsymbol, ADDSYMBOL(16, 17))
+SIMPLE_OP(m5_read_file, READFILE)
+SIMPLE_OP(m5_debug_break, DEBUGBREAK)
+SIMPLE_OP(m5_switch_cpu, SWITCHCPU)
+SIMPLE_OP(m5_add_symbol, ADDSYMBOL(16, 17))
SIMPLE_OP(m5_panic, PANIC)
SIMPLE_OP(m5a_bsm, AN_BSM)
diff --git a/util/m5/m5op_sparc.S b/util/m5/m5op_sparc.S
index ba8f6841f..1a4f5bb89 100644
--- a/util/m5/m5op_sparc.S
+++ b/util/m5/m5op_sparc.S
@@ -64,51 +64,51 @@ LEAF(m5_panic)
PANIC
END(m5_panic)
-LEAF(m5_readfile)
+LEAF(m5_read_file)
retl
READFILE
-END(m5_readfile)
+END(m5_read_file)
-LEAF(m5_debugbreak)
+LEAF(m5_debug_break)
retl
DEBUGBREAK
-END(m5_debugbreak)
+END(m5_debug_break)
/* !!!!!! All code below here just panics !!!!!! */
-LEAF(arm)
+LEAF(m5_arm)
retl
PANIC
-END(arm)
+END(m5_arm)
-LEAF(quiesce)
+LEAF(m5_quiesce)
retl
PANIC
-END(quiesce)
+END(m5_quiesce)
-LEAF(quiesceNs)
+LEAF(m5_quiesce_ns)
retl
PANIC
-END(quiesceNs)
+END(m5_quiesce_ns)
-LEAF(quiesceCycle)
+LEAF(m5_quiesce_cycle)
retl
PANIC
-END(quiesceCycle)
+END(m5_quiesce_cycle)
-LEAF(quiesceTime)
+LEAF(m5_quiesce_time)
retl
PANIC
-END(quiesceTime)
+END(m5_quiesce_time)
-LEAF(m5_initparam)
+LEAF(m5_init_param)
retl
PANIC
-END(m5_initparam)
+END(m5_init_param)
-LEAF(m5_loadsymbol)
+LEAF(m5_load_symbol)
retl
PANIC
-END(m5_loadsymbol)
+END(m5_load_symbol)
LEAF(m5_reset_stats)
retl
@@ -120,25 +120,25 @@ LEAF(m5_dump_stats)
PANIC
END(m5_dump_stats)
-LEAF(m5_dumpreset_stats)
+LEAF(m5_dump_reset_stats)
retl
PANIC
-END(m5_dumpreset_stats)
+END(m5_dump_reset_stats)
LEAF(m5_checkpoint)
retl
PANIC
END(m5_checkpoint)
-LEAF(m5_switchcpu)
+LEAF(m5_switch_cpu)
retl
PANIC
-END(m5_switchcpu)
+END(m5_switch_cpu)
-LEAF(m5_addsymbol)
+LEAF(m5_add_symbol)
retl
PANIC
-END(m5_addsymbol)
+END(m5_add_symbol)
LEAF(m5_anbegin)
retl
diff --git a/util/m5/m5op_x86.S b/util/m5/m5op_x86.S
index c09e51e25..6d1629321 100644
--- a/util/m5/m5op_x86.S
+++ b/util/m5/m5op_x86.S
@@ -61,26 +61,26 @@ name: \
#endif
-TWO_BYTE_OP(arm, M5OP_ARM)
-TWO_BYTE_OP(quiesce, M5OP_QUIESCE)
-TWO_BYTE_OP(quiesceNs, M5OP_QUIESCE_NS)
-TWO_BYTE_OP(quiesceCycle, M5OP_QUIESCE_CYCLE)
-TWO_BYTE_OP(quiesceTime, M5OP_QUIESCE_TIME)
-TWO_BYTE_OP(rpns, M5OP_RPNS)
+TWO_BYTE_OP(m5_arm, M5OP_ARM)
+TWO_BYTE_OP(m5_quiesce, M5OP_QUIESCE)
+TWO_BYTE_OP(m5_quiesce_ns, M5OP_QUIESCE_NS)
+TWO_BYTE_OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE)
+TWO_BYTE_OP(m5_quiesce_time, M5OP_QUIESCE_TIME)
+TWO_BYTE_OP(m5_rpns, M5OP_RPNS)
TWO_BYTE_OP(m5_exit, M5OP_EXIT)
TWO_BYTE_OP(m5_fail, M5OP_FAIL)
-TWO_BYTE_OP(m5_initparam, M5OP_INIT_PARAM)
-TWO_BYTE_OP(m5_loadsymbol, M5OP_LOAD_SYMBOL)
+TWO_BYTE_OP(m5_init_param, M5OP_INIT_PARAM)
+TWO_BYTE_OP(m5_load_symbol, M5OP_LOAD_SYMBOL)
TWO_BYTE_OP(m5_reset_stats, M5OP_RESET_STATS)
TWO_BYTE_OP(m5_dump_stats, M5OP_DUMP_STATS)
-TWO_BYTE_OP(m5_dumpreset_stats, M5OP_DUMP_RESET_STATS)
+TWO_BYTE_OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS)
TWO_BYTE_OP(m5_checkpoint, M5OP_CHECKPOINT)
-TWO_BYTE_OP(m5_readfile, M5OP_READ_FILE)
-TWO_BYTE_OP(m5_writefile, M5OP_WRITE_FILE)
-TWO_BYTE_OP(m5_debugbreak, M5OP_DEBUG_BREAK)
-TWO_BYTE_OP(m5_switchcpu, M5OP_SWITCH_CPU)
-TWO_BYTE_OP(m5_addsymbol, M5OP_ADD_SYMBOL)
+TWO_BYTE_OP(m5_read_file, M5OP_READ_FILE)
+TWO_BYTE_OP(m5_write_file, M5OP_WRITE_FILE)
+TWO_BYTE_OP(m5_debug_break, M5OP_DEBUG_BREAK)
+TWO_BYTE_OP(m5_switch_cpu, M5OP_SWITCH_CPU)
+TWO_BYTE_OP(m5_add_symbol, M5OP_ADD_SYMBOL)
TWO_BYTE_OP(m5_panic, M5OP_PANIC)
TWO_BYTE_OP(m5_work_begin, M5OP_WORK_BEGIN)
TWO_BYTE_OP(m5_work_end, M5OP_WORK_END)
-TWO_BYTE_OP(m5_togglesync, M5OP_DIST_TOGGLE_SYNC)
+TWO_BYTE_OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC)