1 /* 2 * Cisco router simulation platform. 3 * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) 4 * Patched by Jeremy Grossmann for the GNS3 project (www.gns3.net) 5 */ 6 7 #ifndef __DYNAMIPS_H__ 8 #define __DYNAMIPS_H__ 9 10 #include <libelf.h> 11 12 #include "utils.h" 13 14 /* Debugging flags */ 15 #define DEBUG_BLOCK_SCAN 0 16 #define DEBUG_BLOCK_COMPILE 0 17 #define DEBUG_BLOCK_PATCH 0 18 #define DEBUG_BLOCK_CHUNK 0 19 #define DEBUG_BLOCK_TIMESTAMP 0 /* block timestamping (little overhead) */ 20 #define DEBUG_SYM_TREE 0 /* use symbol tree (slow) */ 21 #define DEBUG_MTS_MAP_DEV 0 22 #define DEBUG_MTS_MAP_VIRT 1 23 #define DEBUG_MTS_ACC_U 1 /* undefined memory */ 24 #define DEBUG_MTS_ACC_T 1 /* tlb exception */ 25 #define DEBUG_MTS_ACC_AE 1 /* address error exception */ 26 #define DEBUG_MTS_DEV 0 /* debugging for device access */ 27 #define DEBUG_MTS_STATS 1 /* MTS cache performance */ 28 #define DEBUG_INSN_PERF_CNT 0 /* Instruction performance counter */ 29 #define DEBUG_BLOCK_PERF_CNT 0 /* Block performance counter */ 30 #define DEBUG_DEV_PERF_CNT 1 /* Device performance counter */ 31 #define DEBUG_TLB_ACTIVITY 0 32 #define DEBUG_SYSCALL 0 33 #define DEBUG_CACHE 0 34 #define DEBUG_JR0 0 /* Debug register jumps to 0 */ 35 36 /* Feature flags */ 37 #define MEMLOG_ENABLE 0 /* Memlogger (fast memop must be off) */ 38 #define BREAKPOINT_ENABLE 1 /* Virtual Breakpoints */ 39 #define NJM_STATS_ENABLE 1 /* Non-JIT mode stats (little overhead) */ 40 41 /* Symbol */ 42 struct symbol { 43 m_uint64_t addr; 44 char name[0]; 45 }; 46 47 /* ROM identification tag */ 48 #define ROM_ID 0x1e94b3df 49 50 /* Global log file */ 51 extern FILE *log_file; 52 53 /* Operating system name */ 54 extern const char *os_name; 55 56 /* Software version */ 57 extern const char *sw_version; 58 59 /* Software version specific tag */ 60 extern const char *sw_version_tag; 61 62 /* Global binding address */ 63 extern char *binding_addr; 64 65 /* Command Line long options */ 66 #define OPT_DISK0_SIZE 0x100 67 #define OPT_DISK1_SIZE 0x101 68 #define OPT_EXEC_AREA 0x102 69 #define OPT_IDLE_PC 0x103 70 #define OPT_TIMER_ITV 0x104 71 #define OPT_VM_DEBUG 0x105 72 #define OPT_IOMEM_SIZE 0x106 73 #define OPT_SPARSE_MEM 0x107 74 #define OPT_NOCTRL 0x120 75 #define OPT_NOTELMSG 0x121 76 #define OPT_FILEPID 0x122 77 #define OPT_STARTUP_CONFIG_FILE 0x140 78 #define OPT_PRIVATE_CONFIG_FILE 0x141 79 80 /* Delete all objects */ 81 void dynamips_reset(void); 82 83 #endif 84