gem5.git
8 years agosim: Get rid of the non-const serialize() method
Andreas Sandberg [Fri, 4 Dec 2015 09:48:48 +0000 (09:48 +0000)]
sim: Get rid of the non-const serialize() method

The last SimObject using the legacy serialize API with non-const
methods has now been transitioned to the new API. This changeset
removes the serializeOld() methods from the serialization base class
as they are no longer used.

8 years agostats: Update to reflect changes to RealView platform code
Andreas Sandberg [Fri, 4 Dec 2015 00:19:05 +0000 (00:19 +0000)]
stats: Update to reflect changes to RealView platform code

8 years agoarm, config: Automatically discover available platforms
Andreas Sandberg [Fri, 4 Dec 2015 00:19:05 +0000 (00:19 +0000)]
arm, config: Automatically discover available platforms

Add support for automatically discover available platforms. The
Python-side uses functionality similar to what we use when
auto-detecting available CPU models. The machine IDs have been updated
to match the platform configurations. If there isn't a matching
machine ID, the configuration scripts default to -1 which Linux uses
for device tree only platforms.

8 years agodev, arm: Disable R/B swap in HDLCD by default
Andreas Sandberg [Fri, 4 Dec 2015 00:19:05 +0000 (00:19 +0000)]
dev, arm: Disable R/B swap in HDLCD by default

The HDLCD model implements a workaround that swaps the red and blue
channels. This works around an issue in certain old kernels. The new
driver doesn't seem to have this behavior, so disable the workaround
by default and enable it in the affected platforms.

8 years agodev, arm: Split MCC and DCC subsystems
Andreas Sandberg [Fri, 4 Dec 2015 00:19:05 +0000 (00:19 +0000)]
dev, arm: Split MCC and DCC subsystems

Devices behind the Versatile Express configuration controllers are
currently all lumped into one SimObject. This will make DTB generation
challenging since the DTB assumes them to be in different parts of the
hierarchy. It also makes it hard to model other CoreTiles without also
replicating devices from the motherboard.

This changeset splits the VExpressCoreTileCtrl into two subsystems:
VExpressMCC for all motherboard-related devices and CoreTile2A15DCC
for Core Tile specific devices.

8 years agosim: Add support for generating back traces on errors
Andreas Sandberg [Fri, 4 Dec 2015 00:12:58 +0000 (00:12 +0000)]
sim: Add support for generating back traces on errors

Add functionality to generate a back trace if gem5 crashes (SIGABRT or
SIGSEGV). The current implementation uses glibc's stack traversal
support if available and stubs out the call to print_backtrace()
otherwise.

8 years agoarm: Add support for automatic boot loader selection
Andreas Sandberg [Thu, 3 Dec 2015 23:53:37 +0000 (23:53 +0000)]
arm: Add support for automatic boot loader selection

Add support for automatically selecting a boot loader that matches the
guest system's kernel. Instead of accepting a single boot loader, the
ArmSystem class now accepts a vector of boot loaders. When
initializing a system, the we now look for the first boot loader with
an architecture that matches the kernel.

This changeset makes it possible to use the same system for both
64-bit and 32-bit kernels.

8 years agodev, mips: Remove the unused MaltaPChip class
Andreas Sandberg [Thu, 3 Dec 2015 23:09:34 +0000 (23:09 +0000)]
dev, mips: Remove the unused MaltaPChip class

The MaltaPChip class is currently unused and identical (except for the
class name) to the TsunamiPChip. If someone decides to implement PCI
for Malta, they should make sure to share code with the Tsunami
implementation if they are similar.

8 years agostats: Bump stats to match current behaviour
Andreas Hansson [Wed, 2 Dec 2015 14:58:24 +0000 (09:58 -0500)]
stats: Bump stats to match current behaviour

8 years agoconfig: Fix broken SimObject listing
Andreas Sandberg [Tue, 1 Dec 2015 13:01:05 +0000 (13:01 +0000)]
config: Fix broken SimObject listing

