gem5.git
7 years agodev, arm: add a9mpcore global timer device
Gedare Bloom [Thu, 23 Feb 2017 20:51:49 +0000 (15:51 -0500)]
dev, arm: add a9mpcore global timer device

Change-Id: I6d8a5e3795291b2a4cce022f555cf4b04f997538
Signed-off-by: Gedare Bloom <gedare@rtems.org>
Reviewed-on: https://gem5-review.googlesource.com/3262
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agodev, virtio: Use of Unix socket for virtIO 9P device
Anouk Van Laer [Wed, 1 Mar 2017 13:50:58 +0000 (13:50 +0000)]
dev, virtio: Use of Unix socket for virtIO 9P device

This commit adds support for diod to use a unix socket, rather
than a TCP port.  We don't rely on the IP-based connection as we
directly use pipes to interact with diod.  This allows it to work
on any system, even if the specific port is taken by another diod
instance (or similar).  Secondly, the Unix socket could in theory
be used to debug.  However, this functionality has not been
tested.

Change-Id: I616e0ad8768da1dfc867de3af98cdfbb22a72d63
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2820
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agotests: Fix a typo for the default MI_example protocol
Sean Wilson [Thu, 15 Jun 2017 16:56:13 +0000 (11:56 -0500)]
tests: Fix a typo for the default MI_example protocol

Change-Id: I1c88ba45e4fee3c254db06cac46045dfe6e68524
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3795
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agox86: Add consistent overrides to process.hh
Sean Wilson [Tue, 6 Jun 2017 16:37:13 +0000 (11:37 -0500)]
x86: Add consistent overrides to process.hh

Change-Id: I912601b6f781a0bbedd06583c059589374f6d5c6
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3720
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Joe Gross <joe.gross@amd.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agox86: Fixed remote debugging of simulated code
Matthias Hille [Wed, 3 May 2017 08:42:05 +0000 (10:42 +0200)]
x86: Fixed remote debugging of simulated code

GDB breaks if more bytes are sent than the transmitted registers
actually need. Therefore the GdbRegCache struct needs to be packed to
prevent padding at the end.

Change-Id: Ib2c14eb70becdac609eb4f475d5dddbd5bcc60da
Signed-off-by: Matthias Hille <matthiashille8@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/3020
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoconfigs: fixed SimpleOpts missing error by adding library path
Zhang Zheng [Wed, 19 Apr 2017 10:13:10 +0000 (18:13 +0800)]
configs: fixed SimpleOpts missing error by adding library path

Change-Id: I0de761c8a322a506e436d5c7f12ee509535f52fd
Reviewed-on: https://gem5-review.googlesource.com/2801
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agomem-garnet: Fix garnet stats
Javier Cano-Cano [Tue, 6 Jun 2017 14:10:26 +0000 (16:10 +0200)]
mem-garnet: Fix garnet stats

This patch fix some statistics that in presence of a resetStats
instruction were not  reseted. This bug makes impossible to obtain
reliable network statistics when the simulation doesn't start from tick
zero.

Change-Id: Ibec45f08d95bf0a533d94b70ec960719206ae945
Maintainer: Tushar Krishna <tushar@ece.gatech.edu>
Reviewed-on: https://gem5-review.googlesource.com/3700
Reviewed-by: Jieming Yin <bjm419@gmail.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agotests: Add ARM MOESI_CMP_directory regressions
Nikos Nikoleris [Thu, 30 Mar 2017 13:24:04 +0000 (14:24 +0100)]
tests: Add ARM MOESI_CMP_directory regressions

Change-Id: I3d9c1249a2d39f20fb60c4d4e8af7d1d5731dbef
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2908
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoarm: Refactor the VExpress_EMM system creation
Nikos Nikoleris [Wed, 29 Mar 2017 15:34:24 +0000 (16:34 +0100)]
arm: Refactor the VExpress_EMM system creation

Change-Id: Iac3d15719b2bbc426020a27d6b47a4baaab078c7
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2907
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Make MOESI_CMP_directory the default ARM ruby protocol
Nikos Nikoleris [Fri, 17 Mar 2017 15:11:14 +0000 (15:11 +0000)]
scons: Make MOESI_CMP_directory the default ARM ruby protocol

Previously ARM binaries were by default compiled with the MI_example
protocol. The MI_example protocol cannot properly support load/store
exclusive instructions and therefore it cannot be used to simulate
multicore ARM systems. This change changes to MOESI_CMP_directory as
the default ruby protocol for ARM systems.

Change-Id: I942d950ba466aea9a75f3d8764f9f3eddd0c3baa
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2906
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoconfig: Warn not fail for ARM systems configured with ruby
Nikos Nikoleris [Mon, 6 Mar 2017 09:57:25 +0000 (09:57 +0000)]
config: Warn not fail for ARM systems configured with ruby

Ruby for ARM systems is not fully supported but certain configurations
are expected to work. This change removes the more general fail
statement and warns or fails depending on the particular
configuration.

Change-Id: Ic24799aff966ba15858b93482e0f24a8672d9483
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2905
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoruby, arm: Forward invalidations to the local exclusive monitor
Nikos Nikoleris [Tue, 4 Apr 2017 18:19:02 +0000 (19:19 +0100)]
ruby, arm: Forward invalidations to the local exclusive monitor

ARM systems require local exclusive monitors for the implementation of
synchronization primitives between processors. A ruby memory system
needs to forward invalidations to the local exclusive monitors to
to correctly determine their state.

Change-Id: I7bc4d0f2a5be0f4e36a25c87aa4a81a3f086fb3c
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2904
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoruby: Add support for address ranges in the directory
Nikos Nikoleris [Mon, 13 Mar 2017 18:19:08 +0000 (18:19 +0000)]
ruby: Add support for address ranges in the directory

Previously the directory covered a flat address range that always
started from address 0. This change adds a vector of address ranges
with interleaving and hashing that each directory keeps track of and
the necessary flexibility to support systems with non continuous
memory ranges.

Change-Id: I6ea1c629bdf4c5137b7d9c89dbaf6c826adfd977
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2903
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agodev: Avoid arbitrarily deep stack depth in the i8254xGBe model.
Gabe Black [Sat, 3 Jun 2017 00:03:20 +0000 (17:03 -0700)]
dev: Avoid arbitrarily deep stack depth in the i8254xGBe model.

When it comes time to send a packet with the i8254xGBe model hooked up to
EtherTap and while running in KVM mode, the packet will first go to the
EtherTap over the network style port between them. EtherTap, because it's
not actually a model of anything in the simulation, will immediately pass
the packet off to the real network and report that the transmission was
successful to the i8254xGBe. The i8254xGBe will notice that it still has
stuff it can send (the KVM mode CPU has no trouble keeping it full) and
will, without returning and collapsing the stack, immediately call back
into EtherTap with the next packet. This loop repeats, continually
deepening the stack, until gem5 crashes with a segfault.

To break this loop, a few small changes have been made. First, txFifoTick
has been repurposed slightly so that it continuously keeps track of
whether there's still work to do to flush out the fifo during the current
tick. The code in txWire has been adjusted slightly so that it clears that
variable at the start (also removing some redundancy), so that other code
can set it again if more work needs to be done. Specifically, the
ethTxDone function will set that flag.

