gem5.git
12 years agoCache: Fix the LRU policy for classic memory hierarchy
Lena Olson [Fri, 29 Jun 2012 15:21:58 +0000 (11:21 -0400)]
Cache: Fix the LRU policy for classic memory hierarchy

The LRU policy always evicted the least recently touched way, even if it
contained valid data and another way was invalid, as can happen if a block has
been invalidated by coherance.  This can result in caches never warming up even
though they are replacing blocks.  This modifies the LRU policy to move blocks
to LRU position on invalidation.

12 years agoBus: enable non/coherent buses sub-classes
Uri Wiener [Fri, 29 Jun 2012 15:19:08 +0000 (11:19 -0400)]
Bus: enable non/coherent buses sub-classes
This patch merely changes several methods to be virtual in order to enable
non/coherent buses sub-classes.

12 years agoMem: fix master id assertion in cache_impl.hh
Dam Sunwoo [Fri, 29 Jun 2012 15:19:07 +0000 (11:19 -0400)]
Mem: fix master id assertion in cache_impl.hh
The assertion was applied to the wrong packet.
This patch fixes the issue rerported by Xiang Jiang on the gem5-dev mailing list.

12 years agoStyle: Make style.py's invalid warning print which file caused the infraction.
Matt Evans [Fri, 29 Jun 2012 15:19:06 +0000 (11:19 -0400)]
Style: Make style.py's invalid warning print which file caused the infraction.

12 years agoMem: Fix a livelock resulting in LLSC/locked memory access implementation.
Matt Evans [Fri, 29 Jun 2012 15:19:05 +0000 (11:19 -0400)]
Mem: Fix a livelock resulting in  LLSC/locked memory access implementation.

Currently when multiple CPUs perform a load-linked/store-conditional sequence,
the loads all create a list of reservations which is then scanned when the
stores occur.  A reservation matching the context and address of the store is
sought, BUT all reservations matching the address are also erased at this point.

The upshot is that a store-conditional will remove all reservations even if the
store itself does not succeed.  A livelock was observed using 7-8 CPUs where a
thread would erase the reservations of other threads, not succeed, loop and put
its own reservation in again only to have it blown by another thread that
unsuccessfully now tries to store-conditional -- no forward progress was made,
hanging the system.

The correct way to do this is to only blow a reservation when a store
(conditional or not) actually /occurs/ to its address.  One thread always wins
(the one that does the store-conditional first).

12 years agoStats: Update stats for RAS and LRU fixes.
Ali Saidi [Fri, 29 Jun 2012 15:19:03 +0000 (11:19 -0400)]
Stats: Update stats for RAS and LRU fixes.

12 years agoO3: Track if the RAS has been pushed or not to pop the RAS if neccessary.
Nathanael Premillieu [Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)]
O3: Track if the RAS has been pushed or not to pop the RAS if neccessary.

Add new flag (named pushedRAS) in the PredictorHistory structure.
This flag tracks whether the RAS has been pushed or not during a prediction.
Then, in the squash function it is used to pop the RAS if necessary.

12 years agoARM: Fix identification of one RAS pop instruction.
Ali Saidi [Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)]
ARM: Fix identification of one RAS pop instruction.

The check should be with the op2 field, not with the op1 field.

12 years agoCache: Only invalidate a line in the cache when an uncacheable write is seen.
Ali Saidi [Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)]
Cache: Only invalidate a line in the cache when an uncacheable write is seen.

12 years agoARM: Update version of linux we claim to be to 3.0.0.
Ali Saidi [Fri, 29 Jun 2012 15:18:29 +0000 (11:18 -0400)]
ARM: Update version of linux we claim to be to 3.0.0.

Static binaries generated with new versions of libc complain that the kernel
is too old otherwise.

12 years agoARM: Fix issue with predicted next pc being wrong because of advance() ordering.
Ali Saidi [Fri, 29 Jun 2012 15:18:28 +0000 (11:18 -0400)]
ARM: Fix issue with predicted next pc being wrong because of advance() ordering.

npc in PCState for ARM was being calculated before the current flags were
updated with the next flags. This causes an issue as the npc is incremented by
two or four depending on the current flags (thumb or not) and was leading to
branches that were predicted correctly being identified as mispredicted.

12 years agoARM: Fix address range issue with VExpress EMM stable_2012_06_28
Ali Saidi [Wed, 27 Jun 2012 23:23:02 +0000 (19:23 -0400)]
ARM: Fix address range issue with VExpress EMM

