Re: [gem5-dev] Bug on page http://gem5.org/Download

2019-11-21 Thread Jason Lowe-Power
Thanks, Gabe.

Expect some info about moving to a new website in a few days so we
don't have to deal with these permission issues anymore.

Cheers,
Jason

On Thu, Nov 21, 2019 at 4:10 PM Gabe Black  wrote:
>
> My ye-olde account from back when I was in grad school has enough
> permission to edit the page, so I made the edit. The problem was it was
> formatted as an internal link in the markup, but it was an external link.
> The internal links use a | to separate the target and the text, while
> external links use a space. The | and the first word of the text got
> grouped with the URL, making it point to the wrong place. That's also why
> there were stray []s around the link. External links only have single []
> while internal ones have double [[]]. The extras just ended up as text on
> the page.
>
> Gabe
>
> On Thu, Nov 21, 2019 at 1:47 PM Vince Harron  wrote:
>
> > You do not have permission to edit this page, for the following reason:
> >
> > This page has been protected to prevent editing or other actions.
> >
> > On Thu, Nov 21, 2019 at 1:46 PM Vince Harron  wrote:
> >
> > > *blush* I didn't even notice it is a wiki.
> > >
> > > On Thu, Nov 21, 2019 at 10:46 AM Jason Lowe-Power 
> > > wrote:
> > >
> > >> Thanks for letting us know! To fix this yourself. Anyone can edit the
> > >> wiki.
> > >>
> > >> Cheers,
> > >> Jason
> > >>
> > >> On Tue, Nov 19, 2019 at 10:53 AM Vince Harron 
> > wrote:
> > >> >
> > >> > On the page http://gem5.org/Download
> > >> >
> > >> > The link "[FS cheat scripts] " points to
> > >> >
> > >> > https://github.com/cirosantilli/linux-kernel-module-cheat%7Cgem5
> > >> >
> > >> > Which returns 404.
> > >> >
> > >> > I think the correct link is
> > >> >
> > >> > https://github.com/cirosantilli/linux-kernel-module-cheat
> > >> >
> > >> > I'm not sure where this lives in source control or I would upload a
> > >> patch
> > >> > myself.
> > >> >
> > >> > Thanks,
> > >> >
> > >> > Vince
> > >> >
> > >> > --
> > >> >
> > >> > Vince Harron |  Engineering Manager |  vhar...@google.com |
> > >> 858-442-0868 <(858)%20442-0868> <(858)%20442-0868>
> > >> > ___
> > >> > gem5-dev mailing list
> > >> > gem5-dev@gem5.org
> > >> > http://m5sim.org/mailman/listinfo/gem5-dev
> > >> ___
> > >> gem5-dev mailing list
> > >> gem5-dev@gem5.org
> > >> http://m5sim.org/mailman/listinfo/gem5-dev
> > >
> > >
> > >
> > > --
> > >
> > > Vince Harron |  Engineering Manager |  vhar...@google.com |
> > 858-442-0868 <(858)%20442-0868>
> > > <(858)%20442-0868>
> > >
> >
> >
> > --
> >
> > Vince Harron |  Engineering Manager |  vhar...@google.com |  858-442-0868
> > <(858)%20442-0868>
> > ___
> > gem5-dev mailing list
> > gem5-dev@gem5.org
> > http://m5sim.org/mailman/listinfo/gem5-dev
> ___
> gem5-dev mailing list
> gem5-dev@gem5.org
> http://m5sim.org/mailman/listinfo/gem5-dev
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Re: [gem5-dev] Bug on page http://gem5.org/Download

2019-11-21 Thread Gabe Black
My ye-olde account from back when I was in grad school has enough
permission to edit the page, so I made the edit. The problem was it was
formatted as an internal link in the markup, but it was an external link.
The internal links use a | to separate the target and the text, while
external links use a space. The | and the first word of the text got
grouped with the URL, making it point to the wrong place. That's also why
there were stray []s around the link. External links only have single []
while internal ones have double [[]]. The extras just ended up as text on
the page.

Gabe

On Thu, Nov 21, 2019 at 1:47 PM Vince Harron  wrote:

