summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/alpha/alpha_tru64_process.cc4
-rw-r--r--arch/alpha/pseudo_inst.cc7
-rw-r--r--base/intmath.hh38
-rw-r--r--base/socket.cc2
-rw-r--r--configs/boot/nat-netperf-server.rcS2
-rw-r--r--configs/boot/nat-netperf-stream-client.rcS1
-rw-r--r--configs/boot/nat-spec-surge-client.rcS5
-rwxr-xr-xconfigs/boot/nat-spec-surge-server.rcS5
-rw-r--r--configs/boot/natbox-netperf.rcS4
-rw-r--r--configs/boot/natbox-spec-surge.rcS4
-rwxr-xr-xconfigs/boot/nfs-client-nhfsstone.rcS4
-rwxr-xr-xconfigs/boot/nfs-client-smallb.rcS4
-rwxr-xr-xconfigs/boot/nfs-client-tcp-smallb.rcS4
-rwxr-xr-xconfigs/boot/nfs-client-tcp.rcS4
-rwxr-xr-xconfigs/boot/nfs-client.rcS4
-rwxr-xr-xconfigs/boot/nfs-server-nhfsstone.rcS5
-rwxr-xr-xconfigs/boot/nfs-server.rcS4
-rw-r--r--configs/boot/spec-surge-client.rcS5
-rwxr-xr-xconfigs/boot/spec-surge-server.rcS4
-rwxr-xr-xconfigs/boot/surge-client.rcS4
-rwxr-xr-xconfigs/boot/surge-server.rcS6
-rw-r--r--cpu/pc_event.cc2
-rw-r--r--dev/ide_ctrl.cc3
-rw-r--r--dev/ns_gige.cc21
-rw-r--r--dev/ns_gige.hh2
-rw-r--r--dev/ns_gige_reg.h3
-rw-r--r--dev/sinic.cc12
-rw-r--r--dev/sinic.hh1
-rw-r--r--kern/linux/linux_system.cc3
-rw-r--r--python/m5/config.py14
-rw-r--r--python/m5/objects/Ethernet.mpy5
-rw-r--r--sim/serialize.cc19
-rwxr-xr-xtest/genini.py2
33 files changed, 129 insertions, 78 deletions
diff --git a/arch/alpha/alpha_tru64_process.cc b/arch/alpha/alpha_tru64_process.cc
index 441e7c89f..0910ec552 100644
--- a/arch/alpha/alpha_tru64_process.cc
+++ b/arch/alpha/alpha_tru64_process.cc
@@ -622,6 +622,9 @@ class Tru64 {
getdirentriesFunc(SyscallDesc *desc, int callnum, Process *process,
ExecContext *xc)
{
+#ifdef __CYGWIN__
+ panic("getdirent not implemented on cygwin!");
+#else
int fd = process->sim_fd(xc->getSyscallArg(0));
Addr tgt_buf = xc->getSyscallArg(1);
int tgt_nbytes = xc->getSyscallArg(2);
@@ -670,6 +673,7 @@ class Tru64 {
basep.copyOut(xc->mem);
return tgt_buf_ptr - tgt_buf;
+#endif
}
/// Target sigreturn() handler.
diff --git a/arch/alpha/pseudo_inst.cc b/arch/alpha/pseudo_inst.cc
index 3c3b37928..a4af891af 100644
--- a/arch/alpha/pseudo_inst.cc
+++ b/arch/alpha/pseudo_inst.cc
@@ -26,6 +26,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <cstdio>
@@ -180,15 +181,17 @@ namespace AlphaPseudo
if (fd < 0)
panic("could not open file %s\n", file);
+ if (::lseek(fd, offset, SEEK_SET) < 0)
+ panic("could not seek: %s", strerror(errno));
+
char *buf = new char[len];
char *p = buf;
while (len > 0) {
- int bytes = ::pread(fd, p, len, offset);
+ int bytes = ::read(fd, p, len);
if (bytes <= 0)
break;
p += bytes;
- offset += bytes;
result += bytes;
len -= bytes;
}
diff --git a/base/intmath.hh b/base/intmath.hh
index 5ffe27103..0cf48b41b 100644
--- a/base/intmath.hh
+++ b/base/intmath.hh
@@ -73,7 +73,7 @@ IsPowerOf2(T n)
}
inline int
-FloorLog2(uint32_t x)
+FloorLog2(unsigned x)
{
assert(x > 0);
@@ -89,7 +89,26 @@ FloorLog2(uint32_t x)
}
inline int
-FloorLog2(uint64_t x)
+FloorLog2(unsigned long x)
+{
+ assert(x > 0);
+
+ int y = 0;
+
+#if defined(__LP64__)
+ if (x & ULL(0xffffffff00000000)) { y += 32; x >>= 32; }
+#endif
+ if (x & 0xffff0000) { y += 16; x >>= 16; }
+ if (x & 0x0000ff00) { y += 8; x >>= 8; }
+ if (x & 0x000000f0) { y += 4; x >>= 4; }
+ if (x & 0x0000000c) { y += 2; x >>= 2; }
+ if (x & 0x00000002) { y += 1; }
+
+ return y;
+}
+
+inline int
+FloorLog2(unsigned long long x)
{
assert(x > 0);
@@ -106,17 +125,24 @@ FloorLog2(uint64_t x)
}
inline int
-FloorLog2(int32_t x)
+FloorLog2(int x)
+{
+ assert(x > 0);
+ return FloorLog2((unsigned)x);
+}
+
+inline int
+FloorLog2(long x)
{
assert(x > 0);
- return FloorLog2((uint32_t)x);
+ return FloorLog2((unsigned long)x);
}
inline int
-FloorLog2(int64_t x)
+FloorLog2(long long x)
{
assert(x > 0);
- return FloorLog2((uint64_t)x);
+ return FloorLog2((unsigned long long)x);
}
#if defined(__APPLE__)
diff --git a/base/socket.cc b/base/socket.cc
index ee87dc057..c2e9e70e0 100644
--- a/base/socket.cc
+++ b/base/socket.cc
@@ -93,7 +93,7 @@ ListenSocket::listen(int port, bool reuse)
return true;
}
-#if !defined(__OpenBSD__) && !defined(linux)
+#if defined(__APPLE__)
typedef int socklen_t;
#endif
diff --git a/configs/boot/nat-netperf-server.rcS b/configs/boot/nat-netperf-server.rcS
index 69717b7ce..61b4bea7a 100644
--- a/configs/boot/nat-netperf-server.rcS
+++ b/configs/boot/nat-netperf-server.rcS
@@ -24,7 +24,7 @@ echo "running netserver..."
/benchmarks/netperf/netserver
echo -n "signal natbox to begin..."
-sleep 1
+sleep 5
echo "server ready" | /usr/bin/netcat -c $NATBOX 8000
echo "done."
diff --git a/configs/boot/nat-netperf-stream-client.rcS b/configs/boot/nat-netperf-stream-client.rcS
index d0213c265..e37b8e565 100644
--- a/configs/boot/nat-netperf-stream-client.rcS
+++ b/configs/boot/nat-netperf-stream-client.rcS
@@ -9,6 +9,7 @@ ifconfig eth0 $CLIENT txqueuelen 1000
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_wmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_mem
diff --git a/configs/boot/nat-spec-surge-client.rcS b/configs/boot/nat-spec-surge-client.rcS
index a3bc512db..67c831eb0 100644
--- a/configs/boot/nat-spec-surge-client.rcS
+++ b/configs/boot/nat-spec-surge-client.rcS
@@ -21,17 +21,16 @@ echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nat-spec-surge-server.rcS b/configs/boot/nat-spec-surge-server.rcS
index 9b5674e63..279cd5652 100755
--- a/configs/boot/nat-spec-surge-server.rcS
+++ b/configs/boot/nat-spec-surge-server.rcS
@@ -24,17 +24,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
@@ -50,6 +48,7 @@ cat /benchmarks/apache2/logs/error_log
echo "done."
echo "notifying natbox..."
+sleep 5
echo "server ready" | /usr/bin/netcat -c $NATBOX 8000
echo "done"
diff --git a/configs/boot/natbox-netperf.rcS b/configs/boot/natbox-netperf.rcS
index 5ec08c1a2..32a7371a0 100644
--- a/configs/boot/natbox-netperf.rcS
+++ b/configs/boot/natbox-netperf.rcS
@@ -11,7 +11,7 @@ ifconfig eth1 $INTIF txqueuelen 1000
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_wmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_mem
@@ -21,7 +21,6 @@ echo "262143" > /proc/sys/net/core/rmem_default
echo "262143" > /proc/sys/net/core/wmem_default
echo "262143" > /proc/sys/net/core/optmem_max
echo "100000" > /proc/sys/net/core/netdev_max_backlog
-
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "waiting for netserver..."
@@ -47,6 +46,7 @@ $IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
echo "informing client..."
+sleep 5
echo "server ready" | /usr/bin/netcat -c $CLIENT 8000
echo "starting bash..."
diff --git a/configs/boot/natbox-spec-surge.rcS b/configs/boot/natbox-spec-surge.rcS
index d612424d2..8b84b1a35 100644
--- a/configs/boot/natbox-spec-surge.rcS
+++ b/configs/boot/natbox-spec-surge.rcS
@@ -11,6 +11,7 @@ ifconfig eth1 $INTIF txqueuelen 1000
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_wmem
echo "5000000 5000000 5000000" > /proc/sys/net/ipv4/tcp_mem
@@ -23,6 +24,8 @@ echo "100000" > /proc/sys/net/core/netdev_max_backlog
echo "1" > /proc/sys/net/ipv4/ip_forward
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
+
echo "waiting for netserver..."
/usr/bin/netcat -c -l -p 8000
@@ -46,6 +49,7 @@ $IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
echo "informing client..."
+sleep 5
echo "server ready" | /usr/bin/netcat -c $CLIENT 8000
echo "starting bash..."
diff --git a/configs/boot/nfs-client-nhfsstone.rcS b/configs/boot/nfs-client-nhfsstone.rcS
index 229e418d8..aa2903919 100755
--- a/configs/boot/nfs-client-nhfsstone.rcS
+++ b/configs/boot/nfs-client-nhfsstone.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nfs-client-smallb.rcS b/configs/boot/nfs-client-smallb.rcS
index 22e2107eb..375da1f59 100755
--- a/configs/boot/nfs-client-smallb.rcS
+++ b/configs/boot/nfs-client-smallb.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nfs-client-tcp-smallb.rcS b/configs/boot/nfs-client-tcp-smallb.rcS
index 2ee232158..eeb6aaadd 100755
--- a/configs/boot/nfs-client-tcp-smallb.rcS
+++ b/configs/boot/nfs-client-tcp-smallb.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nfs-client-tcp.rcS b/configs/boot/nfs-client-tcp.rcS
index a67facbb2..319281385 100755
--- a/configs/boot/nfs-client-tcp.rcS
+++ b/configs/boot/nfs-client-tcp.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nfs-client.rcS b/configs/boot/nfs-client.rcS
index 84d15439f..2d64f1999 100755
--- a/configs/boot/nfs-client.rcS
+++ b/configs/boot/nfs-client.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/nfs-server-nhfsstone.rcS b/configs/boot/nfs-server-nhfsstone.rcS
index 564833cb1..222ba309e 100755
--- a/configs/boot/nfs-server-nhfsstone.rcS
+++ b/configs/boot/nfs-server-nhfsstone.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
@@ -60,6 +58,7 @@ echo "Exporting shares..."
/sbin/exportfs -r -v
echo -n "signal client to mount..."
+sleep 5
echo "server ready" | /usr/bin/netcat -c 10.0.0.2 8000
echo "done."
diff --git a/configs/boot/nfs-server.rcS b/configs/boot/nfs-server.rcS
index 0cb489a9d..9e68597e6 100755
--- a/configs/boot/nfs-server.rcS
+++ b/configs/boot/nfs-server.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/spec-surge-client.rcS b/configs/boot/spec-surge-client.rcS
index 6ce2ce9de..f42d6045f 100644
--- a/configs/boot/spec-surge-client.rcS
+++ b/configs/boot/spec-surge-client.rcS
@@ -18,17 +18,16 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/spec-surge-server.rcS b/configs/boot/spec-surge-server.rcS
index 12e31696b..e2d0a58d7 100755
--- a/configs/boot/spec-surge-server.rcS
+++ b/configs/boot/spec-surge-server.rcS
@@ -22,17 +22,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/surge-client.rcS b/configs/boot/surge-client.rcS
index 208524a9c..c63cc93f0 100755
--- a/configs/boot/surge-client.rcS
+++ b/configs/boot/surge-client.rcS
@@ -18,17 +18,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/configs/boot/surge-server.rcS b/configs/boot/surge-server.rcS
index 3feb7b581..234514bd9 100755
--- a/configs/boot/surge-server.rcS
+++ b/configs/boot/surge-server.rcS
@@ -15,7 +15,7 @@ echo -n "setting up network..."
/sbin/ifconfig eth0:3 192.168.0.4 txqueuelen 1000
/sbin/ifconfig eth0:4 192.168.0.5 txqueuelen 1000
/sbin/ifconfig lo 127.0.0.1
-
+
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
@@ -23,17 +23,15 @@ echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
-
+echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
-
echo "524287" > /proc/sys/net/core/rmem_max
echo "524287" > /proc/sys/net/core/wmem_max
echo "524287" > /proc/sys/net/core/optmem_max
echo "300000" > /proc/sys/net/core/netdev_max_backlog
-
echo "131072" > /proc/sys/fs/file-max
echo "done."
diff --git a/cpu/pc_event.cc b/cpu/pc_event.cc
index 21eef677a..2c6bb2443 100644
--- a/cpu/pc_event.cc
+++ b/cpu/pc_event.cc
@@ -125,7 +125,7 @@ void
BreakPCEvent::process(ExecContext *xc)
{
StringWrap name(xc->cpu->name() + ".break_event");
- DPRINTFN("break event %s triggered", descr());
+ DPRINTFN("break event %s triggered\n", descr());
debug_break();
if (remove)
delete this;
diff --git a/dev/ide_ctrl.cc b/dev/ide_ctrl.cc
index 857cdeb78..ae044427e 100644
--- a/dev/ide_ctrl.cc
+++ b/dev/ide_ctrl.cc
@@ -97,7 +97,8 @@ IdeController::IdeController(Params *p)
dmaInterface = new DMAInterface<Bus>(name() + ".dma",
params()->host_bus,
- params()->host_bus, 1);
+ params()->host_bus, 1,
+ true);
pioLatency = params()->pio_latency * params()->host_bus->clockRatio;
}
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc
index 47631642c..0b416750f 100644
--- a/dev/ns_gige.cc
+++ b/dev/ns_gige.cc
@@ -120,11 +120,13 @@ NSGigE::NSGigE(Params *p)
if (p->payload_bus)
dmaInterface = new DMAInterface<Bus>(name() + ".dma",
p->header_bus,
- p->payload_bus, 1);
+ p->payload_bus, 1,
+ p->dma_no_allocate);
else
dmaInterface = new DMAInterface<Bus>(name() + ".dma",
p->header_bus,
- p->header_bus, 1);
+ p->header_bus, 1,
+ p->dma_no_allocate);
} else if (p->payload_bus) {
pioInterface = newPioInterface(name(), p->hier,
p->payload_bus, this,
@@ -134,7 +136,8 @@ NSGigE::NSGigE(Params *p)
dmaInterface = new DMAInterface<Bus>(name() + ".dma",
p->payload_bus,
- p->payload_bus, 1);
+ p->payload_bus, 1,
+ p->dma_no_allocate);
}
@@ -747,6 +750,10 @@ NSGigE::read(MemReqPtr &req, uint8_t *data)
reg = regs.tesr;
break;
+ case M5REG:
+ reg = params()->m5reg;
+ break;
+
default:
panic("reading unimplemented register: addr=%#x", daddr);
}
@@ -2708,6 +2715,8 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(NSGigE)
Param<uint32_t> pci_func;
Param<uint32_t> tx_fifo_size;
Param<uint32_t> rx_fifo_size;
+ Param<uint32_t> m5reg;
+ Param<bool> dma_no_allocate;
END_DECLARE_SIM_OBJECT_PARAMS(NSGigE)
@@ -2740,7 +2749,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(NSGigE)
INIT_PARAM(pci_dev, "PCI device number"),
INIT_PARAM(pci_func, "PCI function code"),
INIT_PARAM_DFLT(tx_fifo_size, "max size in bytes of txFifo", 131072),
- INIT_PARAM_DFLT(rx_fifo_size, "max size in bytes of rxFifo", 131072)
+ INIT_PARAM_DFLT(rx_fifo_size, "max size in bytes of rxFifo", 131072),
+ INIT_PARAM(m5reg, "m5 register"),
+ INIT_PARAM_DFLT(dma_no_allocate, "Should DMA reads allocate cache lines", true)
END_INIT_SIM_OBJECT_PARAMS(NSGigE)
@@ -2777,6 +2788,8 @@ CREATE_SIM_OBJECT(NSGigE)
params->eaddr = hardware_address;
params->tx_fifo_size = tx_fifo_size;
params->rx_fifo_size = rx_fifo_size;
+ params->m5reg = m5reg;
+ params->dma_no_allocate = dma_no_allocate;
return new NSGigE(params);
}
diff --git a/dev/ns_gige.hh b/dev/ns_gige.hh
index 544a300c3..cbb7185e7 100644
--- a/dev/ns_gige.hh
+++ b/dev/ns_gige.hh
@@ -343,6 +343,8 @@ class NSGigE : public PciDev
Net::EthAddr eaddr;
uint32_t tx_fifo_size;
uint32_t rx_fifo_size;
+ uint32_t m5reg;
+ bool dma_no_allocate;
};
NSGigE(Params *params);
diff --git a/dev/ns_gige_reg.h b/dev/ns_gige_reg.h
index 01577fa39..ab9833788 100644
--- a/dev/ns_gige_reg.h
+++ b/dev/ns_gige_reg.h
@@ -117,7 +117,8 @@
#define TANLPAR 0xec
#define TANER 0xf0
#define TESR 0xf4
-#define LAST 0xf4
+#define M5REG 0xf8
+#define LAST 0xf8
#define RESERVED 0xfc
/* chip command register */
diff --git a/dev/sinic.cc b/dev/sinic.cc
index 9535a58ca..4d6ecf668 100644
--- a/dev/sinic.cc
+++ b/dev/sinic.cc
@@ -103,11 +103,11 @@ Device::Device(Params *p)
if (p->payload_bus)
dmaInterface = new DMAInterface<Bus>(p->name + ".dma",
p->header_bus, p->payload_bus,
- 1);
+ 1, p->dma_no_allocate);
else
dmaInterface = new DMAInterface<Bus>(p->name + ".dma",
p->header_bus, p->header_bus,
- 1);
+ 1, p->dma_no_allocate);
} else if (p->payload_bus) {
pioInterface = newPioInterface(p->name, p->hier, p->payload_bus, this,
&Device::cacheAccess);
@@ -115,7 +115,8 @@ Device::Device(Params *p)
pioLatency = p->pio_latency * p->payload_bus->clockRatio;
dmaInterface = new DMAInterface<Bus>(p->name + ".dma", p->payload_bus,
- p->payload_bus, 1);
+ p->payload_bus, 1,
+ p->dma_no_allocate);
}
}
@@ -1388,6 +1389,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Device)
Param<Tick> dma_read_factor;
Param<Tick> dma_write_delay;
Param<Tick> dma_write_factor;
+ Param<bool> dma_no_allocate;
END_DECLARE_SIM_OBJECT_PARAMS(Device)
@@ -1421,7 +1423,8 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Device)
INIT_PARAM_DFLT(dma_read_delay, "fixed delay for dma reads", 0),
INIT_PARAM_DFLT(dma_read_factor, "multiplier for dma reads", 0),
INIT_PARAM_DFLT(dma_write_delay, "fixed delay for dma writes", 0),
- INIT_PARAM_DFLT(dma_write_factor, "multiplier for dma writes", 0)
+ INIT_PARAM_DFLT(dma_write_factor, "multiplier for dma writes", 0),
+ INIT_PARAM_DFLT(dma_no_allocate, "Should we allocat on read in cache", true)
END_INIT_SIM_OBJECT_PARAMS(Device)
@@ -1458,6 +1461,7 @@ CREATE_SIM_OBJECT(Device)
params->dma_read_factor = dma_read_factor;
params->dma_write_delay = dma_write_delay;
params->dma_write_factor = dma_write_factor;
+ params->dma_no_allocate = dma_no_allocate;
return new Device(params);
}
diff --git a/dev/sinic.hh b/dev/sinic.hh
index 6597357a2..062a5408b 100644
--- a/dev/sinic.hh
+++ b/dev/sinic.hh
@@ -316,6 +316,7 @@ class Device : public Base
Tick dma_read_factor;
Tick dma_write_delay;
Tick dma_write_factor;
+ bool dma_no_allocate;
};
protected:
diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc
index b6aa9c6f2..a9c92b54a 100644
--- a/kern/linux/linux_system.cc
+++ b/kern/linux/linux_system.cc
@@ -109,12 +109,13 @@ LinuxSystem::LinuxSystem(Params *p)
kernelPanicEvent->schedule(addr);
else
panic("could not find kernel symbol \'panic\'");
-
+#if 0
kernelDieEvent = new BreakPCEvent(&pcEventQueue, "die if kernel");
if (kernelSymtab->findAddress("die_if_kernel", addr))
kernelDieEvent->schedule(addr);
else
panic("could not find kernel symbol \'die_if_kernel\'");
+#endif
#endif
diff --git a/python/m5/config.py b/python/m5/config.py
index 74988109b..2db2164fc 100644
--- a/python/m5/config.py
+++ b/python/m5/config.py
@@ -177,7 +177,7 @@ class Proxy(object):
# support multiplying proxies by constants
def __mul__(self, other):
- if not isinstance(other, int):
+ if not isinstance(other, (int, float)):
raise TypeError, "Proxy multiplier must be integer"
if self._multiplier == None:
self._multiplier = other
@@ -186,13 +186,19 @@ class Proxy(object):
self._multiplier *= other
return self
+ __rmul__ = __mul__
+
def _mulcheck(self, result):
if self._multiplier == None:
return result
if not isinstance(result, int):
- raise TypeError, "Proxy with multiplier resolves to " \
- "non-integer value"
- return result * self._multiplier
+ # this was an error, but for now we'll assume if it's not
+ # an int it must be a Frequency (yuk)
+ result = Frequency._convert(result)
+ # assuming we're dealing with a frequency here, turn it into
+ # a string and give it a 't' suffix so the Frequency._convert
+ # doesn't choke on it later.
+ return ("%d" % int(round((result * self._multiplier)))) + 't'
def unproxy(self, base, ptype):
obj = base
diff --git a/python/m5/objects/Ethernet.mpy b/python/m5/objects/Ethernet.mpy
index ed95ce233..141d138da 100644
--- a/python/m5/objects/Ethernet.mpy
+++ b/python/m5/objects/Ethernet.mpy
@@ -41,6 +41,7 @@ simobj EtherDev(DmaDevice):
dma_read_factor = Param.Latency('0us', "multiplier for dma reads")
dma_write_delay = Param.Latency('0us', "fixed delay for dma writes")
dma_write_factor = Param.Latency('0us', "multiplier for dma writes")
+ dma_no_allocate = Param.Bool(True, "Should we allocate cache on read")
rx_filter = Param.Bool(True, "Enable Receive Filter")
rx_delay = Param.Latency('1us', "Receive Delay")
@@ -64,6 +65,8 @@ simobj NSGigE(PciDevice):
dma_read_factor = Param.Latency('0us', "multiplier for dma reads")
dma_write_delay = Param.Latency('0us', "fixed delay for dma writes")
dma_write_factor = Param.Latency('0us', "multiplier for dma writes")
+ dma_no_allocate = Param.Bool(True, "Should we allocate cache on read")
+
rx_filter = Param.Bool(True, "Enable Receive Filter")
rx_delay = Param.Latency('1us', "Receive Delay")
@@ -72,6 +75,8 @@ simobj NSGigE(PciDevice):
rx_fifo_size = Param.MemorySize('128kB', "max size in bytes of rxFifo")
tx_fifo_size = Param.MemorySize('128kB', "max size in bytes of txFifo")
+ m5reg = Param.UInt32(0, "Register for m5 usage")
+
intr_delay = Param.Latency('0us', "Interrupt Delay in microseconds")
payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload")
physmem = Param.PhysicalMemory(parent.any, "Physical Memory")
diff --git a/sim/serialize.cc b/sim/serialize.cc
index 52008c394..ca0bc2bb0 100644
--- a/sim/serialize.cc
+++ b/sim/serialize.cc
@@ -172,15 +172,16 @@ template void \
arrayParamIn(Checkpoint *cp, const std::string &section, \
const std::string &name, type *param, int size);
-
-INSTANTIATE_PARAM_TEMPLATES(int8_t)
-INSTANTIATE_PARAM_TEMPLATES(uint8_t)
-INSTANTIATE_PARAM_TEMPLATES(int16_t)
-INSTANTIATE_PARAM_TEMPLATES(uint16_t)
-INSTANTIATE_PARAM_TEMPLATES(int32_t)
-INSTANTIATE_PARAM_TEMPLATES(uint32_t)
-INSTANTIATE_PARAM_TEMPLATES(int64_t)
-INSTANTIATE_PARAM_TEMPLATES(uint64_t)
+INSTANTIATE_PARAM_TEMPLATES(signed char)
+INSTANTIATE_PARAM_TEMPLATES(unsigned char)
+INSTANTIATE_PARAM_TEMPLATES(signed short)
+INSTANTIATE_PARAM_TEMPLATES(unsigned short)
+INSTANTIATE_PARAM_TEMPLATES(signed int)
+INSTANTIATE_PARAM_TEMPLATES(unsigned int)
+INSTANTIATE_PARAM_TEMPLATES(signed long)
+INSTANTIATE_PARAM_TEMPLATES(unsigned long)
+INSTANTIATE_PARAM_TEMPLATES(signed long long)
+INSTANTIATE_PARAM_TEMPLATES(unsigned long long)
INSTANTIATE_PARAM_TEMPLATES(bool)
INSTANTIATE_PARAM_TEMPLATES(string)
diff --git a/test/genini.py b/test/genini.py
index b8eda5d46..d04f049ea 100755
--- a/test/genini.py
+++ b/test/genini.py
@@ -44,7 +44,7 @@ try:
offset = arg.find('=')
if offset == -1:
name = arg
- value = '1'
+ value = 'True'
else:
name = arg[:offset]
value = arg[offset+1:]