The gem5 option '--list-sim-objects' is supposed to list all available
SimObjects and their parameters. It currently chokes on SimObjects
with parameters that have an object instance as their default
value. This is caused by __str__ in SimObject trying to resolve its
complete path. When the path resolution method reaches the parent
object (a MetaSimObject since it hasn't been instantiated), it dies
with a Python exception.

This changeset adds a guard to stop path resolution if the parent
object is a MetaSimObject.

8 years agodev: Remove unnecessary header include
Andreas Sandberg [Tue, 24 Nov 2015 10:13:04 +0000 (10:13 +0000)]
dev: Remove unnecessary header include

--HG--
extra : rebase_source : 64046371962e98413757bc3ab0c0d48dfb11ff1e

8 years agomem: Fix search-replace issues in DRAMPower wrapper license
Andreas Hansson [Wed, 25 Nov 2015 18:52:56 +0000 (13:52 -0500)]
mem: Fix search-replace issues in DRAMPower wrapper license

Fix a number of unintentional insertions of 'const'.

8 years agoconfig: Added missing types to JSON/INI Python reader
Andrew Bardsley [Sun, 22 Nov 2015 10:10:21 +0000 (05:10 -0500)]
config: Added missing types to JSON/INI Python reader

Added the missing types EthernetAddr and Current to the JSON/INI file
reader example configs/example/read_config.py.

Also added __str__ to EthernetAddr to make values appear in the same form
in JSON an INI files.

8 years agosim: Update C++ config example to match SystemC example
Andrew Bardsley [Thu, 10 Sep 2015 15:10:49 +0000 (16:10 +0100)]
sim: Update C++ config example to match SystemC example

Update the use of the drain manager, and checkpointing to
match changes to gem5 since the example was written.

8 years agoarm, dev: Fix flash model serialization code typos
Geoffrey Blake [Sun, 22 Nov 2015 10:10:19 +0000 (05:10 -0500)]
arm, dev: Fix flash model serialization code typos

The flash model has typos in its serialization code for
unknownPages, locationTable, blockValidEntries, and blockEmptyEntries
arrays where it would save each entry in the array under the same
name in the checkpoint.  This patch fixes these typos.

8 years agocpu: Fix base FP and CC register index in o3 insertThread()
Nathanael Premillieu [Sun, 22 Nov 2015 10:10:19 +0000 (05:10 -0500)]
cpu: Fix base FP and CC register index in o3 insertThread()

Note that the method is not used, and could possibly be deleted.

8 years agoarm: Fix fplib 128-bit shift operators
Nathanael Premillieu [Sun, 22 Nov 2015 10:10:18 +0000 (05:10 -0500)]
arm: Fix fplib 128-bit shift operators

Appease clang.

8 years agoconfig: Minor fixes to the DRAM utilisation sweep
Andreas Hansson [Sun, 22 Nov 2015 10:10:17 +0000 (05:10 -0500)]
config: Minor fixes to the DRAM utilisation sweep

8 years agocpu: Fix memory leak in traffic generator
Andreas Hansson [Sun, 22 Nov 2015 10:10:16 +0000 (05:10 -0500)]
cpu: Fix memory leak in traffic generator

In cases where we discard the packet, make sure to also delete it and
the associated request.

8 years agocpu: Enforce 1 interrupt controller per thread
Andreas Sandberg [Fri, 20 Nov 2015 20:50:17 +0000 (14:50 -0600)]
cpu: Enforce 1 interrupt controller per thread

Consider it a fatal configuration error if the number of interrupt
controllers doesn't match the number of threads in an SMT
configuration.

8 years agoMerged changesets: 47e2adf7fb1a and b65d4e878ed2
Nilay Vaish [Mon, 16 Nov 2015 11:10:45 +0000 (05:10 -0600)]
Merged changesets: 47e2adf7fb1a and b65d4e878ed2

--HG--
extra : amend_source : c51de9ae5387aba6fae8403677054678beceb2ab

8 years agostats: updates due to recent chagnesets
Nilay Vaish [Mon, 16 Nov 2015 11:08:57 +0000 (05:08 -0600)]
stats: updates due to recent chagnesets

8 years agox86: Invalidating TLB entry on page fault
Swapnil Haria [Mon, 16 Nov 2015 11:08:54 +0000 (05:08 -0600)]
x86: Invalidating TLB entry on page fault

As per the x86 architecture specification, matching TLB entries need to be
invalidated on a page fault. For instance, after a page fault due to inadequate
protection bits on a TLB hit, the TLB entry needs to be invalidated. This
behavior is clearly specified in the x86 architecture manuals from both AMD and
Intel.  This invalidation is missing currently in gem5, due to which linux
kernel versions 3.8 and up cannot be simulated efficiently. This is exposed by
a linux optimisation in commit e4a1cc56e4d728eb87072c71c07581524e5160b1, which
removes a tlb flush on updating page table entries in x86.

Testing: Linux kernel versions 3.8 onwards were booting very slowly in FS mode,
due to repeated page faults (~300000 before the first print statement in a
bash file). Ensured that page fault rate drops drastically and observed
reduction in boot time from order of hours to minutes for linux kernel v3.8
and v3.11

8 years agox86: cpuid: add family to warn() message
Bjoern A. Zeeb [Mon, 16 Nov 2015 10:58:39 +0000 (04:58 -0600)]
x86: cpuid: add family to warn() message

doCpuid() has to identical warn messages about unimplemented functions.  Add
the family to the log message to make them distinguishable.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agox86: pagetable walker: fix typo in comment
Bjoern A. Zeeb [Mon, 16 Nov 2015 10:58:39 +0000 (04:58 -0600)]
x86: pagetable walker: fix typo in comment

8 years agosparc: Make remote debugging with gdb work
Palle Lyckegaard [Mon, 16 Nov 2015 10:58:39 +0000 (04:58 -0600)]
sparc: Make remote debugging with gdb work
Remove sparc V8 TBR register from list of registers since it is not part of
sparc V9. This brings the number of registers in sync with what gdb expects

Without this patch gdb complains about receoved packet too long.

with this patch gdb is able to work properly with gem5 for remote debugging.

Note: gdb is version 7.8
Note: gdb is configured with --target=sparc64-sun-solaris2.8

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agostats: remove wb_penalized and wb_penalized_rate
Nilay Vaish [Mon, 16 Nov 2015 10:58:29 +0000 (04:58 -0600)]
stats: remove wb_penalized and wb_penalized_rate

8 years agoo3: drop unused statistic wbPenalized and wbPenalizedRate
Nilay Vaish [Mon, 16 Nov 2015 10:57:52 +0000 (04:57 -0600)]
o3: drop unused statistic wbPenalized and wbPenalizedRate

8 years agosim: support for distcc pump server settings
Joe Gross [Sun, 15 Nov 2015 22:56:43 +0000 (17:56 -0500)]
sim: support for distcc pump server settings

8 years agoarm: Add missing explicit overrides for classic caches
Andreas Sandberg [Sun, 15 Nov 2015 21:28:00 +0000 (21:28 +0000)]
arm: Add missing explicit overrides for classic caches

Make clang when compiling on OSX.

8 years agoruby: added stl vector of ints to be used by SLICC
Brad Beckmann [Mon, 20 Jul 2015 14:15:20 +0000 (09:15 -0500)]
ruby: added stl vector of ints to be used by SLICC

8 years agoslicc: fixes for the Address to Addr changeset (11025)
Tony Gutierrez [Fri, 13 Nov 2015 22:30:58 +0000 (17:30 -0500)]
slicc: fixes for the Address to Addr changeset (11025)

misc changes now that Address has become Addr including int to address util
function

8 years agoruby: add BoolVec
Joe Gross [Fri, 13 Nov 2015 22:30:56 +0000 (17:30 -0500)]
ruby: add BoolVec

The BoolVec typedef and insertion operator overload function simplify usage of
vectors of type bool

8 years agomem: add boolean to disable PacketQueue's size sanity check
Brad Beckmann [Mon, 20 Jul 2015 14:15:18 +0000 (09:15 -0500)]
mem: add boolean to disable PacketQueue's size sanity check

the sanity check, while generally useful for exposing memory system bugs,
may be spurious with respect to GPU workloads, which may generate many more
requests than typical CPU workloads. the large number of requests generated
by the GPU may cause the req/resp queues to back up, thus queueing more than
100 packets.

8 years agomisc: ignore object files and static libs in util/m5
Anthony Gutierrez [Fri, 13 Nov 2015 22:03:48 +0000 (17:03 -0500)]
misc: ignore object files and static libs in util/m5

8 years agodev, arm: Initialized the iccrpr register in the GIC
Andreas Sandberg [Wed, 11 Nov 2015 10:18:38 +0000 (10:18 +0000)]
dev, arm: Initialized the iccrpr register in the GIC

The IICRPR register in the GIC is currently not being initialized when
the GIC is instantiated. Initialize to the value mandated by the
architecture specification.

8 years agodev: Add basic checkpoint support to VirtIO9PProxy device
Sascha Bischoff [Thu, 5 Nov 2015 09:40:12 +0000 (09:40 +0000)]
dev: Add basic checkpoint support to VirtIO9PProxy device

This patch adds very basic checkpoint support for the VirtIO9PProxy
device. Previously, attempts to checkpoint gem5 with a present 9P
device caused gem5 to fatal as none of the state is tracked. We still
do not track any state, but we replace the fatal with a warning which
is triggered if the device has been used by the guest system. In the
event that it has not been used, we assume that no state is lost
during checkpointing. The warning is triggered on both a serialize and
an unserialize to ensure maximum visibility for the user.

8 years agodev: Remove unused header includes
Andreas Sandberg [Mon, 9 Nov 2015 13:44:15 +0000 (13:44 +0000)]
dev: Remove unused header includes

Devices should never need to include dev/pciconfall.hh.

--HG--
extra : amend_source : 3a6e56485d432b49e2af22407982fa785c0ccb68

8 years agodev: Don't access the platform directly in PCI devices
Andreas Sandberg [Mon, 9 Nov 2015 13:44:04 +0000 (13:44 +0000)]
dev: Don't access the platform directly in PCI devices

Cleanup PCI devices to avoid using the PciDevice::platform pointer
directly. The PCI-specific functionality provided by the Platform
should be accessed through the wrappers in PciDevice.

8 years agostats: Update stats to match cache changes
Andreas Hansson [Fri, 6 Nov 2015 08:26:50 +0000 (03:26 -0500)]
stats: Update stats to match cache changes

8 years agoconfig: Update memtest to stress test clean writebacks
Andreas Hansson [Fri, 6 Nov 2015 08:26:44 +0000 (03:26 -0500)]
config: Update memtest to stress test clean writebacks

This patch adds yet another twist to the memtest cache hierarchy, in that
the writeback_clean option is toggled at every level to match the
clusivity of the downstream cache.

8 years agomem: Add an option to perform clean writebacks from caches
Andreas Hansson [Fri, 6 Nov 2015 08:26:43 +0000 (03:26 -0500)]
mem: Add an option to perform clean writebacks from caches

This patch adds the necessary commands and cache functionality to
allow clean writebacks. This functionality is crucial, especially when
having exclusive (victim) caches. For example, if read-only L1
instruction caches are not sending clean writebacks, there will never
be any spills from the L1 to the L2. At the moment the cache model
defaults to not sending clean writebacks, and this should possibly be
re-evaluated.

The implementation of clean writebacks relies on a new packet command
WritebackClean, which acts much like a Writeback (renamed
WritebackDirty), and also much like a CleanEvict. On eviction of a
clean block the cache either sends a clean evict, or a clean
writeback, and if any copies are still cached upstream the clean
evict/writeback is dropped. Similarly, if a clean evict/writeback
reaches a cache where there are outstanding MSHRs for the block, the
packet is dropped. In the typical case though, the clean writeback
allocates a block in the downstream cache, and marks it writable if
the evicted block was writable.

The patch changes the O3_ARM_v7a L1 cache configuration and the
default L1 caches in config/common/Caches.py

8 years agoconfig: Update memtest to stress test cache clusivity
Andreas Hansson [Fri, 6 Nov 2015 08:26:42 +0000 (03:26 -0500)]
config: Update memtest to stress test cache clusivity

This patch adds an new twist to the memtest cache hierarchy, in that
it switches from mostly inclusive to mostly exclusive at every level
in the tree. This has helped weed out plenty issues, and serves as a
good stress tests.

8 years agomem: Add cache clusivity
Andreas Hansson [Fri, 6 Nov 2015 08:26:41 +0000 (03:26 -0500)]
mem: Add cache clusivity

This patch adds a parameter to control the cache clusivity, that is if
the cache is mostly inclusive or exclusive. At the moment there is no
intention to support strict policies, and thus the options are: 1)
mostly inclusive, or 2) mostly exclusive.