12 years agoswig: Use SWIG from environment when determining version
Andreas Hansson [Wed, 20 Jun 2012 23:32:42 +0000 (19:32 -0400)]
swig: Use SWIG from environment when determining version

This patch fixes a minor issue in the SConstruct where a hardcoded
swig is used instead of the environment SWIG when determining the
version.

12 years agoBuild: Point to the appropriate tcmalloc package
Andreas Hansson [Mon, 18 Jun 2012 19:43:12 +0000 (15:43 -0400)]
Build: Point to the appropriate tcmalloc package

This patch updates the message printed if the user does not have
tcmalloc available. It turns out that the correct package (which
creates all required symlinks etc) is libgoogle-perftools-dev. This
has been verified on Ubuntu 12.04.

12 years agoconfigs: add run scripts for ics/gb versions of android and bbench
Anthony Gutierrez [Mon, 11 Jun 2012 15:07:42 +0000 (11:07 -0400)]
configs: add run scripts for ics/gb versions of android and bbench

1) Modifies Benchmarks.py to add support for Android ICS and BBench on Android ICS.

2) An rcS script is added for BBench on ICS.

3) Separates benchmark entries and rcS scripts for GB/ICS

4) Removes the debugging output from the existing BBench run script. These
   print statements were used for debugging and they seemed to confuse users
   into believing they should see some terminal output.

12 years agoARM: implement the ProcessInfo methods
Anthony Gutierrez [Mon, 11 Jun 2012 15:07:41 +0000 (11:07 -0400)]
ARM: implement the ProcessInfo methods

12 years agoscons: Make compiler version error more verbose and easier to debug.
Ali Saidi [Mon, 11 Jun 2012 14:54:37 +0000 (10:54 -0400)]
scons: Make compiler version error more verbose and easier to debug.

12 years agoRegression: Fix some bugs in simple-timing-mp-ruby.py.
Marc Orr [Mon, 11 Jun 2012 07:16:43 +0000 (03:16 -0400)]
Regression: Fix some bugs in simple-timing-mp-ruby.py.

12 years agoTiming CPU: Remove a redundant port pointer
Andreas Hansson [Fri, 8 Jun 2012 16:45:24 +0000 (12:45 -0400)]
Timing CPU: Remove a redundant port pointer

This patch is trivial and merely prunes a pointer that was never set
or used.

12 years agoPower: Fix MaxMiscDestRegs which was set to zero
Andreas Hansson [Fri, 8 Jun 2012 16:44:17 +0000 (12:44 -0400)]
Power: Fix MaxMiscDestRegs which was set to zero

This patch fixes a failing compilation caused by MaxMiscDestRegs being
zero. According to gcc 4.6, the result is a comparison that is always
false due to limited range of data type.

12 years agoX86 TLB: Add a missing = sign
Nilay Vaish [Thu, 7 Jun 2012 22:03:45 +0000 (17:03 -0500)]
X86 TLB: Add a missing = sign

12 years agomem: Delay deleting of incoming packets by one call.
Ali Saidi [Thu, 7 Jun 2012 14:59:03 +0000 (10:59 -0400)]
mem: Delay deleting of incoming packets by one call.

This patch is a temporary fix until Andreas' four-phase patches
get reviewed and committed. Removing FastAlloc seems to have exposed
an issue which previously was reasonable rare in which packets are freed
before the sending cache is done with them. This change puts incoming packets
no a pendingDelete queue which are deleted at the start of the next call and
thus breaks the dependency between when the caller returns true and when the
packet is actually used by the sending cache.

Running valgrind on a multi-core linux boot and the memtester results in no
valgrind warnings.

12 years agoX86 TLB: Fix for gcc 4.4.3
Jayneel Gandhi [Thu, 7 Jun 2012 13:11:00 +0000 (08:11 -0500)]
X86 TLB: Fix for gcc 4.4.3
Due to recent changes to X86 TLB, gem5 stopped compiling on
gcc version 4.4.3. This patch provides the fix for that problem. The patch
is tested on gcc 4.4.3. The change is not required for more recent
versions of gcc (like on 4.6.3).

12 years agoConfig: call to setWorkCountOptions() for all ISAs
Nilay Vaish [Thu, 7 Jun 2012 13:05:31 +0000 (08:05 -0500)]
Config: call to setWorkCountOptions() for all ISAs

12 years agoConfig: Remove setMipsOptions
Nilay Vaish [Thu, 7 Jun 2012 13:05:30 +0000 (08:05 -0500)]
Config: Remove setMipsOptions
As status matrix, MIPS fs does not work. Hence, these options are not
required. Secondly, the function is setting param values for a CPU class.
This seems strange, should probably be done in a different way.

