Andreas Sandberg [Wed, 9 Apr 2014 14:01:43 +0000 (16:01 +0200)]
dev: Protect PollEvent processing when running in parallel mode
The calling thread is undefined when the PollQueue services events.
This implies that PollEvents need to handle the case where they are
processed from a different thread than the thread that created the
event. This changeset adds temporary event queue migrations to the VNC
server, the ethernet tap device, and the terminal to protect them from
inter-thread calls.
Nilay Vaish [Tue, 8 Apr 2014 18:26:30 +0000 (13:26 -0500)]
ruby: slicc: change enqueue statement
As of now, the enqueue statement can take in any number of 'pairs' as
argument. But we only use the pair in which latency is the key. This
latency is allowed to be either a fixed integer or a member variable of
controller in which the expression appears. This patch drops the use of pairs
in an enqueue statement. Instead, an expression is allowed which will be
interpreted to be the latency of the enqueue. This expression can anything
allowed by slicc including a constant integer or a member variable.
Nilay Vaish [Tue, 8 Apr 2014 18:26:29 +0000 (13:26 -0500)]
ruby: coherence protocols: drop the phrase IntraChip
The phrase is no longer valid since we do not distinguish between
inter and intra chip communication.
Andreas Sandberg [Thu, 3 Apr 2014 09:22:49 +0000 (11:22 +0200)]
sim: Add the ability to lock and migrate between event queues
We need the ability to lock event queues to enable device accesses
across threads. The serviceOne() method now takes a service lock prior
to handling a new event. By locking an event queue, a different
thread/eq can effectively execute in the context of the locked event
queue. To simplify temporary event queue migrations, this changeset
introduces the EventQueue::ScopedMigration class that unlocks the
current event queue, locks a new event queue, and updates the current
event queue variable.
In order to prevent deadlocks, event queues need to be released when
waiting on barriers. This is implemented using the
EventQueue::ScopedRelease class. An instance of this class is, for
example, used in the BaseGlobalEvent class to release the event queue
when waiting on the synchronization barrier.
The intended use for this functionality is when devices need to be
accessed across thread boundaries. For example, when fast-forwarding,
it might be useful to run devices and CPUs in separate threads. In
such a case, the CPU locks the device queue whenever it needs to
perform IO. This functionality is primarily intended for KVM.
Note: Migrating between event queues can lead to non-deterministic
timing. Use with extreme care!
--HG--
extra : rebase_source :
23e3a741a1fd73861d1339782dbbe1bc76285315
Anthony Gutierrez [Tue, 1 Apr 2014 16:44:30 +0000 (12:44 -0400)]
ext: add McPAT source
this patch adds the source for mcpat, a power, area, and timing modeling
framework.
Anthony Gutierrez [Tue, 1 Apr 2014 16:35:31 +0000 (12:35 -0400)]
arm: fix typos in makefile for ARM m5 util and link statically
1) fixes a typo for clean target libgemOpJni.so -> libgem5OpJni.so
2) addes jni_gem5Op.h to clean since it is added during make
3) links the m5 utility statically since it won't work on some images otherwise
Nilay Vaish [Tue, 1 Apr 2014 16:17:46 +0000 (11:17 -0500)]
configs: use SimpleMemory when using ruby in se mode
A recent changeset altered the default memory class to DRAMCtrl. In se mode,
ruby uses the physical memory to check if a given address is within the bounds
of the physical memory. SimpleMemory is enough for this. Moreover,
SimpleMemory does not check whether it is connected or not, something which
DRAMCtrl does.
Marco Elver [Tue, 25 Mar 2014 18:15:04 +0000 (13:15 -0500)]
cpu: o3: lsq: Fix TSO implementation
This patch fixes violation of TSO in the O3CPU, as all loads must be
ordered with all other loads. In the LQ, if a snoop is observed, all
subsequent loads need to be squashed if the system is TSO.
Prior to this patch, the following case could be violated:
P0 | P1 ;
MOV [x],mail=/usr/spool/mail/nilay | MOV EAX,[y] ;
MOV [y],mail=/usr/spool/mail/nilay | MOV EBX,[x] ;
exists (1:EAX=1 /\ 1:EBX=0) [is a violation]
The problem was found using litmus [http://diy.inria.fr].
Committed by: Nilay Vaish <nilay@cs.wisc.edu
Andreas Hansson [Sun, 23 Mar 2014 15:12:19 +0000 (11:12 -0400)]
stats: Update stats for DRAM changes
This patch updates the stats to reflect the changes to the DRAM
controller.
Andreas Hansson [Sun, 23 Mar 2014 15:12:14 +0000 (11:12 -0400)]
mem: Track DRAM read/write switching and add hysteresis
This patch adds stats for tracking the number of reads/writes per bus
turn around, and also adds hysteresis to the write-to-read switching
to ensure that the queue does not oscilate around the low threshold.
Andreas Hansson [Sun, 23 Mar 2014 15:12:12 +0000 (11:12 -0400)]
mem: Rename SimpleDRAM to a more suitable DRAMCtrl
This patch renames the not-so-simple SimpleDRAM to a more suitable
DRAMCtrl. The name change is intended to ensure that we do not send
the wrong message (although the "simple" in SimpleDRAM was originally
intended as in cleverly simple, or elegant).
As the DRAM controller modelling work is being presented at ISPASS'14
our hope is that a broader audience will use the model in the future.
--HG--
rename : src/mem/SimpleDRAM.py => src/mem/DRAMCtrl.py
rename : src/mem/simple_dram.cc => src/mem/dram_ctrl.cc
rename : src/mem/simple_dram.hh => src/mem/dram_ctrl.hh
Andreas Hansson [Sun, 23 Mar 2014 15:12:10 +0000 (11:12 -0400)]
mem: Change memory defaults to be more representative
Make the default memory type DDR3-1600 x64, and use the open-adaptive
page policy. This change is aiming to ensure that users by default are
using a realistic memory system.
Wendy Elsasser [Sun, 23 Mar 2014 15:12:08 +0000 (11:12 -0400)]
mem: Add close adaptive paging policy to DRAM controller model
This patch adds a second adaptive page policy to the DRAM controller,
closing the page unless there are already queued accesses to the open
page.
Andreas Hansson [Sun, 23 Mar 2014 15:12:06 +0000 (11:12 -0400)]
mem: DRAM controller tidying up
Minor tidying up and removing of redundant code, including the
printing of queue state every million accesses.
Andreas Hansson [Sun, 23 Mar 2014 15:12:05 +0000 (11:12 -0400)]
mem: Fix bug in DRAM bytes per activate
This patch ensures that we do not sample the bytes per activate when
the row has already been closed.
Andreas Hansson [Sun, 23 Mar 2014 15:12:03 +0000 (11:12 -0400)]
mem: Limit the accesses to a page before forcing a precharge
This patch adds a basic starvation-prevention mechanism where a DRAM
page is forced to close after a certain number of accesses. The limit
is combined with the open and open-adaptive page policy and if reached
causes an auto-precharge.
Andreas Hansson [Sun, 23 Mar 2014 15:12:01 +0000 (11:12 -0400)]
mem: Make DRAM write queue draining more aggressive
This patch changes the triggering condition for the write draining
such that we grab the opportunity to issue writes if there are no
reads waiting (as opposed to waiting for the writes to reach the high
threshold). As a result, we potentially drain some of the writes in read
idle periods (if any).
A low threshold is added to be able to control how many write bursts
are kept in the memory controller queue (acting as on-chip storage).
The high and low thresholds are updated to sensible values for a 32/64
size write buffer. Note that the thresholds should be adjusted along
with the queue sizes.
This patch also adds some basic initialisation sanity checks and moves
part of the initialisation to the constructor.
Andreas Hansson [Sun, 23 Mar 2014 15:12:00 +0000 (11:12 -0400)]
config: Add a DRAM efficiency-sweep script
This patch adds a configuration that simplifies evaluation of DRAM
controller configurations by automating a sweep of stride size and
bank parallelism. It works in a rather unconventional way, as it needs
to print the traffic generator stimuli based on the memory
organisation. Hence, it starts by configuring the memory, then it
prints a traffic-generator config file, and loads it.
The resulting stats have one period per data point, identified by the
stride size, and the number of banks being used.
Neha Agarwal [Sun, 23 Mar 2014 15:11:58 +0000 (11:11 -0400)]
cpu: DRAM Traffic Generator
This patch enables a new 'DRAM' mode to the existing traffic
generator, catered to generate specific requests to DRAM based on
required hit length (stride size) and bank utilization. It is an add on
to the Random mode.
The basic idea is to control how many successive packets target the
same page, and how many banks are being used in parallel. This gives a
two-dimensional space that stresses different aspects of the DRAM
timing.
The configuration file needed to use this patch has to be changed as
follow: (reference to Random Mode, LPDDR3 memory type)
'STATE 0
10000000000 RANDOM 50 0
134217728 64 3004 5002 0'
-> 'STATE 0
10000000000 DRAM 50 0
134217728 32 3004 5002 0 96 1024 8 6 1'
The last 4 parameters to be added are:
<stride size (bytes), page size(bytes), number of banks available in DRAM,
number of banks to be utilized, address mapping scheme>
The address mapping information is used to get the stride address
stream of the specified size and to know where to find the bank
bits. The configuration file has a parameter where '0'-> RoCoRaBaCh,
'1'-> RoRaBaCoCh/RoRaBaChCo address-mapping schemes. Note that the
generator currently assumes a single channel and a single rank. This
is to avoid overwhelming the traffic generator with information about
the memory organisation.
Neha Agarwal [Sun, 23 Mar 2014 15:11:56 +0000 (11:11 -0400)]
mem: DDR3 config for comparing with DRAMSim2
This patch adds a new DDR3 configuration to match with the parameters
that are specified in one of the DDR3 configs used in DRAMSim2.
Andreas Hansson [Sun, 23 Mar 2014 15:11:53 +0000 (11:11 -0400)]
mem: More descriptive address-mapping scheme names
This patch adds the row bits to the name of the address mapping
schemes to make it more clear that all the current schemes places the
row bits as the most significant bits.
Curtis Dunham [Sun, 23 Mar 2014 15:11:51 +0000 (11:11 -0400)]
scons: Shush scons
make 'scons -s' actually silent.
Stan Czerniawski [Sun, 23 Mar 2014 15:11:49 +0000 (11:11 -0400)]
misc: Fix -q (quiet) flag
Check the right flag.
Andreas Hansson [Sun, 23 Mar 2014 15:11:48 +0000 (11:11 -0400)]
ruby: Move Ruby debug flags to ruby dir and remove stale options
This patch moves the Ruby-related debug flags to the ruby
sub-directory, and also removes the state SConsopts that add the
no-longer-used NO_VECTOR_BOUNDS_CHECK.
Andreas Hansson [Sun, 23 Mar 2014 15:11:46 +0000 (11:11 -0400)]
util: Add support for detection of gzipped packet traces
This patch adds support for automatically detecting a gzipped packet
trace, thus accepting either a compressed or uncompressed trace.
Andreas Hansson [Sun, 23 Mar 2014 15:11:44 +0000 (11:11 -0400)]
mem: Include the DRAMSim2 wrapper in NULL build
This patch makes sure DRAMSim2 is included in a build of the NULL ISA.
Andreas Hansson [Sun, 23 Mar 2014 15:11:42 +0000 (11:11 -0400)]
ext: Fix typo in DRAMSim2 SConscript
This patch fixes a typo in the SConscript which caused the DRAMSim2
sources to be built without the appropriate flags.
Sascha Bischoff [Sun, 23 Mar 2014 15:11:40 +0000 (11:11 -0400)]
mem: CommMonitor trace warn on non-timing mode
Add a warning to the CommMonitor which will alert the user if they try
and record a trace when the system is not in timing mode.
Stan Czerniawski [Sun, 23 Mar 2014 15:11:39 +0000 (11:11 -0400)]
cpu: Add basic check to TrafficGen initial state
Prevent incomplete configuration of TrafficGen class from causing
segmentation faults. If an 'INIT' line is not present in the
configuration file then the currState variable will remain
uninitialized which may result in a crash.
Andrew Bardsley [Sun, 23 Mar 2014 15:11:37 +0000 (11:11 -0400)]
dev: Fix IsaFake's cxx_header setting
cxx_header was set incorrectly on IsaFake
Eric Van Hensbergen [Sun, 23 Mar 2014 15:11:34 +0000 (11:11 -0400)]
arm: m5ops readfile64 args broken, offset coming through garbage
There were several sections of the m5ops code which were
essentially copy/pasted versions of the 32-bit code. The
problem is that some of these didn't account fo4 64-bit
registers leading to arguments being in the wrong registers.
This patch addresses the args for readfile64, writefile64,
and addsymbol64 -- all of which seemed to suffer from a
similar set of problems when moving to 64-bit.
Andreas Hansson [Sun, 23 Mar 2014 15:11:32 +0000 (11:11 -0400)]
base: Fix error message time unit (cycle -> tick)
This patch fixes the unit used in all error messages.
Nilay Vaish [Thu, 20 Mar 2014 14:16:35 +0000 (09:16 -0500)]
stats: updates due to changes to ruby config scripts
These updates to ruby regression stats are due to renaming piobus to iobus
and dropping piobus in the se mode.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: consumer: avoid accessing wakeup times when waking up
Each consumer object maintains a set of tick values when the object is supposed
to wakeup and do some processing. As of now, the object accesses this set both
when scheduling a wakeup event and when the object actually wakes up. The set
is accessed during wakeup to remove the current tick value from the set. This
functionality is now being moved to the scheduling function where ticks are
removed at a later time.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: garnet: convert network interfaces into clocked objects
This helps in configuring the network interfaces from the python script and
these objects no longer rely on the network object for the timing information.
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
ruby: slicc: code refactor
Nilay Vaish [Thu, 20 Mar 2014 14:14:14 +0000 (09:14 -0500)]
config: ruby: rename _cpu_ruby_ports to _cpu_ports
Nilay Vaish [Thu, 20 Mar 2014 14:14:08 +0000 (09:14 -0500)]
config: fs.py: move creating of test/drive systems to functions
The code that creates test and drive systems is being moved to separate
functions so as to make the code more readable. Ultimately the two
functions would be combined so that the replicated code is eliminated.
Nilay Vaish [Thu, 20 Mar 2014 13:03:09 +0000 (08:03 -0500)]
config: remove ruby_fs.py
The patch removes the ruby_fs.py file. The functionality is being moved to
fs.py. This would being ruby fs simulations in line with how ruby se
simulations are started (using --ruby option). The alpha fs config functions
are being combined for classing and ruby memory systems. This required
renaming the piobus in ruby to iobus. So, we will have stats being renamed
in the stats file for ruby fs regression.
Nilay Vaish [Thu, 20 Mar 2014 13:03:09 +0000 (08:03 -0500)]
ruby: no piobus in se mode
Piobus was recently added to se scripts for ruby so that the interrupt
controller can be connected to something (required since the interrupt
controller sends address range messages). This patch removes the piobus
and instead, the pio port of ruby port will now ignore the range change
messages in se mode.
Nilay Vaish [Mon, 17 Mar 2014 22:40:15 +0000 (17:40 -0500)]
config: ruby: remove piobus from protocols
This patch removes the piobus from the protocol config files. The ports
are now connected to the piobus in the Ruby.py file.
Nilay Vaish [Mon, 17 Mar 2014 22:40:14 +0000 (17:40 -0500)]
ruby: remove some of the unnecessary code
Andreas Sandberg [Sun, 16 Mar 2014 16:40:58 +0000 (17:40 +0100)]
kvm: Clean up signal handling
KVM used to use two signals, one for instruction count exits and one
for timer exits. There is really no need to distinguish between the
two since they only trigger exits from KVM. This changeset unifies and
renames the signals and adds a method, kick(), that can be used to
raise the control signal in the vCPU thread. It also removes the early
timer warning since we do not normally see if the signal was
delivered.
--HG--
extra : rebase_source :
cd0e45ca90894c3d6f6aa115b9b06a1d8f0fda4d
Andreas Sandberg [Sun, 16 Mar 2014 16:30:24 +0000 (17:30 +0100)]
kvm: x86: Adjust PC to remove the CS segment base address
gem5 seems to store the PC as RIP+CS_BASE. This is not what KVM
expects, so we need to subtract CS_BASE prior to transferring the PC
into KVM. This changeset adds the necessary PC manipulation and
refactors thread context updates slightly to avoid reading registers
multiple times from KVM.
--HG--
extra : rebase_source :
3f0569dca06a1fcd8694925f75c8918d954ada44
Andreas Sandberg [Sun, 16 Mar 2014 16:28:23 +0000 (17:28 +0100)]
kvm: x86: Add support for x86 INIT and STARTUP handling
This changeset adds support for INIT and STARTUP IPI handling. We
currently handle both of these interrupts in gem5 and transfer the
state to KVM. Since we do not have a BIOS loaded, we pretend that the
INIT interrupt suspends the CPU after reset.
--HG--
extra : rebase_source :
7f3b25f3801d68f668b6cd91eaf50d6f48ee2a6a
Paul Rosenfeld [Wed, 12 Mar 2014 12:03:22 +0000 (07:03 -0500)]
alpha: Small removal of dead comments/code from alpha ISA
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Andreas Hansson [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
cpu: Make CPU and ThreadContext getters const
This patch merely tidies up the CPU and ThreadContext getters by
making them const where appropriate.
Geoffrey Blake [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
arm: Handle functional TLB walks properly
The table walker code currently accounts for two types of walks,
Atomic and Timing, and treats them differently. Atomic walks keep a
single instance of WalkerState around for all walks to use in
currState. Timing mode keeps a queue of in-flight WalkerStates and
maintains currState as NULL between walks.
If a functional walk is done during Timing mode, it is treated as an
atomic walk and either creates a persistent WalkerState if in between
Timing walks, or stomps an existing currState for an in-progress
Timing walk.
This patch distinguishes functional walks as being able to exist at
any time and sets up a temporary WalkerState for its exclusive use and
then cleans up when finished, leaving any in progress Atomic or Timing
walks undisturbed.
Prakash Ramrakhyani [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Fix incorrect assert failure in the Cache
This patch fixes an assert condition that is not true at all
times. There are valid situations that arise in dual-core
dual-workload runs where the assert condition is false. The function
call following the assert however needs to be called only when the
condition is true (a block cannot be invalidated in the tags structure
if has not been allocated in the structure, and the tempBlock is never
allocated). Hence the 'assert' has been replaced with an 'if'.
Radhika Jagtap [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Edit proto Packet and enhance the python script
This patch changes the decode script to output the optional fields of
the proto message Packet, namely id and flags. The flags field is set
by the communication monitor.
The id field is useful for CPU trace experiments, e.g. linking the
fetch side to decode side. It had to be renamed because it clashes
with a built in python function id() for getting the "identity" of an
object.
This patch also takes a few common function definitions out from the
multiple scripts and adds them to a protolib python module.
Mitch Hayenga [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
scons: Fix clang version identification for OSX
The version string may have additional trailing information
Stephan Diestelhorst [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
misc: Add panic_if / fatal_if / chatty_assert
This snippet can be used to replace if + {panics, fatals, asserts} constructs.
The idea is to have both the condition checking and a verbose printout in a single statement. The interface is as follows:
panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
fatal_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
chatty_assert(foo == bar, "These should be equal: foo %i bar %i", foo, bar);
Mitch Hayenga [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
scons: Fixes uninitialized warnings issued by clang
Small fixes to appease recent clang versions.
Stephan Diestelhorst [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
arm: Fix uninitialised warning with gcc 4.8
Small fix for a warning that prevents compilation with gcc 4.8.1 due
to detecting that a variable might be uninitialised. The fix is to
assign a safe default.
Ali Saidi [Fri, 7 Mar 2014 20:56:23 +0000 (15:56 -0500)]
mem: Wakeup sleeping CPUs without caches on LLSC
For systems without caches, the LLSC code does not get snoops for
wake-ups. We add the LLSC code in the abstract memory to do the job
for us.
Andreas Sandberg [Thu, 6 Mar 2014 14:59:53 +0000 (15:59 +0100)]
sim: Schedule the global sync event at curTick() + simQuantum
The global synchronization event used to be scheduled at
simQuantum. This prevented repeated entries into gem5 from Python as
it can be scheduled in the past. This changeset ensures that the first
global synchronization happens at curTick() + simQuantum instead.
Andreas Sandberg [Mon, 3 Mar 2014 13:44:57 +0000 (14:44 +0100)]
x86: Setup correct TSL/TR segment attributes on INIT
The TSL/LDT & TR/TSS segments didn't contain valid attributes. This
caused problems when transfering the state into KVM where invalid
state is a no-go. Fixup the attributes with values from AMD's
architecture programmer's manual.
Andreas Sandberg [Mon, 3 Mar 2014 13:34:33 +0000 (14:34 +0100)]
kvm: x86: Always assume segments to be usable
When transferring segment registers into kvm, we need to find the
value of the unusable bit. We used to assume that this could be
inferred from the selector since segments are generally unusable if
their selector is 0. This assumption breaks in some weird corner
cases. Instead, we just assume that segments are always usable. This
is what qemu does so it should work.
Andreas Sandberg [Mon, 3 Mar 2014 13:31:39 +0000 (14:31 +0100)]
kvm: Initialize signal handlers from startupThread()
Signal handlers in KVM are controlled per thread and should be
initialized from the thread that is going to execute the CPU. This
changeset moves the initialization call from startup() to
startupThread().
Nilay Vaish [Sun, 2 Mar 2014 05:59:58 +0000 (23:59 -0600)]
ruby: message buffer: changes related to tracking push/pop times
The last pop operation is now tracked as a Tick instead of in Cycles.
This helps in avoiding use of the receiver's clock during the enqueue
operation.
Nilay Vaish [Sun, 2 Mar 2014 05:59:57 +0000 (23:59 -0600)]
ruby: make the max_size variable of the MessageBuffer unsigned
Christopher Torng [Sun, 2 Mar 2014 05:35:23 +0000 (23:35 -0600)]
cpu: Enable fast-forwarding for MIPS InOrderCPU and O3CPU
A copyRegs() function is added to MIPS utilities
to copy architectural state from the old CPU to
the new CPU during fast-forwarding. This
addition alone enables fast-forwarding for the
o3 cpu model running MIPS.
The patch also adds takeOverFrom() and
drainResume() functions to the InOrderCPU to
enable it to take over from another CPU. This
change enables fast-forwarding for the inorder
cpu model running MIPS, but not for Alpha.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Sun, 2 Mar 2014 05:35:21 +0000 (23:35 -0600)]
ruby: profiler: statically allocate stats variable
Couple of users observed segmentation fault when the simulator tries to
register the statistical variable m_IncompleteTimes. It seems that there
is some problem with the initialization of these variables when allocated
in the constructor.
Nilay Vaish [Tue, 25 Feb 2014 02:50:06 +0000 (20:50 -0600)]
stats: updates due to
c0db268f811b
Nilay Vaish [Tue, 25 Feb 2014 02:50:05 +0000 (20:50 -0600)]
ruby: correct errors in changeset
4eec7bdde5b0
Couple of errors were discovered in
4eec7bdde5b0 which necessitated this patch.
Firstly, we create interrupt controllers in the se mode, but no piobus was
being created. RubyPort, which earlier used to ignore range changes now
forwards those to the piobus. The lack of piobus resulted in segmentation
fault. This patch creates a piobus even in se mode. It is not created only
when some tester is running. Secondly, I had missed out on modifying port
connections for other coherence protocols.
Nilay Vaish [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
stats: updates due to changes to ruby pio access handling
Nilay Vaish [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
ruby: route all packets through ruby port
Currently, the interrupt controller in x86 is connected to the io bus
directly. Therefore the packets between the io devices and the interrupt
controller do not go through ruby. This patch changes ruby port so that
these packets arrive at the ruby port first, which then routes them to their
destination. Note that the patch does not make these packets go through the
ruby network. That would happen in a subsequent patch.
Andreas Hansson [Mon, 24 Feb 2014 01:16:16 +0000 (19:16 -0600)]
ruby: Simplify RubyPort flow control and routing
This patch simplfies the retry logic in the RubyPort, avoiding
redundant attributes, and enforcing more stringent checks on the
interactions with the normal ports. The patch also simplifies the
routing done by the RubyPort, using the port identifiers instead of a
heavy-weight sender state.
The patch also fixes a bug in the sending of responses from PIO
ports. Previously these responses bypassed the queue in the queued
port, and ignored the return value, potentially leading to response
packets being lost.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
config: topologies: slight code refactor
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: message buffer: refactor code
Code in two of the functions was exactly the same. This patch moves
this code to a new function which is called from the two functions
mentioned initially.
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: remove few not required #includes
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: slicc: remove unused COPY_HEAD functionality
Nilay Vaish [Mon, 24 Feb 2014 01:16:15 +0000 (19:16 -0600)]
ruby: protocols: remove unused action z_stall
Nilay Vaish [Fri, 21 Feb 2014 14:02:06 +0000 (08:02 -0600)]
config: ruby_random_test: updates due to recent unrelated changes
Nilay Vaish [Fri, 21 Feb 2014 14:02:05 +0000 (08:02 -0600)]
ruby: network: move message buffers to base network class.
Nilay Vaish [Fri, 21 Feb 2014 14:02:04 +0000 (08:02 -0600)]
ruby: network: garnet: fixed: removes net_ptr from links
Nilay Vaish [Fri, 21 Feb 2014 14:02:02 +0000 (08:02 -0600)]
ruby: cache: remove not required variable m_cache_name
Nilay Vaish [Thu, 20 Feb 2014 23:28:01 +0000 (17:28 -0600)]
ruby: network: garnet: fixed: removes next cycle functions
At several places, there are functions that take a cycle value as input
and performs some computation. Along with each such function, another
function was being defined that simply added one more cycle to input and
computed the same function. This patch removes this second copy of the
function. Places where these functions were being called have been updated
to use the original function with argument being current cycle + 1.
Nilay Vaish [Thu, 20 Feb 2014 23:27:45 +0000 (17:27 -0600)]
ruby: controller: slight code refactoring
Nilay Vaish [Thu, 20 Feb 2014 23:27:17 +0000 (17:27 -0600)]
ruby: mesi three level: rename incorrectly named files
Two files had been incorrectly named with a .cache suffix.
--HG--
rename : src/mem/protocol/MESI_Three_Level-L0.cache => src/mem/protocol/MESI_Three_Level-L0cache.sm
rename : src/mem/protocol/MESI_Three_Level-L1.cache => src/mem/protocol/MESI_Three_Level-L1cache.sm
Nilay Vaish [Thu, 20 Feb 2014 23:27:07 +0000 (17:27 -0600)]
ruby: network: removes unused code.
Nilay Vaish [Thu, 20 Feb 2014 23:26:49 +0000 (17:26 -0600)]
ruby: slicc: slight code refactoring
Nilay Vaish [Thu, 20 Feb 2014 23:26:41 +0000 (17:26 -0600)]
ruby: message buffer: removes some unecessary functions.
Andreas Sandberg [Thu, 20 Feb 2014 14:43:53 +0000 (15:43 +0100)]
kvm: Add support for multi-system simulation
The introduction of parallel event queues added most of the support
needed to run multiple VMs (systems) within the same gem5
instance. This changeset fixes up signal delivery so that KVM's
control signals are delivered to the thread that executes the CPU's
event queue. Specifically:
* Timers and counters are now initialized from a separate method
(startupThread) that is scheduled as the first event in the
thread-specific event queue. This ensures that they are
initialized from the thread that is going to execute the CPUs
event queue and enables signal delivery to the right thread when
exiting from KVM.
* The POSIX-timer-based KVM timer (used to force exits from KVM) has
been updated to deliver signals to the thread that's executing KVM
instead of the process (thread is undefined in that case). This
assumes that the timer is instantiated from the thread that is
going to execute the KVM vCPU.
* Signal masking is now done using pthread_sigmask instead of
sigprocmask. The behavior of the latter is undefined in threaded
applications.
* Since signal masks can be inherited, make sure to actively unmask
the control signals when setting up the KVM signal mask.
There are currently no facilities to multiplex between multiple KVM
CPUs in the same event queue, we are therefore limited to
configurations where there is only one KVM CPU per event queue. In
practice, this means that multi-system configurations can be
simulated, but not multiple CPUs in a shared-memory configuration.
Andreas Hansson [Wed, 19 Feb 2014 12:59:46 +0000 (07:59 -0500)]
arm: Bump stats after FS config script update
This patch updates the stats to reflect the change in kernel options
needed for armv8 (but used for all FS regressions).
Anthony Gutierrez [Tue, 18 Feb 2014 22:20:56 +0000 (17:20 -0500)]
arm: armv8 boot options to enable v8
Modifies FSConfig.py to enable ARMv8 compatibility.
To boot gem5 with ARMv8:
Download the v8 kernel, .dtb file, and root FS from: http://gem5.org/Download
Download the ARMv8 toolchain, and add the bin dir to your path:
http://www.linaro.org/engineering/engineering-projects/armv8
Build gem5 for ARM
Build the v8 bootloader (in gem5/system/arm/aarch64_bootloader)
Make script in gem5/system/arm/aarch64_bootloader will require v8 toolchain,
drop the produced boot_emm.arm64 in $(M5_PATH)/binaries/
Run:
$ build/ARM/gem5.fast configs/example/fs.py --machine-type=VExpress_EMM64 \
--kernel=/path/to/kernel/vmlinux-linaro-tracking \
--dtb-filename=/path/to/dtb/rtsm_ve-aemv8a.dtb \
--disk-image=/path/to/img/linaro-minimal-armv8.img
Andreas Hansson [Tue, 18 Feb 2014 10:51:01 +0000 (05:51 -0500)]
mem: Fix bug in PhysicalMemory use of mmap and munmap
This patch fixes a bug in how physical memory used to be mapped and
unmapped. Previously we unmapped and re-mapped if restoring from a
checkpoint. However, we never checked that the new mapping was
actually the same, it was just magically working as the OS seems to
fairly reliably give us the same chunk back. This patch fixes this
issue by relying entirely on the mmap call in the constructor.
Andreas Hansson [Tue, 18 Feb 2014 10:50:59 +0000 (05:50 -0500)]
dev: Include basic devices in NULL ISA build
This patch enbles use of the basic PIO devices as part of the NULL
build. Although it might seem counter intuitive to have a PIO device
without being able to execute a driver, this change enables us to
break a device class hierarchy into an ISA-agnostic part, and an
ISA-specific part, without requiring multiple-inheritance. The
ISA-agnostic base class is a PIO device, but does not make use of the
port.
Andreas Hansson [Tue, 18 Feb 2014 10:50:58 +0000 (05:50 -0500)]
scons: Add PROTOC from the environment
This patch adds PROTOC to the build environment.
Andreas Hansson [Tue, 18 Feb 2014 10:50:58 +0000 (05:50 -0500)]
mem: Filter cache snoops based on address ranges
This patch adds a filter to the cache to drop snoop requests that are
not for a range covered by the cache. This fixes an issue observed
when multiple caches are placed in parallel, covering different
address ranges. Without this patch, all the caches will forward the
snoop upwards, when only one should do so.
Andreas Hansson [Tue, 18 Feb 2014 10:50:53 +0000 (05:50 -0500)]
mem: Add a wrapped DRAMSim2 memory controller
This patch adds DRAMSim2 as a memory controller by wrapping the
external library and creating a sublass of AbstractMemory that bridges
between the semantics of gem5 and the DRAMSim2 interface.
The DRAMSim2 wrapper extracts the clock period from the config
file. There is no way of extracting this information from DRAMSim2
itself, so we simply read the same config file and get it from there.
To properly model the response queue, the wrapper keeps track of how
many transactions are in the actual controller, and how many are
stacking up waiting to be sent back as responses (in the wrapper). The
latter requires us to move away from the queued port and manage the
packets ourselves. This is due to DRAMSim2 not having any flow control
on the response path.
DRAMSim2 assumes that the transactions it is given are matching the
burst size of the choosen memory. The wrapper checks to ensure the
cache line size of the system matches the burst size of DRAMSim2 as
there are currently no provisions to split the system requests. In
theory we could allow a cache line size smaller than the burst size,
but that would lead to inefficient use of the DRAM, so for not we
fatal also in this case.
Andreas Hansson [Tue, 18 Feb 2014 10:50:52 +0000 (05:50 -0500)]
util: Enhance the error messages for packet encode/decode
This patch adds a more verbose error message when the Python protobuf
module cannot be loaded.
Andreas Hansson [Tue, 18 Feb 2014 10:50:51 +0000 (05:50 -0500)]
mem: Fix input to DPRINTF in CommMonitor
Minor fix of the debug message parameters.
Nilay Vaish [Sun, 16 Feb 2014 17:40:34 +0000 (11:40 -0600)]
stats: updates due to branch predictor warming
Nilay Vaish [Sat, 15 Feb 2014 18:44:09 +0000 (12:44 -0600)]
Added tag stable_2014_02_15 to the changeset
459491344fcf
Andreas Sandberg [Sun, 9 Feb 2014 19:49:28 +0000 (20:49 +0100)]
cpu: simple: Add support for using branch predictors
This changesets adds branch predictor support to the
BaseSimpleCPU. The simple CPUs normally don't need a branch predictor,
however, there are at least two cases where it can be desirable:
1) A simple CPU can be used to warm the branch predictor of an O3
CPU before switching to the slower O3 model.
2) The simple CPU can be used as a quick way of evaluating/debugging
new branch predictors since it exposes branch predictor
statistics.
Limitations:
* Since the simple CPU doesn't speculate, only one instruction will
be active in the branch predictor at a time (i.e., the branch
predictor will never see speculative branches).
* The outcome of a branch prediction does not affect the performance
of the simple CPU.
Nilay Vaish [Thu, 6 Feb 2014 22:30:13 +0000 (16:30 -0600)]
base: calls abort() from fatal
Currently fatal() ends the simulation in a normal fashion. This results in
the call stack getting lost when using a debugger and it is not always
possible to debug the simulation just from the information provided by the
printed error message. Even though the error is likely due to a user's fault,
the information available should not be thrown away. Hence, this patch to
call abort() from fatal().
Nilay Vaish [Thu, 6 Feb 2014 22:30:12 +0000 (16:30 -0600)]
ruby: memory controller: use MemoryNode *
Andreas Sandberg [Wed, 5 Feb 2014 13:08:13 +0000 (14:08 +0100)]
x86: Fix x87 state transfer bug
Changeset
7274310be1bb (isa: clean up register constants) increased
the value of NumFloatRegs, which triggered a bug in
X86ISA::copyRegs(). This bug is caused by the x87 stack being copied
twice since register indexes past NUM_FLOATREGS are mapped into the
x87 stack relative to the top of the stack, which is undefined when
the copy takes place.
This changeset updates the copyRegs() function to use access registers
using the non-flattening interface, which guarantees that undesirable
register folding does not happen.
Nikos Nikoleris [Sun, 2 Feb 2014 15:37:35 +0000 (16:37 +0100)]
x86, kvm: Fix bug in the RFlags get and set functions
The getRFlags and setRFlags utility functions were not updated
correctly when condition registers were separated into their own
register class. This lead to incorrect state transfer in calls from
kvm into the simulator (e.g., m5 readfile ended up in an infinite
loop) and when switching CPUs. This patch makes these utility
functions use getCCReg and setCCReg instead of getIntReg and setIntReg
which read and write the integer registers.
Reviewed-by: Andreas Sandberg <andreas@sandberg.pp.se>