The choice of policy guides the behaviuor on a cache fill, and a new
helper function, allocOnFill, is created to encapsulate the decision
making process. For the timing mode, the decision is annotated on the
MSHR on sending out the downstream packet, and in atomic we directly
pass the decision to handleFill. We (ab)use the tempBlock in cases
where we are not allocating on fill, leaving the rest of the cache
unaffected. Simple and effective.

This patch also makes it more explicit that multiple caches are
allowed to consider a block writable (this is the case
also before this patch). That is, for a mostly inclusive cache,
multiple caches upstream may also consider the block exclusive. The
caches considering the block writable/exclusive all appear along the
same path to memory, and from a coherency protocol point of view it
works due to the fact that we always snoop upwards in zero time before
querying any downstream cache.

Note that this patch does not introduce clean writebacks. Thus, for
clean lines we are essentially removing a cache level if it is made
mostly exclusive. For example, lines from the read-only L1 instruction
cache or table-walker cache are always clean, and simply get dropped
rather than being passed to the L2. If the L2 is mostly exclusive and
does not allocate on fill it will thus never hold the line. A follow
on patch adds the clean writebacks.

The patch changes the L2 of the O3_ARM_v7a CPU configuration to be
mostly exclusive (and stats are affected accordingly).

8 years agomem: Avoid unnecessary snoops on writebacks and clean evictions
Ali Jafri [Fri, 6 Nov 2015 08:26:40 +0000 (03:26 -0500)]
mem: Avoid unnecessary snoops on writebacks and clean evictions

