[gem5-dev] Change in public/gem5[master]: scons: Pull style hook management out of the main SConstruct.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded a new patch set (#2). (  
https://gem5-review.googlesource.com/5563 )


Change subject: scons: Pull style hook management out of the main  
SConstruct.

..

scons: Pull style hook management out of the main SConstruct.

Put the code which supports style hooks for mercurial and git into two
scons "tools".

Change-Id: I3ffed85a177be4f9e458fff7b1cf16a3a479914e
---
M SConstruct
A site_scons/gem5_scons/__init__.py
A site_scons/gem5_scons/util.py
M site_scons/site_tools/default.py
A site_scons/site_tools/git.py
A site_scons/site_tools/mercurial.py
6 files changed, 322 insertions(+), 189 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/5563
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3ffed85a177be4f9e458fff7b1cf16a3a479914e
Gerrit-Change-Number: 5563
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: scons: Move python path management out of the SConstruct.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/5564



Change subject: scons: Move python path management out of the SConstruct.
..

scons: Move python path management out of the SConstruct.

Make site_init.py manage sys.path, and the "default" tool set
PYTHONPATH on any environment that's created. The paths to add are
tracked in a common gem5_python_paths.py.

Change-Id: I3387d4394d47a2f9c83322644cfd05909c6890fa
---
M SConstruct
A site_scons/gem5_python_paths.py
M site_scons/site_init.py
M site_scons/site_tools/default.py
4 files changed, 66 insertions(+), 11 deletions(-)



diff --git a/SConstruct b/SConstruct
index f0a3b65..9816c86 100755
--- a/SConstruct
+++ b/SConstruct
@@ -95,13 +95,6 @@
 import SCons
 import SCons.Node

-extra_python_paths = [
-Dir('src/python').srcnode().abspath, # gem5 includes
-Dir('ext/ply').srcnode().abspath, # ply is used by several files
-]
-
-sys.path[1:1] = extra_python_paths
-
 from m5.util import compareVersions, readCommand
 from m5.util.terminal import get_termcap

@@ -192,10 +185,6 @@
 print "No C++ compiler installed (package g++ on Ubuntu and RedHat)"
 Exit(1)

-# add useful python code PYTHONPATH so it can be used by subprocesses
-# as well
-main.AppendENVPath('PYTHONPATH', extra_python_paths)
-
 ###
 #
 # Figure out which configurations to set up based on the path(s) of
diff --git a/site_scons/gem5_python_paths.py  
b/site_scons/gem5_python_paths.py

new file mode 100644
index 000..635af42
--- /dev/null
+++ b/site_scons/gem5_python_paths.py
@@ -0,0 +1,55 @@
+# Copyright (c) 2013, 2015-2017 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Copyright (c) 2011 Advanced Micro Devices, Inc.
+# Copyright (c) 2009 The Hewlett-Packard Development Company
+# Copyright (c) 2004-2005 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Steve Reinhardt
+#  Nathan Binkert
+
+import SCons.Node.FS
+
+fs = SCons.Node.FS.get_default_fs()
+root = fs.Dir('#')
+extra_python_nodes = [
+root.Dir('src').Dir('python').srcnode(), # gem5 includes
+root.Dir('ext').Dir('ply').srcnode(), # ply is used by several files
+]
+
+extra_python_paths = [ node.abspath for node in extra_python_nodes ]
+
+__all__ = ['extra_python_paths']
diff --git a/site_scons/site_init.py b/site_scons/site_init.py
index bc80b23..a4b8b15 100644
--- a/site_scons/site_init.py
+++ b/site_scons/site_init.py
@@ -41,6 +41,8 @@
 # Authors: Steve Reinhardt
 #  Nathan Binkert

+from gem5_python_paths import extra_python_paths
+
 # Check for recent-enough Python and SCons versions.
 try:
 # Really old versions of scons only take two options for the
@@ -69,3 +71,5 @@
 http://gem5.org/wiki/index.php/Using_a_non-default_Python_installation
 """
 raise
+
+sys.path[1:1] = extra_python_paths
diff 

[gem5-dev] Change in public/gem5[master]: scons: Move Transform and termcap functionality into their own files.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/5565



Change subject: scons: Move Transform and termcap functionality into their  
own files.

..

scons: Move Transform and termcap functionality into their own files.

Change-Id: Ica08e93f3873a7eafd02fe7d44c3bdbf0ce7f6b7
---
M SConstruct
M site_scons/gem5_scons/__init__.py
M site_scons/gem5_scons/util.py
M src/SConscript
M src/arch/SConscript
M src/mem/protocol/SConscript
M src/mem/ruby/SConscript
M tests/SConscript
8 files changed, 149 insertions(+), 88 deletions(-)



diff --git a/SConstruct b/SConstruct
index 9816c86..095b58b 100755
--- a/SConstruct
+++ b/SConstruct
@@ -96,7 +96,6 @@
 import SCons.Node

 from m5.util import compareVersions, readCommand
-from m5.util.terminal import get_termcap

 help_texts = {
 "options" : "",
@@ -168,8 +167,6 @@
 print '--no-lto and --force-lto are mutually exclusive'
 Exit(1)

-termcap = get_termcap(GetOption('use_colors'))
-
 
 #
 # Set up the main build environment.
@@ -178,6 +175,10 @@

 main = Environment()

+from gem5_scons import Transform
+from gem5_scons.util import get_termcap
+termcap = get_termcap()
+
 main_dict_keys = main.Dictionary().keys()

 # Check that we have a C/C++ compiler
@@ -301,90 +302,6 @@
 # Add shared top-level headers
 main.Prepend(CPPPATH=Dir('include'))

-def strip_build_path(path, env):
-path = str(path)
-variant_base = env['BUILDROOT'] + os.path.sep
-if path.startswith(variant_base):
-path = path[len(variant_base):]
-elif path.startswith('build/'):
-path = path[6:]
-return path
-
-# Generate a string of the form:
-#   common/path/prefix/src1, src2 -> tgt1, tgt2
-# to print while building.
-class Transform(object):
-# all specific color settings should be here and nowhere else
-tool_color = termcap.Normal
-pfx_color = termcap.Yellow
-srcs_color = termcap.Yellow + termcap.Bold
-arrow_color = termcap.Blue + termcap.Bold
-tgts_color = termcap.Yellow + termcap.Bold
-
-def __init__(self, tool, max_sources=99):
-self.format = self.tool_color + (" [%8s] " % tool) \
-  + self.pfx_color + "%s" \
-  + self.srcs_color + "%s" \
-  + self.arrow_color + " -> " \
-  + self.tgts_color + "%s" \
-  + termcap.Normal
-self.max_sources = max_sources
-
-def __call__(self, target, source, env, for_signature=None):
-# truncate source list according to max_sources param
-source = source[0:self.max_sources]
-def strip(f):
-return strip_build_path(str(f), env)
-if len(source) > 0:
-srcs = map(strip, source)
-else:
-srcs = ['']
-tgts = map(strip, target)
-# surprisingly, os.path.commonprefix is a dumb char-by-char string
-# operation that has nothing to do with paths.
-com_pfx = os.path.commonprefix(srcs + tgts)
-com_pfx_len = len(com_pfx)
-if com_pfx:
-# do some cleanup and sanity checking on common prefix
-if com_pfx[-1] == ".":
-# prefix matches all but file extension: ok
-# back up one to change 'foo.cc -> o' to 'foo.cc -> .o'
-com_pfx = com_pfx[0:-1]
-elif com_pfx[-1] == "/":
-# common prefix is directory path: OK
-pass
-else:
-src0_len = len(srcs[0])
-tgt0_len = len(tgts[0])
-if src0_len == com_pfx_len:
-# source is a substring of target, OK
-pass
-elif tgt0_len == com_pfx_len:
-# target is a substring of source, need to back up to
-# avoid empty string on RHS of arrow
-sep_idx = com_pfx.rfind(".")
-if sep_idx != -1:
-com_pfx = com_pfx[0:sep_idx]
-else:
-com_pfx = ''
-elif src0_len > com_pfx_len and srcs[0][com_pfx_len]  
== ".":

-# still splitting at file extension: ok
-pass
-else:
-# probably a fluke; ignore it
-com_pfx = ''
-# recalculate length in case com_pfx was modified
-com_pfx_len = len(com_pfx)
-def fmt(files):
-f = map(lambda s: s[com_pfx_len:], files)
-return ', '.join(f)
-return self.format % (com_pfx, fmt(srcs), fmt(tgts))
-
-Export('Transform')
-
-# enable the regression script to use the termcap
-main['TERMCAP'] = termcap
-
 if GetOption('verbose'):
 def MakeAction(action, string, *args, **kwargs):
 return Action(action, *args, **kwargs)
diff --git 

[gem5-dev] Change in public/gem5[master]: scons: Pull style hook management out of the main SConstruct.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/5563



Change subject: scons: Pull style hook management out of the main  
SConstruct.

..

scons: Pull style hook management out of the main SConstruct.

Put the code which supports style hooks for mercurial and git into two
scons "tools".

Change-Id: I3ffed85a177be4f9e458fff7b1cf16a3a479914e
---
M SConstruct
A site_scons/gem5_scons/__init__.py
A site_scons/gem5_scons/util.py
M site_scons/site_tools/default.py
A site_scons/site_tools/git.py
A site_scons/site_tools/mercurial.py
6 files changed, 321 insertions(+), 189 deletions(-)



diff --git a/SConstruct b/SConstruct
index 7cf2c9c..f0a3b65 100755
--- a/SConstruct
+++ b/SConstruct
@@ -196,195 +196,6 @@
 # as well
 main.AppendENVPath('PYTHONPATH', extra_python_paths)

-
-#
-# Mercurial Stuff.
-#
-# If the gem5 directory is a mercurial repository, we should do some
-# extra things.
-#
-
-
-hgdir = main.root.Dir(".hg")
-
-
-style_message = """
-You're missing the gem5 style hook, which automatically checks your code
-against the gem5 style rules on %s.
-This script will now install the hook in your %s.
-Press enter to continue, or ctrl-c to abort: """
-
-mercurial_style_message = """
-You're missing the gem5 style hook, which automatically checks your code
-against the gem5 style rules on hg commit and qrefresh commands.
-This script will now install the hook in your .hg/hgrc file.
-Press enter to continue, or ctrl-c to abort: """
-
-git_style_message = """
-You're missing the gem5 style or commit message hook. These hooks help
-to ensure that your code follows gem5's style rules on git commit.
-This script will now install the hook in your .git/hooks/ directory.
-Press enter to continue, or ctrl-c to abort: """
-
-mercurial_style_upgrade_message = """
-Your Mercurial style hooks are not up-to-date. This script will now
-try to automatically update them. A backup of your hgrc will be saved
-in .hg/hgrc.old.
-Press enter to continue, or ctrl-c to abort: """
-
-mercurial_style_hook = """
-# The following lines were automatically added by gem5/SConstruct
-# to provide the gem5 style-checking hooks
-[extensions]
-hgstyle = %s/util/hgstyle.py
-
-[hooks]
-pretxncommit.style = python:hgstyle.check_style
-pre-qrefresh.style = python:hgstyle.check_style
-# End of SConstruct additions
-
-""" % (main.root.abspath)
-
-mercurial_lib_not_found = """
-Mercurial libraries cannot be found, ignoring style hook.  If
-you are a gem5 developer, please fix this and run the style
-hook. It is important.
-"""
-
-# Check for style hook and prompt for installation if it's not there.
-# Skip this if --ignore-style was specified, there's no interactive
-# terminal to prompt, or no recognized revision control system can be
-# found.
-ignore_style = GetOption('ignore_style') or not sys.stdin.isatty()
-
-# Try wire up Mercurial to the style hooks
-if not ignore_style and hgdir.exists():
-style_hook = True
-style_hooks = tuple()
-hgrc = hgdir.File('hgrc')
-hgrc_old = hgdir.File('hgrc.old')
-try:
-from mercurial import ui
-ui = ui.ui()
-ui.readconfig(hgrc.abspath)
-style_hooks = (ui.config('hooks', 'pretxncommit.style', None),
-   ui.config('hooks', 'pre-qrefresh.style', None))
-style_hook = all(style_hooks)
-style_extension = ui.config('extensions', 'style', None)
-except ImportError:
-print mercurial_lib_not_found
-
-if "python:style.check_style" in style_hooks:
-# Try to upgrade the style hooks
-print mercurial_style_upgrade_message
-# continue unless user does ctrl-c/ctrl-d etc.
-try:
-raw_input()
-except:
-print "Input exception, exiting scons.\n"
-sys.exit(1)
-shutil.copyfile(hgrc.abspath, hgrc_old.abspath)
-re_style_hook = re.compile(r"^([^=#]+)\.style\s*=\s*([^#\s]+).*")
-re_style_extension = re.compile("style\s*=\s*([^#\s]+).*")
-old, new = open(hgrc_old.abspath, 'r'), open(hgrc.abspath, 'w')
-for l in old:
-m_hook = re_style_hook.match(l)
-m_ext = re_style_extension.match(l)
-if m_hook:
-hook, check = m_hook.groups()
-if check != "python:style.check_style":
-print "Warning: %s.style is using a non-default " \
-"checker: %s" % (hook, check)
-if hook not in ("pretxncommit", "pre-qrefresh"):
-print "Warning: Updating unknown style hook: %s" % hook
-
-l = "%s.style = python:hgstyle.check_style\n" % hook
-elif m_ext and m_ext.group(1) == style_extension:
-l = "hgstyle = 

[gem5-dev] Change in public/gem5[master]: scons: Move scons and python version checking into site_init.py.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/5561



Change subject: scons: Move scons and python version checking into  
site_init.py.

..

scons: Move scons and python version checking into site_init.py.

In an effort to shrink and modularize the main scons files, this
change pulls the scons and python version checking code out of the
main file and into site_init.py which runs before the SConstruct
starts. This will be a place to put really generic code which has to
do with the very fundemental aspects of getting scons to work. Other
checks, like checks for particular tools or particular versions of
tools, will happen in other more specialized files.

Change-Id: Icd00ecadbe1141aef4dbadcf42d6ddef1f3a701f
---
M SConstruct
A site_scons/site_init.py
2 files changed, 71 insertions(+), 29 deletions(-)



diff --git a/SConstruct b/SConstruct
index 230232d..49bf347 100755
--- a/SConstruct
+++ b/SConstruct
@@ -78,35 +78,6 @@
 #
 ###

-# Check for recent-enough Python and SCons versions.
-try:
-# Really old versions of scons only take two options for the
-# function, so check once without the revision and once with the
-# revision, the first instance will fail for stuff other than
-# 0.98, and the second will fail for 0.98.0
-EnsureSConsVersion(0, 98)
-EnsureSConsVersion(0, 98, 1)
-except SystemExit, e:
-print """
-For more details, see:
-http://gem5.org/Dependencies
-"""
-raise
-
-# pybind11 requires python 2.7
-try:
-EnsurePythonVersion(2, 7)
-except SystemExit, e:
-print """
-You can use a non-default installation of the Python interpreter by
-rearranging your PATH so that scons finds the non-default 'python' and
-'python-config' first.
-
-For more details, see:
-http://gem5.org/wiki/index.php/Using_a_non-default_Python_installation
-"""
-raise
-
 # Global Python includes
 import itertools
 import os
diff --git a/site_scons/site_init.py b/site_scons/site_init.py
new file mode 100644
index 000..bc80b23
--- /dev/null
+++ b/site_scons/site_init.py
@@ -0,0 +1,71 @@
+# Copyright (c) 2013, 2015-2017 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Copyright (c) 2011 Advanced Micro Devices, Inc.
+# Copyright (c) 2009 The Hewlett-Packard Development Company
+# Copyright (c) 2004-2005 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Steve Reinhardt
+#  Nathan Binkert
+
+# Check for recent-enough Python and SCons versions.
+try:
+# Really old versions of scons only take two options for the
+# function, so check once without the revision and once with the
+# revision, the first instance will fail for stuff other than
+# 0.98, and the second will fail for 0.98.0
+EnsureSConsVersion(0, 98)
+EnsureSConsVersion(0, 98, 1)
+except SystemExit, e:
+

[gem5-dev] Change in public/gem5[master]: scons: Override the "default" tool to set up the default env.

2017-11-08 Thread Gabe Black (Gerrit)
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/5562



Change subject: scons: Override the "default" tool to set up the default  
env.

..

scons: Override the "default" tool to set up the default env.

This imports various environment variables into the scons environment,
and sets some general properties on it.

Change-Id: Ib255955090c7b1e1cb80c703c18a9c867fcf1c9e
---
M SConstruct
A site_scons/site_tools/default.py
2 files changed, 88 insertions(+), 27 deletions(-)



diff --git a/SConstruct b/SConstruct
index 49bf347..7cf2c9c 100755
--- a/SConstruct
+++ b/SConstruct
@@ -183,33 +183,7 @@
 #
 

-# export TERM so that clang reports errors in color
-use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
- 'LIBRARY_PATH', 'PATH', 'PKG_CONFIG_PATH', 'PROTOC',
- 'PYTHONPATH', 'RANLIB', 'TERM' ])
-
-use_prefixes = [
-"ASAN_",   # address sanitizer symbolizer path and settings
-"CCACHE_", # ccache (caching compiler wrapper) configuration
-"CCC_",# clang static analyzer configuration
-"DISTCC_", # distcc (distributed compiler wrapper)  
configuration

-"INCLUDE_SERVER_", # distcc pump server settings
-"M5",  # M5 configuration (e.g., path to kernels)
-]
-
-use_env = {}
-for key,val in sorted(os.environ.iteritems()):
-if key in use_vars or \
-any([key.startswith(prefix) for prefix in use_prefixes]):
-use_env[key] = val
-
-# Tell scons to avoid implicit command dependencies to avoid issues
-# with the param wrappes being compiled twice (see
-# http://scons.tigris.org/issues/show_bug.cgi?id=2811)
-main = Environment(ENV=use_env, IMPLICIT_COMMAND_DEPENDENCIES=0)
-main.Decider('MD5-timestamp')
-main.root = Dir(".") # The current directory (where this file  
lives).

-main.srcdir = Dir("src") # The source directory
+main = Environment()

 main_dict_keys = main.Dictionary().keys()

diff --git a/site_scons/site_tools/default.py  
b/site_scons/site_tools/default.py

new file mode 100644
index 000..1d7d0d9
--- /dev/null
+++ b/site_scons/site_tools/default.py
@@ -0,0 +1,87 @@
+# Copyright (c) 2013, 2015-2017 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Copyright (c) 2011 Advanced Micro Devices, Inc.
+# Copyright (c) 2009 The Hewlett-Packard Development Company
+# Copyright (c) 2004-2005 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Steve Reinhardt
+#  Nathan Binkert
+
+import os
+
+import SCons.Tool
+import SCons.Tool.default
+
+def common_config(env):
+# export TERM so that clang reports errors in color
+use_vars = set([ 'AS', 'AR', 'CC', 'CXX', 'HOME', 'LD_LIBRARY_PATH',
+ 'LIBRARY_PATH', 'PATH', 

[gem5-dev] Change in public/gem5[master]: tests/ext: Add a new testing library proposal

2017-11-08 Thread Sean Wilson (Gerrit)

Hello Jason Lowe-Power,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/4421

to look at the new patch set (#9).

Change subject: tests/ext: Add a new testing library proposal
..

tests/ext: Add a new testing library proposal

The new test library is split into two parts: The framework which resides
in ext/, and the gem5 helping components in /tests/gem5.

Change-Id: Ib4f3ae8d7eb96a7306335a3e739b7e8041aa99b9
Signed-off-by: Sean Wilson 
---
A ext/testlib/FILES.rst
A ext/testlib/__init__.py
A ext/testlib/config.py
A ext/testlib/fixture.py
A ext/testlib/helper.py
A ext/testlib/loader.py
A ext/testlib/logger.py
A ext/testlib/main.py
A ext/testlib/query.py
A ext/testlib/result.py
A ext/testlib/runner/__init__.py
A ext/testlib/runner/parallel.py
A ext/testlib/runner/runner.py
A ext/testlib/suite.py
A ext/testlib/tee.py
A ext/testlib/terminal.py
A ext/testlib/test.py
A ext/testlib/uid.py
A ext/testlib/util.py
A tests/.gitignore
A tests/credentials.ini
A tests/gem5/__init__.py
A tests/gem5/fixture.py
A tests/gem5/suite.py
A tests/gem5/verifier.py
A tests/legacy-configs/run.py
A tests/main.py
27 files changed, 4,903 insertions(+), 0 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/4421
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib4f3ae8d7eb96a7306335a3e739b7e8041aa99b9
Gerrit-Change-Number: 4421
Gerrit-PatchSet: 9
Gerrit-Owner: Sean Wilson 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Sean Wilson 
Gerrit-CC: Rahul Thakur 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: dev: Move generic serial devices to src/dev/serial

2017-11-08 Thread Andreas Sandberg (Gerrit)
Andreas Sandberg has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/4291 )


Change subject: dev: Move generic serial devices to src/dev/serial
..

dev: Move generic serial devices to src/dev/serial

Change-Id: I104227fc460f8b561e7375b329a541c1fce881b2
Signed-off-by: Andreas Sandberg 
Reviewed-by: Curtis Dunham 
Reviewed-on: https://gem5-review.googlesource.com/4291
Reviewed-by: Gabe Black 
---
M src/dev/SConscript
M src/dev/alpha/backdoor.cc
M src/dev/alpha/tsunami.cc
M src/dev/arm/gic_pl390.cc
M src/dev/arm/pl011.hh
M src/dev/arm/realview.cc
M src/dev/arm/vgic.cc
M src/dev/mips/malta.cc
C src/dev/serial/SConscript
R src/dev/serial/Serial.py
R src/dev/serial/Terminal.py
R src/dev/serial/Uart.py
R src/dev/serial/serial.cc
R src/dev/serial/serial.hh
R src/dev/serial/terminal.cc
R src/dev/serial/terminal.hh
R src/dev/serial/uart.cc
R src/dev/serial/uart.hh
R src/dev/serial/uart8250.cc
R src/dev/serial/uart8250.hh
M src/dev/sparc/t1000.cc
M src/dev/virtio/block.hh
M src/dev/virtio/console.hh
M src/dev/x86/pc.cc
24 files changed, 37 insertions(+), 48 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/dev/SConscript b/src/dev/SConscript
index b95d360..6939e03 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -44,9 +44,6 @@

 SimObject('BadDevice.py')
 SimObject('Platform.py')
-SimObject('Serial.py')
-SimObject('Terminal.py')
-SimObject('Uart.py')

 Source('baddev.cc')
 Source('intel_8254_timer.cc')
@@ -54,13 +51,6 @@
 Source('pixelpump.cc')
 Source('platform.cc')
 Source('ps2.cc')
-Source('serial.cc')
-Source('terminal.cc')
-Source('uart.cc')
-Source('uart8250.cc')

 DebugFlag('Intel8254Timer')
 DebugFlag('MC146818')
-DebugFlag('Terminal')
-DebugFlag('TerminalVerbose')
-DebugFlag('Uart')
diff --git a/src/dev/alpha/backdoor.cc b/src/dev/alpha/backdoor.cc
index 5187e5b..e2de197 100644
--- a/src/dev/alpha/backdoor.cc
+++ b/src/dev/alpha/backdoor.cc
@@ -52,7 +52,7 @@
 #include "dev/alpha/tsunami_io.hh"
 #include "dev/platform.hh"
 #include "dev/storage/simple_disk.hh"
-#include "dev/terminal.hh"
+#include "dev/serial/terminal.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"
 #include "mem/physical.hh"
diff --git a/src/dev/alpha/tsunami.cc b/src/dev/alpha/tsunami.cc
index 82a3812..30df89d 100644
--- a/src/dev/alpha/tsunami.cc
+++ b/src/dev/alpha/tsunami.cc
@@ -44,7 +44,6 @@
 #include "dev/alpha/tsunami_cchip.hh"
 #include "dev/alpha/tsunami_io.hh"
 #include "dev/alpha/tsunami_pchip.hh"
-#include "dev/terminal.hh"

 using namespace std;
 //Should this be AlphaISA?
diff --git a/src/dev/arm/gic_pl390.cc b/src/dev/arm/gic_pl390.cc
index d2ec1d7..4818be6 100644
--- a/src/dev/arm/gic_pl390.cc
+++ b/src/dev/arm/gic_pl390.cc
@@ -48,7 +48,6 @@
 #include "debug/GIC.hh"
 #include "debug/IPI.hh"
 #include "debug/Interrupt.hh"
-#include "dev/terminal.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"

diff --git a/src/dev/arm/pl011.hh b/src/dev/arm/pl011.hh
index d6c839c..2317b31 100644
--- a/src/dev/arm/pl011.hh
+++ b/src/dev/arm/pl011.hh
@@ -50,7 +50,7 @@
 #define __DEV_ARM_PL011_H__

 #include "dev/arm/amba_device.hh"
-#include "dev/uart.hh"
+#include "dev/serial/uart.hh"

 class BaseGic;
 struct Pl011Params;
diff --git a/src/dev/arm/realview.cc b/src/dev/arm/realview.cc
index e5e7afd..8524b23 100644
--- a/src/dev/arm/realview.cc
+++ b/src/dev/arm/realview.cc
@@ -53,7 +53,6 @@
 #include "config/the_isa.hh"
 #include "cpu/intr_control.hh"
 #include "dev/arm/base_gic.hh"
-#include "dev/terminal.hh"
 #include "sim/system.hh"

 using namespace std;
diff --git a/src/dev/arm/vgic.cc b/src/dev/arm/vgic.cc
index cc8ad77..5295204 100644
--- a/src/dev/arm/vgic.cc
+++ b/src/dev/arm/vgic.cc
@@ -43,7 +43,6 @@
 #include "debug/Checkpoint.hh"
 #include "debug/VGIC.hh"
 #include "dev/arm/base_gic.hh"
-#include "dev/terminal.hh"
 #include "mem/packet.hh"
 #include "mem/packet_access.hh"

diff --git a/src/dev/mips/malta.cc b/src/dev/mips/malta.cc
index 8843d4b..a259047 100755
--- a/src/dev/mips/malta.cc
+++ b/src/dev/mips/malta.cc
@@ -44,7 +44,6 @@
 #include "debug/Malta.hh"
 #include "dev/mips/malta_cchip.hh"
 #include "dev/mips/malta_io.hh"
-#include "dev/terminal.hh"
 #include "params/Malta.hh"
 #include "sim/system.hh"

diff --git a/src/dev/Serial.py b/src/dev/serial/SConscript
similarity index 82%
copy from src/dev/Serial.py
copy to src/dev/serial/SConscript
index 7871b48..b9f13f5 100644
--- a/src/dev/Serial.py
+++ b/src/dev/serial/SConscript
@@ -1,4 +1,6 @@
-# Copyright (c) 2014, 2017 ARM Limited
+# -*- mode:python -*-
+
+# Copyright (c) 2017 ARM Limited
 # All rights reserved.
 #
 # The license below extends only to copyright in the software and shall
@@ -10,6 +12,9 @@
 # unmodified and in its entirety in all distributions of the software,
 # 

[gem5-dev] Change in public/gem5[master]: arch-arm: Corrected encoding for T32 HVC instruction

2017-11-08 Thread Giacomo Travaglini (Gerrit)
Giacomo Travaglini has uploaded this change for review. (  
https://gem5-review.googlesource.com/5541



Change subject: arch-arm: Corrected encoding for T32 HVC instruction
..

arch-arm: Corrected encoding for T32 HVC instruction

This patch corrects the encoding of the HVC (Hypervisor Call) for the
T32 instruction set.

Change-Id: I6f77eaf5c586697e9ccd588419c61e6d90c6c7bf
Signed-off-by: Giacomo Travaglini 
Reviewed-by: Chuan Zhu 
---
M src/arch/arm/isa/formats/branch.isa
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/src/arch/arm/isa/formats/branch.isa  
b/src/arch/arm/isa/formats/branch.isa

index 513506d..df85b08 100644
--- a/src/arch/arm/isa/formats/branch.isa
+++ b/src/arch/arm/isa/formats/branch.isa
@@ -1,6 +1,6 @@
 // -*- mode:c++ -*-

-// Copyright (c) 2010, 2012-2013 ARM Limited
+// Copyright (c) 2010,2012-2013,2017 ARM Limited
 // All rights reserved
 //
 // The license below extends only to copyright in the software and shall
@@ -247,7 +247,7 @@
 }
 }
 }
-  case 0xfe:
+  case 0x7e:
 {
 uint32_t imm16 = (bits(machInst, 19, 16) << 12) |
  (bits(machInst, 11,  0) <<  0);

--
To view, visit https://gem5-review.googlesource.com/5541
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f77eaf5c586697e9ccd588419c61e6d90c6c7bf
Gerrit-Change-Number: 5541
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: dev: Move generic serial devices to src/dev/serial

2017-11-08 Thread Andreas Sandberg (Gerrit)

Hello Gabe Black, Jason Lowe-Power, Curtis Dunham,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/4291

to look at the new patch set (#3).

Change subject: dev: Move generic serial devices to src/dev/serial
..

dev: Move generic serial devices to src/dev/serial

Change-Id: I104227fc460f8b561e7375b329a541c1fce881b2
Signed-off-by: Andreas Sandberg 
Reviewed-by: Curtis Dunham 
---
M src/dev/SConscript
M src/dev/alpha/backdoor.cc
M src/dev/alpha/tsunami.cc
M src/dev/arm/gic_pl390.cc
M src/dev/arm/pl011.hh
M src/dev/arm/realview.cc
M src/dev/arm/vgic.cc
M src/dev/mips/malta.cc
C src/dev/serial/SConscript
R src/dev/serial/Serial.py
R src/dev/serial/Terminal.py
R src/dev/serial/Uart.py
R src/dev/serial/serial.cc
R src/dev/serial/serial.hh
R src/dev/serial/terminal.cc
R src/dev/serial/terminal.hh
R src/dev/serial/uart.cc
R src/dev/serial/uart.hh
R src/dev/serial/uart8250.cc
R src/dev/serial/uart8250.hh
M src/dev/sparc/t1000.cc
M src/dev/virtio/block.hh
M src/dev/virtio/console.hh
M src/dev/x86/pc.cc
24 files changed, 37 insertions(+), 48 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/4291
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I104227fc460f8b561e7375b329a541c1fce881b2
Gerrit-Change-Number: 4291
Gerrit-PatchSet: 3
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Curtis Dunham 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: dev: Add a dummy serial device

2017-11-08 Thread Andreas Sandberg (Gerrit)
Andreas Sandberg has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/4290 )


Change subject: dev: Add a dummy serial device
..

dev: Add a dummy serial device

Add a dummy serial device that discards any output and doesn't provide
any input. This device can be used to terminate UARTs that don't have
a default device (e.g., a terminal) attached.

Change-Id: I4a6b0b5037ce360f59bfb5c566e1698d113a1d26
Signed-off-by: Andreas Sandberg 
Reviewed-by: Curtis Dunham 
Reviewed-on: https://gem5-review.googlesource.com/4290
Reviewed-by: Gabe Black 
---
M src/dev/Serial.py
M src/dev/serial.cc
M src/dev/serial.hh
3 files changed, 41 insertions(+), 0 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/dev/Serial.py b/src/dev/Serial.py
index bbc792b..7871b48 100644
--- a/src/dev/Serial.py
+++ b/src/dev/Serial.py
@@ -42,3 +42,7 @@
 type = 'SerialDevice'
 abstract = True
 cxx_header = "dev/serial.hh"
+
+class SerialNullDevice(SerialDevice):
+type = 'SerialNullDevice'
+cxx_header = "dev/serial.hh"
diff --git a/src/dev/serial.cc b/src/dev/serial.cc
index 63e8a38..68fc94c 100644
--- a/src/dev/serial.cc
+++ b/src/dev/serial.cc
@@ -41,6 +41,7 @@

 #include "base/misc.hh"
 #include "params/SerialDevice.hh"
+#include "params/SerialNullDevice.hh"

 SerialDevice::SerialDevice(const SerialDeviceParams *p)
 : SimObject(p), interfaceCallback(nullptr)
@@ -71,3 +72,24 @@
 interfaceCallback->process();
 }

+
+
+
+SerialNullDevice::SerialNullDevice(const SerialNullDeviceParams *p)
+: SerialDevice(p)
+{
+}
+
+uint8_t
+SerialNullDevice::readData()
+{
+panic("SerialNullDevice does not have pending data.\n");
+}
+
+
+
+SerialNullDevice *
+SerialNullDeviceParams::create()
+{
+return new SerialNullDevice(this);
+}
diff --git a/src/dev/serial.hh b/src/dev/serial.hh
index 4ea2f5e..230ecaa 100644
--- a/src/dev/serial.hh
+++ b/src/dev/serial.hh
@@ -44,6 +44,7 @@
 #include "sim/sim_object.hh"

 struct SerialDeviceParams;
+struct SerialNullDeviceParams;

 /**
  * Base class for serial devices such as terminals.
@@ -140,4 +141,18 @@
 Callback *interfaceCallback;
 };

+/**
+ * Dummy serial device that discards all data sent to it.
+ */
+class SerialNullDevice : public SerialDevice
+{
+  public:
+SerialNullDevice(const SerialNullDeviceParams *p);
+
+  public:
+bool dataAvailable() const override { return false; }
+void writeData(uint8_t c) override {};
+uint8_t readData() override;
+};
+
 #endif // __DEV_SERIAL_HH__

--
To view, visit https://gem5-review.googlesource.com/4290
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4a6b0b5037ce360f59bfb5c566e1698d113a1d26
Gerrit-Change-Number: 4290
Gerrit-PatchSet: 4
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Curtis Dunham 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: dev: Refactor UART->Terminal interface

2017-11-08 Thread Andreas Sandberg (Gerrit)
Andreas Sandberg has submitted this change and it was merged. (  
https://gem5-review.googlesource.com/4289 )


Change subject: dev: Refactor UART->Terminal interface
..

dev: Refactor UART->Terminal interface

The UART models currently assume that they are always wired to a
terminal. While true at the moment, this isn't necessarily a valid
assumption. This change introduces the SerialDevice class that defines
the interface for serial devices. Currently, Terminal is the only
class that implements this interface.

Change-Id: I74fefafbbaf5ac1ec0d4ec0b5a0f4b246fdad305
Signed-off-by: Andreas Sandberg 
Reviewed-by: Curtis Dunham 
Reviewed-on: https://gem5-review.googlesource.com/4289
Reviewed-by: Gabe Black 
---
M src/dev/SConscript
A src/dev/Serial.py
M src/dev/Terminal.py
M src/dev/Uart.py
M src/dev/alpha/backdoor.cc
M src/dev/arm/pl011.cc
A src/dev/serial.cc
A src/dev/serial.hh
M src/dev/terminal.cc
M src/dev/terminal.hh
M src/dev/uart.cc
M src/dev/uart.hh
M src/dev/uart8250.cc
M src/dev/virtio/VirtIOConsole.py
M src/dev/virtio/console.cc
M src/dev/virtio/console.hh
16 files changed, 309 insertions(+), 77 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/src/dev/SConscript b/src/dev/SConscript
index 9cfda05..b95d360 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -44,6 +44,7 @@

 SimObject('BadDevice.py')
 SimObject('Platform.py')
+SimObject('Serial.py')
 SimObject('Terminal.py')
 SimObject('Uart.py')

@@ -53,6 +54,7 @@
 Source('pixelpump.cc')
 Source('platform.cc')
 Source('ps2.cc')
+Source('serial.cc')
 Source('terminal.cc')
 Source('uart.cc')
 Source('uart8250.cc')
diff --git a/src/dev/Serial.py b/src/dev/Serial.py
new file mode 100644
index 000..bbc792b
--- /dev/null
+++ b/src/dev/Serial.py
@@ -0,0 +1,44 @@
+# Copyright (c) 2014, 2017 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Andreas Sandberg
+
+from m5.params import *
+from m5.SimObject import SimObject
+
+class SerialDevice(SimObject):
+type = 'SerialDevice'
+abstract = True
+cxx_header = "dev/serial.hh"
diff --git a/src/dev/Terminal.py b/src/dev/Terminal.py
index 2b54f9d..9b50111 100644
--- a/src/dev/Terminal.py
+++ b/src/dev/Terminal.py
@@ -29,8 +29,9 @@
 from m5.SimObject import SimObject
 from m5.params import *
 from m5.proxy import *
+from Serial import SerialDevice

-class Terminal(SimObject):
+class Terminal(SerialDevice):
 type = 'Terminal'
 cxx_header = "dev/terminal.hh"
 intr_control = Param.IntrControl(Parent.any, "interrupt controller")
diff --git a/src/dev/Uart.py b/src/dev/Uart.py
index c3bc9dd..c3bfd1b 100644
--- a/src/dev/Uart.py
+++ b/src/dev/Uart.py
@@ -29,13 +29,14 @@
 from m5.params import *
 from m5.proxy import *
 from Device import BasicPioDevice
+from Serial 

[gem5-dev] Change in public/gem5[master]: dev: Refactor UART->Terminal interface

2017-11-08 Thread Andreas Sandberg (Gerrit)

Hello Gabe Black, Jason Lowe-Power, Curtis Dunham,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/4289

to look at the new patch set (#3).

Change subject: dev: Refactor UART->Terminal interface
..

dev: Refactor UART->Terminal interface

The UART models currently assume that they are always wired to a
terminal. While true at the moment, this isn't necessarily a valid
assumption. This change introduces the SerialDevice class that defines
the interface for serial devices. Currently, Terminal is the only
class that implements this interface.

Change-Id: I74fefafbbaf5ac1ec0d4ec0b5a0f4b246fdad305
Signed-off-by: Andreas Sandberg 
Reviewed-by: Curtis Dunham 
---
M src/dev/SConscript
A src/dev/Serial.py
M src/dev/Terminal.py
M src/dev/Uart.py
M src/dev/alpha/backdoor.cc
M src/dev/arm/pl011.cc
A src/dev/serial.cc
A src/dev/serial.hh
M src/dev/terminal.cc
M src/dev/terminal.hh
M src/dev/uart.cc
M src/dev/uart.hh
M src/dev/uart8250.cc
M src/dev/virtio/VirtIOConsole.py
M src/dev/virtio/console.cc
M src/dev/virtio/console.hh
16 files changed, 309 insertions(+), 77 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/4289
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I74fefafbbaf5ac1ec0d4ec0b5a0f4b246fdad305
Gerrit-Change-Number: 4289
Gerrit-PatchSet: 3
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Curtis Dunham 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in public/gem5[master]: mem: Add function to check if the slave can receive a timing req

2017-11-08 Thread Nikos Nikoleris (Gerrit)

Hello Christian Menard,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/5041

to look at the new patch set (#3).

Change subject: mem: Add function to check if the slave can receive a  
timing req

..

mem: Add function to check if the slave can receive a timing req

This changeset adds support for tryTiming, an interface that allows a
master to check if the slave is busy or otherwise if it can accept a
timingReq.

Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
---
M src/mem/port.cc
M src/mem/port.hh
2 files changed, 29 insertions(+), 2 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/5041
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
Gerrit-Change-Number: 5041
Gerrit-PatchSet: 3
Gerrit-Owner: Nikos Nikoleris 
Gerrit-Reviewer: Christian Menard 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-CC: Matthias Jung 
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Cron <m5test@zizzer> /z/m5/regression/do-regression quick

2017-11-08 Thread Cron Daemon
* build/RISCV/tests/opt/quick/se/00.hello/riscv/linux/minor-timing: FAILED!
* build/RISCV/tests/opt/quick/se/00.hello/riscv/linux/o3-timing: FAILED!
* build/RISCV/tests/opt/quick/se/00.hello/riscv/linux/simple-atomic: FAILED!
* build/RISCV/tests/opt/quick/se/00.hello/riscv/linux/simple-timing: FAILED!
* build/RISCV/tests/opt/quick/se/00.hello/riscv/linux/simple-timing-ruby: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64a/minor-timing: 
FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64a/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64a/simple-atomic: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64a/simple-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64a/simple-timing-ruby:
 FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64c/minor-timing: 
FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64c/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64c/simple-atomic: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64c/simple-timing: 
FAILED!
*** diff[simerr]: SKIPPED* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64d/minor-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64c/simple-timing-ruby:
 FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64d/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64d/simple-atomic: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64d/simple-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64d/simple-timing-ruby:
 FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64f/minor-timing: 
FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64f/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64f/simple-atomic: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64f/simple-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64f/simple-timing-ruby:
 FAILED!
 * 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64i/minor-timing: 
FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64i/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64i/simple-atomic: 
FAILED!*** gem5 stderr ***
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64i/simple-timing-ruby:
 FAILED!*** diff[config.ini]: SKIPPED
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64i/simple-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64m/minor-timing: 
FAILED!
* build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64m/o3-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64m/simple-atomic: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64m/simple-timing: 
FAILED!
* 
build/RISCV/tests/opt/quick/se/02.insttest/riscv/linux-rv64m/simple-timing-ruby:
 FAILED!
* build/ALPHA/tests/opt/quick/se/00.hello/alpha/linux/minor-timing: CHANGED!
* 
build/ALPHA/tests/opt/quick/fs/80.netperf-stream/alpha/linux/twosys-tsunami-simple-atomic:
 CHANGED!
* build/ARM/tests/opt/quick/se/00.hello/arm/linux/minor-timing: CHANGED!
* build/ARM/tests/opt/quick/se/00.hello/arm/linux/o3-timing: CHANGED!
* build/ARM/tests/opt/quick/se/00.hello/arm/linux/o3-timing-checker: 
CHANGED!
* build/ARM/tests/opt/quick/se/00.hello/arm/linux/simple-atomic: CHANGED!
* 
build/ARM/tests/opt/quick/se/00.hello/arm/linux/simple-atomic-dummychecker: 
CHANGED!
* build/ARM/tests/opt/quick/se/00.hello/arm/linux/simple-timing: CHANGED!
* 
build/ARM/tests/opt/quick/se/03.learning-gem5/arm/linux/learning-gem5-p1-simple:
 CHANGED!Statistics mismatch
* 
build/ARM/tests/opt/quick/se/03.learning-gem5/arm/linux/learning-gem5-p1-two-level:
 CHANGED!
* build/ARM/tests/opt/quick/se/10.mcf/arm/linux/simple-atomic: CHANGED!
* build/ARM/tests/opt/quick/se/10.mcf/arm/linux/simple-timing: CHANGED!
* build/ARM/tests/opt/quick/se/50.vortex/arm/linux/simple-atomic: CHANGED!
* build/ARM/tests/opt/quick/se/50.vortex/arm/linux/simple-timing: CHANGED!
* build/ARM/tests/opt/quick/se/70.twolf/arm/linux/simple-atomic: CHANGED!
* build/ARM/tests/opt/quick/se/70.twolf/arm/linux/simple-timing: CHANGED!
* 
build/ARM/tests/opt/quick/fs/10.linux-boot/arm/linux/realview-simple-atomic: 
CHANGED!
* 
build/ARM/tests/opt/quick/fs/10.linux-boot/arm/linux/realview-simple-atomic-dual:
 CHANGED!
*** diff[simout]: SKIPPED* 
build/ARM/tests/opt/quick/fs/10.linux-boot/arm/linux/realview-simple-timing-dual:
 CHANGED!
* 
build/ARM/tests/opt/quick/fs/10.linux-boot/arm/linux/realview-simple-timing: