gem5.git
12 years agoMOESI_hammer: fixed bug with single cpu + flushes, then modified the regression teste...
Brad Beckmann [Fri, 6 Apr 2012 20:47:06 +0000 (13:47 -0700)]
MOESI_hammer: fixed bug with single cpu + flushes, then modified the regression tester to check this functionality

12 years agorubytest: seperated read and write ports.
Brad Beckmann [Fri, 6 Apr 2012 20:47:06 +0000 (13:47 -0700)]
rubytest: seperated read and write ports.

This patch allows the ruby tester to support protocols where the i-cache and d-cache
are managed by seperate controllers.

12 years agoMEM: Enable multiple distributed generalized memories
Andreas Hansson [Fri, 6 Apr 2012 17:46:31 +0000 (13:46 -0400)]
MEM: Enable multiple distributed generalized memories

This patch removes the assumption on having on single instance of
PhysicalMemory, and enables a distributed memory where the individual
memories in the system are each responsible for a single contiguous
address range.

All memories inherit from an AbstractMemory that encompasses the basic
behaviuor of a random access memory, and provides untimed access
methods. What was previously called PhysicalMemory is now
SimpleMemory, and a subclass of AbstractMemory. All future types of
memory controllers should inherit from AbstractMemory.

To enable e.g. the atomic CPU and RubyPort to access the now
distributed memory, the system has a wrapper class, called
PhysicalMemory that is aware of all the memories in the system and
their associated address ranges. This class thus acts as an
infinitely-fast bus and performs address decoding for these "shortcut"
accesses. Each memory can specify that it should not be part of the
global address map (used e.g. by the functional memories by some
testers). Moreover, each memory can be configured to be reported to
the OS configuration table, useful for populating ATAG structures, and
any potential ACPI tables.

Checkpointing support currently assumes that all memories have the
same size and organisation when creating and resuming from the
checkpoint. A future patch will enable a more flexible
re-organisation.

--HG--
rename : src/mem/PhysicalMemory.py => src/mem/AbstractMemory.py
rename : src/mem/PhysicalMemory.py => src/mem/SimpleMemory.py
rename : src/mem/physical.cc => src/mem/abstract_mem.cc
rename : src/mem/physical.hh => src/mem/abstract_mem.hh
rename : src/mem/physical.cc => src/mem/simple_mem.cc
rename : src/mem/physical.hh => src/mem/simple_mem.hh

12 years agoNetworkTest: remove unnecessary memory allocation
Tushar Krishna [Thu, 5 Apr 2012 21:51:26 +0000 (17:51 -0400)]
NetworkTest: remove unnecessary memory allocation

12 years agoConfig: corrects the way Ruby attaches to the DMA ports
Nilay Vaish [Thu, 5 Apr 2012 16:09:19 +0000 (11:09 -0500)]
Config: corrects the way Ruby attaches to the DMA ports
With recent changes to the memory system, a port cannot be assigned a peer
port twice. While making use of the Ruby memory system in FS mode, DMA
ports were assigned peer twice, once for the classic memory system
and once for the Ruby memory system. This patch removes this double
assignment of peer ports.

12 years agoRuby: Fix the example configurations option parsing
Andreas Hansson [Thu, 5 Apr 2012 14:45:26 +0000 (10:45 -0400)]
Ruby: Fix the example configurations option parsing

This patch fixes the, currently broken, Ruby example scripts to
reflect the changes in the parsing of command-line options.

12 years agoPython: Make the All proxy traverse SimObject children as well
Andreas Hansson [Thu, 5 Apr 2012 14:44:35 +0000 (10:44 -0400)]
Python: Make the All proxy traverse SimObject children as well

This patch changes the behaviour of the All proxy parameter to not
only consider the direct children, but also do a pre-order depth-first
traversal of the object tree and append all results from the
children.

This is used in a later patch to find all the memories in the system,
independent of where they are located in the hierarchy.

12 years agoAtomic: Remove the physmem_port and access memory directly
Andreas Hansson [Tue, 3 Apr 2012 07:50:14 +0000 (03:50 -0400)]
Atomic: Remove the physmem_port and access memory directly

This patch removes the physmem_port from the Atomic CPU and instead
uses the system pointer to access the physmem when using the fastmem
option. The system already keeps track of the physmem and the valid
memory address ranges, and with this patch we merely make use of that
existing functionality. As a result of this change, the overloaded
getMasterPort in the Atomic CPU can be removed, thus unifying the CPUs.

12 years agoX86: Fix address size handling so real mode works properly.
Gabe Black [Sat, 31 Mar 2012 19:27:33 +0000 (12:27 -0700)]
X86: Fix address size handling so real mode works properly.

Virtual (pre-segmentation) addresses are truncated based on address size, and
any non-64 bit linear address is truncated to 32 bits. This means that real
mode addresses aren't truncated down to 16 bits after their segment bases are
added in.

12 years agoMEM: Remove legacy DRAM in preparation for memory updates
Andreas Hansson [Fri, 30 Mar 2012 16:57:48 +0000 (12:57 -0400)]
MEM: Remove legacy DRAM in preparation for memory updates

This patch removes the DRAM memory class in preparation for updates to
the memory system, with the first one introducing an abstract memory
class, and removing the assumption of a single physical memory.