This patch optimises the handling of writebacks and clean evictions
when using a snoop filter. Instead of snooping into the caches to
determine if the block is cached or not, simply set the status based
on the snoop-filter result.

8 years agomem: Order packet queue only on matching addresses
Andreas Hansson [Fri, 6 Nov 2015 08:26:38 +0000 (03:26 -0500)]
mem: Order packet queue only on matching addresses

Instead of conservatively enforcing order for all packets, which may
negatively impact the simulated-system performance, this patch updates
the packet queue such that it only applies the restriction if there
are already packets with the same address in the queue.

The basic need for the order enforcement is due to coherency
interactions where requests/responses to the same cache line must not
over-take each other. We rely on the fact that any packet that needs
order enforcement will have a block-aligned address. Thus, there is no
need for the queue to know about the cacheline size.

8 years agomem: Enforce insertion order on the cache response path
Ali Jafri [Fri, 6 Nov 2015 08:26:37 +0000 (03:26 -0500)]
mem: Enforce insertion order on the cache response path

This patch enforces insertion order transmission of packets on the
response path in the cache. Note that the logic to enforce order is
already present in the packet queue, this patch simply turns it on for
queues in the response path.

Without this patch, there are corner cases where a request-response is
faster than a response-response forwarded through the cache. This
violation of queuing order causes problems in the snoop filter leaving
it with inaccurate information. This causes assert failures in the
snoop filter later on.

A follow on patch relaxes the order enforcement in the packet queue to
limit the performance impact.

8 years agomem: Use the packet delays and do not just zero them out
Andreas Hansson [Fri, 6 Nov 2015 08:26:36 +0000 (03:26 -0500)]
mem: Use the packet delays and do not just zero them out

This patch updates the I/O devices, bridge and simple memory to take
the packet header and payload delay into account in their latency
calculations. In all cases we add the header delay, i.e. the
accumulated pipeline delay of any crossbars, and the payload delay
needed for deserialisation of any payload.

Due to the additional unknown latency contribution, the packet queue
of the simple memory is changed to use insertion sorting based on the
time stamp. Moreover, since the memory hands out exclusive (non
shared) responses, we also need to ensure ordering for reads to the
same address.

8 years agomem: Align rules for sinking inhibited packets at the slave
Andreas Hansson [Fri, 6 Nov 2015 08:26:35 +0000 (03:26 -0500)]
mem: Align rules for sinking inhibited packets at the slave