If there's more work to be done flushing the Fifo while in tick(), it
will loop until txFifoTick stays cleared, meaning either the Fifo is
empty, or the object on the other end hasn't said it's done yet.

Finally, a new bool member called inTick has been added which keeps track
of whether the tick() function is still active somewhere in the callstack.
If it is, then the tick event shouldn't be rescheduled in ethTxDone, since
tick will take care of that before it returns. It won't check to see if it
needs to, and so without this check there's a panic from scheduling the
same event twice.

It's not completely clear that the Fifo should send packets over and over
as fast as the other side accepts them within the same tick, although it's
not clear that it shouldn't either. If not, then probably all that would
need to change would be to remove the "while" loop so that the tick event
would be rescheduled, and the Fifo would be further emptied the next time
around.

Change-Id: I653379b43389d0539ecfadb3fc6c40e38a8864c2
Reviewed-on: https://gem5-review.googlesource.com/3642
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

7 years agoscons: Try to handle problems with gcc, lto and partial linking.
Gabe Black [Tue, 6 Jun 2017 05:23:18 +0000 (22:23 -0700)]
scons: Try to handle problems with gcc, lto and partial linking.

gcc has had a lot of problems with incremental linking and partial linking
at the same time. Basically, the partial link assumes that it's the only
link that's going to happen, and it converts weak external symbols into
regular external symbols. Then when the real final link happens, those
symbols are duplicated and the link fails.

Versions of gcc 6 and greater add an option called -flinker-output which
lets you tell the linker to do an incremental link. Unfortunately, other
bugs make that fail, and so gcc 6 doesn't work either. Hopefully version
7 works better.

A --force-lto option was added so that, when only one of lto and partial
linking is available, you can switch from having partial linking to having
lto.

Change-Id: I5e293f5cfb07a14343dc74030d99cb161fb8bbbe
Reviewed-on: https://gem5-review.googlesource.com/3680
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agotests: Update RISC-V hello test and stats
Alec Roelke [Wed, 31 May 2017 22:49:18 +0000 (18:49 -0400)]
tests: Update RISC-V hello test and stats

Update the "Hello, world!" executable for RISC-V to use the latest GNU
Linux toolchain and fix the stats accordingly.

Change-Id: I5ff3d7f4bb41b10170038b8c07492f15bb54a022
Reviewed-on: https://gem5-review.googlesource.com/3560
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoscons: Add use_tuntap to export list
Jason Lowe-Power [Sun, 4 Jun 2017 20:01:12 +0000 (15:01 -0500)]
scons: Add use_tuntap to export list

Fixes broken build after c58537c.

Change-Id: I686ffaaad4fe558b6e51c89c9b26121318c2b721
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/3647
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agobase: misc: Include cstdlib in base/misc.hh.
Gabe Black [Fri, 2 Jun 2017 00:24:42 +0000 (17:24 -0700)]
base: misc: Include cstdlib in base/misc.hh.

Some of the macros, notably panic, uses exit(). Callers shouldn't have to
know that or have coincidentally included cstdlib, the provider of exit,
themselves.

Change-Id: I634602ed1795dcc8897b4bddb1167c96763acc18
Reviewed-on: https://gem5-review.googlesource.com/3601
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoconfig: Adjust load_addr_mask in VExpress_GEM5_V1
Weiping Liao [Fri, 13 Jan 2017 02:12:20 +0000 (18:12 -0800)]
config: Adjust load_addr_mask in VExpress_GEM5_V1

Fix load_addr_mask in VExpress_GEM5_V1 in order to boot with the 64-bit
kernel.

Change-Id: I13a0a752c60e53262a245cb24b16606071041397
Reviewed-on: https://gem5-review.googlesource.com/3643
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agomisc: Ignore build products in src/util/term.
Gabe Black [Fri, 2 Jun 2017 23:53:45 +0000 (16:53 -0700)]
misc: Ignore build products in src/util/term.

Change-Id: I8027a282c261d29cd276742411eb0ed3ce078247
Reviewed-on: https://gem5-review.googlesource.com/3641
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agomisc: Add git ignore patterns for build products in src/util/tap
Gabe Black [Fri, 2 Jun 2017 23:51:38 +0000 (16:51 -0700)]
misc: Add git ignore patterns for build products in src/util/tap

Change-Id: I498058255a05585e8142bdaa852549e20c27e347
Reviewed-on: https://gem5-review.googlesource.com/3640
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agodev: Add a version of EtherTap which uses the tap driver.
Gabe Black [Sat, 3 Jun 2017 14:23:05 +0000 (07:23 -0700)]
dev: Add a version of EtherTap which uses the tap driver.

The object is called EtherTap (as opposed to EtherTapStub, what the former
EtherTap was renamed to), and its existance is gated on the linux/if_tun.h
header file existing. That's probably overly strict, but it will hopefully
be minimally likely to break the build for other systems.

Change-Id: Ie03507fadf0d843a4d4d52f283c44a416c6f2a74
Reviewed-on: https://gem5-review.googlesource.com/3646
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>

7 years agodev: Refactor the EtherTapStub to make room for using tap.
Gabe Black [Sat, 3 Jun 2017 12:03:18 +0000 (05:03 -0700)]
dev: Refactor the EtherTapStub to make room for using tap.

A lot of the implementation of EtherTapStub can be shared with a version
which uses a tap device directly. This change factors out those parts to
accommodate that.

Change-Id: I9c2e31f1be139ca73859a83f05457cef90101006
Reviewed-on: https://gem5-review.googlesource.com/3645
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>

7 years agodev: Rename EtherTap to be EtherTapStub.
Gabe Black [Sat, 3 Jun 2017 07:45:09 +0000 (00:45 -0700)]
dev: Rename EtherTap to be EtherTapStub.

The EtherTap object is going to be reworked so that it connects to a tap
device directly, but it's worthwhile to still be able to use the m5tap
utility (util/tap) to send/receive packets on systems which don't support
tap but do support the pcap API. It can also be used to replay ethernet
frames, to capture the ethernet frames coming from gem5 for analysis, to
programmatically consume and/or generate the frames, or even to forward
them to/from a remote system.

Change-Id: Ic7bd763d86cd913ac373dd10a8d6d1fc6b35f95a
Reviewed-on: https://gem5-review.googlesource.com/3644
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>

7 years agomisc: Fix building the m5tap utility.
Gabe Black [Thu, 1 Jun 2017 23:53:36 +0000 (16:53 -0700)]
misc: Fix building the m5tap utility.

Use printf instead of cprintf to avoid having to have .o files from gem5.
Stop disabling optimization. Placate the style checker by rearranging the
header include order. Include some missing standard headers. Switch from
the deprecated -I- gcc option to using -iquote. Make the "program"
variable a const char *. When checking the return value of getopt, don't
check against the char c which may mask the -1 return value. Instead,
store the return value in an int, and then later cast it to a char when
it's actually consumed.

Change-Id: Ibec51927d0cdbd98db8e53081be2c4931e20333c
Reviewed-on: https://gem5-review.googlesource.com/3600
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>