12 years agoRuby: Remove the physMemPort and instead access memory directly
Andreas Hansson [Fri, 30 Mar 2012 13:42:36 +0000 (09:42 -0400)]
Ruby: Remove the physMemPort and instead access memory directly

This patch removes the physMemPort from the RubySequencer and instead
uses the system pointer to access the physmem. The system already
keeps track of the physmem and the valid memory address ranges, and
with this patch we merely make use of that existing functionality. The
memory is modified so that it is possible to call the access functions
(atomic and functional) without going through the port, and the memory
is allowed to be unconnected, i.e. have no ports (since Ruby does not
attach it like the conventional memory system).

12 years agoMEM: Introduce the master/slave port sub-classes in C++
William Wang [Fri, 30 Mar 2012 13:40:11 +0000 (09:40 -0400)]
MEM: Introduce the master/slave port sub-classes in C++

This patch introduces the notion of a master and slave port in the C++
code, thus bringing the previous classification from the Python
classes into the corresponding simulation objects and memory objects.

The patch enables us to classify behaviours into the two bins and add
assumptions and enfore compliance, also simplifying the two
interfaces. As a starting point, isSnooping is confined to a master
port, and getAddrRanges to slave ports. More of these specilisations
are to come in later patches.

The getPort function is not getMasterPort and getSlavePort, and
returns a port reference rather than a pointer as NULL would never be
a valid return value. The default implementation of these two
functions is placed in MemObject, and calls fatal.

The one drawback with this specific patch is that it requires some
code duplication, e.g. QueuedPort becomes QueuedMasterPort and
QueuedSlavePort, and BusPort becomes BusMasterPort and BusSlavePort
(avoiding multiple inheritance). With the later introduction of the
port interfaces, moving the functionality outside the port itself, a
lot of the duplicated code will disappear again.

12 years agoCPU: Unify initMemProxies across CPUs and simulation modes
Andreas Hansson [Fri, 30 Mar 2012 13:38:35 +0000 (09:38 -0400)]
CPU: Unify initMemProxies across CPUs and simulation modes

This patch unifies where initMemProxies is called, in the init()
method of each BaseCPU subclass, before TheISA::initCPU is
called. Moreover, it also ensures that initMemProxies is called in
both full-system and syscall-emulation mode, thus unifying also across
the modes. An additional check is added in the ThreadState to ensure
that initMemProxies is only called once.

12 years agoConfig: Change the way options are added
Nilay Vaish [Wed, 28 Mar 2012 16:01:53 +0000 (11:01 -0500)]
Config: Change the way options are added
I am not too happy with the way options are added in files se.py and fs.py
currently. This patch moves all the options to the file Options.py, functions
from which are called when required.

12 years agoConfig: Move setWorkCountOptions() to Simulation.py
Nilay Vaish [Tue, 27 Mar 2012 23:23:21 +0000 (18:23 -0500)]
Config: Move setWorkCountOptions() to Simulation.py
The function is presently defined in FSConfig.py, which does not seem to be
the correct place for it.

12 years agorange_map: Enable const find and iteration
Andreas Hansson [Mon, 26 Mar 2012 09:37:00 +0000 (05:37 -0400)]
range_map: Enable const find and iteration

This patch adds const access functions to the range_map to enable its use
in a const context, similar to the STL container classes.

12 years agoPower: Change bitfield name to avoid conflicts with range_map
Andreas Hansson [Mon, 26 Mar 2012 09:35:24 +0000 (05:35 -0400)]
Power: Change bitfield name to avoid conflicts with range_map

This patch changes the name of a bitfield from W to W_FIELD to avoid
clashes with W being used as a class (typename) in the templatized
range_map. It also changes L to L_FIELD to avoid future problems. The
problem manifestes itself when the CPU includes a header that in turn
includes range_map.hh. The relevant parts of the decoder are updated.

12 years agoRuby: Fix Set::print for 32-bit hosts
Andreas Hansson [Fri, 23 Mar 2012 10:54:25 +0000 (06:54 -0400)]
Ruby: Fix Set::print for 32-bit hosts

This patch fixes a compilation error caused by a length mismatch on
32-bit hosts. The ifdef and sprintf is replaced by a csprintf.

12 years agoMEM: Unify bus access methods and prepare for master/slave split
Andreas Hansson [Thu, 22 Mar 2012 10:37:21 +0000 (06:37 -0400)]
MEM: Unify bus access methods and prepare for master/slave split

This patch unifies the recvFunctional, recvAtomic and recvTiming to
all be based on a similar structure: 1) extract information about the
incoming packet, 2) send it out to the appropriate snoopers, 3)
determine where it is going, and 4) forward it to the right
destination. The naming of variables across the different access
functions is now consistent as well.

Additionally, the patch introduces the member functions releaseBus and
retryWaiting to better distinguish between the two cases when we
should tell a sender to retry. The first case is when the bus goes
from busy to idle, and the second case is when it receives a retry
from a destination that did not immediatelly accept a packet.

As a very minor change, the MMU debug flag is no longer used in the bus.

12 years agoMEM: Split SimpleTimingPort into PacketQueue and ports
Andreas Hansson [Thu, 22 Mar 2012 10:36:27 +0000 (06:36 -0400)]
MEM: Split SimpleTimingPort into PacketQueue and ports

