m5.c (12003:bbe320b2f604) | m5.c (12023:272819f230c0) |
---|---|
1/* 2 * Copyright (c) 2011, 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 29 unchanged lines hidden (view full) --- 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 * 40 * Authors: Nathan Binkert 41 */ 42 43#ifdef linux 44#define _GNU_SOURCE 45#include <sched.h> | 1/* 2 * Copyright (c) 2011, 2017 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 29 unchanged lines hidden (view full) --- 38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 * 40 * Authors: Nathan Binkert 41 */ 42 43#ifdef linux 44#define _GNU_SOURCE 45#include <sched.h> |
46 |
|
46#endif 47 48#include <err.h> 49#include <fcntl.h> 50#include <inttypes.h> 51#include <stdio.h> 52#include <stdlib.h> 53#include <string.h> --- 289 unchanged lines hidden (view full) --- 343 { "dumpstats", do_dump_stats, "[delay [period]]" }, 344 { "dumpresetstats", do_dump_reset_stats, "[delay [period]]" }, 345 { "readfile", do_read_file, "" }, 346 { "writefile", do_write_file, "<filename>" }, 347 { "execfile", do_exec_file, "" }, 348 { "checkpoint", do_checkpoint, "[delay [period]]" }, 349 { "addsymbol", do_addsymbol, "<address> <symbol>" }, 350 { "loadsymbol", do_loadsymbol, "" }, | 47#endif 48 49#include <err.h> 50#include <fcntl.h> 51#include <inttypes.h> 52#include <stdio.h> 53#include <stdlib.h> 54#include <string.h> --- 289 unchanged lines hidden (view full) --- 344 { "dumpstats", do_dump_stats, "[delay [period]]" }, 345 { "dumpresetstats", do_dump_reset_stats, "[delay [period]]" }, 346 { "readfile", do_read_file, "" }, 347 { "writefile", do_write_file, "<filename>" }, 348 { "execfile", do_exec_file, "" }, 349 { "checkpoint", do_checkpoint, "[delay [period]]" }, 350 { "addsymbol", do_addsymbol, "<address> <symbol>" }, 351 { "loadsymbol", do_loadsymbol, "" }, |
351 { "initparam", do_initparam, "[key] // key must be shorter than 16 chars" }, | 352 { "initparam", do_initparam, "[key] // key must be shorter" 353 " than 16 chars" }, |
352 { "sw99param", do_sw99param, "" }, 353#ifdef linux 354 { "pin", do_pin, "<cpu> <program> [args ...]" } 355#endif 356}; 357int numfuncs = sizeof(mainfuncs) / sizeof(mainfuncs[0]); 358 359void --- 19 unchanged lines hidden (view full) --- 379 int fd; 380 381 fd = open("/dev/mem", O_RDWR | O_SYNC); 382 if (fd == -1) { 383 perror("Can't open /dev/mem"); 384 exit(1); 385 } 386 | 354 { "sw99param", do_sw99param, "" }, 355#ifdef linux 356 { "pin", do_pin, "<cpu> <program> [args ...]" } 357#endif 358}; 359int numfuncs = sizeof(mainfuncs) / sizeof(mainfuncs[0]); 360 361void --- 19 unchanged lines hidden (view full) --- 381 int fd; 382 383 fd = open("/dev/mem", O_RDWR | O_SYNC); 384 if (fd == -1) { 385 perror("Can't open /dev/mem"); 386 exit(1); 387 } 388 |
387 m5_mem = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, M5OP_ADDR); | 389 m5_mem = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 390 M5OP_ADDR); |
388 if (!m5_mem) { 389 perror("Can't mmap /dev/mem"); 390 exit(1); 391 } 392#endif 393} 394 395int --- 24 unchanged lines hidden --- | 391 if (!m5_mem) { 392 perror("Can't mmap /dev/mem"); 393 exit(1); 394 } 395#endif 396} 397 398int --- 24 unchanged lines hidden --- |