12 years agoConfig: changes to a couple of error msgs
Nilay Vaish [Thu, 7 Jun 2012 13:05:30 +0000 (08:05 -0500)]
Config: changes to a couple of error msgs

12 years agocpu: Don't init simple and inorder CPUs if they are defered.
Anthony Gutierrez [Tue, 5 Jun 2012 18:20:13 +0000 (14:20 -0400)]
cpu: Don't init simple and inorder CPUs if they are defered.

initCPU() will be called to initialize switched out CPUs for the simple and
inorder CPU models. this patch prevents those CPUs from being initialized
because they should get their state from the active CPU when it is switched
out.

12 years agoISA: Back-out NoopMachInst as a StaticInstPtr change.
Ali Saidi [Tue, 5 Jun 2012 17:52:30 +0000 (13:52 -0400)]
ISA: Back-out NoopMachInst as a StaticInstPtr change.

12 years agocpt: update some comments in the checkpoint migration script
Ali Saidi [Tue, 5 Jun 2012 14:36:59 +0000 (10:36 -0400)]
cpt: update some comments in the checkpoint migration script

12 years agoall: Update stats for memory per master and total fix.
Ali Saidi [Tue, 5 Jun 2012 05:23:16 +0000 (01:23 -0400)]
all: Update stats for memory per master and total fix.

12 years agostats: when applying an operation to two vectors sum the components first.
William Wang [Tue, 5 Jun 2012 05:23:11 +0000 (01:23 -0400)]
stats: when applying an operation to two vectors sum the components first.

Previously writing X/Y in a formula would result in:
x[0]/y[0] + x[1]/y[1]
In reality you want:
(x[0] +x[1])/(y[0] + y[1])

12 years agoMem: add per-master stats to physmem
Dam Sunwoo [Tue, 5 Jun 2012 05:23:11 +0000 (01:23 -0400)]
Mem: add per-master stats to physmem

Added per-master stats (similar to cache stats) to physmem.

12 years agoARM: Add PCIe support to VExpress_EMM model and remove deprecated ELT
Geoffrey Blake [Tue, 5 Jun 2012 05:23:11 +0000 (01:23 -0400)]
ARM: Add PCIe support to VExpress_EMM model and remove deprecated ELT

12 years agoARM: removed extra white space
Chander Sudanthi [Tue, 5 Jun 2012 05:23:10 +0000 (01:23 -0400)]
ARM: removed extra white space

Extra white space fixes in miscregs.hh

12 years agoARM: Fix MPIDR and MIDR register implementation.
Chander Sudanthi [Tue, 5 Jun 2012 05:23:10 +0000 (01:23 -0400)]
ARM: Fix MPIDR and MIDR register implementation.

This change allows designating a system as MP capable or not as some
bootloaders/kernels care that it's set right. You can have a single
processor MP capable system, but you can't have a multi-processor
UP only system. This change also fixes the initialization of the MIDR
register.

12 years agoARM: PS2 encoding fix
Chander Sudanthi [Tue, 5 Jun 2012 05:23:10 +0000 (01:23 -0400)]
ARM: PS2 encoding fix

Fixed Disable encoding and added SetDefaults.
See http://wiki.osdev.org/Mouse_Input for encodings.

12 years agosim: Provide a framework for detecting out of data checkpoints and migrating them.
Ali Saidi [Tue, 5 Jun 2012 05:23:10 +0000 (01:23 -0400)]
sim: Provide a framework for detecting out of data checkpoints and migrating them.

12 years agostats: Add stats unittest for total calculations.
Ali Saidi [Tue, 5 Jun 2012 05:23:10 +0000 (01:23 -0400)]
stats: Add stats unittest for total calculations.

12 years agoO3: Clean up the O3 structures and try to pack them a bit better.
Ali Saidi [Tue, 5 Jun 2012 05:23:09 +0000 (01:23 -0400)]
O3: Clean up the O3 structures and try to pack them a bit better.

DynInst is extremely large the hope is that this re-organization will put the
most used members close to each other.

12 years agosim: Add support for tcmalloc if it's installed and available.
Ali Saidi [Tue, 5 Jun 2012 05:23:09 +0000 (01:23 -0400)]
sim: Add support for tcmalloc if it's installed and available.
This package is available in Ubuntu, Debian, and Redhat as google-perftools.
With multiple tests on a single machine I've seen a little over 10% performance
gain with tcmalloc.