This patch decouples the queueing and the port interactions to
simplify the introduction of the master and slave ports. By separating
the queueing functionality from the port itself, it becomes much
easier to distinguish between master and slave ports, and still retain
the queueing ability for both (without code duplication).

As part of the split into a PacketQueue and a port, there is now also
a hierarchy of two port classes, QueuedPort and SimpleTimingPort. The
QueuedPort is useful for ports that want to leave the packet
transmission of outgoing packets to the queue and is used by both
master and slave ports. The SimpleTimingPort inherits from the
QueuedPort and adds the implemention of recvTiming and recvFunctional
through recvAtomic.

The PioPort and MessagePort are cleaned up as part of the changes.

--HG--
rename : src/mem/tport.cc => src/mem/packet_queue.cc
rename : src/mem/tport.hh => src/mem/packet_queue.hh

12 years agoScons: Remove Werror=False in SConscript files
Andreas Hansson [Thu, 22 Mar 2012 10:34:50 +0000 (06:34 -0400)]
Scons: Remove Werror=False in SConscript files

This patch removes the overriding of "-Werror" in a handful of
cases. The code compiles with gcc 4.6.3 and clang 3.0 without any
warnings, and thus without any errors. There are no functional changes
introduced by this patch. In the future, rather than ypassing
"-Werror", address the warnings.

12 years agoPython: Fix a conditional expression that requires Python 2.5
Andreas Hansson [Wed, 21 Mar 2012 23:02:03 +0000 (19:02 -0400)]
Python: Fix a conditional expression that requires Python 2.5

This patch changes a conditional expression to a conventional if/else
block, which does not require Python >= 2.5.

12 years agoARM: Update stats for IT and conditional branch changes
Ali Saidi [Wed, 21 Mar 2012 15:36:45 +0000 (10:36 -0500)]
ARM: Update stats for IT and conditional branch changes

12 years agoARM: Fix case where cond/uncond control is mis-specified
Nathanael Premillieu [Wed, 21 Mar 2012 15:34:06 +0000 (10:34 -0500)]
ARM: Fix case where cond/uncond control is mis-specified

12 years agoARM: Clean up condCodes in IT blocks.
Ali Saidi [Wed, 21 Mar 2012 15:34:06 +0000 (10:34 -0500)]
ARM: Clean up condCodes in IT blocks.

12 years agoARM: IT doesn't need to be serializing.
Geoffrey Blake [Wed, 21 Mar 2012 15:34:06 +0000 (10:34 -0500)]
ARM: IT doesn't need to be serializing.

12 years agoO3: Fix sizing of decode to rename skid buffer.
Andrew Lukefahr [Wed, 21 Mar 2012 15:34:06 +0000 (10:34 -0500)]
O3: Fix sizing of decode to rename skid buffer.

12 years agoARM: Add RTC to PBX System
Koan-Sin Tan [Wed, 21 Mar 2012 15:34:05 +0000 (10:34 -0500)]
ARM: Add RTC to PBX System

12 years agoO3: Fix size of skid buffer between fetch and decode when widths are different
Brian Grayson [Wed, 21 Mar 2012 15:34:05 +0000 (10:34 -0500)]
O3: Fix size of skid buffer between fetch and decode when widths are different

12 years agoARM: Fix uninitialized value in ARM RTC model.
Ali Saidi [Wed, 21 Mar 2012 15:34:05 +0000 (10:34 -0500)]
ARM: Fix uninitialized value in ARM RTC model.

12 years agoGarnet: Stats at vnet granularity + code cleanup
Tushar Krishna [Mon, 19 Mar 2012 21:34:17 +0000 (17:34 -0400)]
Garnet: Stats at vnet granularity + code cleanup

This patch
(1) Moves redundant code from fixed and flexible networks to BaseGarnetNetwork.
(2) Prints network stats at vnet granularity.

12 years agogcc: Clean-up of non-C++0x compliant code, first steps
Andreas Hansson [Mon, 19 Mar 2012 10:36:09 +0000 (06:36 -0400)]
gcc: Clean-up of non-C++0x compliant code, first steps

This patch cleans up a number of minor issues aiming to get closer to
compliance with the C++0x standard as interpreted by gcc and clang
(compile with std=c++0x and -pedantic-errors). In particular, the
patch cleans up enums where the last item was succeded by a comma,
namespaces closed by a curcly brace followed by a semi-colon, and the
use of the GNU-extension typeof (replaced by templated functions). It
does not address variable-length arrays, zero-size arrays, anonymous
structs, range expressions in switch statements, and the use of long
long. The generated CPU code also has a large number of issues that
remain to be fixed, mainly related to overflows in implicit constant
conversion (due to shifts).

12 years agoclang: Fix recently introduced clang compilation errors
Andreas Hansson [Mon, 19 Mar 2012 10:35:04 +0000 (06:35 -0400)]
clang: Fix recently introduced clang compilation errors

This patch makes the code compile with clang 2.9 and 3.0 again by
making two very minor changes. Firt, it maintains a strict typing in
the forward declaration of the BaseCPUParams. Second, it adds a
FullSystemInt flag of the type unsigned int next to the boolean
FullSystem flag. The FullSystemInt variable can be used in
decode-statements (expands to switch statements) in the instruction
decoder.