7 years agodev: Add a missing parameter to the EtherTap device.
Gabe Black [Thu, 1 Jun 2017 22:03:40 +0000 (15:03 -0700)]
dev: Add a missing parameter to the EtherTap device.

There needs to be a SlavePort called "tap" for the ethertap device to be
able to connect to the gem5 network successfully.

Change-Id: I1ad81219f612fd1ec278c6148af728d20bc916da
Reviewed-on: https://gem5-review.googlesource.com/3580
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>

7 years agoruby: Don't set the block data when a store conditional fails
Nikos Nikoleris [Fri, 3 Mar 2017 16:52:45 +0000 (16:52 +0000)]
ruby: Don't set the block data when a store conditional fails

Previously the Sequencer upon a Store Conditional would
unconditionally set the data of the memory location. This change
checks and prevents a failed Store Conditional from modifying any
data.

Change-Id: Id63c9579d8f054f0e95c6d338a7e31aa48762755
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2902
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agopython: Fix unproxing of VectorParams
Nikos Nikoleris [Thu, 23 Mar 2017 10:22:12 +0000 (10:22 +0000)]
python: Fix unproxing of VectorParams

Previously proxy vector parameters would resolve correctly only for
Parent.all. Any other proxy such as Parent.any, or exact ones such as
Parent.addr_range would resolve to a *vector* of the right value
resulting into a vector of a vector. For example if we set:

DirectoryController0.addr_range = [0x100000-0x1fffff, 0x200000-0x2fffff]
DirectoryMemory0.addr_range = Parent.addr_range

where DirectoryController0 is the parent SimObject of DirectoryMemory0
after unproxying the Parent.addr_range VectorParam we would get

DirectoryMemory0.addr_range = [[0x100000-0x1fffff, 0x200000-0x2fffff]]

This change unifies handling of all three proxies to the same correct
unproxy mechanism.

Change-Id: Ie5107f69f58eb700b3e1b92c55210e0d53e6788d
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2901
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agodev, arm: ignore writes to the SCU
Gedare Bloom [Thu, 23 Feb 2017 20:50:49 +0000 (15:50 -0500)]
dev, arm: ignore writes to the SCU

Change-Id: I31808b6d7ca2bc2af41deaec747e3a13bd4f77d2
Signed-off-by: Gedare Bloom <gedare@rtems.org>
Reviewed-on: https://gem5-review.googlesource.com/3261
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agomisc: check address range in the SystemC example
Christian Menard [Tue, 23 May 2017 16:34:12 +0000 (18:34 +0200)]
misc: check address range in the SystemC example

Using a wrong offset or memory size may lead to segmentation faults.
This patch adds an address range check and produces an error message.

Change-Id: I79a72c05879266daf61a83367fe4ae386d1958a4
Reviewed-on: https://gem5-review.googlesource.com/3482
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
7 years agomisc: Reorder sources in util/tlm and rewrite build scripts
Christian Menard [Mon, 22 May 2017 22:48:52 +0000 (00:48 +0200)]
misc: Reorder sources in util/tlm and rewrite build scripts

* Use one SConstruct to build everything instead of one SConstruct for
  each example.
* Introduce SConscripts for sub-directories.
* Build in 'build' instead of the source tree.
* Build and link to SystemC from the ext/systemc directory. This
  ensures that SystemC does not need to be installed on the host and
  avoids possible issues caused by an incompatible SystemC build.
* Update the README and add some minor fixes

Change-Id: I641ed94f542626864fb7af499ad1be8fd4ad929f
Reviewed-on: https://gem5-review.googlesource.com/3480
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoext: Revamp the systemc SConscripts.
Gabe Black [Fri, 19 May 2017 23:35:00 +0000 (16:35 -0700)]
ext: Revamp the systemc SConscripts.

The existing scripts were including pthread code and QT code at the same
time, and also insisting on an having a set of architecture specific
source files for whatever the current architecture is.

This change selects using either QT or pthreads based on the host
architecture, distributes accumulating source files, list source files
explicitly (to avoid including redundant coroutine libraries) and makes
scons insist on an architecture specific QT implementation only if QT is
being used. It also defines a preprocessor symbol which tells some headers
whether or not pthreads are being used, and also clones the scons
environment to avoid leaking flags into the main environment used to
compile gem5 itself.

If the host architecture isn't supported by systemc, a warning will be
printed, and the various build products and SConscript files will be
skipped over.

Change-Id: I1a40123a11e49e02922a054f093246cf197087bf
Reviewed-on: https://gem5-review.googlesource.com/3461
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Christian Menard <christian.menard@tu-dresden.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agox86: Rework how VEX prefixes are decoded.
Gabe Black [Wed, 24 May 2017 10:09:56 +0000 (03:09 -0700)]
x86: Rework how VEX prefixes are decoded.

Remove redundant information from the ExtMachInst, hash the vex
information to ensure the decode cache works properly, print the vex info
when printing an ExtMachInst, consider the vex info when comparing two
ExtMachInsts, fold the info from the vex prefixes into existing settings,
remove redundant decode code, handle vex prefixes one byte at a time and
don't bother building up the entire prefix, and let instructions that care
about vex use it in their implementation, instead of developing an entire
parallel decode tree.

This also eliminates the error prone vex immediate decode table which was
incomplete and would result in an out of bounds access for incorrectly
encoded instructions or when the CPU was mispeculating, as it was (as far
as I can tell) redundant with the tables that already existed for two and
three byte opcodes. There were differences, but I think those may have
been mistakes based on the documentation I found.

Also, in 32 bit mode, the VEX prefixes might actually be LDS or LES
instructions which are still legal in that mode. A valid VEX prefix would
look like an LDS/LES with an otherwise invalid modrm encoding, so use that
as a signal to abort processing the VEX and turn the instruction into an
LES/LDS as appropriate.

Change-Id: Icb367eaaa35590692df1c98862f315da4c139f5c
Reviewed-on: https://gem5-review.googlesource.com/3501
Reviewed-by: Joe Gross <joe.gross@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

7 years agox86: sim: Make 32 bit x86 processes work again.
Gabe Black [Wed, 24 May 2017 09:49:51 +0000 (02:49 -0700)]
x86: sim: Make 32 bit x86 processes work again.

When the LiveProcess class was renamed to be just Process, the CL author
also changed the syscall function from a virtual function into a regular
one. Unfortunately, the I386Process class overrode the syscall function
to adjust the return address so that control would return to the right
place. Without that adjustment, 32 bit x86 process would segfault and die
immediately after their first system call.

This change reinstates the virtual specifier on the base syscall function,
and adds an override keyword on the I386Process's version so that it won't
be orphaned again in the future. It also fixes some small style issues the
style checker script complained about.

Change-Id: I0d1178ea0eda6676050c8fc043820a2bb4d99c0d
Reviewed-on: https://gem5-review.googlesource.com/3500
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoutil: generate fully qualified paths for cscope
Gedare Bloom [Thu, 23 Feb 2017 20:53:49 +0000 (15:53 -0500)]
util: generate fully qualified paths for cscope