12 years agosim: Remove FastAlloc
Ali Saidi [Tue, 5 Jun 2012 05:23:08 +0000 (01:23 -0400)]
sim: Remove FastAlloc

While FastAlloc provides a small performance increase (~1.5%) over regular malloc it isn't thread safe.
After removing FastAlloc and using tcmalloc I've seen a performance increase of 12% over libc malloc
when running twolf for ARM.

12 years agoARM: Fix over-eager assert in gic.
Ali Saidi [Tue, 5 Jun 2012 05:23:08 +0000 (01:23 -0400)]
ARM: Fix over-eager assert in gic.

12 years agostats: Provide a mechanism to get a callback when stats are dumped.
Mitchell Hayenga [Tue, 5 Jun 2012 05:23:08 +0000 (01:23 -0400)]
stats: Provide a mechanism to get a callback when stats are dumped.

This mechanism is useful for dumping output that is correlated with stats
dumping, but isn't tracked by the gem5 statistics.

12 years agoARM: Fix compilation on ARM after Gabe's change.
Ali Saidi [Tue, 5 Jun 2012 05:23:08 +0000 (01:23 -0400)]
ARM: Fix compilation on ARM after Gabe's change.

12 years agoISA: Turn the ExtMachInst NoopMachinst into the StaticInstPtr NoopStaticInst.
Gabe Black [Mon, 4 Jun 2012 17:57:23 +0000 (10:57 -0700)]
ISA: Turn the ExtMachInst NoopMachinst into the StaticInstPtr NoopStaticInst.

This eliminates a use of the ExtMachInst type outside of the ISAs.

12 years agoX86: Update stats for the CPUID change.
Gabe Black [Mon, 4 Jun 2012 17:43:11 +0000 (10:43 -0700)]
X86: Update stats for the CPUID change.

12 years agoX86: Ensure that the CPUID instruction always writes its outputs.
Gabe Black [Mon, 4 Jun 2012 17:43:09 +0000 (10:43 -0700)]
X86: Ensure that the CPUID instruction always writes its outputs.

The CPUID instruction was implemented so that it would only write its results
if the instruction was successful. This works fine on the simple CPU where
unwritten registers retain their old values, but on a CPU like O3 with
renaming this is broken. The instruction needs to write the old values back
into the registers explicitly if they aren't being changed.

12 years agoX86: Ensure that the decoder's internal ExtMachInst is completely initialized.
Gabe Black [Mon, 4 Jun 2012 17:43:08 +0000 (10:43 -0700)]
X86: Ensure that the decoder's internal ExtMachInst is completely initialized.

There are some bits of some fields of the ExtMachInst which are not actually
used for anything but are included in the hash of an ExtMachInst for
simplicity and efficiency. This change makes sure the decoder's internal
working ExtMachInst is completely initialized, even these unused bits, so that
there isn't any nondeterministic behavior, no valgrind messages about
uninitialized variables, and no potential false misses/redundant entries in
the decode cache.

12 years agoBus: Split the bus into a non-coherent and coherent bus
Andreas Hansson [Thu, 31 May 2012 17:30:04 +0000 (13:30 -0400)]
Bus: Split the bus into a non-coherent and coherent bus

This patch introduces a class hierarchy of buses, a non-coherent one,
and a coherent one, splitting the existing bus functionality. By doing
so it also enables further specialisation of the two types of buses.

A non-coherent bus connects a number of non-snooping masters and
slaves, and routes the request and response packets based on the
address. The request packets issued by the master connected to a
non-coherent bus could still snoop in caches attached to a coherent
bus, as is the case with the I/O bus and memory bus in most system
configurations. No snoops will, however, reach any master on the
non-coherent bus itself. The non-coherent bus can be used as a
template for modelling PCI, PCIe, and non-coherent AMBA and OCP buses,
and is typically used for the I/O buses.

A coherent bus connects a number of (potentially) snooping masters and
slaves, and routes the request and response packets based on the
address, and also forwards all requests to the snoopers and deals with
the snoop responses. The coherent bus can be used as a template for
modelling QPI, HyperTransport, ACE and coherent OCP buses, and is
typically used for the L1-to-L2 buses and as the main system
interconnect.

The configuration scripts are updated to use a NoncoherentBus for all
peripheral and I/O buses.

A bit of minor tidying up has also been done.

--HG--
rename : src/mem/bus.cc => src/mem/coherent_bus.cc
rename : src/mem/bus.hh => src/mem/coherent_bus.hh
rename : src/mem/bus.cc => src/mem/noncoherent_bus.cc
rename : src/mem/bus.hh => src/mem/noncoherent_bus.hh