> You do not have permission to edit this page, for the following reason:
>
> This page has been protected to prevent editing or other actions.
>
> On Thu, Nov 21, 2019 at 1:46 PM Vince Harron  wrote:
>
> > *blush* I didn't even notice it is a wiki.
> >
> > On Thu, Nov 21, 2019 at 10:46 AM Jason Lowe-Power 
> > wrote:
> >
> >> Thanks for letting us know! To fix this yourself. Anyone can edit the
> >> wiki.
> >>
> >> Cheers,
> >> Jason
> >>
> >> On Tue, Nov 19, 2019 at 10:53 AM Vince Harron 
> wrote:
> >> >
> >> > On the page http://gem5.org/Download
> >> >
> >> > The link "[FS cheat scripts] " points to
> >> >
> >> > https://github.com/cirosantilli/linux-kernel-module-cheat%7Cgem5
> >> >
> >> > Which returns 404.
> >> >
> >> > I think the correct link is
> >> >
> >> > https://github.com/cirosantilli/linux-kernel-module-cheat
> >> >
> >> > I'm not sure where this lives in source control or I would upload a
> >> patch
> >> > myself.
> >> >
> >> > Thanks,
> >> >
> >> > Vince
> >> >
> >> > --
> >> >
> >> > Vince Harron |  Engineering Manager |  vhar...@google.com |
> >> 858-442-0868 <(858)%20442-0868> <(858)%20442-0868>
> >> > ___
> >> > gem5-dev mailing list
> >> > gem5-dev@gem5.org
> >> > http://m5sim.org/mailman/listinfo/gem5-dev
> >> ___
> >> gem5-dev mailing list
> >> gem5-dev@gem5.org
> >> http://m5sim.org/mailman/listinfo/gem5-dev
> >
> >
> >
> > --
> >
> > Vince Harron |  Engineering Manager |  vhar...@google.com |
> 858-442-0868 <(858)%20442-0868>
> > <(858)%20442-0868>
> >
>
>
> --
>
> Vince Harron |  Engineering Manager |  vhar...@google.com |  858-442-0868
> <(858)%20442-0868>
> ___
> gem5-dev mailing list
> gem5-dev@gem5.org
> http://m5sim.org/mailman/listinfo/gem5-dev
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: scons: Add "warning" and "error" methods.

2019-11-21 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22885 )


Change subject: scons: Add "warning" and "error" methods.
..

scons: Add "warning" and "error" methods.

These methods will make reporting errors less verbose and more
consistent, since they'll handle some formating, setting colors,
prefixing with an appropriate "Warning:" or "Error:" tag, and exiting
in the case of an error.

Change-Id: Iddea5bf342a4fc4b26002d8e98292f9dc57fa8cc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22885
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M site_scons/gem5_scons/__init__.py
1 file changed, 18 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/site_scons/gem5_scons/__init__.py  
b/site_scons/gem5_scons/__init__.py

index 0521862..86494cf 100644
--- a/site_scons/gem5_scons/__init__.py
+++ b/site_scons/gem5_scons/__init__.py
@@ -38,9 +38,12 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+from __future__ import print_function
+
 import os

 from gem5_scons.util import get_termcap
+import SCons.Script

 termcap = get_termcap()

@@ -124,4 +127,18 @@
 return ', '.join(f)
 return self.format % (com_pfx, fmt(srcs), fmt(tgts))

-__all__ = ['Transform']
+def print_message(prefix, color, message, **kwargs):
+lines = message.split('\n')
+message = prefix + ('\n' + ' ' * len(prefix)).join(lines)
+print(color + termcap.Bold + message + termcap.Normal, **kwargs)
+
+def warning(*args, **kwargs):
+message = ' '.join(args)
+print_message('Warning: ', termcap.Yellow, message, **kwargs)
+
+def error(*args, **kwargs):
+message = ' '.join(args)
+print_message('Error: ', termcap.Red, message, **kwargs)
+SCons.Script.Exit(1)
+
+__all__ = ['Transform', 'warning', 'error']

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


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iddea5bf342a4fc4b26002d8e98292f9dc57fa8cc
Gerrit-Change-Number: 22885
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: scons: Use HAVE_PROTOC when building protobuf files.