Change-Id: I318c185b117b9608110544526fbaaa3fdcdeb8bc
Signed-off-by: Gedare Bloom <gedare@rtems.org>
Reviewed-on: https://gem5-review.googlesource.com/3260
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoarm: Fix incorrect handling of PMEVTYPERx_EL0 in PMU
Andreas Sandberg [Tue, 2 May 2017 16:26:34 +0000 (17:26 +0100)]
arm: Fix incorrect handling of PMEVTYPERx_EL0 in PMU

The PMU model currently doesn't calculate the PMU event counter index
correctly for writes to the PMEVTYPER[0-5]_EL0 registers. Fix this
obvious mistake.

Change-Id: I2913eedddeb98480660e2d63948f6d727adf5ab8
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3121
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
7 years agopython: Fix PyEvent reference counting bug
Andreas Sandberg [Wed, 10 May 2017 09:57:27 +0000 (10:57 +0100)]
python: Fix PyEvent reference counting bug

The current implementation of reference counting for PyEvents only
partially works. The native object is currently kept alive while it is
in the event queue. However, if the Python object goes out of scope,
the Python side of this object is garbage collected which leaves a
"dangling" native object. This results in confusing error messages
where PyBind is unable to find the Python implementation of an event
when it is triggered.

Implement reference counting using the generalized reference counting
API instead.

Change-Id: I4e8e04abc4f61dff238d718065f5371e73b38ab3
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3222
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agosim: Add hooks to implement event reference counting
Andreas Sandberg [Wed, 10 May 2017 09:51:53 +0000 (10:51 +0100)]
sim: Add hooks to implement event reference counting

We currently only support deleting an event if it is triggered and not
re-scheduled. This is fine for most native code. However, there are
cases where Python needs to count references to make sure that the
Python object stays live while the native object is live.

Generalise the mechanism used to implement by adding reference
counting hooks to the event base class:

  * Event::acquire() / Event::acquireImpl()
  * Event::release() / Event::releaseImpl()

These calls can be used to implement both reference counting and the
existing AutoDelete functionality. The default implementation in Event
maintains backwards compatibility with the existing AutoDelete feature
by ignoring acquireImpl() and deleting the event on releaseImpl() if
it isn't scheduled anymore.

Since AutoDelete functionality is no longer the only way events can be
managed, this change introduces the new Managed flag. This flag
activates automatic memory management. The acquireImpl()/releaseImpl()
methods are only called from acquire()/release() it is set. To
maintain backwards compatibility, AutoDelete is used as an alias for
Managed.

Change-Id: I5637984c906a9d44c22780712cf1c521b8297149
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3221
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoarch-riscv: Fix bad stack initialization
Alec Roelke [Tue, 16 May 2017 21:00:02 +0000 (17:00 -0400)]
arch-riscv: Fix bad stack initialization

This patch fixes a problem with RISC-V initial stack setup in SE mode
where the AT_RANDOM aux vector value contains an address that is too
close to the top of the stack and doesn't fit the required 16 bytes. To
fix this, the program header table was added to the top of the stack
just like the RISC-V proxy kernel does.

Change-Id: I814562e060ff041cd0d7a7c54c3685645bd325a3
Reviewed-on: https://gem5-review.googlesource.com/3401
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

7 years agoarch-arm: Fix some poorly done type max and min in NEON
Rekai Gonzalez-Alberquilla [Tue, 25 Apr 2017 17:35:54 +0000 (18:35 +0100)]
arch-arm: Fix some poorly done type max and min in NEON

The ISA code for ARM calculates min and max elements for types using
bit manipulation. That triggers some warnings, treated as errors, as
the compiler can tell that there is an overflow and the sign
flips. Fixed using standard lib definitions instead.

Change-Id: Ie2331b410c7f76d4bd87da5afe9edf20c8ac91b3
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3481
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoext: Upgrade PyBind11 to version 2.1.1
Andreas Sandberg [Tue, 9 May 2017 18:22:53 +0000 (19:22 +0100)]
ext: Upgrade PyBind11 to version 2.1.1

Change-Id: I16870dec402d661295f9d013dc23e362b2b2c169
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3225
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agopython: Prevent Python wrappers from deleting SimObjects
Andreas Sandberg [Tue, 9 May 2017 18:28:47 +0000 (19:28 +0100)]
python: Prevent Python wrappers from deleting SimObjects

The PyBind wrappers could potentially delete SimObjects if they don't
have any references. This is not desirable since there could be
pointers to such objects within the C++ world. This problem doesn't
normally occur since Python typically holds a pointer to the root node
as long as the simulator is running.

Prevent SimObject and Param deletion by using a PyBind-prescribed
unique_ptr with a dummy deleter as the pointer wrapper for the Python
world.

Change-Id: Ied14602c9ee69a083a69c5dae1b5fcf8efb4548a
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3224
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agopython: Fix weird memory issue in wrapped AddrRange vectors
Andreas Sandberg [Wed, 10 May 2017 12:16:43 +0000 (13:16 +0100)]
python: Fix weird memory issue in wrapped AddrRange vectors

There is a weird issue with the PyBind wrapper of
vector<AddrRange>. Assigning new values to a param that is a vector of
AddrRange sometimes results in an out-of-bounds memory access.

We work around this issue by treating AddrRange vectors as opaque
types. This slightly changes the semantics of the wrapper since Python
now manipulates the real object rather than a copy that has been
converted to a list.

Change-Id: Ie027c06e7a7262214b43b19a76b24fe4b20426c5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Timothy Hayes <timothy.hayes@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3223
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoscons: Enable explicitly building something with no variant.
Gabe Black [Fri, 19 May 2017 23:30:45 +0000 (16:30 -0700)]
scons: Enable explicitly building something with no variant.

The SConstruct currently expects all explicit targets to be under a
variant directory like ARM or X86 which tells it what settings to use,
etc. There are things which scons knows how to build however, which do not
live under a variant directory, specifically everything under ext.

This change makes scons not look for a variant directory when it
encounters a target which is built by something in ext. This enables
things like explicitly building the systemc libraries, for example.

Change-Id: I8982a96fe49e3cb970ec78e11cea08703990c686
Reviewed-on: https://gem5-review.googlesource.com/3460
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Christian Menard <christian.menard@tu-dresden.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agopython: Remove unused readline import
Andreas Sandberg [Thu, 18 May 2017 17:01:32 +0000 (18:01 +0100)]
python: Remove unused readline import

The readline module is imported by main.py but doesn't seem to be
used.

Change-Id: I7888e3b6ad0a0fedc14b0feec2adf0a39883bbf8
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3421
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agobase, sim, arch: Fix clang 5.0 warnings
Andreas Sandberg [Thu, 18 May 2017 14:11:23 +0000 (15:11 +0100)]
base, sim, arch: Fix clang 5.0 warnings

Compiling gem5 with recent version of clang (4 and 5) triggers
warnings that are treated as errors:

  * Global templatized static functions result in a warning if they
    are not used. These should either be declared as static inline or
    without the static identifier to avoid the warning.

  * Some templatized classes contain static variables. The
    instantiated versions of these variables / templates need to be
    explicitly declared to avoid a compiler warning.

Change-Id: Ie8261144836e94ebab7ea04ccccb90927672c257
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3420
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agobase: Refactor the GDB code.
Gabe Black [Thu, 11 May 2017 21:11:28 +0000 (14:11 -0700)]
base: Refactor the GDB code.