12 years agoscripts: Fix to ensure that port connection count is always set
Andreas Hansson [Mon, 19 Mar 2012 10:34:02 +0000 (06:34 -0400)]
scripts: Fix to ensure that port connection count is always set

This patch ensures that the port connection count is set to zero in those
cases when the port is not connected.

12 years agoruby_fs.py: Add call to createInterruptController()
Nilay Vaish [Fri, 16 Mar 2012 12:47:03 +0000 (07:47 -0500)]
ruby_fs.py: Add call to createInterruptController()

12 years agoFSConfig.py: fix a typo makeLinuxAlphaRubySystem
Nilay Vaish [Fri, 16 Mar 2012 12:46:45 +0000 (07:46 -0500)]
FSConfig.py: fix a typo makeLinuxAlphaRubySystem

12 years agobuild: remove implicit-cache setting of scons from recent build faster patch
Marc Orr [Fri, 16 Mar 2012 10:29:07 +0000 (03:29 -0700)]
build: remove implicit-cache setting of scons from recent build faster patch

12 years agose.py: Changes to ruby portion due to SE/FS merge
Nilay Vaish [Sun, 11 Mar 2012 21:51:38 +0000 (16:51 -0500)]
se.py: Changes to ruby portion due to SE/FS merge
With the SE/FS merge, interrupt controller is created irrespective of the
mode. This patch creates the interrupt controller when Ruby is used and
connects its ports.

12 years agoO3: Add fatal when fetchWidth > Impl::MaxWidth.
Brian Grayson [Sun, 11 Mar 2012 14:20:54 +0000 (10:20 -0400)]
O3: Add fatal when fetchWidth > Impl::MaxWidth.

12 years agoARM: Fix memory starting at non-zero address and exceeding max mem for a system.
Ali Saidi [Fri, 9 Mar 2012 21:45:47 +0000 (16:45 -0500)]
ARM: Fix memory starting at non-zero address and exceeding max mem for a system.

12 years agoARM: Update stats for CBNZ fix.
Ali Saidi [Fri, 9 Mar 2012 20:33:07 +0000 (15:33 -0500)]
ARM: Update stats for CBNZ fix.

12 years agoARM: Fix branch prediction issue with CB(N)Z instruction
Brian Grayson [Fri, 9 Mar 2012 20:32:41 +0000 (15:32 -0500)]
ARM: Fix branch prediction issue with CB(N)Z instruction

12 years agoARM: Update stats for valgrind fix and replace config.inis which are out of date.
Ali Saidi [Fri, 9 Mar 2012 14:59:29 +0000 (09:59 -0500)]
ARM: Update stats for valgrind fix and replace config.inis which are out of date.

12 years agoO3/Ozone: Eliminate dead code counting software prefetch insts
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
O3/Ozone: Eliminate dead code counting software prefetch insts

Eliminates dead code in the O3 and Ozone CPU models that counted
software prefetch instructions separately for the ALPHA ISA only.

12 years agoCheckerCPU: Make some basic regression tests for CheckerCPU
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
CheckerCPU: Make some basic regression tests for CheckerCPU

Adds regression tests for the CheckerCPU. ARM ISA support
only at this point.

12 years agoCheckerCPU: Add function stubs to non-ARM ISA source to compile with CheckerCPU
Geoffrey Blake [Fri, 9 Mar 2012 14:59:28 +0000 (09:59 -0500)]
CheckerCPU: Add function stubs to non-ARM ISA source to compile with CheckerCPU

Making the CheckerCPU a runtime time option requires the code to be compatible
with ISAs other than ARM.  This patch adds the appropriate function
stubs to allow compilation.

12 years agoCheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
Geoffrey Blake [Fri, 9 Mar 2012 14:59:27 +0000 (09:59 -0500)]
CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable

Enables the CheckerCPU to be selected at runtime with the --checker option
from the configs/example/fs.py and configs/example/se.py configuration
files.  Also merges with the SE/FS changes.

12 years agoARM: Don't reset CPUs that are going to be switched in.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
ARM: Don't reset CPUs that are going to be switched in.

12 years agoSystem: Move code in initState() back into constructor whenever possible.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
System: Move code in initState() back into constructor whenever possible.

The change to port proxies recently moved code out of the constructor into
initState(). This is needed for code that loads data into memory, however
for code that setups symbol tables, kernel based events, etc this is the wrong
thing to do as that code is only called when a checkpoint isn't being restored
from.

12 years agoARM: Fix valgrind reported error on O3 that was causing minor stats changes.
Ali Saidi [Fri, 9 Mar 2012 14:59:26 +0000 (09:59 -0500)]
ARM: Fix valgrind reported error on O3 that was causing minor stats changes.

12 years agocache: Allow main memory to be at disjoint address ranges.
Ali Saidi [Fri, 9 Mar 2012 14:59:25 +0000 (09:59 -0500)]
cache: Allow main memory to be at disjoint address ranges.

12 years agoFix the SPARC fs regression by adding a call to createInterruptController.
Gabe Black [Thu, 8 Mar 2012 10:10:03 +0000 (02:10 -0800)]
Fix the SPARC fs regression by adding a call to createInterruptController.