This patch aligns how the memory-system slaves, i.e. the various
memory controllers and the bridge, identify and deal with sinking of
inhibited packets that are only useful within the coherent part of the
memory system.

In the future we could shift the onus to the crossbar, and add a
parameter "is_point_of_coherence" that would allow it to sink the
aforementioned packets.

8 years agomem: Do not treat CleanEvict as a write operation
Andreas Hansson [Fri, 6 Nov 2015 08:26:33 +0000 (03:26 -0500)]
mem: Do not treat CleanEvict as a write operation

This patch changes the CleanEvict command type to not be considered a
write. Initially it was made a zero-sized write to match the writeback
command, but as things developed it became clear that it causes more
problems than it solves. For example, the memory modules (and bridge)
should not consider the CleanEvict as a write, but instead discard
it. With this patch it will be neither a read, nor write, and as it
does not need a response the slave will simply sink it.

8 years agomem: Unify delayed packet deletion
Andreas Hansson [Fri, 6 Nov 2015 08:26:21 +0000 (03:26 -0500)]
mem: Unify delayed packet deletion

This patch unifies how we deal with delayed packet deletion, where the
receiving slave is responsible for deleting the packet, but the
sending agent (e.g. a cache) is still relying on the pointer until the
call to sendTimingReq completes. Previously we used a mix of a
deletion vector and a construct using unique_ptr. With this patch we
ensure all slaves use the latter approach.

8 years agomisc: Appease clang static analyzer
Andreas Hansson [Fri, 6 Nov 2015 08:26:16 +0000 (03:26 -0500)]
misc: Appease clang static analyzer

A few minor fixes to issues identified by the clang static analyzer.

8 years agomem: Check the XBar's port queues on functional snoops
Andreas Sandberg [Fri, 6 Nov 2015 08:26:09 +0000 (03:26 -0500)]
mem: Check the XBar's port queues on functional snoops

The CoherentXBar currently doesn't check its queued slave ports when
receiving a functional snoop. This caused data corruption in cases
when a modified cache lines is forwarded between two caches.

Add the required functional calls into the queued slave ports.

8 years agoconfigs: fix bug introduced due to 276ad9121192
Nilay Vaish [Wed, 4 Nov 2015 18:36:28 +0000 (12:36 -0600)]
configs: fix bug introduced due to 276ad9121192

I had made a typo in changeset 276ad9121192.  This changeset fixes it

8 years agomem: hmc: minor fixes
Erfan Azarkhish [Tue, 3 Nov 2015 18:17:58 +0000 (12:17 -0600)]
mem: hmc: minor fixes

This patch performs two minor fixes to DRAMCtrl.py and xbar.hh in favor of the
HMC patch series.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agomem: hmc: serial link model
Erfan Azarkhish [Tue, 3 Nov 2015 18:17:57 +0000 (12:17 -0600)]
mem: hmc: serial link model

This changeset adds a serial link model for the Hybrid Memory Cube (HMC).
SerialLink is a simple variation of the Bridge class, with the ability to
account for the latency of packet serialization. Also trySendTiming has been
modified to correctly model bandwidth.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agomem: hmc: adds controller
Erfan Azarkhish [Tue, 3 Nov 2015 18:17:56 +0000 (12:17 -0600)]
mem: hmc: adds controller

This patch models a simple HMC Controller. It simply schedules the incoming
packets to HMC Serial Links using a round robin mechanism.  This patch should
be applied in series with other patches modeling a complete HMC device.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agomem: hmc: top level design
Erfan Azarkhish [Tue, 3 Nov 2015 18:17:56 +0000 (12:17 -0600)]
mem: hmc: top level design

This patch enables modeling a complete Hybrid Memory Cube (HMC) device. It
highly reuses the existing components in gem5's general memory system with some
small modifications. This changeset requires additional patches to model a
complete HMC device.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

8 years agosparc: add missing parameter to makeSparcSystem()
Palle Lyckegaard [Tue, 3 Nov 2015 18:17:55 +0000 (12:17 -0600)]
sparc: add missing parameter to makeSparcSystem()

makeSparcSystem() in configs/common/FSConfig.py is missing the cmdLine
parameter Without the parameter the simulation fails to start.  With the
parameter the simulation starts properly.

8 years agoarm: Add secure flag to TableWalker request when needed
Nathanael Premillieu [Thu, 29 Oct 2015 12:48:26 +0000 (08:48 -0400)]
arm: Add secure flag to TableWalker request when needed

8 years agodev: Fix segfault in flash device
Sascha Bischoff [Thu, 29 Oct 2015 12:48:25 +0000 (08:48 -0400)]
dev: Fix segfault in flash device

Fix a bug in which the flash device would write out of bounds and
could either trigger a segfault and corrupt the memory of other
objects. This was caused by using pageSize in the place of
pagesPerBlock when running the garbage collector.

Also, added an assert to flag this condition in the future.

8 years agodev: Fix draining for UFSHostDevice and FlashDevice
Sascha Bischoff [Thu, 29 Oct 2015 12:48:24 +0000 (08:48 -0400)]
dev: Fix draining for UFSHostDevice and FlashDevice

