diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-04-08 04:23:02 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-04-08 04:23:02 +0000 |
commit | 46befb1a2530f4f016a7fe6e05a877af82d53b3f (patch) | |
tree | c115da59cf0d258aebfb23902b5086e247068750 /emulators | |
parent | - Bump PORTREVISION. (diff) |
- Enable JIT on amd64
- Change IP binding algorithm: it is used both for the console and AUX port,
and not only in a mode hypervisor
PR: ports/111330
Submitted by: Pavel I Volkov <pol at opk.ru> (maintainer)
Notes
Notes:
svn path=/head/; revision=189464
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/dynamips-devel/Makefile | 3 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-README | 11 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-dev_vtty.c | 33 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-dynamips.1 | 13 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-dynamips.c | 46 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-mips64_nojit_trans.c | 15 | ||||
-rw-r--r-- | emulators/dynamips-devel/files/patch-mips64_nojit_trans.h | 11 |
7 files changed, 123 insertions, 9 deletions
diff --git a/emulators/dynamips-devel/Makefile b/emulators/dynamips-devel/Makefile index 96afc67314c4..3816b064cd18 100644 --- a/emulators/dynamips-devel/Makefile +++ b/emulators/dynamips-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= dynamips DISTVERSION= 0.2.7-RC1 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= http://www.ipflow.utc.fr/dynamips/ PKGNAMESUFFIX= -devel @@ -53,7 +54,7 @@ do-install: .if ${ARCH} == "i386" DYNAMIPS_ARCH= "x86" .elif ${ARCH} == "amd64" -DYNAMIPS_ARCH= "nojit" # JIT does not work on amd64 for some reason +DYNAMIPS_ARCH= "amd64" .else DYNAMIPS_ARCH= "nojit" .endif diff --git a/emulators/dynamips-devel/files/patch-README b/emulators/dynamips-devel/files/patch-README new file mode 100644 index 000000000000..4b092b6bc69b --- /dev/null +++ b/emulators/dynamips-devel/files/patch-README @@ -0,0 +1,11 @@ +--- README.orig Fri Apr 6 20:53:59 2007 ++++ README Fri Apr 6 20:57:02 2007 +@@ -50,7 +50,7 @@ + -R <rom_file> : Load an alternate ROM (default: embedded) + -k <clock_div> : Set the clock divisor (default: 4) + +- -T <port> : Console is on TCP <port> ++ -T [ip_address:]<port> : Console is on TCP <port> + -U <si_desc> : Console in on serial interface <si_desc> + (default is on the terminal) + diff --git a/emulators/dynamips-devel/files/patch-dev_vtty.c b/emulators/dynamips-devel/files/patch-dev_vtty.c new file mode 100644 index 000000000000..e99df79b2592 --- /dev/null +++ b/emulators/dynamips-devel/files/patch-dev_vtty.c @@ -0,0 +1,33 @@ +--- dev_vtty.c.orig Fri Apr 6 16:44:07 2007 ++++ dev_vtty.c Fri Apr 6 19:43:37 2007 +@@ -24,6 +24,8 @@ + #include <fcntl.h> + #include <errno.h> + #include <assert.h> ++#include <netinet/in.h> ++#include <arpa/inet.h> + + #include <arpa/telnet.h> + +@@ -43,6 +45,8 @@ + #include "dev_c2600.h" + #include "dev_vtty.h" + ++extern char hypervisor_ip_address[]; ++ + /* VTTY list */ + static pthread_mutex_t vtty_list_mutex = PTHREAD_MUTEX_INITIALIZER; + static vtty_t *vtty_list = NULL; +@@ -132,7 +136,11 @@ + + memset(&serv,0,sizeof(serv)); + serv.sin_family = AF_INET; +- serv.sin_addr.s_addr = htonl(INADDR_ANY); ++ if (strlen(hypervisor_ip_address) != 0 && ++ inet_addr(hypervisor_ip_address) != INADDR_NONE) ++ serv.sin_addr.s_addr = inet_addr(hypervisor_ip_address); ++ else ++ serv.sin_addr.s_addr = htonl(INADDR_ANY); + serv.sin_port = htons(vtty->tcp_port); + + if (bind(vtty->accept_fd,(struct sockaddr *)&serv,sizeof(serv)) < 0) { diff --git a/emulators/dynamips-devel/files/patch-dynamips.1 b/emulators/dynamips-devel/files/patch-dynamips.1 index 4a6ab8d1f1e6..cfa724c388d8 100644 --- a/emulators/dynamips-devel/files/patch-dynamips.1 +++ b/emulators/dynamips-devel/files/patch-dynamips.1 @@ -1,5 +1,5 @@ ---- dynamips.1.orig Wed Mar 21 14:26:01 2007 -+++ dynamips.1 Wed Mar 21 14:26:30 2007 +--- dynamips.1.orig Wed Feb 14 20:37:58 2007 ++++ dynamips.1 Fri Apr 6 20:59:41 2007 @@ -44,7 +44,7 @@ .SH OPTIONS A summary of options is included below. @@ -9,3 +9,12 @@ Enable hypervisor mode. .br The hypervisor mode of dynamips allows you to run simultaneously +@@ -133,7 +133,7 @@ + The command "show clock" at the IOS' CLI will help you set this value. + + .TP +-.B -T <port> ++.B -T [ip_address:]<port> + Console is on TCP <port> + .TP + .B -U <si_desc> diff --git a/emulators/dynamips-devel/files/patch-dynamips.c b/emulators/dynamips-devel/files/patch-dynamips.c index 253c3dbb54b9..a2631b8f28be 100644 --- a/emulators/dynamips-devel/files/patch-dynamips.c +++ b/emulators/dynamips-devel/files/patch-dynamips.c @@ -1,10 +1,10 @@ ---- dynamips.c.orig Wed Mar 21 10:07:17 2007 -+++ dynamips.c Wed Mar 21 13:39:57 2007 +--- dynamips.c.orig Wed Feb 14 20:37:58 2007 ++++ dynamips.c Fri Apr 6 21:11:38 2007 @@ -61,6 +61,7 @@ /* Hypervisor */ int hypervisor_mode = 0; int hypervisor_tcp_port = 0; -+char hypervisor_ip_address[263]; /* 256(MAXHOSTNAMELEN)+1(:)+5(port)+NULL */ ++char hypervisor_ip_address[263]="\000"; /* 256(MAXHOSTNAMELEN)+1(:)+5(port)+NULL */ /* Log file */ char *log_file_name = NULL; @@ -17,7 +17,41 @@ " -P <platform> : Platform to emulate (7200, 3600, " "2691, 3725 or 3745) " "(default: 7200)\n\n" -@@ -1061,6 +1062,7 @@ +@@ -254,7 +255,7 @@ + " -R <rom_file> : Load an alternate ROM (default: embedded)\n" + " -k <clock_div> : Set the clock divisor (default: %d)\n" + "\n" +- " -T <port> : Console is on TCP <port>\n" ++ " -T [ip_address:]<port> : Console is on TCP <port>\n" + " -U <si_desc> : Console in on serial interface <si_desc>\n" + " (default is on the terminal)\n" + "\n" +@@ -780,6 +781,7 @@ + int instance_id; + int res,option; + char *str; ++ char *index; + + /* Get the instance ID */ + instance_id = 0; +@@ -944,7 +946,15 @@ + /* TCP server for Console Port */ + case 'T': + vm->vtty_con_type = VTTY_TYPE_TCP; +- vm->vtty_con_tcp_port = atoi(optarg); ++ strncpy(hypervisor_ip_address,optarg,sizeof(hypervisor_ip_address)); ++ index=strrchr(hypervisor_ip_address,':'); ++ if (index != NULL) { ++ *index++='\000'; ++ vm->vtty_con_tcp_port = atoi(index); ++ } else { ++ vm->vtty_con_tcp_port = atoi(hypervisor_ip_address); ++ hypervisor_ip_address[0]='\000'; ++ } + break; + + /* Serial interface for Console port */ +@@ -1061,6 +1071,7 @@ static int run_hypervisor(int argc,char *argv[]) { char *options_list = "H:l:hN:"; @@ -25,7 +59,7 @@ int i,option; for(i=1;i<argc;i++) -@@ -1079,7 +1081,15 @@ +@@ -1079,7 +1090,15 @@ { /* Hypervisor TCP port */ case 'H': @@ -42,7 +76,7 @@ break; /* Log file */ -@@ -1244,7 +1254,7 @@ +@@ -1244,7 +1263,7 @@ /* Free resources used by instance */ vm_release(vm); } else { diff --git a/emulators/dynamips-devel/files/patch-mips64_nojit_trans.c b/emulators/dynamips-devel/files/patch-mips64_nojit_trans.c new file mode 100644 index 000000000000..a19169965bd9 --- /dev/null +++ b/emulators/dynamips-devel/files/patch-mips64_nojit_trans.c @@ -0,0 +1,15 @@ +--- mips64_nojit_trans.c.orig Fri Mar 30 17:33:19 2007 ++++ mips64_nojit_trans.c Fri Mar 30 17:42:29 2007 +@@ -53,10 +53,11 @@ + EMPTY(void mips64_set_pc(mips64_jit_tcb_t *b,m_uint64_t new_pc)); + EMPTY(void mips64_set_ra(mips64_jit_tcb_t *b,m_uint64_t ret_pc)); + EMPTY(void mips64_emit_breakpoint(mips64_jit_tcb_t *b)); +-EMPTY(void mips64_emit_invalid_delay_slot(mips64_jit_tcb_t *b)); ++EMPTY(int mips64_emit_invalid_delay_slot(mips64_jit_tcb_t *b)); + EMPTY(void mips64_inc_cp0_count_reg(mips64_jit_tcb_t *b)); + EMPTY(void mips64_check_pending_irq(mips64_jit_tcb_t *b)); + EMPTY(void mips64_inc_perf_counter(mips64_jit_tcb_t *b)); ++EMPTY(void mips64_emit_single_step(mips64_jit_tcb_t *b,mips_insn_t insn)); + + /* MIPS instruction array */ + struct mips64_insn_tag mips64_insn_tags[] = { diff --git a/emulators/dynamips-devel/files/patch-mips64_nojit_trans.h b/emulators/dynamips-devel/files/patch-mips64_nojit_trans.h new file mode 100644 index 000000000000..94330b7fae4e --- /dev/null +++ b/emulators/dynamips-devel/files/patch-mips64_nojit_trans.h @@ -0,0 +1,11 @@ +--- mips64_nojit_trans.h.orig Fri Mar 30 17:27:32 2007 ++++ mips64_nojit_trans.h Fri Mar 30 17:27:48 2007 +@@ -37,7 +37,7 @@ + void mips64_emit_breakpoint(mips64_jit_tcb_t *b); + + /* Emit unhandled instruction code */ +-void mips64_emit_invalid_delay_slot(mips64_jit_tcb_t *b); ++int mips64_emit_invalid_delay_slot(mips64_jit_tcb_t *b); + + /* + * Increment count register and trigger the timer IRQ if value in compare |