2019-11-21 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22884 )


Change subject: scons: Use HAVE_PROTOC when building protobuf files.
..

scons: Use HAVE_PROTOC when building protobuf files.

Also wrap PROTOC in {}s which is better form.

Change-Id: I3f80c260593a1d5b7fb5394fe4b71cb774e652ce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22884
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/SConscript
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/SConscript b/src/SConscript
index d8014b2..53c0128 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1006,14 +1006,14 @@
 Source(cc_file)

 # Build all protocol buffers if we have got protoc and protobuf available
-if env['HAVE_PROTOBUF']:
+if env['HAVE_PROTOC'] and env['HAVE_PROTOBUF']:
 for proto in ProtoBuf.all:
 # Use both the source and header as the target, and the .proto
 # file as the source. When executing the protoc compiler, also
 # specify the proto_path to avoid having the generated files
 # include the path.
 env.Command([proto.cc_file, proto.hh_file], proto.tnode,
-MakeAction('$PROTOC --cpp_out ${TARGET.dir} '
+MakeAction('${PROTOC} --cpp_out ${TARGET.dir} '
'--proto_path ${SOURCE.dir} $SOURCE',
Transform("PROTOC")))


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


Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3f80c260593a1d5b7fb5394fe4b71cb774e652ce
Gerrit-Change-Number: 22884
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: scons: Use the new error() and warning() methods.

2019-11-21 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22886 )


Change subject: scons: Use the new error() and warning() methods.
..

scons: Use the new error() and warning() methods.

Also clean up some error messages which were missing capitalization,
etc.

Change-Id: Iaef6b4343a693d30b579e72218cbb7723ebf7d48
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22886
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M SConstruct
M src/SConscript
2 files changed, 83 insertions(+), 140 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 3951a8e..9a38210 100755
--- a/SConstruct
+++ b/SConstruct
@@ -169,9 +169,10 @@
 AddLocalOption('--with-asan', dest='with_asan', action='store_true',
help='Build with Address Sanitizer if available')

+from gem5_scons import Transform, error, warning
+
 if GetOption('no_lto') and GetOption('force_lto'):
-print('--no-lto and --force-lto are mutually exclusive')
-Exit(1)
+error('--no-lto and --force-lto are mutually exclusive')

 
 #
@@ -181,7 +182,6 @@

 main = Environment()

-from gem5_scons import Transform
 from gem5_scons.util import get_termcap
 termcap = get_termcap()

@@ -189,8 +189,7 @@

 # Check that we have a C/C++ compiler
 if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
-print("No C++ compiler installed (package g++ on Ubuntu and RedHat)")
-Exit(1)
+error("No C++ compiler installed (package g++ on Ubuntu and RedHat)")

 ###
 #
@@ -249,16 +248,14 @@
 try:
 build_top = rfind(path_dirs, 'build', -2)
 except:
-print("Error: no non-leaf 'build' dir found on target path", t)
-Exit(1)
+error("No non-leaf 'build' dir found on target path.", t)
 this_build_root = joinpath('/',*path_dirs[:build_top+1])
 if not build_root:
 build_root = this_build_root
 else:
 if this_build_root != build_root:
-print("Error: build targets not under same build root\n"
+error("build targets not under same build root\n"
   "  %s\n  %s" % (build_root, this_build_root))
-Exit(1)
 variant_path = joinpath('/',*path_dirs[:build_top+2])
 if variant_path not in variant_paths:
 variant_paths.append(variant_path)
@@ -358,8 +355,7 @@
 main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
 main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0
 if main['GCC'] + main['CLANG'] > 1:
-print('Error: How can we have two at the same time?')
-Exit(1)
+error('Two compilers enabled at once?')

 # Set up default C++ compiler flags
 if main['GCC'] or main['CLANG']:
@@ -392,23 +388,18 @@
  '-Wno-error=deprecated',
 ])
 else:
-print(termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal,  
end=' ')

