From 15613161c28591ca1a40d019a1568f01d68d5743 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 1 Nov 2003 13:20:44 -0500 Subject: Commit a command for use inside a simulated system for communicating with the simulator. This program is generally compiled as the name m5 and installed in /usr/local/bin This command uses opcodes that are invalid on a normal system, so don't expect it to do anything on a real system. --HG-- extra : convert_revision : fcbae99d4b0d38ff4a9950f1ab53923baa1f667a --- util/m5/m5op.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 util/m5/m5op.h (limited to 'util/m5/m5op.h') diff --git a/util/m5/m5op.h b/util/m5/m5op.h new file mode 100644 index 000000000..53de3144d --- /dev/null +++ b/util/m5/m5op.h @@ -0,0 +1,11 @@ +#ifndef __M5OP_H__ +#define __M5OP_H__ + +void arm(unsigned long address); +void quiesce(); +void ivlb(unsigned long interval); +void ivle(unsigned long interval); +void m5exit(); +unsigned long initparam(); + +#endif // __M5OP_H__ -- cgit v1.2.3 From c4dd30662be73ccfa75224bcdfcb7418462e82e5 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sat, 1 Nov 2003 14:11:29 -0500 Subject: Licenses --HG-- extra : convert_revision : ce47fdfaa5c59480a1fb38d86eed7d16ab7b5fc1 --- util/m5/m5op.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'util/m5/m5op.h') diff --git a/util/m5/m5op.h b/util/m5/m5op.h index 53de3144d..ee24f6948 100644 --- a/util/m5/m5op.h +++ b/util/m5/m5op.h @@ -1,3 +1,31 @@ +/* + * Copyright (c) 2003 The Regents of The University of Michigan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef __M5OP_H__ #define __M5OP_H__ -- cgit v1.2.3 From 1cd3757db92528bf1805fabe59db45f6359ab5b9 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sun, 2 Nov 2003 01:08:59 -0500 Subject: add several new functions that can be called from the guest to tell the simulator to do something. exit -> exit_old (deprecated exit now takes an optional parameter that tells it to execute at a specified time in the future The next four functions have two optional parameters. The first specifies a delay for how long to wait to issue the instruction. The second will tell the simulator to repeat that command at the specified interval. checkpoint will trigger a checkpoint dumpstats will cause the simulator to dump stats resetstats will cause all stats to be reset dumpreset will dump and reset stats all times are in nanoseconds util/m5/Makefile: Clean up to make it a bit easier to muck with util/m5/m5.c: Add a bunch of new commands and clean up the command parsing path Convert atoi to strtoul so that we can use 64bit numbers and even hex if we want to. (this runs on alpha, so a long is 64bit) util/m5/m5op.h: add prototypes for new m5 instructions use uint64_t since it's nicer --HG-- extra : convert_revision : 664ff00f0f0dfc5263c4e873d82fd9996a4521e9 --- util/m5/m5op.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'util/m5/m5op.h') diff --git a/util/m5/m5op.h b/util/m5/m5op.h index ee24f6948..266460ce9 100644 --- a/util/m5/m5op.h +++ b/util/m5/m5op.h @@ -29,11 +29,17 @@ #ifndef __M5OP_H__ #define __M5OP_H__ -void arm(unsigned long address); +#include + +void arm(uint64_t address); void quiesce(); -void ivlb(unsigned long interval); -void ivle(unsigned long interval); -void m5exit(); -unsigned long initparam(); +void ivlb(uint64_t interval); +void ivle(uint64_t interval); +void m5exit(uint64_t ns_delay); +uint64_t initparam(); +void checkpoint(uint64_t ns_delay, uint64_t ns_period); +void reset_stats(uint64_t ns_delay, uint64_t ns_period); +void dump_stats(uint64_t ns_delay, uint64_t ns_period); +void dumpreset_stats(uint64_t ns_delay, uint64_t ns_period); #endif // __M5OP_H__ -- cgit v1.2.3