The new version modularizes the implementation of the various commands,
gets rid of dynamic allocation of the register cache, fixes some small
style problems, and uses exceptions to simplify error handling internal to
the GDB stub.

Change-Id: Iff3548373ce4adfb99106a810f5713b769df89b2
Reviewed-on: https://gem5-review.googlesource.com/3280
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Boris Shingarov <shingarov@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agosyscall_emul, riscv: add override keyword to RISCV Process class
Brandon Potter [Mon, 15 May 2017 19:03:20 +0000 (14:03 -0500)]
syscall_emul, riscv: add override keyword to RISCV Process class

Change-Id: I2a146ae57aac3787389997961208474a97e7c155
Reviewed-on: https://gem5-review.googlesource.com/3360
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

7 years agoconfigs: fix cpu names in big.LITTLE example
Pierre-Yves Péneau [Fri, 12 May 2017 15:50:35 +0000 (17:50 +0200)]
configs: fix cpu names in big.LITTLE example

CPU aliases have been dropped, this change fixes the big.LITTLE example.

Change-Id: Idd59a6eca93448ef0e23087365fb5452bcef9247
Signed-off-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
Reviewed-on: https://gem5-review.googlesource.com/3300
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoarm, config: added support for ex5 model of big.LITTLE
Pierre-Yves Péneau [Wed, 22 Mar 2017 17:36:13 +0000 (18:36 +0100)]
arm, config: added support for ex5 model of big.LITTLE