12 years agobuild scripts: Made minor modifications to reduce build overhead time.
Marc Orr [Wed, 7 Mar 2012 03:07:41 +0000 (19:07 -0800)]
build scripts: Made minor modifications to reduce build overhead time.

1. --implicit-cache behavior is default.
2. makeEnv in src/SConscript is conditionally called.
3. decider set to MD5-timestamp
4. NO_HTML build option changed to SLICC_HTML (defaults to False)

12 years agoStats: Update stats for changeset 8868
Andreas Hansson [Tue, 6 Mar 2012 16:14:54 +0000 (11:14 -0500)]
Stats: Update stats for changeset 8868

Changeset 8868 slightly changes the statistics for the parser and
bzip2 regressions for ARM o3-timing. This patch merely updates the
statistics to reflect these changes.

12 years agoSConstruct: rename and document AddM5Option
Steve Reinhardt [Fri, 2 Mar 2012 22:05:00 +0000 (14:05 -0800)]
SConstruct: rename and document AddM5Option

Got rid of gratuitous M5 reference in the function name.
In the process, wondered why we have this function at all and
spent time trying to get rid of it and eventually firgured out
why it's needed.  Put the answer in a comment so we don't have
to wonder again.

12 years agoSConstruct: update comments & doc strings
Steve Reinhardt [Fri, 2 Mar 2012 21:53:52 +0000 (13:53 -0800)]
SConstruct: update comments & doc strings

Lots of references to 'M5' still, and some to SE/FS

12 years agoDynInst: get rid of dead MyHash code.
Steve Reinhardt [Fri, 2 Mar 2012 17:17:42 +0000 (09:17 -0800)]
DynInst: get rid of dead MyHash code.

Not sure what this was ever used for, but it
doesn't seem used anymore.

12 years agoCPU: Check that the interrupt controller is created when needed
Andreas Hansson [Fri, 2 Mar 2012 14:21:48 +0000 (09:21 -0500)]
CPU: Check that the interrupt controller is created when needed

This patch adds a creation-time check to the CPU to ensure that the
interrupt controller is created for the cases where it is needed,
i.e. if the CPU is not being switched in later and not a checker CPU.

The patch also adds the "createInterruptController" call to a number
of the regression scripts.

12 years agoStats: Fix the realview regression stats after nvmem move
Andreas Hansson [Fri, 2 Mar 2012 14:18:50 +0000 (09:18 -0500)]
Stats: Fix the realview regression stats after nvmem move

This patch updates the realview regressions stats to reflect that nvmem
moved in the object hierarchy and is now under system.realview.

12 years agoRuby: Rename RubyPort::sendTiming to avoid overriding base class
Andreas Hansson [Fri, 2 Mar 2012 14:16:50 +0000 (09:16 -0500)]
Ruby: Rename RubyPort::sendTiming to avoid overriding base class

This patch renames the sendTiming member function in the RubyPort to
avoid inadvertently hiding Port::sendTiming (discovered through some
rather painful debugging). The RubyPort does, in fact, rely on the
functionality of the queued port and the implementation merely
schedules a send the next cycle. The new name for the member function
is sendNextCycle to better reflect this behaviour.

In the unlikely event that we ever shift to using C++11 the member
functions in Port should have a "final" identifier to prevent any
overriding in derived classes.

12 years agoARM: FIx a bug preventing multiple cores booting a VExpress_EMM machine.
Ali Saidi [Fri, 2 Mar 2012 14:18:19 +0000 (08:18 -0600)]
ARM: FIx a bug preventing multiple cores booting a VExpress_EMM machine.

New kernel code verifies that multi-processor extensions are available
before booting secondary CPUs.

12 years agoARM: FIx missing cf controller connection.
Ali Saidi [Fri, 2 Mar 2012 04:43:23 +0000 (22:43 -0600)]
ARM: FIx missing cf controller connection.

12 years agoVNC: spacing
Chander Sudanthi [Thu, 1 Mar 2012 23:26:36 +0000 (17:26 -0600)]
VNC: spacing

Fixed some spacing in a switch statement

12 years agoARM: Add support for Versatile Express extended memory map
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add support for Versatile Express extended  memory map

Also clean up how we create boot loader memory a bit.

12 years agoARM: Add RTC device for ARM platforms.
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add RTC device for ARM platforms.

This change implements a PL031 real time clock.

--HG--
rename : src/dev/arm/timer_sp804.cc => src/dev/arm/rtc_pl031.cc
rename : src/dev/arm/timer_sp804.hh => src/dev/arm/rtc_pl031.hh