This patch fixes the drain logic for the UFSHostDevice and the
FlashDevice. In the case of the FlashDevice, the logic for CheckDrain
needed to be reversed, whilst in the case of the UFSHostDevice check
drain was never being called. In both cases the system would never
complete draining if the initial attampt to drain failed.

8 years agokvm, arm: Fix compilation errors due to API changes
Victor Garcia [Thu, 29 Oct 2015 12:48:23 +0000 (08:48 -0400)]
kvm, arm: Fix compilation errors due to API changes

The checkpoint changes, along with the SMT patches have changed a
number of APIs. Adapt the ArmKvmCPU accordingly.

8 years agomem: Clarify cache MSHR handling on fill
Andreas Hansson [Thu, 29 Oct 2015 12:48:20 +0000 (08:48 -0400)]
mem: Clarify cache MSHR handling on fill

This patch addresses the upgrading of deferred targets in the MSHR,
and makes it clearer by explicitly calling out what is happening
(deferred targets are promoted if we get exclusivity without asking
for it).

8 years agopower: Implement Remote GDB
Boris Shingarov [Sun, 25 Oct 2015 23:01:52 +0000 (16:01 -0700)]
power: Implement Remote GDB

8 years agox86: Add missing explicit overrides for X86 devices
Andreas Hansson [Fri, 23 Oct 2015 13:51:12 +0000 (09:51 -0400)]
x86: Add missing explicit overrides for X86 devices

Make clang >= 3.5 happy when compiling build/X86/gem5.opt on OSX.

8 years agoarm: Add missing explicit overrides for ARM devices
Andreas Hansson [Fri, 23 Oct 2015 13:51:11 +0000 (09:51 -0400)]
arm: Add missing explicit overrides for ARM devices

Make clang >= 3.5 happy when compiling build/ARM/gem5.opt on OSX.

8 years agomem: Pass snoop retries through the CommMonitor
Andreas Hansson [Wed, 14 Oct 2015 17:32:28 +0000 (13:32 -0400)]
mem: Pass snoop retries through the CommMonitor

Allow the monitor to be placed after a snooping port, and do not fail
on snoop retries, but instead pass them on to the slave port.

8 years agoruby: profiler: provide the number of vnets through ruby system
Nilay Vaish [Wed, 14 Oct 2015 05:29:43 +0000 (00:29 -0500)]
ruby: profiler: provide the number of vnets through ruby system

The aim is to ultimately do away with the static function
Network::getNumberOfVirtualNetworks().

8 years agoruby: remove unused functionalRead() function.
Nilay Vaish [Wed, 14 Oct 2015 05:29:39 +0000 (00:29 -0500)]
ruby: remove unused functionalRead() function.

Not required since functional reads cannot rely on messages that are inflight.

8 years agoruby: garnet: flexible: refactor flit
Nilay Vaish [Wed, 14 Oct 2015 05:29:38 +0000 (00:29 -0500)]
ruby: garnet: flexible: refactor flit

8 years agomisc: Add explicit overrides and fix other clang >= 3.5 issues
Andreas Hansson [Mon, 12 Oct 2015 08:08:01 +0000 (04:08 -0400)]
misc: Add explicit overrides and fix other clang >= 3.5 issues

This patch adds explicit overrides as this is now required when using
"-Wall" with clang >= 3.5, the latter now part of the most recent
XCode. The patch consequently removes "virtual" for those methods
where "override" is added. The latter should be enough of an
indication.

As part of this patch, a few minor issues that clang >= 3.5 complains
about are also resolved (unused methods and variables).

8 years agomisc: Remove redundant compiler-specific defines
Andreas Hansson [Mon, 12 Oct 2015 08:07:59 +0000 (04:07 -0400)]
misc: Remove redundant compiler-specific defines

This patch moves away from using M5_ATTR_OVERRIDE and the m5::hashmap
(and similar) abstractions, as these are no longer needed with gcc 4.7
and clang 3.1 as minimum compiler versions.

8 years agostats: Update for UDelayEvent quiesce change
Joel Hestness [Sat, 10 Oct 2015 21:45:41 +0000 (16:45 -0500)]
stats: Update for UDelayEvent quiesce change

8 years agosim: Don't quiesce UDelayEvents with 0 latency
Joel Hestness [Sat, 10 Oct 2015 21:45:38 +0000 (16:45 -0500)]
sim: Don't quiesce UDelayEvents with 0 latency

ARM uses UDelayEvents to emulate kernel __*udelay functions and speed up
simulation. UDelayEvents call Pseudoinst::quiesceNs to quiesce the system for
a specified delay. Changeset 10341:0b4d10f53c2d introduced the requirement
that any quiesce process that is started must also be completed by scheduling
an EndQuiesceEvent. This change causes the CPU to hang if an IsQuiesce
instruction is executed, but the corresponding EndQuiesceEvent is not
scheduled.

Changeset 11058:d0934b57735a introduces a fix for uses of PseudoInst::quiesce*
that would conditionally execute the EndQuiesceEvent. ARM UDelayEvents specify
quiesce period of 0 ns (src/arch/arm/linux/system.cc), so changeset 11058
causes these events to now execute full quiesce processes, greatly increasing
the total instructions executed in kernel delay loops and slowing simulation.