This patch enables using calibrated big and LITTLE cores, ex5_big and
ex5_LITTLE instead of the default 'arm_detailed' and 'minor' cpus. The ex5
model is based on the Samsung Exynos 5 Octa (5422) SoC. Operation and memory
hierarchy latencies have been calibrated using the lmbench micro-benchmark
suite. The preliminary validation results have been published as: 'Full-System
Simulation of big.LITTLE Multicore Architecture for Performance and Energy
Exploration', in International Symposium on Embedded Multicore/Many-core
Systems-on-Chip (MCSoC'16), Lyon, France (Sep, 2016).

From http://reviews.gem5.org/r/3666

Change-Id: I4935dee0a9222bd1bf7adfccb9443014945bb2d7
Signed-off-by: Anastasiia Butko <abutko@lbl.gov>
Signed-off-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
Reviewed-on: https://gem5-review.googlesource.com/2464
Reviewed-by: Gabor Dozsa <gabor.dozsa@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoext: Include SystemC 2.3.1 into gem5
Matthias Jung [Wed, 1 Mar 2017 17:39:56 +0000 (18:39 +0100)]
ext: Include SystemC 2.3.1 into gem5

In the past it happened several times that some changes in gem5 broke the
SystemC coupling. Recently Accelera has changed the licence for SystemC
from their own licence to Apache2.0, which is compatible with gem5.
However, SystemC usually relies on the Boost library, but I was able to
exchange the boost calls by c++11 alternatives. The recent SystemC version
is placed into /ext and is integrated into gem5's build system. The goal is
to integrate some SystemC tests for the CI in some following patches.

Change-Id: I4b66ec806b5e3cffc1d7c85d3735ff4fa5b31fd0
Reviewed-on: https://gem5-review.googlesource.com/2240
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoconfig: Changes to boot Android N
Weiping Liao [Fri, 13 Jan 2017 02:12:20 +0000 (18:12 -0800)]
config: Changes to boot Android N

necessary kernel command line options in FSConfig.py

Change-Id: Id66f640b6beb4efa9c23080c3d2516eda688c72d
Reviewed-on: https://gem5-review.googlesource.com/3320
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agox86: Fix the multiplication microops.
Gabe Black [Tue, 16 May 2017 02:39:51 +0000 (19:39 -0700)]
x86: Fix the multiplication microops.

If the operands were 64 bit, an intermediate calculation could lose a
carry bit. This change rearranges that intermediate calculation if the
operand width is large, and reworks the microop implementation in general
in an attempt to make it easier to understand.

Change-Id: Ib36333f3f2695a33cd9623e43682de22ebd2e7ea
Reviewed-on: https://gem5-review.googlesource.com/3381
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

7 years agopython: Add a helper function to create Python events
Andreas Sandberg [Tue, 9 May 2017 18:06:39 +0000 (19:06 +0100)]
python: Add a helper function to create Python events

Add a helper function, m5.event.create(), to create events from
Python. This function takes a callable Python object (e.g., a
function) as an argument and optionally a priority as a keyword
argument. This function was accidentally dropped from the public API
when switching to PyBind.

Change-Id: Icbd0e392d9506934ec2c9f541199aa35c1c2df8c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3220
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agostyle: fix line lengths and include ordering
Brandon Potter [Mon, 15 May 2017 20:13:19 +0000 (15:13 -0500)]
style: fix line lengths and include ordering

The style checker complains about line length and ordering for these
files. This fix should make these two files kosher.

Change-Id: I822a0518a98d9e379a543d2017e90c4e9666a58d
Reviewed-on: https://gem5-review.googlesource.com/3380
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

7 years agocpu: fix problem with forwarding and locked load
Alec Roelke [Sun, 9 Apr 2017 19:23:23 +0000 (15:23 -0400)]
cpu: fix problem with forwarding and locked load

If a (regular) store is followed closely enough by a locked load that
overlaps, the LSQ will forward the store's data to the locked load and
never tell the cache about the locked load.  As a result, the cache will
not lock the address and all future store-conditional requests on that
address will fail.  This patch fixes that by preventing forwarding if
the memory request is a locked load and adding another case to the LSQ
forwarding logic that delays the locked load request if a store in the
LSQ contains all or part of the data that is requested.

[Merge second and last if blocks because their bodies are the same.]

Change-Id: I895cc2b9570035267bdf6ae3fdc8a09049969841
Reviewed-on: https://gem5-review.googlesource.com/2400
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoarm, dev: stub out GIC distributor interrupt groups
Curtis Dunham [Wed, 29 Mar 2017 19:07:03 +0000 (14:07 -0500)]
arm, dev: stub out GIC distributor interrupt groups

We don't implement the GICD_IGROUPRn registers, which is allowed, but
to be correct, they should be RAZ/WI (read as zero, writes ignored).

Change-Id: I8039baf72f45c0095f41e165b8e327c79b1ac082
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2620
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agobase: Make the VNC server more resilient.
Gabe Black [Wed, 10 May 2017 07:35:43 +0000 (00:35 -0700)]
base: Make the VNC server more resilient.

If the client does something bad, don't kill the whole simulation, just
complain, drop the client and keep going.

Change-Id: I824f2d121e2fe03cdf4323a25c192b68e0370acc
Reviewed-on: https://gem5-review.googlesource.com/3200
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agomisc: Make the remote GDB stub more resilient to bad connections.
Gabe Black [Wed, 10 May 2017 06:18:48 +0000 (23:18 -0700)]
misc: Make the remote GDB stub more resilient to bad connections.

Currently, if the remote gdb stub fails to read a byte from an incoming
packet because the connection has been dropped, the read call will return
anyway and the calling code will have no way to know something bad
happened. It might reattempt the read over and over again waiting for some
particular byte, doomed to never make forward progress.

This change modifies the remote GDB code so that if a read or write call
fails, it will instead detach from the debugger and continue. Before this
change, When simulating a port scan, ie connecting to the debugger port
and then immediately dropping the connection using this command:

nc -v -n -z -w 1 127.0.0.1 7000

gem5 would enter the previously described death spiral. After it, gem5
detaches from the bad connection and resumes execution. Subsequently
attaching with gdb was successful.

This code is written in a C centric style, and would benefit from some
refactoring.

Change-Id: Ie3c0bb35b9cfe3671d0f731e3907548bae0d292f
Reviewed-on: https://gem5-review.googlesource.com/3180
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agosyscall_emul: Fix undefined macro behavior
Andreas Sandberg [Wed, 10 May 2017 12:10:23 +0000 (13:10 +0100)]
syscall_emul: Fix undefined macro behavior

Clang's UBSAN implementation complains about macros that expand to
expressions that contain 'defined'. Explicitly set the various feature
macros to 1 or 0 to avoid this issue.

Change-Id: Iba239dacfe526c43ab9c5da5183a350fc4fdc57d
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3241

7 years agoarm: Remove unused DumpStatsPCEventF class in FreeBSD system
Andreas Sandberg [Wed, 10 May 2017 12:11:57 +0000 (13:11 +0100)]
arm: Remove unused DumpStatsPCEventF class in FreeBSD system

The DumpStatsPCEventF is declared but lacks an implementation. This
confuses RTTI in clang. Remove this class since it is clearly not
needed.

Change-Id: Ib95f09f2ba8593f8d0e072b96afd5f8a9ed31070
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3240
Reviewed-by: B.A. Zeeb <baz21@cam.ac.uk>
7 years agoscons: Use the generalized switching headers on the GPU ISA.
Gabe Black [Tue, 2 May 2017 05:05:00 +0000 (22:05 -0700)]
scons: Use the generalized switching headers on the GPU ISA.

Now that the switching header implementation has been generalized, there's
no need to have two nearly identical implementations for the two different
groups of headers.

Change-Id: Ie7c24fcddbc672ac5ca2d69bfc35696f42c55580
Reviewed-on: https://gem5-review.googlesource.com/2984
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoscons: arch: Generalize the switching header code.
Gabe Black [Tue, 2 May 2017 04:58:41 +0000 (21:58 -0700)]
scons: arch: Generalize the switching header code.

Factor out the ISA ness of the switching header generating function. Also
turn it into a SCons builder which builds a single header, and a wrapping
method which uses the builder on a group of header files which all target
the same subdirectory.

Change-Id: I87705f97b6ebd9baebd4ebcfea19cc1218a64ad0
Reviewed-on: https://gem5-review.googlesource.com/2983
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoconfig: Fix up some configs to not use CPU aliases.
Gabe Black [Mon, 8 May 2017 06:57:47 +0000 (23:57 -0700)]
config: Fix up some configs to not use CPU aliases.

Support for CPU aliases were removed recently.

Change-Id: I3c1173dc34170d8639d95e52bf660f248848f77f
Reviewed-on: https://gem5-review.googlesource.com/3100
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agoscons: Get rid of the all_isa_deps variable.
Gabe Black [Tue, 2 May 2017 03:08:59 +0000 (20:08 -0700)]
scons: Get rid of the all_isa_deps variable.

This value can be computed more directly and more locally near where it's
used.

Change-Id: Ib5f45015494a6c8033ce0ac4b8931688f37492c8
Reviewed-on: https://gem5-review.googlesource.com/2982
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agomisc: Add the --listener-loopback-only command line option.
Gabe Black [Fri, 5 May 2017 23:53:42 +0000 (16:53 -0700)]
misc: Add the --listener-loopback-only command line option.

This option invokes the Listener::loopbackOnly() static function which
will make the port listeners bind to the loopback device exclusively and
ignore connections on other devices. That prevents external agents like
port scanners from disrupting simulations with spurious connections.

Change-Id: I46b22165046792a6f970826c109bdbce7db25c84
Reviewed-on: https://gem5-review.googlesource.com/3082
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agomisc: Expose the listener loopbackOnly function to python.
Gabe Black [Fri, 5 May 2017 23:52:21 +0000 (16:52 -0700)]
misc: Expose the listener loopbackOnly function to python.

Change-Id: Ibb405af54a46a93706a6f476b5314491e84be0c8
Reviewed-on: https://gem5-review.googlesource.com/3081
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agobase: Teach the socket listeners how to bind to the loopback.
Gabe Black [Fri, 5 May 2017 23:50:22 +0000 (16:50 -0700)]
base: Teach the socket listeners how to bind to the loopback.

The loopback device will allow access to various services like remote GDB
debugging, connecting to the terminal, etc., without letting external
agents like port scanners connect and disrupting the simulation.

Change-Id: I76dccbf152fa278ae9f342b25f7e345a1329fbe4
Reviewed-on: https://gem5-review.googlesource.com/3080
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agostyle: Treat PyBind headers as Python headers
Andreas Sandberg [Tue, 2 May 2017 13:04:44 +0000 (14:04 +0100)]
style: Treat PyBind headers as Python headers

Some PyBind11 headers need to include Python.h. This means that we need
to include PyBind11 headers before any standard library headers. Enforce
this by applying the Python.hh rules for anything in pybind11/.

Change-Id: Id175a4f613960a17f84f98b81bfd02806e905d5a
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3120
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
7 years agopython: Fix debug flag listing regression
Andreas Sandberg [Mon, 8 May 2017 15:53:29 +0000 (16:53 +0100)]
python: Fix debug flag listing regression

The PyBind11 changes slightly modified gem5's internal debug
interfaces. The corresponding change to the public API went missing
before the new bindings were merged. This change updates the Python
glue to use the new interface.

Change-Id: I3ecca5a3f6c35b99d55126d697371124f81a12dd
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Matteo Andreozzi <matteo.andreozzi@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3140
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoutil, arm: Support mmapped m5ops on aarch64
Andreas Sandberg [Fri, 2 Dec 2016 16:51:18 +0000 (16:51 +0000)]
util, arm: Support mmapped m5ops on aarch64

Add support for memory-mapped m5ops in the aarch64 version of the m5
utility. To enable support for memory-mapped m5ops, compile the tool
with the define M5OP_ADDR set to the base of the m5op PA range.

Change-Id: I13e21e48536b9849bf4081411b66b2f350f7a8ac
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2966

7 years agoarm: Enable m5ops by default for VExpress_GEM5_V1
Andreas Sandberg [Fri, 28 Apr 2017 09:55:06 +0000 (09:55 +0000)]
arm: Enable m5ops by default for VExpress_GEM5_V1

Allocate 0x10010000-0x1001ffff for m5 pseudo-ops. This range is a part
of the CS5 address range in the RS1/RS2 memory map.

Change-Id: Ica45cd53bc4ebb62966afa099fa465e27fb0452c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2965

7 years agoarm: Add support for memory-mapped m5ops
Andreas Sandberg [Tue, 16 Feb 2016 19:21:04 +0000 (13:21 -0600)]
arm: Add support for memory-mapped m5ops

Add support for a memory mapped m5op interface. When enabled, the TLB
intercepts accesses in the 64KiB region designated by the
ArmTLB.m5ops_base parameter. An access to this range maps to a
specific m5op call. The upper 8 bits of the offset into the range
denote the m5op function to call and the lower 8 bits denote the
subfunction.

Change-Id: I55fd8ac1afef4c3cc423b973870c9fe600a843a2
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2964

7 years agokvm, arm: Fix incorrect PSTATE sync
Andreas Sandberg [Fri, 28 Apr 2017 11:08:32 +0000 (11:08 +0000)]
kvm, arm: Fix incorrect PSTATE sync

The state transfer code wasn't reading back PSTATE correctly from the
CPU prior to updating the thread context and was incorreclty writing
the register as a 32-bit value when updating KVM. Correctly read back
the state before updating gem5's view of PSTATE and cast the value to
a uint64_t.

Change-Id: I0a6ff5b77b897c756b20a20f65c420f42386360f
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2963
Reviewed-by: Rahul Thakur <rjthakur@google.com>
7 years agoutil: Correctly handle short writes in m5 (read|exec)file
Andreas Sandberg [Wed, 26 Apr 2017 16:46:13 +0000 (16:46 +0000)]
util: Correctly handle short writes in m5 (read|exec)file

The m5 tool has subcommands that writes a file to the simulated file
system. The implementation of this command currently doesn't check the
return value from write, which leads to compiler warnings and
potentially incorrect behavior. Add the necessary checks.

Change-Id: If558534d3245aa24cf15edf06bd0af4c6ba3908c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2962
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agoutil: Add the m5_loadsymbol pseudo op to the m5 tool
Andreas Sandberg [Mon, 8 May 2017 09:57:17 +0000 (10:57 +0100)]
util: Add the m5_loadsymbol pseudo op to the m5 tool

Change-Id: Ib8bf4eac77170db8b2bf44796fd9d46b02217d03
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3122
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agoutil: Fix incorrect use of m5_loadsymbol
Andreas Sandberg [Wed, 26 Apr 2017 16:44:23 +0000 (16:44 +0000)]
util: Fix incorrect use of m5_loadsymbol

It seems like the m5 utility incorrectly called m5_loadsymbol instead
of m5_addsymbol. Judging by the signature of the loadsymbol command,
the expected behavior is to add a new symbol to gem5's symbol
table. This is behavior is implemented by m5_addsymbol.

Change-Id: I83b61c48d6f8d7b1e8b57d884dfca00481c83c3a
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2961
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agomisc: fix build failure in cxx_config example
Paul Rosenfeld [Tue, 2 May 2017 21:07:55 +0000 (15:07 -0600)]
misc: fix build failure in cxx_config example

Fix a missing header in the cxx_config example which is used as a
simple example of using libgem5.so without python.

Change-Id: I758bfe42ba735ce0c7eaedd49b94a130e3bd21e3
Reviewed-on: https://gem5-review.googlesource.com/3000
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Get rid of the PHONY_BASE construction variable.
Gabe Black [Tue, 2 May 2017 02:50:30 +0000 (19:50 -0700)]
scons: Get rid of the PHONY_BASE construction variable.

The value of that variable can be computed more directly and more locally
to where it's consumed.

Change-Id: I5ca1f732a34e22d4dae2aeb6ee7fc8adebe1caa0
Reviewed-on: https://gem5-review.googlesource.com/2981
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoutil: Fix incorrect return type in m5 writefile
Andreas Sandberg [Wed, 26 Apr 2017 16:43:03 +0000 (16:43 +0000)]
util: Fix incorrect return type in m5 writefile

Change-Id: Ic24a1c3c1488e970ed27bb6b99262d201f535384
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2960
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agoscons: Replace str(foo.get_contents()) with foo.get_text_contents().
Gabe Black [Sat, 6 May 2017 01:05:36 +0000 (18:05 -0700)]
scons: Replace str(foo.get_contents()) with foo.get_text_contents().

For Value() nodes, the get_contents() method and the get_text_contents()
method are just aliases to the same thing, both of which return a value
which has already been converted using str(). The str() which was included
explicitly in the SConscript was redundant, except that it showed that the
value from get_contents was being treated as a string. To avoid the
redundancy but to still leave a hint to the value's type, this change
converts those bits of code to use get_text_contents() and removes the
str().

Change-Id: I8f7da9b652f749e741b553c9a0e2248ae15ec3ca
Reviewed-on: https://gem5-review.googlesource.com/3084
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Make env['USE_PYTHON'] a source for createEnumStrings.
Gabe Black [Sat, 6 May 2017 01:01:33 +0000 (18:01 -0700)]
scons: Make env['USE_PYTHON'] a source for createEnumStrings.

That clues scons in to the fact that the contents of the target of that
function depends on the value of that construction variable.

Change-Id: I803322ea1a178152da3d95dffffe20acd4271c88
Reviewed-on: https://gem5-review.googlesource.com/3083
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Paul Rosenfeld <prosenfeld@micron.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoconfig: Remove support for CPU aliases.
Gabe Black [Fri, 28 Apr 2017 03:47:10 +0000 (20:47 -0700)]
config: Remove support for CPU aliases.

This was added for backwards compatability, but it adds a decent amount
of complexity.

The table below shows what CPU class name to use in place of a given
alias.

+==========+========================================================+
|  Alias   |                       CPU class                        |
+==========+========================================================+
| timing   | TimingSimpleCPU                                        |
| atomic   | AtomicSimpleCPU                                        |
| minor    | MinorCPU                                               |
| detailed | DrivO3CPU                                              |
| kvm      | ArmKvmCPU, ArmV8KvmCPU or X86KvmCPU, depending on arch |
| trace    | TraceCPU                                               |
+==========+========================================================+

Change-Id: I251c4f64b7869c6b64dd25b36967ae240f01ef08
Reviewed-on: https://gem5-review.googlesource.com/2940
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agosyscall_emul: Argument retrieval bug fix
Alexandru Dutu [Tue, 2 May 2017 17:56:36 +0000 (13:56 -0400)]
syscall_emul: Argument retrieval bug fix

This commit fixes a stack-buffer underflow
by fixing the way the array is indexed.

Change-Id: I44400e2b99a2f8e1f48f673cd110b9dcd6480a72
Reviewed-on: https://gem5-review.googlesource.com/3040
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

7 years agoscons: Merge reading test SConscripts into makeEnv.
Gabe Black [Tue, 2 May 2017 00:50:43 +0000 (17:50 -0700)]
scons: Merge reading test SConscripts into makeEnv.

We're already visiting each of the environments, there's no reason to
track them all and then set up test SConscripts on a second pass.

Change-Id: I2d1166f58ac907e874d6ad5de7bd53ff7ad645f8
Reviewed-on: https://gem5-review.googlesource.com/2980
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Fix the compiler flag used for partial linking.
Gabe Black [Wed, 3 May 2017 07:37:19 +0000 (00:37 -0700)]
scons: Fix the compiler flag used for partial linking.

It seems that g++ can generally handle the -r flag for generating a
relocatable object file, but ld can't always handle the  --relocatable
flag.

Change-Id: I15f32e469590a814131d4e992b392a7ad6c52b83
Reviewed-on: https://gem5-review.googlesource.com/3001
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agopython: Remove SWIG
Andreas Sandberg [Mon, 30 Jan 2017 12:00:21 +0000 (12:00 +0000)]
python: Remove SWIG

Remove SWIG-specific Python code.

Change-Id: If1d1b253d84021c9a8f9a64027ea7a94f2336dff
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2922
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
7 years agobase, sim, dev: Remove SWIG
Andreas Sandberg [Mon, 30 Jan 2017 12:00:05 +0000 (12:00 +0000)]
base, sim, dev: Remove SWIG

Remove SWIG guards and SWIG-specific C++ code.

Change-Id: Icaad6720513b6f48153727ef3f70e0dba0df4bee
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2921
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
7 years agoscons: Remove SWIG support
Andreas Sandberg [Mon, 30 Jan 2017 11:59:57 +0000 (11:59 +0000)]
scons: Remove SWIG support

Remove remaining SWIG support from the build infrastructure.

Change-Id: I7549cd0f952ca3a51481918eefef3a29f03af359
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2920
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
7 years agopython: Use PyBind11 instead of SWIG for Python wrappers
Andreas Sandberg [Mon, 27 Feb 2017 13:17:51 +0000 (13:17 +0000)]
python: Use PyBind11 instead of SWIG for Python wrappers

Use the PyBind11 wrapping infrastructure instead of SWIG to generate
wrappers for functionality that needs to be exported to Python. This
has several benefits:

  * PyBind11 can be redistributed with gem5, which means that we have
    full control of the version used. This avoid a large number of
    hard-to-debug SWIG issues we have seen in the past.

  * PyBind11 doesn't rely on a custom C++ parser, instead it relies on
    wrappers being explicitly declared in C++. The leads to slightly
    more boiler-plate code in manually created wrappers, but doesn't
    doesn't increase the overall code size. A big benefit is that this
    avoids strange compilation errors when SWIG doesn't understand
    modern language features.

  * Unlike SWIG, there is no risk that the wrapper code incorporates
    incorrect type casts (this has happened on numerous occasions in
    the past) since these will result in compile-time errors.

As a part of this change, the mechanism to define exported methods has
been redesigned slightly. New methods can be exported either by
declaring them in the SimObject declaration and decorating them with
the cxxMethod decorator or by adding an instance of
PyBindMethod/PyBindProperty to the cxx_exports class variable. The
decorator has the added benefit of making it possible to add a
docstring and naming the method's parameters.

The new wrappers have the following known issues:

  * Global events can't be memory managed correctly. This was the
    case in SWIG as well.

Change-Id: I88c5a95b6cf6c32fa9e1ad31dfc08b2e8199a763
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Andrew Bardsley <andrew.bardsley@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2231
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
7 years agoext: Fix undefined macro in pybind
Andreas Sandberg [Mon, 27 Feb 2017 13:17:51 +0000 (13:17 +0000)]
ext: Fix undefined macro in pybind

Change-Id: I63a2506d3c028f78cacce8308e2f0e4880531dec
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2230
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
7 years agoext: Add pybind rev f4b81b3
Andreas Sandberg [Mon, 27 Feb 2017 13:17:51 +0000 (13:17 +0000)]
ext: Add pybind rev f4b81b3

Change-Id: I52e4fc9ebf2f59da57d8cf8f3e37cc79598c2f5f
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2229
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
7 years agoscons: Remove the SPAWN hack added earlier.
Gabe Black [Fri, 28 Apr 2017 11:11:38 +0000 (04:11 -0700)]
scons: Remove the SPAWN hack added earlier.

A previous change forced scons to spawn child processes by exec-ing it
directly rather than going through the shell because the command line
length would be too long for the shell to handle. Now that incremental
linking should keep the command line lengths more under control, that
change should no longer be necessary.

Change-Id: I9e82a62083afd1414324a7fd697bd6d4b76367ae
Reviewed-on: https://gem5-review.googlesource.com/2947
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Group Source-s based on what SConscript included them.
Gabe Black [Fri, 28 Apr 2017 11:03:01 +0000 (04:03 -0700)]
scons: Group Source-s based on what SConscript included them.

The groups won't be perfectly balanced or optimally planned, but this
requires no thought and breaks the object files down into a reasonable
number of reasonably sized groups.

Change-Id: I6542fc807aaf356a9be751093f68e2e29f0b1586
Reviewed-on: https://gem5-review.googlesource.com/2946
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Put Source objects in groups and partially link them.
Gabe Black [Fri, 28 Apr 2017 11:00:42 +0000 (04:00 -0700)]
scons: Put Source objects in groups and partially link them.

The groups will be linked together into intermediate partially linked
object files. Right now the hierarchy is assumed to be flat, but with some
effort it could be extended to allow truly hierarchical linking.

Change-Id: I77b77710554e5f05e8b00720a0170afaf4afac2d
Reviewed-on: https://gem5-review.googlesource.com/2945
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Add builders for partially linked object files.
Gabe Black [Fri, 28 Apr 2017 10:57:09 +0000 (03:57 -0700)]
scons: Add builders for partially linked object files.

These intermediate object files can be used to perform a hierarchical
link.

Change-Id: I27634731734eebe6531ce6b0894abdd59ffdc5c9
Reviewed-on: https://gem5-review.googlesource.com/2944
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoarch-sparc: Fix wrong indentation causing warnings for gcc 6
Nikos Nikoleris [Wed, 26 Apr 2017 09:52:13 +0000 (10:52 +0100)]
arch-sparc: Fix wrong indentation causing warnings for gcc 6

Change-Id: I94e15ae79f0e73692d882f62fd2b7bf45cf0c841
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2900
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

7 years agodev: Add ATA command used in recent Linux kernels
Jason Lowe-Power [Mon, 24 Apr 2017 13:55:24 +0000 (08:55 -0500)]
dev: Add ATA command used in recent Linux kernels

Add a case for the ATA command ATAPI_IDENTIFY_DEVICE.
This avoids the panic: Unsupported ATA command when booting a recent Linux
kernel. This was tested on 4.8.13.

Change-Id: Ib297a2c02da0730d8698c59801254dd0f5ee9f7f
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/2863
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
7 years agoscons: Add a Transform() for when linking shared libraries.
Gabe Black [Fri, 28 Apr 2017 10:49:24 +0000 (03:49 -0700)]
scons: Add a Transform() for when linking shared libraries.

Change-Id: I7ddba0cc7be559633328011c1c7e2282f509b78c
Reviewed-on: https://gem5-review.googlesource.com/2943
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

7 years agoscons: Find ext build directories automatically.
Gabe Black [Fri, 28 Apr 2017 06:50:09 +0000 (23:50 -0700)]
scons: Find ext build directories automatically.

The ext directories with SConscripts in them are easy to find
automatically. Avoid boilerplate listing them out and SConscript()ing
them manually.

Change-Id: Ib723882aebc00e639eb8ec44904bb05ffa2c6b55
Reviewed-on: https://gem5-review.googlesource.com/2942
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>