12 years agoStats: Fix stats to match output after changeset 8800b05e1cb3
Andreas Hansson [Wed, 9 May 2012 18:52:14 +0000 (11:52 -0700)]
Stats: Fix stats to match output after changeset 8800b05e1cb3

This patch updates the stats for parser to be aligned with the most
up-to-date behaviour. Somehow the wrong results got committed as part
of 8800b05e1cb3 (see details below) when fixing the no_value -> nan
stats.

changeset:   8983:8800b05e1cb3
user:        Nathan Binkert <nate@binkert.org>
summary:     stats: update stats for no_value -> nan

12 years agogcc: Small fixes to compile with gcc 4.7
Andreas Hansson [Wed, 30 May 2012 09:31:48 +0000 (05:31 -0400)]
gcc: Small fixes to compile with gcc 4.7

This patch makes two very minor changes to please gcc 4.7. The
CopyData function no longer exists and this has been replaced. For
some reason previous versions of gcc did not complain on the const
char casting not having an implementation, but this is now addressed.

12 years agoBus: Remove redundant packet parameter from isOccupied
Andreas Hansson [Wed, 30 May 2012 09:31:11 +0000 (05:31 -0400)]
Bus: Remove redundant packet parameter from isOccupied

This patch merely remove the Packet* from the isOccupied member
function. Historically this was used to check if the packet was an
express snoop, but this is now done outside this function (where
relevant).

12 years agoBus: Turn the PortId into a transport function parameter
Andreas Hansson [Wed, 30 May 2012 09:30:24 +0000 (05:30 -0400)]
Bus: Turn the PortId into a transport function parameter

The main aim of this patch is to arrive at a suitable port interface
for vector ports, including both the packet and the port id. This
patch changes the bus transport functions
(recvFunctional/Atomic/Timing) to require a PortId parameter
indicating the source port. Previously this information was passed by
setting the source field of the packet, and this is only required in
the case of a timing request.

With this patch, the use of the source and destination field is also
more restrictive, as they are only needed for timing accesses. The
modifications to these fields for atomic snoops is now removed
entirely, also making minor modifications to the cache.

12 years agoPacket: Unify the use of PortID in packet and port
Andreas Hansson [Wed, 30 May 2012 09:29:42 +0000 (05:29 -0400)]
Packet: Unify the use of PortID in packet and port

This patch removes the Packet::NodeID typedef and unifies it with the
Port::PortId. The src and dest fields in the packet are used to hold a
port id (e.g. in the bus), and thus the two should actually be the
same.

The typedef PortID is now global (in base/types.hh) and aligned with
the ThreadID in terms of capitalisation and naming of the
InvalidPortID constant.

Before this patch, two flags were used for valid destination and
source, rather than relying on a named value (InvalidPortID), and
this is now redundant, as the src and dest field themselves are
sufficient to tell whether the current value is a valid port
identifier or not. Consequently, the VALID_SRC and VALID_DST are
removed.

As part of the cleaning up, a number of int parameters and local
variables are updated to use PortID.

Note that Ruby still has its own NodeID typedef. Furthermore, the
MemObject getMaster/SlavePort still has an int idx parameter with a
default value of -1 which should eventually change to PortID idx =
InvalidPortID.

12 years agoPacket: Updated comments for src and dest fields
Andreas Hansson [Wed, 30 May 2012 09:29:07 +0000 (05:29 -0400)]
Packet: Updated comments for src and dest fields

This patch updates the comments for the src and dest fields to reflect
their actual use. Due to a number of patches (e.g. removing the
Broadcast flag), the old comments are no longer indicative of the
current usage.

12 years agoBridge: Split deferred request, response and sender state
Andreas Hansson [Wed, 30 May 2012 09:28:06 +0000 (05:28 -0400)]
Bridge: Split deferred request, response and sender state

This patch splits the PacketBuffer class into a RequestState and a
DeferredRequest and DeferredResponse. Only the requests need a
SenderState, and the deferred requests and responses only need an
associated point in time for the request and the response queue.

Besides the cleaning up, the goal is to simplify the transition to a
new port handshake, and with these changes, the two packet queues are
starting to look very similar to the generic packet queue, but
currently they do a few unique things relating to the NACK and
counting of requests/responses that the packet queue cannot be
conveniently used. This will be addressed in a later patch.