This patch updates the UDelayEvent to conditionally execute
PseudoInst::quiesceNs (**a quiesce operation**) only if the specified
delay is >0 ns. The result is ARM delay loops no longer execute instructions
for quiesce handling, and regression time returns to normal.

8 years agoisa: Add parameter to pick different decoder inside ISA
Rekai Gonzalez Alberquilla [Fri, 9 Oct 2015 19:50:54 +0000 (14:50 -0500)]
isa: Add parameter to pick different decoder inside ISA

The decoder is responsible for splitting instructions in micro
operations (uops). Given that different micro architectures may split
operations differently, this patch allows to specify which micro
architecture each isa implements, so different cores in the system can
split instructions differently, also decoupling uop splitting
(microArch) from ISA (Arch). This is done making the decodification
calls templates that receive a type 'DecoderFlavour' that maps the
name of the operation to the class that implements it. This way there
is only one selection point (converting the command line enum to the
appropriate DecodeFeatures object). In addition, there is no explicit
code replication: template instantiation hides that, and the compiler
should be able to resolve a number of things at compile-time.

8 years agosim: Add relative break scheduling
Dylan Johnson [Fri, 9 Oct 2015 19:27:09 +0000 (14:27 -0500)]
sim: Add relative break scheduling

Add schedRelBreak() function, executable within a debugger, that sets a
breakpoint by relative rather than absolute tick.

8 years agoarch: clean up isa_parser error handling
Steve Reinhardt [Wed, 7 Oct 2015 00:26:50 +0000 (17:26 -0700)]
arch: clean up isa_parser error handling

Although some decent error messages were getting generated inside
isa_parser.py, they weren't always getting printed because of the
screwy way we were handling exceptions.  (Basically an inner
exception would get hidden by an outer exception, and the more
informative inner error message would not get printed.)

Also line numbers were messed up, since they were taken from the
lexer, which is typically a token (or more) ahead of the grammar
rule that's being matched.  Using the 'lineno' attribute that
PLY associates with the grammar production is more accurate.
The new LineTracker class extends lineno to track filenames as
well as line numbers.

8 years agosim: add ExecMacro to Exec* compound debug flags
Steve Reinhardt [Wed, 7 Oct 2015 00:26:50 +0000 (17:26 -0700)]
sim: add ExecMacro to Exec* compound debug flags

Really should have been there in the first place, IMO.
Makes debugging x86 execution a lot easier.

8 years agosim: print pid in output header
Steve Reinhardt [Wed, 7 Oct 2015 00:26:50 +0000 (17:26 -0700)]
sim: print pid in output header

This information is useful if you have a bunch of simulations running
and want to know which one to kill, but you've neglected to take
advantage of the previous patch and embed the pid in your output path.

8 years agox86: implement rcpps and rcpss SSE insts
Steve Reinhardt [Wed, 7 Oct 2015 00:26:50 +0000 (17:26 -0700)]
x86: implement rcpps and rcpss SSE insts

These are packed single-precision approximate reciprocal operations,
vector and scalar versions, respectively.

This code was basically developed by copying the code for
sqrtps and sqrtss.  The mrcp micro-op was simplified relative to
msqrt since there are no double-precision versions of this operation.

8 years agox86: implement fild, fucomi, and fucomip x87 insts
Steve Reinhardt [Wed, 7 Oct 2015 00:26:50 +0000 (17:26 -0700)]
x86: implement fild, fucomi, and fucomip x87 insts

fild loads an integer value into the x87 top of stack register.
fucomi/fucomip compare two x87 register values (the latter
also doing a stack pop).
These instructions are used by some versions of GNU libstdc++.

8 years agoext: fix SST connector
Curtis Dunham [Tue, 6 Oct 2015 23:08:28 +0000 (18:08 -0500)]
ext: fix SST connector

The renamings in changesets 8f5993cf (2015-03-23) "mem: rename
Locked/LOCKED to LockedRMW/LOCKED_RMW" and fdd4a895 (2015-07-03)
"mem: Split WriteInvalidateReq into write and invalidate" broke the
SST connector.  This commit repeats those renamings in ext/sst.

8 years agosim: Add ability to break at specific kernel function
Dylan Johnson [Wed, 2 Sep 2015 18:34:19 +0000 (13:34 -0500)]
sim: Add ability to break at specific kernel function

Adds a GDB callable function that sets a breakpoint at
the beginning of a kernel function.

8 years agotests: Update SMT tests to correctly configure CPUs
Andreas Sandberg [Mon, 5 Oct 2015 18:13:23 +0000 (13:13 -0500)]
tests: Update SMT tests to correctly configure CPUs

The 01.hello-2T-smt test case for the O3 CPU didn't correctly setup
the number of threads before creating interrupt controllers, which
confused the constructor in BaseCPU. This changeset adds SMT support
to the test configuration infrastructure.

--HG--
rename : tests/configs/o3-timing.py => tests/configs/o3-timing-mt.py
rename : tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing/config.ini => tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing-mt/config.ini
rename : tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing/simerr => tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing-mt/simerr
rename : tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing/simout => tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing-mt/simout
rename : tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing/stats.txt => tests/quick/se/01.hello-2T-smt/ref/alpha/linux/o3-timing-mt/stats.txt