12 years agoARM: Add limited CP14 support.
Matt Horsnell [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: Add limited CP14 support.

New kernels attempt to read CP14 what debug architecture is available.
These changes add the debug registers and return that none is currently
available.

12 years agoCache: Fix an issue with LRU when bonus block is used to complete transaction.
Ali Saidi [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
Cache: Fix an issue with LRU when bonus block is used to complete transaction.

The block is never inserted because it's the one extra block in the cache, but
it can be invalidated twice in a row. In that case the block doesn't have a
new master id (beacuse it was never inserted), however it is valid and
the accounting goes wrong at that point.

12 years agoARM: move kernel func event to correct location.
Dam Sunwoo [Thu, 1 Mar 2012 23:26:31 +0000 (17:26 -0600)]
ARM: move kernel func event to correct location.

With the recent series of patches, the symbol table loading moved from
"construct" time to "init" time, but the kernel function event
callback registration was left behind. This patch moves it to the
proper location.

12 years agoARM: fix bits-to-fp conversion function declarations.
Giacomo Gabrielli [Thu, 1 Mar 2012 23:26:30 +0000 (17:26 -0600)]
ARM: fix bits-to-fp conversion function declarations.

Add extra declarations to allow the compiler to pick up the right function.
Please note that these declarations have been added as part of the
clang-related changes.

12 years agox86: Fix x86 TLB and Walker
Nilay Vaish [Thu, 1 Mar 2012 17:37:03 +0000 (11:37 -0600)]
x86: Fix x86 TLB and Walker
This patch adds a function to X86 tlb that returns the
walker port. This port is required for correctly connecting
the walker ports for the cpu just switched in

12 years agox86: Fix switching of CPUs
Nilay Vaish [Thu, 1 Mar 2012 17:37:02 +0000 (11:37 -0600)]
x86: Fix switching of CPUs
This patch prevents creation of interrupt controller for
cpus that will be switched in later

12 years agoConfig: make option ruby available always
Nilay Vaish [Thu, 1 Mar 2012 17:36:59 +0000 (11:36 -0600)]
Config: make option ruby available always

12 years agoMEM: Make all the port proxy members const
Andreas Hansson [Wed, 29 Feb 2012 09:47:51 +0000 (04:47 -0500)]
MEM: Make all the port proxy members const

This is a trivial patch that merely makes all the member functions of
the port proxies const. There is no good reason why they should not
be, and this change only serves to make it explicit that they are not
modified through their use.

12 years agoSWIG: Ensure ptrdiff_t is a known type in gcc >= 4.6.1
Andreas Hansson [Wed, 29 Feb 2012 09:26:58 +0000 (04:26 -0500)]
SWIG: Ensure ptrdiff_t is a known type in gcc >= 4.6.1

This patch fixes a compilation error that occurs with gcc >= 4.6.1,
caused by swig not including cstddef and not using the std:: namespace
prefix for ptrdiff_t. There is an old patch,
http://reviews.m5sim.org/r/913/ that no longer applies cleanly and
this might be re-iterating the same issue.

We work around the problem by always enforcing the inclusion of
cstddef in all swig interface declarations, and also by explicitly
using std::ptrdiff_t.

12 years agoEIO: update stats (mostly order change, some renames)
Steve Reinhardt [Wed, 29 Feb 2012 06:51:39 +0000 (01:51 -0500)]
EIO: update stats (mostly order change, some renames)

12 years agoMake the IO bridge accept address headed to all the local APICs.
Gabe Black [Sun, 26 Feb 2012 23:33:07 +0000 (15:33 -0800)]
Make the IO bridge accept address headed to all the local APICs.

12 years agoX86: Use the M5PanicFault fault in execute methods instead of calling panic.
Gabe Black [Sun, 26 Feb 2012 23:32:53 +0000 (15:32 -0800)]
X86: Use the M5PanicFault fault in execute methods instead of calling panic.

If an instruction is executed speculatively and hits a situation where it
wants to panic, it should return a fault instead. If the instruction was
misspeculated, the fault can be thrown away. If the instruction wasn't
misspeculated, the fault will be invoked and the panic will still happen.

12 years agoMEM: Simplify cache ports preparing for master/slave split
Andreas Hansson [Fri, 24 Feb 2012 16:52:49 +0000 (11:52 -0500)]
MEM: Simplify cache ports preparing for master/slave split

This patch splits the two cache ports into a master (memory-side) and
slave (cpu-side) subclass of port with slightly different
functionality. For example, it is only the CPU-side port that blocks
incoming requests, and only the memory-side port that schedules send
events outside of what the transmit list dictates.

This patch simplifies the two classes by relying further on
SimpleTimingPort and also generalises the latter to better accommodate
the changes (introducing trySendTiming and scheduleSend). The
memory-side cache port overrides sendDeferredPacket to be able to not
only send responses from the transmit list, but also send requests
based on the MSHRs.

A follow on patch further simplifies the SimpleTimingPort and the
cache ports.

12 years agoMEM: Prepare mport for master/slave split
Andreas Hansson [Fri, 24 Feb 2012 16:50:15 +0000 (11:50 -0500)]
MEM: Prepare mport for master/slave split

This patch simplifies the mport in preparation for a split into a
master and slave role for the message ports. In particular,
sendMessageAtomic was only used in a single location and similarly so
sendMessageTiming. The affected interrupt device is updated
accordingly.

12 years agoRuby: Simplify tester ports by not using SimpleTimingPort
Andreas Hansson [Fri, 24 Feb 2012 16:48:48 +0000 (11:48 -0500)]
Ruby: Simplify tester ports by not using SimpleTimingPort

This patch simplfies the master ports used by RubyDirectedTester and
RubyTester by avoiding the use of SimpleTimingPort. Neither tester
made any use of the functionality offered by SimpleTimingPort besides
a trivial implementation of recvFunctional (only snoops) and
recvRangeChange (not relevant since there is only one master).

The patch does not change or add any functionality, it merely makes
the introduction of a master/slave port easier (in a future patch).

12 years agoMEM: Move all read/write blob functions from Port to PortProxy
Andreas Hansson [Fri, 24 Feb 2012 16:46:39 +0000 (11:46 -0500)]
MEM: Move all read/write blob functions from Port to PortProxy

This patch moves the readBlob/writeBlob/memsetBlob from the Port class
to the PortProxy class, thus making a clear separation of the basic
port functionality (recv/send functional/atomic/timing), and the
higher-level functional accessors available on the port proxies.

There are only a few places in the code base where the blob functions
were used on ports, and they are all for peeking into the memory
system without making a normal memory access (in the memtest, and the
malta and tsunami pchip). The memtest also exemplifies how easy it is
to create a non-translating proxy if desired. The malta and tsunami
pchip used a slave port to perform a functional read, and this is now
changed to rely on the physProxy of the system (to which they already
have a pointer).

12 years agoMEM: Make port proxies use references rather than pointers
Andreas Hansson [Fri, 24 Feb 2012 16:45:30 +0000 (11:45 -0500)]
MEM: Make port proxies use references rather than pointers

This patch is adding a clearer design intent to all objects that would
not be complete without a port proxy by making the proxies members
rathen than dynamically allocated. In essence, if NULL would not be a
valid value for the proxy, then we avoid using a pointer to make this
clear.

The same approach is used for the methods using these proxies, such as
loadSections, that now use references rather than pointers to better
reflect the fact that NULL would not be an acceptable value (in fact
the code would break and that is how this patch started out).

Overall the concept of "using a reference to express unconditional
composition where a NULL pointer is never valid" could be done on a
much broader scale throughout the code base, but for now it is only
done in the locations affected by the proxies.

12 years agoMEM: Move port creation to the memory object(s) construction
Andreas Hansson [Fri, 24 Feb 2012 16:43:53 +0000 (11:43 -0500)]
MEM: Move port creation to the memory object(s) construction

This patch moves all port creation from the getPort method to be
consistently done in the MemObject's constructor. This is possible
thanks to the Swig interface passing the length of the vector ports.
Previously there was a mix of: 1) creating the ports as members (at
object construction time) and using getPort for the name resolution,
or 2) dynamically creating the ports in the getPort call. This is now
uniform. Furthermore, objects that would not be complete without a
port have these ports as members rather than having pointers to
dynamically allocated ports.