12 years agoX86: Use the HandyM5Reg to avoid a register read and some logic in the TLB.
Gabe Black [Tue, 29 May 2012 04:56:23 +0000 (21:56 -0700)]
X86: Use the HandyM5Reg to avoid a register read and some logic in the TLB.

12 years agoX86: Add a 32 bit hello world test binary.
Gabe Black [Mon, 28 May 2012 02:01:09 +0000 (19:01 -0700)]
X86: Add a 32 bit hello world test binary.

12 years agoX86: Move the GDT down to where it can be accessed in 32 bit mode.
Gabe Black [Mon, 28 May 2012 02:01:08 +0000 (19:01 -0700)]
X86: Move the GDT down to where it can be accessed in 32 bit mode.

The GDT can be accessed by user level software running in compatibility mode
by moving segment selectors into segment registers. The GDT needs to be set up
at an address accessible in this mode.

12 years agoX86: Truncate addresses to 32 bits except in 64 bit mode, not long mode.
Gabe Black [Mon, 28 May 2012 02:01:04 +0000 (19:01 -0700)]
X86: Truncate addresses to 32 bits except in 64 bit mode, not long mode.

A small change was added a while ago to keep addresses from overflowing 32
bits when larger addresses shouldn't be accessible to software. That change
truncated when not in long mode, but really it should have truncated when not
in 64 bit mode. The difference is whether compatibility mode is included, a
mode that's supposed to act like a legacy 32 bit mode.

12 years agoISA,CPU: Generalize and split out the components of the decode cache.
Gabe Black [Sat, 26 May 2012 20:45:12 +0000 (13:45 -0700)]
ISA,CPU: Generalize and split out the components of the decode cache.

This will allow it to be specialized by the ISAs. The existing caching scheme
is provided by the BasicDecodeCache in the GenericISA namespace and is built
from the generalized components.

--HG--
rename : src/cpu/decode_cache.cc => src/arch/generic/decode_cache.cc

12 years agoCPU: Merge the predecoder and decoder.
Gabe Black [Sat, 26 May 2012 20:44:46 +0000 (13:44 -0700)]
CPU: Merge the predecoder and decoder.

These classes are always used together, and merging them will give the ISAs
more flexibility in how they cache things and manage the process.

--HG--
rename : src/arch/x86/predecoder_tables.cc => src/arch/x86/decoder_tables.cc

12 years agoISA: Make the decode function part of the ISA's decoder.
Gabe Black [Fri, 25 May 2012 07:55:24 +0000 (00:55 -0700)]
ISA: Make the decode function part of the ISA's decoder.

12 years agoCPU: Simplify the implementation of the decode cache.
Gabe Black [Fri, 25 May 2012 07:54:39 +0000 (00:54 -0700)]
CPU: Simplify the implementation of the decode cache.

Also reorganize it to make it more amenable to being rearranged later.

12 years agoDecode: Make the Decoder class defined per ISA.
Gabe Black [Fri, 25 May 2012 07:53:37 +0000 (00:53 -0700)]
Decode: Make the Decoder class defined per ISA.

--HG--
rename : src/cpu/decode.cc => src/arch/generic/decoder.cc
rename : src/cpu/decode.hh => src/arch/generic/decoder.hh

12 years agoCache: Remove dangling doWriteback declaration
Andreas Hansson [Thu, 24 May 2012 08:09:19 +0000 (04:09 -0400)]
Cache: Remove dangling doWriteback declaration

This patch removes the declaration of doWriteback as there is no
implementation for this member function.

12 years agoPacket: Cleaning up packet command and attribute
Andreas Hansson [Wed, 23 May 2012 13:18:04 +0000 (09:18 -0400)]
Packet: Cleaning up packet command and attribute

This patch removes unused commands and attributes from the packet to
avoid any confusion. It is part of an effort to clear up how and where
different commands and attributes are used.

12 years agoConfig: Use the attribute naming and include ports in JSON
Andreas Hansson [Wed, 23 May 2012 13:16:39 +0000 (09:16 -0400)]
Config: Use the attribute naming and include ports in JSON

This patch changes the organisation of the JSON output slightly to
make it easier to traverse and use the files. Most importantly, the
hierarchical dictionaries now use keys that correspond to the
attribute names also in the case of VectorParams (used to be
e.f. "cpu0 cpu1"). It also adds the name and the path to each
SimObject directory entry. Before this patch, to get cpu0, you would
have to query dict['system']['cpu0 cpu1'][0] and this could be a dict
with 'cpu0' : { cpu parameters }. Now you use dict['system']['cpu'][0]
and get { cpu parameters } (where one is "name" : "cpu0").