8 years agostats: update EIO stats for snoop filter changes
Steve Reinhardt [Fri, 2 Oct 2015 05:04:12 +0000 (01:04 -0400)]
stats: update EIO stats for snoop filter changes

8 years agoconfig: Fix 'learning gem5' configs after SMT push
Andreas Hansson [Thu, 1 Oct 2015 08:07:15 +0000 (04:07 -0400)]
config: Fix 'learning gem5' configs after SMT push

This patch updates the 'learning gem5' example scripts to match the
recent push of the SMT patches.

8 years agobase: remove Trace::enabled flag
Curtis Dunham [Wed, 30 Sep 2015 20:21:55 +0000 (15:21 -0500)]
base: remove Trace::enabled flag

The DTRACE() macro tests both Trace::enabled and the specific flag. This
change uses the same administrative interface for enabling/disabling
tracing, but masks the SimpleFlags settings directly. This eliminates a
load for every DTRACE() test, e.g. DPRINTF.

8 years agoarm: Change TLB Software Caching
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
arm: Change TLB Software Caching

In ARM, certain variables are only updated when a necessary change is
detected.  Having 2 SMT threads share a TLB resulted in these not being
updated as required.  This patch adds a thread context identifer to
assist in the invalidation of these variables.

8 years agocpu,isa,mem: Add per-thread wakeup logic
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
cpu,isa,mem: Add per-thread wakeup logic

Changes wakeup functionality so that only specific threads on SMT
capable cpus are woken.

8 years agoisa,cpu: Add support for FS SMT Interrupts
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
isa,cpu: Add support for FS SMT Interrupts

Adds per-thread interrupt controllers and thread/context logic
so that interrupts properly get routed in SMT systems.

8 years agoarm: SMT MPIDR Setting
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
arm: SMT MPIDR Setting

Changes assignment of the MPIDR for multi-threaded systems only.

8 years agocpu: Add per-thread monitors
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
cpu: Add per-thread monitors

Adds per-thread address monitors to support FullSystem SMT.

8 years agoconfig,cpu: Add SMT support to Atomic and Timing CPUs
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
config,cpu: Add SMT support to Atomic and Timing CPUs

Adds SMT support to the "simple" CPU models so that they can be
used with other SMT-supported CPUs. Example usage: this enables
the TimingSimpleCPU to be used to warmup caches before swapping to
detailed mode with the in-order or out-of-order based CPU models.

8 years agocpu: Change thread assignments for heterogenous SMT
Mitch Hayenga [Wed, 30 Sep 2015 16:14:19 +0000 (11:14 -0500)]
cpu: Change thread assignments for heterogenous SMT

Trying to run an SE system with varying threads per core (SMT cores + Non-SMT
cores) caused failures due to the CPU id assignment logic.  The comment
about thread assignment (worrying about core 0 not having tid 0) seems
not to be valid given that our configuration scripts initialize them in
order.

This removes that constraint so a heterogenously threaded sytem can work.

8 years agoruby: Fix CacheMemory allocate leak
Joel Hestness [Tue, 29 Sep 2015 14:28:26 +0000 (09:28 -0500)]
ruby: Fix CacheMemory allocate leak

If a cache entry permission was previously set to NotPresent, but the entry was
not deleted, a following cache allocation can cause the entry to be leaked by
setting the entry pointer to a newly allocated entry. To eliminate this
possibility, check if the new entry is different from the old one, and if so,
delete the old one.

8 years agoarch, x86: Delete packet in IntDevice::recvResponse
Joel Hestness [Tue, 29 Sep 2015 14:28:26 +0000 (09:28 -0500)]
arch, x86: Delete packet in IntDevice::recvResponse

IntDevice::recvResponse is called from two places in current mainline: (1) the
short circuit path of X86ISA::IntDevice::IntMasterPort::sendMessage for atomic
mode, and (2) the full request->response path to and from the x86 interrupts
device (finally called from MessageMasterPort::recvTimingResp). In the former
case, the packet was deleted correctly, but in the latter case, the packet and
request leak. To fix the leak, move request and packet deletion into IntDevice
inherited class implementations of recvResponse.

8 years agoruby: RubyPort delete snoop requests
Joel Hestness [Tue, 29 Sep 2015 14:28:25 +0000 (09:28 -0500)]
ruby: RubyPort delete snoop requests

In RubyPort::ruby_eviction_callback, prior changes fixed a memory leak caused
by instantiating separate packets for each port that the eviction was forwarded
to. That change, however, left the instantiated request to also leak. Allocate
it on the stack to avoid the leak.

8 years agoruby: Fix memory leak in AbstractController
Joel Hestness [Tue, 29 Sep 2015 14:28:25 +0000 (09:28 -0500)]
ruby: Fix memory leak in AbstractController

Recent changes to memory access queuing allocate requests for packets sent to
memory controllers, but did not free the requests. Delete them to avoid leaks.

8 years agoruby: RubyMemoryControl delete requests
Joel Hestness [Tue, 29 Sep 2015 14:25:29 +0000 (09:25 -0500)]
ruby: RubyMemoryControl delete requests

Changes to the RubyMemoryControl removed the dequeue function, which deleted
MemoryNode instances. This results in leaked MemoryNode instances. Correctly
delete these instances.