-print("Don't know what compiler options to use for your compiler.")
-print(termcap.Yellow + '   compiler:' + termcap.Normal,  
main['CXX'])

-print(termcap.Yellow + '   version:' + termcap.Normal, end = ' ')
-if not CXX_version:
-print(termcap.Yellow + termcap.Bold + "COMMAND NOT FOUND!" +
-  termcap.Normal)
-else:
-print(CXX_version.replace('\n', ''))
-print("   If you're trying to use a compiler other than GCC")
-print("   or clang, there appears to be something wrong with your")
-print("   environment.")
-print("   ")
-print("   If you are trying to use a compiler other than those  
listed")

-print("   above you will need to ease fix SConstruct and ")
-print("   src/SConscript to support that compiler.")
-Exit(1)
+error('\n'.join(
+  "Don't know what compiler options to use for your compiler.",
+  "compiler: " + main['CXX'],
+  "version: " + CXX_version.replace('\n', '') if
+CXX_version else 'COMMAND NOT FOUND!',
+  "If you're trying to use a compiler other than GCC",
+  "or clang, there appears to be something wrong with your",
+  "environment.",
+  "",
+  "If you are trying to use a compiler other than those listed",
+  "above you will need to ease fix SConstruct and ",
+  "src/SConscript to support that compiler."))

 if main['GCC']:
 # Check for a supported version of gcc. >= 4.8 is chosen for its
@@ -416,8 +407,8 @@
 # http://gcc.gnu.org/projects/cxx0x.html for details.
 gcc_version = readCommand([main['CXX'], '-dumpversion'],  
exception=False)

 if compareVersions(gcc_version, "4.8") < 0:
-print('Error: gcc version 4.8 or 

[gem5-dev] Change in gem5/gem5[master]: scons: Don't use PROTOC for the protoc command and to flag its presence.

2019-11-21 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22883 )


Change subject: scons: Don't use PROTOC for the protoc command and to flag  
its presence.

..

scons: Don't use PROTOC for the protoc command and to flag its presence.

Commands that blindly use PROTOC will try to execute "False" which is
very confusing for someone looking at the console output and error
messages. Instead, create a new environment setting HAVE_PROTOC which
is either true or false depending on if the protoc command exists and
passes muster.

Also, if there's an error running protoc, catch that and use it to
mark protoc as unavailable. The previous behavior was to supress errors
and just return an empty string instead, I assume with the expectation
that that would be an invalid version and fail later checks.

Change-Id: I1251b4e7e0e9894cdd3343e59498cc653b648b26
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22883
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 41 insertions(+), 36 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 39e7ccc..3951a8e 100755
--- a/SConstruct
+++ b/SConstruct
@@ -595,44 +595,49 @@
 have_pkg_config = readCommand(['pkg-config', '--version'], exception='')

 # Check for the protobuf compiler
-protoc_version = readCommand([main['PROTOC'], '--version'],
- exception='').split()
+try:
+main['HAVE_PROTOC'] = True
+protoc_version = readCommand([main['PROTOC'], '--version']).split()

-# First two words should be "libprotoc x.y.z"
-if len(protoc_version) < 2 or protoc_version[0] != 'libprotoc':
-print(termcap.Yellow + termcap.Bold +
-'Warning: Protocol buffer compiler (protoc) not found.\n' +
-' Please install protobuf-compiler for tracing support.' +
-termcap.Normal)
-main['PROTOC'] = False
-else:
-# Based on the availability of the compress stream wrappers,
-# require 2.1.0
-min_protoc_version = '2.1.0'
-if compareVersions(protoc_version[1], min_protoc_version) < 0:
+# First two words should be "libprotoc x.y.z"
+if len(protoc_version) < 2 or protoc_version[0] != 'libprotoc':
 print(termcap.Yellow + termcap.Bold +
-'Warning: protoc version', min_protoc_version,
-'or newer required.\n' +
-' Installed version:', protoc_version[1],
+'Warning: Protocol buffer compiler (protoc) not found.\n' +
+' Please install protobuf-compiler for tracing  
support.' +

 termcap.Normal)
-main['PROTOC'] = False
+main['HAVE_PROTOC'] = False
 else:
-# Attempt to determine the appropriate include path and
-# library path using pkg-config, that means we also need to
-# check for pkg-config. Note that it is possible to use
-# protobuf without the involvement of pkg-config. Later on we
-# check go a library config check and at that point the test
-# will fail if libprotobuf cannot be found.
-if have_pkg_config:
-try:
-# Attempt to establish what linking flags to add for  
protobuf

-# using pkg-config
-main.ParseConfig('pkg-config --cflags --libs-only-L  
protobuf')

-except:
-print(termcap.Yellow + termcap.Bold +
-'Warning: pkg-config could not get protobuf flags.' +
-termcap.Normal)
-
+# Based on the availability of the compress stream wrappers,
+# require 2.1.0
+min_protoc_version = '2.1.0'
+if compareVersions(protoc_version[1], min_protoc_version) < 0:
+print(termcap.Yellow + termcap.Bold +
+'Warning: protoc version', min_protoc_version,
+'or newer required.\n' +
+' Installed version:', protoc_version[1],
+termcap.Normal)
+main['HAVE_PROTOC'] = False
+else:
+# Attempt to determine the appropriate include path and
+# library path using pkg-config, that means we also need to
+# check for pkg-config. Note that it is possible to use
+# protobuf without the involvement of pkg-config. Later on we
+# check go a library config check and at that point the test
+# will fail if libprotobuf cannot be found.
+if have_pkg_config:
+try:
+# Attempt to establish what linking flags to add for
+# protobuf
+# using pkg-config
+main.ParseConfig(
+'pkg-config --cflags --libs-only-L protobuf')
+

[gem5-dev] Change in gem5/gem5[master]: tests, base: Added GTests for exec_ecoff.h and exec_aout.h

2019-11-21 Thread Bobby R. Bruce (Gerrit)
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22323 )


Change subject: tests,base: Added GTests for exec_ecoff.h and exec_aout.h
..

tests,base: Added GTests for exec_ecoff.h and exec_aout.h

Change-Id: Iec76ba24a06425caefd28d640c6479720f401c06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22323
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/base/SConscript
A src/base/loader/exec_aout.test.cc
M src/base/loader/exec_ecoff.h
A src/base/loader/exec_ecoff.test.cc
4 files changed, 470 insertions(+), 0 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/SConscript b/src/base/SConscript
index c9162b4..fe92b43 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -103,6 +103,8 @@
 GTest('circular_queue.test', 'circular_queue.test.cc')
 GTest('sat_counter.test', 'sat_counter.test.cc')
 GTest('refcnt.test','refcnt.test.cc')
+GTest('loader/exec_ecoff.test', 'loader/exec_ecoff.test.cc')
+GTest('loader/exec_aout.test', 'loader/exec_aout.test.cc')
 GTest('condcodes.test', 'condcodes.test.cc')
 GTest('chunk_generator.test', 'chunk_generator.test.cc')

diff --git a/src/base/loader/exec_aout.test.cc  
b/src/base/loader/exec_aout.test.cc

new file mode 100644
index 000..97419e4
--- /dev/null
+++ b/src/base/loader/exec_aout.test.cc
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2019 The Regents of the University of California
+ * 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: Bobby R. Bruce
+ */
+
+
+#include 
+
+#include "base/loader/exec_aout.h"
+
+#define OMAGIC_STRUCT (*((const aout_exechdr *)omagic))
+#define NMAGIC_STRUCT (*((const aout_exechdr *)nmagic))
+#define ZMAGIC_STRUCT (*((const aout_exechdr *)zmagic))
+#define NO_MAGIC_STRUCT (*((const aout_exechdr *)no_magic))
+
+#if (defined(_BIG_ENDIAN) || !defined(_LITTLE_ENDIAN))\
+&& BYTE_ORDER==BIG_ENDIAN
+const uint8_t omagic[] {
+0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t nmagic[] {
+0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t zmagic[] {
+0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t no_magic[] {
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x01, 0x00
+};
+#elif defined(_LITTLE_ENDIAN) || BYTE_ORDER==LITTLE_ENDIAN
+const uint8_t omagic[] {
+0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t nmagic[] {
+0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t zmagic[] 

Re: [gem5-dev] Bug on page http://gem5.org/Download

2019-11-21 Thread Vince Harron
You do not have permission to edit this page, for the following reason:

This page has been protected to prevent editing or other actions.

On Thu, Nov 21, 2019 at 1:46 PM Vince Harron  wrote:

> *blush* I didn't even notice it is a wiki.
>
> On Thu, Nov 21, 2019 at 10:46 AM Jason Lowe-Power 
> wrote:
>
>> Thanks for letting us know! To fix this yourself. Anyone can edit the
>> wiki.
>>
>> Cheers,
>> Jason
>>
>> On Tue, Nov 19, 2019 at 10:53 AM Vince Harron  wrote:
>> >
>> > On the page http://gem5.org/Download
>> >
>> > The link "[FS cheat scripts] " points to
>> >
>> > https://github.com/cirosantilli/linux-kernel-module-cheat%7Cgem5
>> >
>> > Which returns 404.
>> >
>> > I think the correct link is
>> >
>> > https://github.com/cirosantilli/linux-kernel-module-cheat
>> >
>> > I'm not sure where this lives in source control or I would upload a
>> patch
>> > myself.
>> >
>> > Thanks,
>> >
>> > Vince
>> >
>> > --
>> >
>> > Vince Harron |  Engineering Manager |  vhar...@google.com |
>> 858-442-0868 <(858)%20442-0868>
>> > ___
>> > gem5-dev mailing list
>> > gem5-dev@gem5.org
>> > http://m5sim.org/mailman/listinfo/gem5-dev
>> ___
>> gem5-dev mailing list
>> gem5-dev@gem5.org
>> http://m5sim.org/mailman/listinfo/gem5-dev
>
>
>
> --
>
> Vince Harron |  Engineering Manager |  vhar...@google.com |  858-442-0868
> <(858)%20442-0868>
>


-- 

Vince Harron |  Engineering Manager |  vhar...@google.com |  858-442-0868
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Re: [gem5-dev] Bug on page http://gem5.org/Download

2019-11-21 Thread Jason Lowe-Power
Thanks for letting us know! To fix this yourself. Anyone can edit the wiki.

Cheers,
Jason

On Tue, Nov 19, 2019 at 10:53 AM Vince Harron  wrote:
>
> On the page http://gem5.org/Download
>
> The link "[FS cheat scripts] " points to
>
> https://github.com/cirosantilli/linux-kernel-module-cheat%7Cgem5
>
> Which returns 404.
>
> I think the correct link is
>
> https://github.com/cirosantilli/linux-kernel-module-cheat
>
> I'm not sure where this lives in source control or I would upload a patch
> myself.
>
> Thanks,
>
> Vince
>
> --
>
> Vince Harron |  Engineering Manager |  vhar...@google.com |  858-442-0868
> ___
> gem5-dev mailing list
> gem5-dev@gem5.org
> http://m5sim.org/mailman/listinfo/gem5-dev
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Cron /z/m5/regression/do-regression quick

2019-11-21 Thread Cron Daemon
scons: *** [build/HSAIL_X86/arch/hsail/gpu_decoder.do] Error 1
scons: *** [build/RISCV/base/intmath.fo] Error 4
scons: *** [build/HSAIL_X86/base/intmath.fo] Error 4
scons: *** [build/HSAIL_X86/arch/hsail/gpu_decoder.fo] Error 1
scons: *** [build/ALPHA/base/intmath.o] Error 4
scons: *** [build/MIPS/base/intmath.o] Error 4
scons: `build/MIPS/tests/opt/quick/fs' is up to date.
scons: *** [build/NULL/base/intmath.o] Error 4
scons: `build/NULL/tests/opt/quick/fs' is up to date.
scons: *** [build/NULL_MOESI_hammer/base/intmath.o] Error 4
scons: `build/NULL_MOESI_hammer/tests/opt/quick/fs' is up to date.
scons: *** [build/NULL_MESI_Two_Level/base/intmath.o] Error 4
scons: `build/NULL_MESI_Two_Level/tests/opt/quick/fs' is up to date.
scons: *** [build/NULL_MOESI_CMP_directory/base/intmath.o] Error 4
scons: `build/NULL_MOESI_CMP_directory/tests/opt/quick/fs' is up to date.
scons: *** [build/NULL_MOESI_CMP_token/base/intmath.o] Error 4
scons: `build/NULL_MOESI_CMP_token/tests/opt/quick/fs' is up to date.
scons: *** [build/POWER/base/intmath.o] Error 4
scons: `build/POWER/tests/opt/quick/fs' is up to date.
scons: *** [build/SPARC/base/intmath.o] Error 4
scons: *** [build/X86/base/intmath.o] Error 4
scons: `build/X86_MESI_Two_Level/tests/opt/quick/se' is up to date.
scons: `build/X86_MESI_Two_Level/tests/opt/quick/fs' is up to date.
scons: *** [build/ARM/base/intmath.o] Error 4
scons: *** [build/RISCV/base/intmath.o] Error 4
scons: `build/RISCV/tests/opt/quick/fs' is up to date.
scons: *** [build/HSAIL_X86/base/intmath.o] Error 4
scons: *** [build/HSAIL_X86/arch/hsail/gpu_decoder.o] Error 1
scons: `build/HSAIL_X86/tests/opt/quick/fs' is up to date.

See /z/m5/regression/regress-2019-11-19-03:00:01 for details.

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[master]: base: Remove tests making use of Big/LittleEndianOrder Namespace

2019-11-21 Thread Giacomo Travaglini (Gerrit)
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/22943 )


Change subject: base: Remove tests making use of Big/LittleEndianOrder  
Namespace

..

base: Remove tests making use of Big/LittleEndianOrder Namespace

Unit tests are currently broken.
commit d40f0bc579fb8b10da7181d3a144cd3e9a0a0e59 is removing the
BigEndianOrder and LittleEndianOrder namespace.
Therefore we shouldn't test them and their helpers.

Change-Id: I68a45f264b782334d0a0f725c2c435c27337e757
Signed-off-by: Giacomo Travaglini 
Reviewed-by: Nikos Nikoleris 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22943
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Gabe Black 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/sim/byteswap.test.cc
1 file changed, 0 insertions(+), 452 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/byteswap.test.cc b/src/sim/byteswap.test.cc
index ef41437..8ebc584 100644
--- a/src/sim/byteswap.test.cc
+++ b/src/sim/byteswap.test.cc
@@ -337,455 +337,3 @@
 EXPECT_EQ(0x, letobe((uint16_t)0x));
 EXPECT_EQ(0xa0a0, letobe((uint16_t)0xa0a0));
 }
-
-TEST(ByteswapTest, beg_gtole)
-{
-EXPECT_EQ(0x0123456789abcdef,
-BigEndianGuest::gtole((uint64_t)0xefcdab8967452301));
-EXPECT_EQ(0xfedcba9876543210,
-BigEndianGuest::gtole((uint64_t)0x1032547698badcfe));
-EXPECT_EQ(0x0b1cb071b77141b1,
-BigEndianGuest::gtole((uint64_t)0xb14171b771b01c0b));
-EXPECT_EQ(0x,
-BigEndianGuest::gtole((uint64_t)0x));
-EXPECT_EQ(0x,
-BigEndianGuest::gtole((uint64_t)0x));
-EXPECT_EQ(0xa0a0a0a0a0a0a0a0,
-BigEndianGuest::gtole((uint64_t)0xa0a0a0a0a0a0a0a0));
-EXPECT_EQ(0x0123cdef, BigEndianGuest::gtole((uint32_t)0xefcd2301));
-EXPECT_EQ(0xfedc3210, BigEndianGuest::gtole((uint32_t)0x1032dcfe));
-EXPECT_EQ(0x0b1c41b1, BigEndianGuest::gtole((uint32_t)0xb1411c0b));
-EXPECT_EQ(0x, BigEndianGuest::gtole((uint32_t)0x));
-EXPECT_EQ(0x, BigEndianGuest::gtole((uint32_t)0x));
-EXPECT_EQ(0xa0a0a0a0, BigEndianGuest::gtole((uint32_t)0xa0a0a0a0));
-EXPECT_EQ(0x01ef, BigEndianGuest::gtole((uint16_t)0xef01));
-EXPECT_EQ(0xfe10, BigEndianGuest::gtole((uint16_t)0x10fe));
-EXPECT_EQ(0x0bb1, BigEndianGuest::gtole((uint16_t)0xb10b));
-EXPECT_EQ(0x00ff, BigEndianGuest::gtole((uint16_t)0xff00));
-EXPECT_EQ(0x, BigEndianGuest::gtole((uint16_t)0x));
-EXPECT_EQ(0xa0a0, BigEndianGuest::gtole((uint16_t)0xa0a0));
-}
-
-TEST(ByteswapTest, beg_letog)
-{
-EXPECT_EQ(0x0123456789abcdef,
-BigEndianGuest::letog((uint64_t)0xefcdab8967452301));
-EXPECT_EQ(0xfedcba9876543210,
-BigEndianGuest::letog((uint64_t)0x1032547698badcfe));
-EXPECT_EQ(0x0b1cb071b77141b1,
-BigEndianGuest::letog((uint64_t)0xb14171b771b01c0b));
-EXPECT_EQ(0x,
-BigEndianGuest::letog((uint64_t)0x));
-EXPECT_EQ(0x,
-BigEndianGuest::letog((uint64_t)0x));
-EXPECT_EQ(0xa0a0a0a0a0a0a0a0,
-BigEndianGuest::letog((uint64_t)0xa0a0a0a0a0a0a0a0));
-EXPECT_EQ(0x0123cdef, BigEndianGuest::letog((uint32_t)0xefcd2301));
-EXPECT_EQ(0xfedc3210, BigEndianGuest::letog((uint32_t)0x1032dcfe));
-EXPECT_EQ(0x0b1c41b1, BigEndianGuest::letog((uint32_t)0xb1411c0b));
-EXPECT_EQ(0x, BigEndianGuest::letog((uint32_t)0x));
-EXPECT_EQ(0x, BigEndianGuest::letog((uint32_t)0x));
-EXPECT_EQ(0xa0a0a0a0, BigEndianGuest::letog((uint32_t)0xa0a0a0a0));
-EXPECT_EQ(0x01ef, BigEndianGuest::letog((uint16_t)0xef01));
-EXPECT_EQ(0xfe10, BigEndianGuest::letog((uint16_t)0x10fe));
-EXPECT_EQ(0x0bb1, BigEndianGuest::letog((uint16_t)0xb10b));
-EXPECT_EQ(0x00ff, BigEndianGuest::letog((uint16_t)0xff00));
-EXPECT_EQ(0x, BigEndianGuest::letog((uint16_t)0x));
-EXPECT_EQ(0xa0a0, BigEndianGuest::letog((uint16_t)0xa0a0));
-}
-
-TEST(ByteswapTest, beg_gtobe)
-{
-EXPECT_EQ(0xefcdab8967452301,
-BigEndianGuest::gtobe((uint64_t)0xefcdab8967452301));
-EXPECT_EQ(0x1032547698badcfe,
-BigEndianGuest::gtobe((uint64_t)0x1032547698badcfe));
-EXPECT_EQ(0xb14171b771b01c0b,
-BigEndianGuest::gtobe((uint64_t)0xb14171b771b01c0b));
-EXPECT_EQ(0x,
-BigEndianGuest::gtobe((uint64_t)0x));
-EXPECT_EQ(0x,
-BigEndianGuest::gtobe((uint64_t)0x));
-EXPECT_EQ(0xa0a0a0a0a0a0a0a0,
-BigEndianGuest::gtobe((uint64_t)0xa0a0a0a0a0a0a0a0));
-EXPECT_EQ(0xefcd2301, BigEndianGuest::gtobe((uint32_t)0xefcd2301));
-EXPECT_EQ(0x1032dcfe,