Additionally this patch includes more verbose information about the
ports, specifying their role, and using a JSON array rather than a
concatenated string for the peer.

12 years agoDMA: Split the DMA device and IO device into seperate files
Andreas Hansson [Wed, 23 May 2012 13:15:45 +0000 (09:15 -0400)]
DMA: Split the DMA device and IO device into seperate files

This patch moves the DMA device to its own set of files, splitting it
from the IO device. There are no behavioural changes associated with
this patch.

The patch also grabs the opportunity to do some very minor tidying up,
including some white space removal and pruning some redundant
parameters.

Besides the immediate benefits of the separation-of-concerns, this
patch also makes upcoming changes more streamlined as it split the
devices that are only slaves and the DMA device that also acts as a
master.

--HG--
rename : src/dev/io_device.cc => src/dev/dma_device.cc
rename : src/dev/io_device.hh => src/dev/dma_device.hh

12 years agoMEM: Add a snooping DMA port subclass for table walker
Andreas Hansson [Wed, 23 May 2012 13:14:12 +0000 (09:14 -0400)]
MEM: Add a snooping DMA port subclass for table walker

This patch makes the (device) DmaPort non-snooping and removes the
recvSnoop constructor parameter and instead introduces a
SnoopingDmaPort subclass for the ARM table walker.

Functionality is unchanged, as are the stats, and the patch merely
clarifies that the normal DMA ports are not snooping (although they
may issue requests that are snooped by others, as done with PCI, PCIe,
AMBA4 ACE etc).

Currently this port is declared in the ARM table walker as it is not
used anywhere else. If other ports were to have similar behaviour it
could be moved in a future patch.

12 years agoConfig: Exit with fatal if a port is already connected
Andreas Hansson [Wed, 23 May 2012 13:01:56 +0000 (09:01 -0400)]
Config: Exit with fatal if a port is already connected

This patch turns the existing warning into a fatal, as there should
never be any cases where a (non-vector) port is assigned to and then
later connected to something else. If this behaviour is allowed, as it
used to be, there are cases where the wrong number of C++ ports are
created when instantiating objects with VectorPorts (obviously that
could be fixed, but the better approach is to simply not allow it).

12 years agoX86 Regression: update stats due to cc register split
Nilay Vaish [Tue, 22 May 2012 16:38:04 +0000 (11:38 -0500)]
X86 Regression: update stats due to cc register split

12 years agoRuby: Remove the unused src/mem/ruby/common/Driver.* files.
Nilay Vaish [Tue, 22 May 2012 16:35:58 +0000 (11:35 -0500)]
Ruby: Remove the unused src/mem/ruby/common/Driver.* files.

12 years agoRuby Sequencer: Schedule deadlock check event at correct time
Nilay Vaish [Tue, 22 May 2012 16:32:57 +0000 (11:32 -0500)]
Ruby Sequencer: Schedule deadlock check event at correct time
The scheduling of the deadlock check event was being done incorrectly as the
clock was not being multiplied, so as to convert the time into ticks. This
patch removes that bug.

12 years agoX86: Split Condition Code register
Nilay Vaish [Tue, 22 May 2012 16:29:53 +0000 (11:29 -0500)]
X86: Split Condition Code register
This patch moves the ECF and EZF bits to individual registers (ecfBit and
ezfBit) and the CF and OF bits to cfofFlag registers. This is being done
so as to lower the read after write dependencies on the the condition code
register. Ultimately we will have the following registers [ZAPS], [OF],
[CF], [ECF], [EZF] and [DF]. Note that this is only one part of the
solution for lowering the dependencies. The other part will check whether
or not the condition code register needs to be actually read. This would
be done through a separate patch.

12 years agox86 ISA: Implement the sse3 haddps instruction.
Marc Orr [Sat, 19 May 2012 11:32:25 +0000 (04:32 -0700)]
x86 ISA: Implement the sse3 haddps instruction.

Shuffle the 32 bit values into position, and then add in parallel.

12 years agoSyscalls: warn when the length argument to mmap is excessive.
Gabe Black [Sat, 19 May 2012 11:13:47 +0000 (04:13 -0700)]
Syscalls: warn when the length argument to mmap is excessive.

If the length argument to mmap is larger than the arbitrary but reasonable
limit of 4GB, there's a good chance that the value is nonsense and not
intentional. Rather than attempting to satisfy the mmap anyway, this change
makes gem5 warn to make it more apparent what's going wrong.