This patch also enables an elaboration-time enumeration of all the
ports in the system which can be used to determine the masterId.

12 years agoCPU: Round-two unifying instr/data CPU ports across models
Andreas Hansson [Fri, 24 Feb 2012 16:42:00 +0000 (11:42 -0500)]
CPU: Round-two unifying instr/data CPU ports across models

This patch continues the unification of how the different CPU models
create and share their instruction and data ports. Most importantly,
it forces every CPU to have an instruction and a data port, and gives
these ports explicit getters in the BaseCPU (getDataPort and
getInstPort). The patch helps in simplifying the code, make
assumptions more explicit, andfurther ease future patches related to
the CPU ports.

The biggest changes are in the in-order model (that was not modified
in the previous unification patch), which now moves the ports from the
CacheUnit to the CPU. It also distinguishes the instruction fetch and
load-store unit from the rest of the resources, and avoids the use of
indices and casting in favour of keeping track of these two units
explicitly (since they are always there anyways). The atomic, timing
and O3 model simply return references to their already existing ports.

12 years agoMEM: Fatal when no port can be found for an address
Andreas Hansson [Fri, 24 Feb 2012 16:40:29 +0000 (11:40 -0500)]
MEM: Fatal when no port can be found for an address

This patch adds a check in the findPort method to ensure that an
invalid port id is never returned. Previously this could happen if no
default port was set, and no address matched the request, in which
case -1 was returned causing a SEGFAULT when using the id to index in
the port array. To clean things up further a symbolic name is added
for the invalid port id.

12 years agoSimObject: make get_config_as_dict() tolerate undefined params
Steve Reinhardt [Mon, 20 Feb 2012 16:11:14 +0000 (08:11 -0800)]
SimObject: make get_config_as_dict() tolerate undefined params

Without this patch, undefined params cause a cryptic KeyError
in multidict inside get_config_as_dict().  This patch lets
undefined params through get_config_as_dict() so they can
once again generate meaningful error messages later on in
the configuration process.

12 years agoMEM: Fix residual bus ports and make them master/slave
Andreas Hansson [Tue, 14 Feb 2012 19:15:30 +0000 (14:15 -0500)]
MEM: Fix residual bus ports and make them master/slave

This patch cleans up a number of remaining uses of bus.port which
is now split into bus.master and bus.slave. The only non-trivial change
is the memtest where the level building now has to be aware of the role
of the ports used in the previous level.

12 years agoScript: Fix the scripts that use the num_cpus cache parameter
Andreas Hansson [Tue, 14 Feb 2012 17:11:18 +0000 (12:11 -0500)]
Script: Fix the scripts that use the num_cpus cache parameter

