diff options
Diffstat (limited to 'util/m5/m5.c')
-rw-r--r-- | util/m5/m5.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/util/m5/m5.c b/util/m5/m5.c index 38da9dc37..48b8ed9b7 100644 --- a/util/m5/m5.c +++ b/util/m5/m5.c @@ -58,8 +58,7 @@ #include <unistd.h> #include <gem5/m5ops.h> - -void *m5_mem = NULL; +#include "m5_mmap.h" char *progname; char *command = "unspecified"; @@ -375,27 +374,6 @@ usage() exit(1); } -static void -map_m5_mem() -{ -#ifdef M5OP_ADDR - int fd; - - fd = open("/dev/mem", O_RDWR | O_SYNC); - if (fd == -1) { - perror("Can't open /dev/mem"); - exit(1); - } - - m5_mem = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, - M5OP_ADDR); - if (!m5_mem) { - perror("Can't mmap /dev/mem"); - exit(1); - } -#endif -} - int main(int argc, char *argv[]) { |