12 years agoMem: Fix size check when allocating physical memory
Lena Olson [Tue, 15 May 2012 01:31:33 +0000 (20:31 -0500)]
Mem: Fix size check when allocating physical memory

12 years agoConfig: Fix a typo in the se.py script for setting fastmem
Andreas Hansson [Wed, 16 May 2012 16:37:08 +0000 (12:37 -0400)]
Config: Fix a typo in the se.py script for setting fastmem

This patch changes a hardcoded index 0 to the appropriate CPU index so
that fastmem is set correctly for all the CPUs in the system.

12 years agoARM: update stats for clock frequency fix.
Ali Saidi [Thu, 10 May 2012 23:04:29 +0000 (18:04 -0500)]
ARM: update stats for clock frequency fix.

12 years agoARM: fix the calculation of the values in the RV clocks
Koan-Sin Tan [Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)]
ARM: fix the calculation of the values in the RV clocks

This clock is used by the linux scheduler.

12 years agostats: fix compilation of unit test.
Ali Saidi [Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)]
stats: fix compilation of unit test.

12 years agostats: fix bug in assert for 2d vector
Ali Saidi [Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)]
stats: fix bug in assert for 2d vector

12 years agoARM: pl011 raw interrupt fix
Chander Sudanthi [Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)]
ARM: pl011 raw interrupt fix

Raw interrupt was not being set when interrupt was disabled.
This patch sets the raw interrupt regardless of the mask.

12 years agoARM: EMM board address range fix
Chander Sudanthi [Thu, 10 May 2012 23:04:28 +0000 (18:04 -0500)]
ARM: EMM board address range fix

0x40000000 is reservered for external AXI addresses.  This address
range is not used currently.  Removed the range from the bridge.

12 years agoDOT: improved dot-based system visualization
Uri Wiener [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
DOT: improved dot-based system visualization
Revised system visualization to reflect structure and memory hierarchy.
Improved visualization: less congested and cluttered; more colorful.
Nodes reflect components; directed edges reflect dirctional relation, from
a master port to a slave port. Requires pydot.

12 years agoDOT: fixed broken code for visualizing configuration using dot
Uri Wiener [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
DOT: fixed broken code for visualizing configuration using dot

Fixed broken code which visualizes the system configuration by generating a
tree from each component's children, starting from root.
Requires DOT (hence pydot).

12 years agoARM: guard masked symbol tables by default
Dam Sunwoo [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
ARM: guard masked symbol tables by default

Symbol tables masked with the loadAddrMask create redundant entries
that could conflict with kernel function events that rely on the
original addresses.  This patch guards the creation of those masked
symbol tables by default, with an option to enable them when needed
(for early-stage kernel debugging, etc.)

12 years agomem: fix bug with CopyStringOut and null string termination.
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
mem: fix bug with CopyStringOut and null string termination.

12 years agoCache: restructure code that actually isn't a loop
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
Cache: restructure code that actually isn't a loop

12 years agodev: use correct delete operation in SimpleDisk
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
dev: use correct delete operation in SimpleDisk

12 years agoARM: Fix incorrect use of not operators in arm devices
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
ARM: Fix incorrect use of not operators in arm devices

12 years agogem5: assert before indexing intro arrays to verify bounds
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
gem5: assert before indexing intro arrays to verify bounds

12 years agogem5: fix some iterator use and erase bugs
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
gem5: fix some iterator use and erase bugs

12 years agogem5: fix a number of use after free issues
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
gem5: fix a number of use after free issues

12 years agobase: fix a invalid ?: operator
Ali Saidi [Thu, 10 May 2012 23:04:27 +0000 (18:04 -0500)]
base: fix a invalid ?: operator

12 years agogem5: Fix a number of incorrect case statements
Ali Saidi [Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)]
gem5: Fix a number of incorrect case statements

12 years agoARM: Update m5op assembly for thumb compilation.
Ali Saidi [Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)]
ARM: Update m5op assembly for thumb compilation.

12 years agostats: track if the stats have been enabled and prevent requesting master id
Ali Saidi [Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)]
stats: track if the stats have been enabled and prevent requesting master id

Track the point in the initialization where statistics have been registered.
After this point registering new masterIds can no longer work as some
SimObjects may have sized stats vectors based on the previous value. If someone
tries to register a masterId after this point the simulator executes fatal().

12 years agoCache: Panic if you attempt to create a checkpoint with a cache in the system
Ali Saidi [Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)]
Cache: Panic if you attempt to create a checkpoint with a cache in the system