This patch merely removes the use of the num_cpus cache parameter
which no longer exists after the introduction of the masterIds. The
affected scripts fail when trying to set the parameter. Note that this
patch does not update the regression stats.

12 years agoMEM: Fix master/slave ports in Ruby and non-regression scripts
Andreas Hansson [Tue, 14 Feb 2012 08:41:53 +0000 (03:41 -0500)]
MEM: Fix master/slave ports in Ruby and non-regression scripts

This patch brings the Ruby and other scripts up to date with the
introduction of the master/slave ports.

12 years agobp: fix up stats for changes to branch predictor
Ali Saidi [Mon, 13 Feb 2012 18:30:30 +0000 (12:30 -0600)]
bp: fix up stats for changes to branch predictor

12 years agoBPred: Fix RAS to handle predicated call/return instructions.
Mrinmoy Ghosh [Mon, 13 Feb 2012 18:26:25 +0000 (12:26 -0600)]
BPred: Fix RAS to handle predicated call/return instructions.

Change RAS to fix issues with predicated call/return instructions.
Handled all cases in the life of a predicated call and return instruction.

12 years agoBP: Fix several Branch Predictor issues.
Mrinmoy Ghosh [Mon, 13 Feb 2012 18:26:24 +0000 (12:26 -0600)]
BP: Fix several Branch Predictor issues.
1. Updates the Branch Predictor correctly to the state
   just after a mispredicted branch, if a squash occurs.
2. If a BTB does not find an entry, the branch is predicted not taken.
   The global history is modified to correctly reflect this prediction.
3. Local history is now updated at the fetch stage instead of
   execute stage.
4. In the Update stage of the branch predictor the local predictors are
   now correctly updated according to the state of local history during
   fetch stage.

This patch also improves performance by as much as 17% on some benchmarks

12 years agoMEM: Explicit ports and Python binding on CopyEngine
Andreas Hansson [Mon, 13 Feb 2012 11:46:43 +0000 (06:46 -0500)]
MEM: Explicit ports and Python binding on CopyEngine

The copy-engine ports were previously created implicitly and bound
based on the dma port peer rather than relying on the normal Python
binding (connectPorts) being called explicitly. This patch makes the
copy engine port similar to all other ports in that they are visibly
in the Python class and bound using the normal explicit calls through
Python.

12 years agoMEM: Pass the ports from Python to C++ using the Swig params
Andreas Hansson [Mon, 13 Feb 2012 11:45:11 +0000 (06:45 -0500)]
MEM: Pass the ports from Python to C++ using the Swig params

This patch adds basic information about the ports in the parameter
classes to be passed from the Python world to the corresponding C++
object. Currently, the only information passed is the number of
connected peers, which for a Port is either 0 or 1, and for a
VectorPort reflects the size of the VectorPort. The default port of
the bus had to be renamed to avoid using the name "default" as a field
in the parameter class. It is possible to extend the Swig'ed
information further and add e.g. a pair with a description and size.

12 years agoMEM: Introduce the master/slave port roles in the Python classes
Andreas Hansson [Mon, 13 Feb 2012 11:43:09 +0000 (06:43 -0500)]
MEM: Introduce the master/slave port roles in the Python classes

This patch classifies all ports in Python as either Master or Slave
and enforces a binding of master to slave. Conceptually, a master (such
as a CPU or DMA port) issues requests, and receives responses, and
conversely, a slave (such as a memory or a PIO device) receives
requests and sends back responses. Currently there is no
differentiation between coherent and non-coherent masters and slaves.

The classification as master/slave also involves splitting the dual
role port of the bus into a master and slave port and updating all the
system assembly scripts to use the appropriate port. Similarly, the
interrupt devices have to have their int_port split into a master and
slave port. The intdev and its children have minimal changes to
facilitate the extra port.

Note that this patch does not enforce any port typing in the C++
world, it merely ensures that the Python objects have a notion of the
port roles and are connected in an appropriate manner. This check is
carried when two ports are connected, e.g. bus.master =
memory.port. The following patches will make use of the
classifications and specialise the C++ ports into masters and slaves.

12 years agotests: fix diff-out script for op/inst stat changes.
Ali Saidi [Mon, 13 Feb 2012 00:35:59 +0000 (18:35 -0600)]
tests: fix diff-out script for op/inst stat changes.

12 years agoX86: open flags: Another patch from Vince Weaver
Gabe Black [Mon, 13 Feb 2012 00:41:29 +0000 (16:41 -0800)]
X86:  open flags: Another patch from Vince Weaver

12 years agoconfigs: fix minor config bugs posted on the mailing list
Ali Saidi [Sun, 12 Feb 2012 23:18:53 +0000 (17:18 -0600)]
configs: fix minor config bugs posted on the mailing list

12 years agostats: update stats for insts/ops and master id changes
Ali Saidi [Sun, 12 Feb 2012 22:07:43 +0000 (16:07 -0600)]
stats: update stats for insts/ops and master id changes

12 years agocpu: add separate stats for insts/ops both globally and per cpu model
Anthony Gutierrez [Sun, 12 Feb 2012 22:07:39 +0000 (16:07 -0600)]
cpu: add separate stats for insts/ops both globally and per cpu model