14205:197360deaa20 |
26-Jun-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
stats: Add support for hierarchical stats
This change makes the stat system aware of the hierarchical nature of stats. The aim is to achieve the following goals:
* Make the SimObject hierarchy explicit in the stat system (i.e., get rid of name() + ".foo"). This makes stat naming less fragile and makes it possible to implement hierarchical formats like XML/HDF5/JSON in a clean way.
* Make it more convenient to split stats into a separate struct/class that can be bound to a SimObject. This makes the namespace cleaner and makes stat accesses a bit more obvious.
* Make it possible to build groups of stats in C++ that can be used in subcomponents in a SimObject (similar to what we do for checkpoint sections). This makes it easier to structure large components.
* Enable partial stat dumps. Some of our internal users have been asking for this since a full stat dump can be large.
* Enable better stat access from Python.
This changeset implements solves the first three points by introducing a class (Stats::Group) that owns statistics belonging to the same object. SimObjects inherit from Stats::Group since they typically have statistics.
New-style statistics need to be associated with a parent group at instantiation time. Instantiation typically sets the name and the description, other parameters need to be set by overriding Group::regStats() just like with legacy stats. Simple objects with scalar stats can typically avoid implementing regStats() altogether since the stat name and description are both specified in the constructor.
For convenience reasons, statistics groups can be merged into other groups. This means that a SimObject can create a stat struct that inherits from Stats::Group and merge it into the parent group (SimObject). This can make the code cleaner since statistics tracking gets grouped into a single object.
Stat visitors have a new API to expose the group structure. The Output::beginGroup(name) method is called at the beginning of a group and the Output::endGroup() method is called when all stats, and sub-groups, have been visited. Flat formats (e.g., the text format) typically need to maintain a stack to track the full path to a stat.
Legacy, flat, statistics are still supported after applying this change. These stats don't belong to any group and stat visitors will not see a Output::beginGroup(name) call before their corresponding Output::visit() methods are called.
Change-Id: I9025d61dfadeabcc8ecf30813ab2060def455648 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19368 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> |
14191:a8e387a87a28 |
17-Aug-2019 |
Gabe Black <gabeblack@google.com> |
sim: Add a << overload for the Port class which prints its name.
This makes it easier/less verbose to print the name of a port, it's most important and identifying feature, in a DPRINTF or other stream based output.
Change-Id: I050d102844612577f9a83d550e619736507a6781 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20234 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
14190:74c7a99c8b8c |
17-Aug-2019 |
Gabe Black <gabeblack@google.com> |
sim: Add a takeOverFrom method to the base Port class.
This makes it easier, safer, and less verbose to swap out ports when a CPU takes over for another CPU, for instance.
Change-Id: Ice08e4dcb4b04dc66b1841331092a78b4f6f5a96 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20233 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
14189:a363edac6a12 |
16-Aug-2019 |
Gabe Black <gabeblack@google.com> |
mem, sim, systemc: Reorganize Port and co.s bind, unbind slightly.
The base Port class can keep track of its peer, and also whether it's connected. This is partially delegated away from the port subclasses which still keep track of a cast version of their peer pointer for their own conveneince, so that it can be used by generic code. Even with the Port mechanism's new flexibility, each port still has exactly one peer and is either connected or not based on whether there is a peer currently.
Change-Id: Id3228617dd1604d196814254a1aadeac5ade7cde Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20232 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com> |
14163:98099c4cb5c6 |
07-Aug-2019 |
Gabe Black <gabeblack@google.com> |
sim: Add a hook Clocked objects can implement for frequency changes.
This hook will let them implement whatever additional behavior is necessary for when the clock changes.
An alternative design for this might have made the "update" function virtual, and required anyone overriding it to call into the base class. I think that would be an inferior design for two reasons. First, the subclass author might forget to call update. Second, while it might *seem* like this would have some performance benefit since you wouldn't call into the virtual function and then call update, incurring the function call overhead twice, you're going to call into update once regardless, and then you're either going to call the virtual funciton which does nothing (the norm) or does something. In either case you call the same functions the same number of times.
There may be a slight penalty in code size since the call to update may be inlined in the call sights before the virtual function, and there will almost certainly be more of those than there would be implementations of the virtual function, but that should be negligable when compared to gem5's size as a whole.
Change-Id: Id25a5359f2b1f7e42c6d1dcbc70a37d3ce092d38 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20089 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Srikant Bharadwaj <srikant.bharadwaj@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
14162:6b811c4fdde6 |
07-Aug-2019 |
Gabe Black <gabeblack@google.com> |
sim: Clean up some mild style bugs in clocked_object.hh.
Clean up some formatting, and also remove redundant inline keywords. A function defined in place in a class definition is already automatically inline.
Change-Id: Iaad3a8dda6498c6a6068c2aabc9d6eb11f3d2eb2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20088 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14149:9154039407e5 |
09-Aug-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: rename Process::setpgid member
The getter methods to access these types of members do not have a 'get' string in the method names. To make the interface a bit more consistent, remove the 'set' part of the member name.
Change-Id: I04c56bd9d9feb1cf68ff50a1152083ea57ea7c62 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20008 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14139:0ea736dea1ff |
08-Aug-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: minor refactor for ProcessParams::create
Remove the nullptr initialization and change the message for object file failure.
Change-Id: I14b80b47b65893c55810e7f715c1b8fc643c5125 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19949 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14138:4d94d8df94aa |
08-Aug-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: remove unused parameter
The init function which processes invoke on their page tables has a thread context pointer parameter. The parameter is not used by the code so remove it.
Change-Id: Ic4766fbc105d81c1c9ee4b5c0f428497dff2ab30 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19948 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14130:62df30844a66 |
11-Mar-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add new getpgrp system call
This changeset adds new (relatively simple) system call support. The getpgrp call returns a thread context's pgid.
Change-Id: I361bdbfb9c01b761ddd5a4923d23f86971f8d614 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17111 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu> |
14129:7a41ca7e465c |
12-Mar-2019 |
Matthew Sinclair <matthew.sinclair@amd.com> |
sim-se: adding pipe2 syscall
pipe2 builds on top of the pipe syscall implementation by adding some extra flags for the files (to avoid have to make separate calls to fcntl).
Change-Id: I88cf6f1387b9d14e60b33a32db412da9ed93a3e6 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12310 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14124:9742fcde81e1 |
28-Aug-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: small refactor on pipe syscall
Change-Id: I02ffb1c4af980554ff12ac7d11d32ba80fe261c5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12308 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14121:692af22d0737 |
11-Mar-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: small performance optimization
A local variable was being set inside a loop when it should have been set outside the loop. This changeset moves the variable to the appropriate place.
Change-Id: If7655b501bd819c39d35dea4c316b4b9ed3173a2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17108 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
14120:500e6c5d8c1c |
11-Mar-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: fstat64 bugfix
The fstat64 system call does an upcast on entries in the file descriptor array to check if the file descriptor has a backing host-filesystem file opened. It does so because it needs to pass the host fd into the fstat call (since we rely on the host filesystem to service filesystem system calls).
The upcast was overly specific. This changeset alters the system call to use the most general base class of the file descriptor entries that can satisfy the code.
Change-Id: I10daf820257cea4d678ee6917e01e9cc9cd1cf5e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17110 Tested-by: kokoro <noreply+kokoro@google.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
14119:e97d6496cffa |
11-Mar-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add new option to getrlimit syscall
The NPROC option was not serviced by the getrlimit syscall. This changeset adds in the necessary code to service the option.
Change-Id: I679d3949c3bbb0628188f4e33034028d7726fdcb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17109 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> |
14090:a2fea3b370b5 |
11-Jun-2019 |
Gabor Dozsa <gabor.dozsa@arm.com> |
sim: Add getter to fault virtual address
Change-Id: Ifd493aee9e78b0b4ddcc71e90f48679543acb861 Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19176 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14024:abe47b13653d |
02-May-2019 |
Gabe Black <gabeblack@google.com> |
arch, base, cpu, gpu, sim: Merge getMemProxy and getVirtProxy.
These two functions were performing the same function but had two different names for historical reasons. This change merges them together, keeping the getVirtProxy name to be consistent with the getPhysProxy method used to get a non-translating proxy port.
Change-Id: Idd83c6b899f9343795075b030ccbc723a79e52a4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18581 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
14022:a7cdc33dab35 |
02-May-2019 |
Gabe Black <gabeblack@google.com> |
cpu, sim: Return PortProxy &s from all the proxy accessors.
This is a step towards merging the accessors for SE and FS modes.
Change-Id: I76818ab88b97097ac363e243be9cc1911b283090 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18579 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
14020:c9bf7a011602 |
02-May-2019 |
Gabe Black <gabeblack@google.com> |
arch, base, sim: Demote (SE|FS)TranslatingPortProxy &s to PortProxy &s.
Al(most) all of the interesting differences between the two classes have been removed. There are some control methods which are still specific to each type which may require treating them as their true type, but most code that consumes them doesn't need to worry about which is which.
Change-Id: Ie592676f1e496c7940605b66e55cd7fae18e59d6 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18577 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
14018:9d2153431f44 |
02-May-2019 |
Gabe Black <gabeblack@google.com> |
arch, base, sim: Replace Copy(String)?(In|Out) with equivalent code.
This expands those functions into code which extracts the virt proxy and then uses the appropriate method on it. This has two benefits. First, the Copy* functions where mostly redundant wrappers around the methods the proxy port already had. Second, using them forced a particular port which might not actually be what the user wanted.
Change-Id: I62084631dd080061e3c74997125164f40da2d77c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18575 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14014:ce216ee5d886 |
21-May-2019 |
Ciro Santilli <ciro.santilli@arm.com> |
sim-se: add a release parameter to Process.py
Set the default release to that single value for all ISAs.
glibc has checks for the kernel version based on uname, and refuses to start any syscall emulation programs if those checks don't pass with error:
FATAL: kernel too old
The ideal solution to this problem is to actually implement all missing system calls for the required kernel version and bumping the release accordingly.
However, it is very hard to implement all missing syscalls and verify compliance.
Previously, we have simply bumped the version manually from time to time when major glibc versions started breaking.
This commit alleviates the problem in two ways.
Firstly, having a single kernel version for all versions means that it is easier to bump all versions at once.
Secondly, it makes it is possible to set the release with a parameter, which in turn can be set from the command line with:
se.py --param 'system.cpu[:].workload[:].release = "4.18.0"'
Change-Id: I9e3c31073bfe68735f7b0775c8e299aa62b98222 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17849 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
14010:0e1e887507c0 |
01-May-2019 |
Gabe Black <gabeblack@google.com> |
arch, base, dev, sim: Remove now unnecessary casts from PortProxy methods.
Change-Id: Ia73b2d86a10d02fa09c924a4571477bb5f200eb7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18572 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13995:5d459168a680 |
28-Aug-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: change syscall function signature
The system calls had four parameters. One of the parameters is ThreadContext and another is Process. The ThreadContext holds the value of the current process so the Process parameter is redundant since the system call functions already have indirect access.
With the old API, it is possible to call into the functions with the wrong supplied Process which could end up being a confusing error.
This patch removes the redundancy by forcing access through the ThreadContext field within each system call.
Change-Id: Ib43d3f65824f6d425260dfd9f67de1892b6e8b7c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12299 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13994:a18a6bb72a49 |
18-Apr-2018 |
Tony Gutierrez <anthony.gutierrez@amd.com> |
sim-se: remove /sys from special paths
Currently, the open system call implementation in SE mode treats /sys/ as a special path that is opened using a special open handler. The ROC runtime, however, reads several files in /sys/ that are supported via path redirection. Here we remove /sys/ from the special files so that the necessary files may be read via path redirection.
Change-Id: Ifdab38ea1e6cc486ad43aec96b6e032fe63f137d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12127 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13990:828a9dfb6bd0 |
03-May-2019 |
Gabe Black <gabeblack@google.com> |
sim: Make the Process create function use the object loader mechanism.
This gets rid of the big mass of #if-s around headers and around the code which creates an object file.
As a nice side bonus, this also means that in addition to supporting multiple OS/arch combinations simultaneously, the object file loader could support multiple ISAs simultaneously as well, since each could load and set up its object file loaders indepedently and without the base process classes knowledge/involvement.
Change-Id: I0a19ad06e30e9062a96d27f00b66756eb3a595ba Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18631 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13981:577196ddd040 |
02-May-2019 |
Gabe Black <gabeblack@google.com> |
arch, base, cpu, dev, mem, sim: Remove #if 0-ed out code.
This code will be preserved through version control, but otherwise creates clutter and will rot in place since it's never compiled.
Change-Id: Id265f6deac445116843956ea5cf1210d8127274e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18608 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13936:4fd3a0a20e0e |
04-May-2019 |
Andrea Mondelli <Andrea.Mondelli@ucf.edu> |
sim-se: correct statfs inclusion on !linux host
- Added missing header - Fixed typo on __linux__ macro conditional - s/ifdef/if defined/g for consistency
Change-Id: I83b69856e5ec8b23b707642c0e14216cf62db31e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18668 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13934:b204cb97c870 |
18-Apr-2018 |
Joe Gross <joseph.gross@amd.com> |
sim-se: fix a few bugs/warns from GCC 6
Change-Id: Ib2ad860324fd234b23262d141be3e82628ff61f0 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12126 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13933:b4382461066d |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add eventfd system call
Change-Id: I7aeb4fe808d0c8f2fb8041e3662d330d8458f09c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12125 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13907:3a7a5838ef50 |
18-Apr-2018 |
Alexandru Dutu <alexandru.dutu@amd.com> |
sim-se: use DPRINTF_SYSCALL for ioctl/wait4
Change-Id: I4fbaf1a0653f13ae964a2574cc26bbaac2dc0686 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12124 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13906:005b70666608 |
29-Apr-2019 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: bugfix for 54c77aa055e
54c77aa055e introduced a bug which manifests as cyclical dependency on a member initialization for the Process class.
The current working directory (cwd) parameter is passed into Process to initialize both the target and host versions of the cwd. (The target and host versions may differ if the faux filesystem is used.) The host cwd init invoked methods which rely on the host cwd already being initialized. To avoid the bug, the code will now rely on using the targets cwd version, but will issue checks against the redirect paths.
Change-Id: I4ab644a3e00737dbf249f5d6faf20a26ceb04248 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18448 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13905:5cf30883255c |
27-Apr-2019 |
Gabe Black <gabeblack@google.com> |
arch: cpu: Track kernel stats using the base ISA agnostic type.
Then cast to the ISA specific type when necessary. This removes (mostly) an ISA specific aspect to some of the interfaces. The ISA specific version of the kernel stats still needs to be constructed and stored in a few places which means that kernel_stats.hh still needs to be a switching arch header, for instance.
In the future, I'd like to make the kernel its own object like the Process objects in SE mode, and then it would be able to instantiate and maintain its own stats.
Change-Id: I8309d49019124f6bea1482aaea5b5b34e8c97433 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18429 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13902:a43851662ce3 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add socket ioctls
The OpenMPI 1.8.2 runtime needs the ioctl code included in this patch to issue socket operations on the host machine.
Change-Id: I687b31f375a846f0bab2debd9b9472605a4d2c7d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12123 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13897:0388bc4e1c61 |
18-Apr-2018 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim-se: create Proc out files in out dir
Redirected output files from Process objects were being created in the current directory instead of in the output directory.
Change-Id: Ieb6ab5556fbcc811f4f24910da247d4dcdbc71bd Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12122 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13894:8603648c1679 |
24-Apr-2019 |
Gabe Black <gabeblack@google.com> |
arch, sim: Simplify the AuxVector type.
The AuxVector type has a bunch of accessors which just give access to the underlying variables through references. We might as well just make those members accessible directly.
Also, the AuxVector doesn't need to handle endianness flips itself. We can tell the byteswap mechanism how to flip an AuxVector, and let it handle that for us.
This gets rid of the entire .cc file which was complicated by trying to both hide the ISA specific endianness translations, and instantiate templated functions in a .cc.
Change-Id: I433cd61e73e0b067b6d628fba31be4a4ec1c4cf0 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18373 Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
13893:0e863b6c441a |
24-Apr-2019 |
Gabe Black <gabeblack@google.com> |
mem: Remove the ISA specialized versions of port proxy's read/write.
These selected their behavior based on ifdefs and had to be disabled when on the NULL ISA. The versions which take an explicit endianness have been renamed to just read/write instead of readGtoH and writeHtoG since the direction of the translation is obvious from context.
Change-Id: I6cfbfda6c4481962d442d3370534e50532d41814 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18372 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13892:0182a0601f66 |
22-Apr-2019 |
Gabe Black <gabeblack@google.com> |
mem: Minimize the use of MemObject.
MemObject doesn't provide anything beyond its base ClockedObject any more, so this change removes it from most inheritance hierarchies. Occasionally MemObject is replaced with SimObject when I was fairly confident that the extra functionality of ClockedObject wasn't needed.
Change-Id: Ic014ab61e56402e62548e8c831eb16e26523fdce Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18289 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Gabe Black <gabeblack@google.com> |
13883:f44e21d3aaa7 |
18-Apr-2018 |
David Hashe <david.hashe@amd.com> |
sim-se: add a faux-filesystem
This change introduces the concept of a faux-filesystem. The faux-filesystem creates a directory structure in m5out (or whatever output dir the user specifies) where system calls may be redirected.
This is useful to avoid non-determinism when reading files with varying path names (e.g., variations from run-to-run if the simulation is scheduled on a cluster where paths may change).
Also, this changeset allows circumventing host pseudofiles which have information specific to the host processor (such as cache hierarchy or processor information). Bypassing host pseudofiles can be useful when executing runtimes in the absence of an operating system kernel since runtimes may try to query standard files (i.e. /proc or /sys) which are not relevant to an application executing in syscall emulation mode.
Change-Id: I90821b3b403168b904a662fa98b85def1628621c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12119 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13867:9b10bbcf0543 |
15-Apr-2019 |
Alexandru Dutu <alexandru.dutu@amd.com> |
sim-se: Enhance clone for X86KvmCPU
This changeset enables clone to work with X86KvmCPU model, which will allow running multi-threaded applications at near hardware speeds. Even though the application is multi-threaded, the KvmCPU model uses one event queue, therefore, only one hardware thread will be used, through KVM, to simulate multiple application threads.
Change-Id: I2b2a7b1edb1c56eeb9c4fa0553cd236029cd53f8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18268 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com> |
13784:1941dc118243 |
07-Mar-2019 |
Gabe Black <gabeblack@google.com> |
arch, cpu, dev, gpu, mem, sim, python: start using getPort.
Replace the getMasterPort, getSlavePort, and getEthPort functions with getPort, and remove extraneous mechanisms that are no longer necessary.
Change-Id: Iab7e3c02d2f3a0cf33e7e824e18c28646b5bc318 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17040 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13782:9f6654f478e2 |
07-Mar-2019 |
Gabe Black <gabeblack@google.com> |
mem: Move bind() and unbind() into the Port class.
These are now pure virtual methods which more specialized port subclasses will need to implement. The SlavePort class implements them by ignoring them and then providing parallel functions for the MasterPort to call. The MasterPort's methods do basically what they did before, except now bind() uses dynamic cast to check if its peer is of the appropriate type and also to convert it into that type before connecting to it.
Change-Id: I0948799bc954acaebf371e6b6612cee1d3023bc4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17038 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13781:280e5206fd97 |
07-Mar-2019 |
Gabe Black <gabeblack@google.com> |
sim: Add a getPort function to SimObject.
This will retrieve a Port object from a given SimObject (which might not be a MemObject) no matter what flavor of Port it is.
Change-Id: I636b85e9d4929a05a769e165849106bcb5f3e9c1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17037 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13771:10d990934f15 |
07-Mar-2019 |
Gabe Black <gabeblack@google.com> |
mem: Move the Port base class into sim.
The Port class is going to be officially used for more than just memory system connections.
Change-Id: I493e721f99051865c5f0c06946a2303ff723c2af Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17036 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13757:79c0e02258d1 |
20-Feb-2019 |
Daniel R. Carvalho <odanrc@yahoo.com.br> |
sim: Add size to array unserialization error message
Add both acquired and expected size information to array unserialization error message.
Change-Id: Ic0a493c5a7860066eb992e9e91e7a4746b197579 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/16542 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13694:51669166f428 |
14-Feb-2019 |
Gabe Black <gabeblack@google.com> |
sim: Add a mechanism to exit the simulation loop immediately.
There are some cases, specifically when running systemc, that it's necessary to exit the simulation loop immediately rather than finishing running events scheduled for the current Tick. When running under sc_main, sc_stop and sc_pause return control to sc_main which can happen immediately. When running without sc_main, control needs to return to the python config script which needs to happen through a global exit event.
Since sc_pause and sc_stop are supposed to stop simulation without necessarily letting all the events at the current time run, we need a way to schedule an exit event with a very high priority (rather than a very low priority).
This change adds a new exitSimLoopNow function which does that, and adds a new constructor to the GlobalSimLoopExitEvent which uses that priority.
Also, a couple of cruft functions from the sim events are removed.
Change-Id: Icfbec17fb10f98084a75740acd839dbf4096fbb3 Reviewed-on: https://gem5-review.googlesource.com/c/16444 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13665:9c7fe3811b88 |
25-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
python: Don't assume SimObjects live in the global namespace
The importer in Python 3 doesn't like the way we import SimObjects from the global namespace. Convert the existing SimObject declarations to import from m5.objects. As a side-effect, this makes these files consistent with configuration files.
Change-Id: I11153502b430822130722839e1fa767b82a027aa Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15981 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> |
13662:3e072654ca86 |
28-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
python: Fix native module initialisation on Python 3
The approach we currently use to register our native modules doesn't work on Python 3. Convert the code to use the Python inittab instead of the old ad-hoc method.
Change-Id: I961f8a33993c621473732faeaab955a882769a4b Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15979 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> |
13651:b33db942f760 |
02-Apr-2018 |
Moyang Wang <mw828@cornell.edu> |
kern,sim: implement FUTEX_WAKE_OP
This patch implements FUTEX_WAKE_OP operation in the futex syscall. Below is its description:
int futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int *uaddr2, int val3);
This operation was added to support some user-space use cases where more than one futex must be handled at the same time. The most notable example is the implementation of pthread_cond_signal(3), which requires operations on two futexes, the one used to implement the mutex and the one used in the implementation of the wait queue associated with the condition variable. FUTEX_WAKE_OP allows such cases to be implemented without leading to high rates of contention and context switching.
Reference: http://man7.org/linux/man-pages/man2/futex.2.html
Change-Id: I215f3c2a7bdc6374e5dfe06ee721c76933a10f2d Reviewed-on: https://gem5-review.googlesource.com/c/9630 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13650:93efc0143eb7 |
02-Apr-2018 |
Moyang Wang <mw828@cornell.edu> |
sim, kern: support FUTEX_CMP_REQUEUE
This patch supports FUTEX_CMP_REQUEUE operation. Below is its description from Linux man page:
futex syscall: int futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int *uaddr2, int val3);
This operation first checks whether the location uaddr still contains the value val3. If not, the operation fails with the error EAGAIN. Otherwise, the operation wakes up a maximum of val waiters that are waiting on the futex at uaddr. If there are more than val waiters, then the remaining waiters are removed from the wait queue of the source futex at uaddr and added to the wait queue of the target futex at uaddr2. The val2 argument specifies an upper limit on the number of waiters that are requeued to the futex at uaddr2.
Reference: http://man7.org/linux/man-pages/man2/futex.2.html
Change-Id: I6d2ebd19a935b656d19d8342f7ab450c0d2031f4 Reviewed-on: https://gem5-review.googlesource.com/c/9629 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13649:d1bb2eb7d0f6 |
02-Apr-2018 |
Tuan Ta <qtt2@cornell.edu> |
sim: handle the case when there're not enough HW thread contexts
In SE mode, since there's no OS scheduler, the number of active SW threads is limited by the number of HW thread contexts. Previously, if there is no spare HW thread context, the simulator just fails and stops. Instead, this patch returns EAGAIN error code from a clone syscall if there's no available HW thread context. Then it's up to the simulated program to handle the error.
Linux man page reference: http://man7.org/linux/man-pages/man2/clone.2.html http://man7.org/linux/man-pages/man2/fork.2.html
Change-Id: Ib4e092433e49de4dde376c8cb81f7d3f7851cbc0 Reviewed-on: https://gem5-review.googlesource.com/c/9628 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13644:6180ee72e061 |
02-Apr-2018 |
Tuan Ta <qtt2@cornell.edu> |
sim,cpu: make exit_group halt all threads in a group
When a thread calls exit_group, in addition to halting the thread itself, it needs to halt all other threads in its group (i.e., threads sharing the same thread group ID). This patch enables threads to do that.
Change-Id: Ib2e158fb27cf98843f177a64a2d643b1bbc94d03 Reviewed-on: https://gem5-review.googlesource.com/c/9623 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13642:253cda14088e |
02-Apr-2018 |
Tuan Ta <qtt2@cornell.edu> |
sim,kern: support FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET ops
This patch adds support for two operations in futex system call: FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. The two operations are used to selectively wake up a certain thread waiting on a futex variable.
Basically each thread waiting on a futex variable is associated with a bitset that is checked when another thread tries to wake up all threads waiting on the futex variable.
Change-Id: I2300e53b144d8fae226423fa2efb0238c1d93ef9 Reviewed-on: https://gem5-review.googlesource.com/c/9621 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13641:648f3106ebdf |
02-Apr-2018 |
Tuan Ta <qtt2@cornell.edu> |
cpu: fixed how O3 CPU executes an exit system call
When a thread executed an exit syscall in SE mode, the thread context was removed immediately in the same cycle, which left inflight squash operations and trap event incomplete. The problem happened when a new thread was assigned to the CPU later. The new thread started with some incomplete transactions of the previous thread (e.g., squashing). This problem could cause incorrect execution flow for the new thread (i.e., pc was not reset properly at the exit point), deadlock (i.e., some stage-to-stage signals were not reset) and incorrect rename map between logical and physical registers.
This patch adds a new state called 'Halting' to the thread context and defers removing thread context from a CPU until a trap event initiated by an exit syscall execution is processed. This patch also makes sure that the removal of a thread context happens after all inflight transactions of the to-be-removed thread in the pipeline complete.
Change-Id: If7ef1462fb8864e22b45371ee7ae67e2a5ad38b8 Reviewed-on: https://gem5-review.googlesource.com/c/8184 Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13634:748418e0ca3f |
26-Dec-2018 |
Austin Harris <austinharris@utexas.edu> |
arch-riscv: Enable support for riscv 32-bit in SE mode.
This patch splits up the riscv SE mode support for 32 and 64-bit. A future patch will add support for decoding rv32 instructions.
Change-Id: Ia79ae19f753caf94dc7e5830a6630efb94b419d7 Signed-off-by: Austin Harris <austinharris@utexas.edu> Reviewed-on: https://gem5-review.googlesource.com/c/15355 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Alec Roelke <alec.roelke@gmail.com> Maintainer: Alec Roelke <alec.roelke@gmail.com> |
13629:0b83d5382336 |
04-Feb-2019 |
Andrea Mondelli <Andrea.Mondelli@ucf.edu> |
sim: added missed macro definition on MacOS
A recent patch add the use of the macro: CMSG_ALIGN This macro is not very cross-platform, and needs to be defined according to the platform.
This patch defines the missing macro on MacOS.
Change-Id: I582f69e652dc060b4532358141179ad6d37eafc7 Reviewed-on: https://gem5-review.googlesource.com/c/16102 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13620:e0d9b09788f6 |
25-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Prepare C++ side for Python 3
Python 3 uses wide strings instead of ordinary strings for many APIs. Add the necessary conversions to comply with the new API.
Change-Id: I6f45c9c532537d50d54b542f34eb8fd8cb375874 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15977 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> |
13610:5d5404ac6288 |
16-Oct-2018 |
Giacomo Gabrielli <giacomo.gabrielli@arm.com> |
arch,cpu: Add vector predicate registers
Latest-gen. vector/SIMD extensions, including the Arm Scalable Vector Extension (SVE), introduce the notion of a predicate register file. This changeset adds this feature across architectures and CPU models.
Change-Id: Iebcadbad89c0a582ff8b1b70de353305db603946 Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13715 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13572:14ddf44aaebc |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se add readv and modifies writev
Change-Id: I6cbce4389d5697da34058dc910306394e48c6582 Reviewed-on: https://gem5-review.googlesource.com/c/12117 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13571:a320800ceccf |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add ability to get/set sock metadata
Add getsockopt, getsockname, setsockname, and getpeername system calls.
Change-Id: Ifa1d9a95f15b4fb12859dbfd3c4bd248de2e3d32 Reviewed-on: https://gem5-review.googlesource.com/c/12116 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13570:b6484720c6a9 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add syscalls related to polling
Fix poll so that it will use the syscall retry capability instead of causing a blocking call.
Add the accept and wait4 system calls.
Add polling to read to remove deadlocks that occur in the event queue that are caused by blocking system calls.
Modify the write system call to return an error number in case of error.
Change-Id: I0b4091a2e41e4187ebf69d63e0088f988f37d5da Reviewed-on: https://gem5-review.googlesource.com/c/12115 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13569:47a2291177a7 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add calls for network transmissions
Add recvfrom, sendto, recvmsg, and sendmsg system calls.
Change-Id: I2eb50ea7823c8af57d99b3b8d443d2099418c06c Reviewed-on: https://gem5-review.googlesource.com/c/12114 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13568:9c11b79e3223 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
sim-se: add socket-based functionality
Add socket, socketpair, bind, list, connect and shutdown system calls.
Change-Id: I635af3fca410f96fe28f8fe497e3d457a9dbc470 Reviewed-on: https://gem5-review.googlesource.com/c/12113 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13567:08896772e474 |
15-Jan-2019 |
Daniel R. Carvalho <odanrc@yahoo.com.br> |
base: Fix unitialized storage
The bitunion is not being initialized on constructor to avoid performance overhead, and that generated a maybe-unitialized error when a sub-class was being copied before assigned in serialize's parseParam() in some compilers.
This patch adds zero-initialization to the problematic variable to appease the compiler.
Change-Id: I90fa6aa356b3e14ec25e3294b17ed10f429a9a38 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/15635 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13557:fc33e6048b25 |
13-Oct-2018 |
Gabe Black <gabeblack@google.com> |
cpu: dev: sim: gpu-compute: Banish some ISA specific register types.
These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are some remaining types, specifically the vector registers and the CCReg. I'm less familiar with these new types of registers, and so will look at getting rid of them at some later time.
Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b Reviewed-on: https://gem5-review.googlesource.com/c/13624 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13539:22b36f5a7a95 |
09-Jan-2019 |
Javier Setoain <javier.setoain@arm.com> |
sim-se, arch-arm: Add support for getdents64
Change-Id: Ib27950144d4c9802ffb842db98aec9e433ccbfc5 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15438 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
13536:77e19417e723 |
09-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim-se: Refactor clone to avoid most ifdefs
Some parts of clone are architecture dependent. In some cases, we are able to use architecture-specific helper functions or register aliases. However, there is still some architecture-specific that is protected by ifdefs in the common clone implementation.
Move these architecture-specific bits to the architecture-specific OS class instead to avoid these ifdefs and make the code a bit more readable.
Change-Id: Ia0903d738d0ba890863bddfa77e3b717db7f45de Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15435 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13535:14b3f5a55d38 |
09-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim-se: Correctly calculate next PC in clone
The clone syscall doesn't propagate all state in the PCState object when calculating the return PC of a newly created process. Instead of creating a new PCState object from the next PC address, copy the old PC and advance it.
Change-Id: Ice53831920bcb5d198865169ed2cca8d06e37cfe Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15417 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13534:6068637fc0c0 |
09-Jan-2019 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim-se: Use CONFIG_CLONE_BACKWARDS for Arm
Linxu on Arm users the CLONE_BACKWARDS argument order for the clone syscall.
Change-Id: I48deb4f03140c9d4ef7a89e3e33813e76777f999 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15416 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13479:5a1924882c60 |
30-Nov-2018 |
Tony Gutierrez <anthony.gutierrez@amd.com> |
arch-x86: Add sys/syscall.h to x86 process.cc/syscall_emul.cc
Change a66d12c guards the selection of getdents() in x86's process.cc file with SYS_getdents, however process.cc does not include the right header for SYS_getdents, which leads to x86 choosing the unimplemented call. This change adds sys/syscall.h to address the problem.
This change also adds sys/syscall.hh to syscall_emu.cc, which only includes syscall.hh and may not be supported on all systems.
Change-Id: If1adcf41e9e455de5f2827ba98c542fdcacdc22e Reviewed-on: https://gem5-review.googlesource.com/c/14775 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13475:5189e2334f1a |
28-Nov-2018 |
Nikos Nikoleris <nikos.nikoleris@arm.com> |
base, sim: Add missing destructors
Derived classes with virtual functions need to define a virtual destructor or a protected destructor otherwise calling the base class destructor has undefined behavior. This change adds a virtual distructor in the base class.
Change-Id: I1c855aa56dff6585ff99b9147bdb4eb9729a0a53 Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14815 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13448:94861018bb62 |
20-Nov-2018 |
Ciro Santilli <ciro.santilli@arm.com> |
sim-se: only implement getdentsFunc on supported hosts
The implementation of the getdents syscall relies on SYS_getdents, which is not available on all archs, because the getdents syscall has been superseded by getdents64, and does not exist on newer archs such as aarch64.
This leads the build to break on aarch64 hosts with error:
error: 'SYS_getdents' was not declared in this scope
Change-Id: I8701fb5b61c0418b14a9463ef135a391a7f7a9ba Reviewed-on: https://gem5-review.googlesource.com/c/14596 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13440:17adf0ea4d36 |
16-Nov-2018 |
Gabe Black <gabeblack@google.com> |
sim: Deschedule existing events when destructing an event queue.
Other objects in the simulation may try to deschedule their events when destructed, and if they're cleaned up after the event queue is then they might try to deschedule events on an event queue that no longer exists.
Change-Id: I9452ce52fba78297ce3dc4b3884289b5e2f2574d Reviewed-on: https://gem5-review.googlesource.com/c/14400 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
13415:dfba7ea400e2 |
17-Oct-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Move BitUnion overloading to show/parseParams
This patch is moving template overloading for BitUnions into the showParam, parseParams functions. Henceforth BitUnion types will use the common param wrapper. This patch implicitly implements (UN)SERIALIZE_CONTAINER for BitUnions.
Change-Id: I0e1faadb4afd4dc9de5dc5fca40041e349c9ba73 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13636 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13414:1b5387dccec3 |
17-Oct-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Move paramIn/Out definition to header file
This patch is moving the definitions of paramIn/Out templates to the header file. In this way we gain:
1) We don't have to do explicit instantiation anymore for user defined types. This spares us from including data type header files into serialize.cc
2) We can overload show/parseParam for BitUnions or any other type that requires special handling when serializing. Just by overloading the two templates we get all the containers' (list, vector, array..) serialization for free
2) gtest: With the idea of adding unit tests for Serializable objects, we can avoid importing serialize.cc and just redefine Serializable methods in the test source, implementing a Serializable stub
Change-Id: I45a9bb87d5ef886a3668fd477005cd105f612e36 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13635 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13409:071d5425ce37 |
07-Nov-2018 |
Gabe Black <gabeblack@google.com> |
sim: Push the global frequency management code into C++.
That makes it available when python is left out, and makes it available to c++ code without having to call back into python.
Change-Id: If82e7e8eff526f2b957f84afe046e1d56fed4aa2 Reviewed-on: https://gem5-review.googlesource.com/c/14055 Reviewed-by: Srikant Bharadwaj <srikant.bharadwaj@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
13371:1e796c9f369d |
26-Sep-2018 |
Ciro Santilli <ciro.santilli@arm.com> |
syscall_emul: fix openat when directory does not end in "/"
Before this commit, the following code:
dir_fd = open(".", O_DIRECTORY); file_fd = openat(dir_fd, "ble", O_CREAT, S_IRUSR | S_IWUSR);
would create a file called ".ble" in the current working directory, instead of the correct "ble".
Change-Id: I1525a088d49744e29b760387afabef9f1ac98646 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13005 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
13107:8fa5f70698a2 |
24-Sep-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Extend (UN)SERIALIZE_ARRAY to BitUnions
This patch is making it possible to use SERIALIZE_ARRAY and UNSERIALIZE array for serializing arrays of BitUnions.
Change-Id: I682766b472585f70a89338f373fb94dff5db53c3 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/12924 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
13031:47510ddc366d |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: implement dir-related syscalls
Add getdents, rmdir, chdir, and mknod to SE mode for x86.
Change-Id: I387ea3066869e8999bc0064f74070f4e47c1e9a1 Reviewed-on: https://gem5-review.googlesource.com/12112 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13030:c08481a521c4 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: refactor FDEntry and children classes
Strips off superfluous inline specifiers in header file.
Changes return types and parameters that deal with strings to include the const& specifiers.
Change-Id: I570b1801abb059b91216f0223458d00963b9ca1c Reviewed-on: https://gem5-review.googlesource.com/12111 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13029:75abda747dc3 |
18-Apr-2018 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: style changes and FDArray refactor
Some members were defined as public when they should have been privately declared so these were moved to the appropriate spot.
The operator[] had inline specified for for an in-class definition which is redundant since inline definitions are always implicitly inline.
Private members had the leading underscore applied to them to denote that they're private (consistent with style guide).
Changed static const defined class variable into a constexpr with brace-list initialization.
Change-Id: If3054416b57827d1542e9ebab428d67d0e767723 Reviewed-on: https://gem5-review.googlesource.com/12110 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
13028:9a09c342891e |
04-May-2018 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: expand AuxVector class
The AuxVector class is responsible for holding Process data. The data that it holds is normally setup by an OS kernel in the process address space. The purpose behind doing this is to pass in information that the process will need for various reasons. (Check out the enum in the header file for an idea of what the AuxVector holds.)
The AuxVector struct was changed into a class and encapsulation methods were added to protect access to the member variables.
The host ISA may have a different endianness than the simulated ISA. Since data is passed between the process address space and the simulator for auxiliary vectors, we need to worry about maintaining endianness for the right context.
Change-Id: I32c5ac4b679559886e1efeb4b5483b92dfc94af9 Reviewed-on: https://gem5-review.googlesource.com/12109 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
13021:f57df5a2660e |
13-Sep-2018 |
Sherif Elhabbal <elhabbalsherif@gmail.com> |
power: Add a clock_period variable to power expressions
Currently 'Clock period in ticks' stat is not accessible in power equations . This patch adds a variable 'clock_period' to be referenced to get the Clock period in ticks
Signed-off-by: Sherif Elhabbal <elhabbalsherif@gmail.com> Change-Id: Icac6a2e2003ed75d1680180e53343b0203139d72 Reviewed-on: https://gem5-review.googlesource.com/12664 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12980:127afc3ac506 |
11-Sep-2018 |
Gabe Black <gabeblack@google.com> |
base: Correct a small typo in sim/core.(hh|cc).
The value GHz with a small z was spelled GHZ with a large z, which was inconsistent with the other frequency-like values in that namespace.
Change-Id: I55dfc447a5811ae584e46769cd9cadd08bd1e716 Reviewed-on: https://gem5-review.googlesource.com/12572 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12965:8d8a5c770ea8 |
10-May-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Add System method for MasterID lookup
A new method (lookupMasterId) has been added to the System. A client should use it when querying the System for the MasterID of a particular master. It changes from getMasterId since it is not registering a new MasterID if the master is not found in the master's list.
Change-Id: I701158d22e235085bba9ab91154fbb702cae1467 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/11969 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12796:16dffc0e6c7f |
21-Jun-2018 |
Matt Sinclair <mattdsinclair@gmail.com> |
syscall_emul: adding symlink system call
Change-Id: Iebda05c130b4d2ee8434cad1e703933bfda486c8 Reviewed-on: https://gem5-review.googlesource.com/11490 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12795:6e69f6a3c0c0 |
21-Jun-2018 |
Matt Sinclair <mattdsinclair@gmail.com> |
syscall_emul: adding link system call
Change-Id: If8922c2233bbe1f6fce35f64d1a44b91d2cfeed2 Reviewed-on: https://gem5-review.googlesource.com/11489 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12716:430023c6881b |
27-Apr-2018 |
Michael LeBeane <michael.lebeane@amd.com> |
dev: Exit correctly in dist-gem5 for SE mode
Do not allow the exit() syscall to terminate gem5 when running in dist-gem5 mode. The exit must be coordinated by the distributed interface instead.
Change-Id: I57f47610b59fe9e18ba3a1667fb5e45cecac1a81 Reviewed-on: https://gem5-review.googlesource.com/10461 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Mohammad Alian <m.alian1369@gmail.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12697:cd71b966be1e |
27-Apr-2018 |
Tony Gutierrez <anthony.gutierrez@amd.com> |
style: fix amd license and style issues
Change-Id: I26136fb49f743c4a597f8021cfd27f78897267b5 Reviewed-on: https://gem5-review.googlesource.com/10463 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
12694:157b4b3a9879 |
02-May-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Remove trailing dot when assigning a master's name
This patch fixes the master's name allocation in the system. The error was occurring when a submaster was not specified in getMasterId: a trailing separation dot was still added to the master's name.
Change-Id: I0e67900f6fdd36a61900453b55219fc7007d1b05 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/10301 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12680:91f4d6668b4f |
04-Apr-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim,cpu,mem,arch: Introduced MasterInfo data structure
With this patch a gem5 System will store more info about its Masters. While it was previously keeping track of the Master name and Master ID only, it is now adding a per-Master pointer to the SimObject related to the Master. This will make it possible for a client to query a System for a Master using either the master's name or the master's pointer.
Change-Id: I8b97d328a65cd06f329e2cdd3679451c17d2b8f6 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/9781 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> |
12678:b52646318166 |
17-Apr-2018 |
Jason Lowe-Power <jason@lowepower.com> |
docs: Fix power model doxygen
Change-Id: I0a9a30bc4a89411e0f1dd897f0d1f05f20790b50 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/9981 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> |
12593:79d55cbe84aa |
09-Mar-2018 |
Jason Lowe-Power <jason@lowepower.com> |
sim-se: Fix fallthrough in prlimit
Change-Id: Ieec4651000b3b4de05ba5ba11fdfa5392a5477e7 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/8904 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12547:3bf3ae601ead |
21-Aug-2017 |
Anouk Van Laer <anouk.vanlaer@arm.com> |
sim, power: Temperature used for power calculations
The temperature used for the power calculations was fixed at 0 degrees, unless a thermal model was setup. This commit allows the user to set the temperature that needs to be used by the power calculation during gem5 configuration. This value will be overwritten if there are thermal models present.
Change-Id: I7ca8fa6766bdcba9d362c12fc75d1e1f74385f35 Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8602 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12546:8182d78bebcb |
01-Mar-2017 |
Anouk Van Laer <anouk.vanlaer@arm.com> |
sim: Added model type to power model
Static, dynamic or all to differentiate between types of power models so for example static models will not be asked for a dynamic power
Change-Id: I3a0385821f7c671aedddaebeb038c677367faa81 Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8601 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12521:da4f02f2e5d7 |
02-Aug-2017 |
Chuan Zhu <chuan.zhu@arm.com> |
sim: Add gtoh/htog helpers that take an explicit endianness
Add helper functions to swap between guest byte order and host byte order that take a guest endianness as a parameter. These functions are called htog and htog to be consistent with the helper functions that extract guest byte order from a compile time constant.
Change-Id: Ie6be7dfd3b7a58ad6bfb57b25be5f85b5f425929 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8201 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12515:e3d1a64d0260 |
05-Feb-2018 |
Giacomo Travaglini <giacomo.travaglini@arm.com> |
sim: Remove _numContexts member in System class
A System object has a _numContexts member variable which represent the number of ThreadContext registered in the System. Since this has to match the size of the ThreadContext vector, this patch removes the manually cached size. This was usually used as a for-loop index, whereas we want to enforce the use of range-based loops whenever possible.
Change-Id: I1ba317c0393bcc9c1aeebbb1fc22d7b2bc2cf90c Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8062 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12469:ea3fefba5a72 |
16-Dec-2015 |
Glenn Bergmans <glenn.bergmans@arm.com> |
arm: DT autogeneration - Device Tree generation methods
This patch adds an extra layer to the pyfdt library such that usage gets easier and device tree nodes can be specified in less code, without limiting original usage. Note to not import both the pyfdt and fdthelper in the same namespace (but generally fdthelper is all you need, because it supplies the same classes even when they are not extended in any way)
Also, this patch lays out the primary functionality for generating a device tree, where every SimObject gets an empty generateDeviceTree method and ArmSystems loop over their children in an effort to merge all the nodes. Devices are implemented in other patches.
Change-Id: I4d0a0666827287fe42e18447f19acab4dc80cc49 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5962 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12461:a4cb506cda74 |
09-Jan-2018 |
Gabe Black <gabeblack@google.com> |
tarch, mem: Abstract the data stored in the SE page tables.
Rather than store the actual TLB entry that corresponds to a mapping, we can just store some abstracted information (address, a few flags) and then let the caller turn that into the appropriate entry. There could potentially be some small amount of overhead from creating entries vs. storing them and just installing them, but it's likely pretty minimal since that only happens on a TLB miss (ideally rare), and, if it is problematic, there could be some preallocated TLB entries which are just minimally filled in as necessary.
This has the nice effect of finally making the page tables ISA agnostic.
Change-Id: I11e630f60682f0a0029b0683eb8ff0135fbd4317 Reviewed-on: https://gem5-review.googlesource.com/7350 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12460:0f221912b014 |
08-Jan-2018 |
Gabe Black <gabeblack@google.com> |
x86, mem: Rewrite the multilevel page table class.
The new version extracts all the x86 specific aspects of the class, and builds the interface around a variable collection of template arguments which are classes that represent the different levels of the page table. The multilevel page table class is now much more ISA independent.
Change-Id: Id42e168a78d0e70f80ab2438480cb6e00a3aa636 Reviewed-on: https://gem5-review.googlesource.com/7347 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com> |
12452:ad4adeb441d0 |
07-Jan-2018 |
Gabe Black <gabeblack@google.com> |
sim: Use the new BitUnion templates in serialize.hh.
serialize.hh should not reference internal implementation details in the underlying BitUnion types.
Change-Id: I1ce29243db63801b7788f037fdc54811bdab889c Reviewed-on: https://gem5-review.googlesource.com/7203 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12450:b5a0300fc327 |
06-Jan-2018 |
Gabe Black <gabeblack@google.com> |
base: Rework bitunions so they can be more flexible.
They are now oriented around a class which makes it easy to provide custom setter/getter functions which let you set or read bits in an arbitrary way.
Future additions may add the ability to add custom bitfield methods, and index-able bitfields.
Change-Id: Ibd6d4d9e49107490f6dad30a4379a8c93bda9333 Reviewed-on: https://gem5-review.googlesource.com/7201 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> |
12449:2260f4a68210 |
16-Jan-2018 |
Gabe Black <gabeblack@google.com> |
sim, arch, base: Refactor the base remote GDB class.
Fold the GDBListener class into the main BaseRemoteGDB class, move around a bunch of functions, convert a lot of internal functions to be private, move some functions into the .cc, make some functions non-virtual which didn't really need to be overridden.
Change-Id: Id0832b730b0fdfb2eababa5067e72c66de1c147d Reviewed-on: https://gem5-review.googlesource.com/7422 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> |
12448:b299e560f1d8 |
04-Jan-2018 |
Gabe Black <gabeblack@google.com> |
arch, mem, sim: Consolidate and rename the SE mode page table classes.
Now that Nothing inherits from PageTableBase directly, it can be merged into FuncPageTable. This change also takes the opportunity to rename the combined class to EmulationPageTable which lets you know that it's specifically for SE mode.
Also remove the page table entry cache since it doesn't seem to actually improve performance. The TLBs likely absorb the majority of the locality, essentially acting like a cache like they would in real hardware.
Change-Id: If1bcb91aed08686603bf7bee37298c0eee826e13 Reviewed-on: https://gem5-review.googlesource.com/7342 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com> |
12443:0479f5e6f8bd |
12-Jan-2018 |
Gabe Black <gabeblack@google.com> |
sim: Simplify registerThreadContext a little bit.
The code in this function was a little convoluted. This change attempts to simplify it a little bit to make it easier to read.
Change-Id: I1ae557b9fede47fa89a9ea550bd0af8ad242449f Reviewed-on: https://gem5-review.googlesource.com/7421 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12431:000549e1f497 |
22-Dec-2017 |
Gabe Black <gabeblack@google.com> |
arch,mem: Move page table construction into the arch classes.
This gets rid of an awkward NoArchPageTable class, and also gives the arch a place to inject ISA specific parameters (specifically page size) without having to have TheISA:: in the generic version of these types.
Change-Id: I1412f303460d5c43dafdb9b3cd07af81c908a441 Reviewed-on: https://gem5-review.googlesource.com/6981 Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com> Maintainer: Gabe Black <gabeblack@google.com> |
12426:bd598b155482 |
17-Sep-2017 |
Tuan Ta <qtt2@cornell.edu> |
arch-riscv,sim: Support clone syscall in RISC-V
(1) This patch sets a correct order of clone syscall's arguments for RISC-V. Linux kernel 4.15 uses CLONE_BACKWARDS flag by default for RISC-V. The flag in the Linux kernel defines the list of clone syscall's arguments in the following order:
clone_flags (flags) newsp (newStack) parent_tidptr (ptidPtr) tls (tlsPtr) child_tidptr (ctidPtr)
Code reference: https://github.com/riscv/riscv-linux/blob/master/kernel/fork.c https://github.com/riscv/riscv-linux/blob/master/arch/riscv/Kconfig
(2) This patch copies a parent thread's register values to its child thread in clone syscall.
Change-Id: I2eb1c8e80990861080ce7153503ed784fb2c7bdf Reviewed-on: https://gem5-review.googlesource.com/6904 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Alec Roelke <ar4jc@virginia.edu> |
12416:3c2a005993a0 |
21-Dec-2017 |
Tuan Ta <qtt2@cornell.edu> |
sim: Fix a bug in prlimit syscall in SE mode
The old_limit pointer is supposed to be the 4th argument (index 3) of the prlimit syscall. This patch sets old_limit pointer to the correct argument.
Change-Id: I97808f7234cd2622cb3eb2f1e0beb7fc8cf492c1 Reviewed-on: https://gem5-review.googlesource.com/6903 Reviewed-by: Alec Roelke <ar4jc@virginia.edu> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12392:e0dbdf30a2a5 |
13-Dec-2017 |
Jason Lowe-Power <jason@lowepower.com> |
misc: Updates for gcc7.2 for x86
GCC 7.2 is much stricter than previous GCC versions. The following changes are needed:
* There is now a warning if there is an implicit fallthrough between two case statments. C++17 adds the [[fallthrough]]; declaration. However, to support non C++17 standards (i.e., C++11), we use M5_FALLTHROUGH. M5_FALLTHROUGH checks for [[fallthrough]] compliant C++17 compiler and if that doesn't exist, it defaults to nothing (no older compilers generate warnings). * The above resulted in a couple of bugs that were found. This is noted in the review request on gerrit. * throw() for dynamic exception specification is deprecated * There were a couple of new uninitialized variable warnings * Can no longer perform bitwise operations on a bool. * Must now include <functional> for std::function * Compiler bug for void* lambda. Changed to auto as work around. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82878
Change-Id: I5d4c782a4e133fa4cdb119e35d9aff68c6e2958e Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/5802 Reviewed-by: Gabe Black <gabeblack@google.com> |
12386:2bf5fb25a5f1 |
13-Dec-2017 |
Gabe Black <gabeblack@google.com> |
arm,sparc,x86,base,cpu,sim: Replace the Twin(32|64)_t types with.
Replace them with std::array<>s.
Change-Id: I76624c87a1cd9b21c386a96147a18de92b8a8a34 Reviewed-on: https://gem5-review.googlesource.com/6602 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12383:57de7e3b7ba0 |
12-Dec-2017 |
Gabe Black <gabeblack@google.com> |
base: Add endianness conversion functions for std::array types.
These swap the endianness of each element within the array individually.
They probably obsolute the Twin(32|64)_t types which I believe were used for SPARC.
Change-Id: Ic389eb24bdcdc0081068b0c5a37abdf416f6c924 Reviewed-on: https://gem5-review.googlesource.com/6581 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12334:e0ab29a34764 |
30-Nov-2017 |
Gabe Black <gabeblack@google.com> |
misc: Rename misc.(hh|cc) to logging.(hh|cc)
These files aren't a collection of miscellaneous stuff, they're the definition of the Logger interface, and a few utility macros for calling into that interface (panic, warn, etc.).
Change-Id: I84267ac3f45896a83c0ef027f8f19c5e9a5667d1 Reviewed-on: https://gem5-review.googlesource.com/6226 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com> |
12302:5771c4c65b23 |
18-Nov-2017 |
Gabe Black <gabeblack@google.com> |
scons: Switch from "guards" to "tags" on source files.
Tags are just arbitrary strings which are attached to source files which mark them as having some property. By default, all source files have the "gem5 lib" tag added to them which marks them as part of the gem5 library, the primary component of the gem5 binary but also a seperable component for use in, for example, system C.
The tags can be completely overridden by setting the "tags" parameter on Source, etc., functions, and can be augmented by setting "add_tags" which are tags that will be added, or alternatively additional tags. It's possible to specify both, in which case the tags will be set to the union of tags and add_tags. add_tags is supposed to be a way to add extra tags to the default without actually overriding the default. Both tags and add_tags can be a list/tuple/etc of tags, or a single string which will be converted into a set internally.
Other existing tags include: 1. "python" for files that need or are used with python and are excluded when the --without-python option is set 2. "main" for the file(s) which implement the gem5 binary's main function. 3. The name of a unit test to group its files together. 4. Tags which group source files for partial linking.
By grouping the "tags" into a single parameter instead of taking all extra parameters as tags, the extra parameters can, in the future, be passed to the underlying scons environment. Also, the tags are either present or not. With guards, they could be present and True, present and False, or not present at all.
Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2 Reviewed-on: https://gem5-review.googlesource.com/5822 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12296:e127a1bae7bd |
06-Nov-2017 |
Alec Roelke <ar4jc@virginia.edu> |
sim-se: Add default to SyscallDesc constructor
This patch adds a default value of unimplementedFunc to SyscallDesc's constructor's second argument, which makes adding system call placeholders to SE mode cleaner.
Change-Id: I3e7efb3a887cc52d16d2095d3dd2e2a96fb882fb Reviewed-on: https://gem5-review.googlesource.com/5501 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12283:9c8f694f4e97 |
20-Nov-2017 |
Austin Harris <austinharris@utexas.edu> |
sim: Fix need to save address space info during serialization.
This fixes a fatal already mapped error in FuncPageTable::allocate that occurs in some cases when restoring from a checkpoint.
Change-Id: Ib726a69358118626663e42b7f14889b0d3a98de0 Reported-by: Ruohuang Zheng <zhengruohuang@gmail.com> Signed-off-by: Austin Harris <austinharris@utexas.edu> Reviewed-on: https://gem5-review.googlesource.com/5901 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12272:bcc67ee98e6d |
12-May-2016 |
Geoffrey Blake <Geoffrey.Blake@arm.com> |
sim: Implement load_addr_mask auto-calculation
Recent Linux kernels for AArch64 have changed their start addresses but we still want to relocate the kernel to 0x80080000 which required hacking the load_addr_mask in Realview.py to be 0x7ffffff from 0xfffffff to mask off the proper number of MSBs to load the kernel in the desired location. To avoid having to make this change in the future again, we auto-calculate the load_addr_mask if it is specified as 0x0 in the System sim-object to find the most restrictive address mask instead of having the configuration specify it. If the configuration does specify the address mask, we use it instead of auto-calculating.
Change-Id: I18aabb5d09945c6e3e3819c9c8036ea24b6c35cf Signed-off-by: Geoffrey Blake <Geoffrey.Blake@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2323 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12270:3d6437eb362d |
08-Sep-2017 |
Tiago Muck <tiago.muck@arm.com> |
sim: ScopedMigration does nothing if both eqs are the same
Added a check to avoid unlocking/locking the same event queue. Also, added an optional parameter to enable the migration to be skipped. This can be useful to disable the synchronization for certain runtime conditions.
Change-Id: I4b03b3ffff4f9503153cd41dd8aa78705bf16cc4 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5730 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12265:7db0f21ff605 |
01-Jul-2016 |
David Guillen Fandos <david.guillen@arm.com> |
pwr: Enable multiple power models per component
This patch allows the user to specify more than one power model for any given Clocked Object. This is useful and some times necessary to properly model components that have multiple power sources (or subcomponents) but gem5 doesn't model them.
The ideal solution would be to have a DictParam to replace the VectorParam so each model can have a name and can be identified in the stats file.
Change-Id: I4080a7054a16b56069c44750a7a9ce4e674cdf9d Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5733 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12263:860fad010585 |
08-Sep-2017 |
Tiago Muck <tiago.muck@arm.com> |
sim: Clocked object debug message updated for clarity
Change-Id: I5bbf36ef21ac14d9edf68ec6766d33f88e84d308 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5729 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12262:a58c0c323e4f |
12-Apr-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add an option to load additional kernel objects
There are cases where it is desirable to load a kernel and a set of additional objects. This can, for example, be useful for testing where the bootstrap code can be loaded from one object (the kernel) and the test proper from another.
This changeset adds this functionality by adding a kernel_extras vector parameter to the System class. Object files in this vector are loaded in order after the kernel when running in full system mode.
Change-Id: I06f57c6a65a17b02eb4267bed0aa829f21bcfa3b Reviewed-on: https://gem5-review.googlesource.com/5703 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12235:95ab7b9d1c57 |
28-Oct-2017 |
Alec Roelke <ar4jc@virginia.edu> |
sim-se: Add prlimit system call
Some ISAs (namely RISC-V) implement getrlimit and setrlimit using prlimit. This patch adds an implementation for the prlimit system call. Normally prlimit is supposed to provide the functionality of both getrlimit and setrlimit, but because gem5 does not support setrlimit this implementation of prlimit will simply display a warning and return a failure code if the setrlimit mode is used. The same thing will happen if a pid other than 0 is passed to it.
Change-Id: I653af2d5a60e716f4d6286196be7600409efcef8 Reviewed-on: https://gem5-review.googlesource.com/5321 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12206:dd72486d1dbc |
18-Sep-2017 |
Rico Amslinger <rico.amslinger@informatik.uni-augsburg.de> |
sim-se: Fix mremap for downward growing mmap regions
mremapFunc(...) did not respect Process::mmapGrowsDown(). This resulted in an attempt to remap into an already allocated region and a panic in FuncPageTable::allocate(...). This behavior can be observed in 435.gromacs.
Change-Id: Ib3ad33816126c76506d69679bdcefa7a98ef69f9 Reviewed-on: https://gem5-review.googlesource.com/4700 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
12203:4fa428be5f7e |
03-Sep-2017 |
Bjoern A. Zeeb <baz21@cam.ac.uk> |
sim: make compile on FreeBSD prior to 11
FreeBSD before the early 11 development is expecting a char * for stack.ss_sp rather than the standards compliant void *. Catch that case and allow gem5 to compile on old FreeBSD versions.
Change-Id: Ic0ae560b52bfe5b3905ae87df791d349e053ec97 Reviewed-on: https://gem5-review.googlesource.com/4660 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12188:426168f1ba0d |
01-Sep-2017 |
Gabe Black <gabeblack@google.com> |
mem: Record the request master ID in the PacketInfo structure.
That can be recorded in a packet trace.
Change-Id: I3813ab4ea5aadeb40b355ff01f10e8ecab2bb790 Reviewed-on: https://soc-sim-internal-review.googlesource.com/3482 Reviewed-by: Rahul Thakur <rjthakur@google.com> Reviewed-on: https://gem5-review.googlesource.com/4780 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> |
12185:90a329add771 |
18-Sep-2017 |
Gabe Black <gabeblack@google.com> |
sim: Stop using loadState in the Root SimObject.
The primary difference between using loadState and letting the default implementation of loadState call unserialize is that whether or not that code is called is dependent on that object being associated with a section in the checkpoint file being unserialized. Since there's always a "root" object, there should always be a section for it in the checkpoint and those should be equivalent.
This removes one custom implementation of the loadState function.
Change-Id: Ia674ccc18e141f38746e22ccfddc21475b1a0731 Reviewed-on: https://gem5-review.googlesource.com/4740 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12158:c66cf095928d |
27-Jul-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Use named constants for pseudo ops
Use named constants from a shared header instead of magic values when handling pseudo ops.
Change-Id: If157060bbcd772ce7e8556482b44ca714f4319b1 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4262 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12145:9079b93ac9d4 |
21-Jun-2017 |
Jose Marinho <jose.marinho@arm.com> |
sim: Prevent segfault in the wakeCpu m5op if id is invalid
Change-Id: I86229cedb206e10326cdee3f09a5c871e49c8d48 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3965 |
12141:0d5750e8c0b0 |
28-Jun-2017 |
Sean Wilson <spwilson2@wisc.edu> |
sim, x86: Make clone a virtual function
This fixes the function call to clone in syscall_emul.hh where the x86 version should be called before the base implementation of clone.
Change-Id: Iccd2f680ff6e3a5536037d688a80ab3f236bbd98 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3902 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12125:0066d9926c1a |
27-Jun-2017 |
Sean Wilson <spwilson2@wisc.edu> |
sim, gdb: Refactor some Event subclasses into lambdas
Change-Id: If3e4329204f27eda96b50ec6ac279ebc6ef23d99 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3921 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12122:20512f6810d7 |
28-Jun-2017 |
Jose Marinho <jose.marinho@arm.com> |
cpu, sim: Add param to force CPUs to wait for GDB
By setting the BaseCPU parameter wait_for_dbg_connection, the GDB server blocks during initialisation waiting for the remote debugger to connect before starting the simulated CPU.
Change-Id: I4d62c68ce9adf69344bccbb44f66e30b33715a1c [ Update info message to include remote GDB port, rename param. ] Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3963 Reviewed-by: Gabe Black <gabeblack@google.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> |
12113:bdf1545c9919 |
13-Jun-2017 |
Jose Marinho <jose.marinho@arm.com> |
sim: Fix clashing stat names in TickedObject and Ticked
Change tickCycles numCycles stat name to totalTickCycles os as not to clash with the name of the tickCycles stat of the same class. Declared the params passed to the TickedObject constructer as const. Call ClockedObject::regStats() from the TickedObject::regStats to ensure the correct initialization of the base class (ClockedObject) stats
Change-Id: I6cf5bbe10fa27f2ad0e31d9f70ec3be47fe41455 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3964 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12109:f29e9c5418aa |
05-Apr-2017 |
Rekai Gonzalez-Alberquilla <Rekai.GonzalezAlberquilla@arm.com> |
cpu: Added interface for vector reg file
This patch adds some more functionality to the cpu model and the arch to interface with the vector register file.
This change consists mainly of augmenting ThreadContexts and ExecContexts with calls to get/set full vectors, underlying microarchitectural elements or lanes. Those are meant to interface with the vector register file. All classes that implement this interface also get an appropriate implementation.
This requires implementing the vector register file for the different models using the VecRegContainer class.
This change set also updates the Result abstraction to contemplate the possibility of having a vector as result.
The changes also affect how the remote_gdb connection works.
There are some (nasty) side effects, such as the need to define dummy numPhysVecRegs parameter values for architectures that do not implement vector extensions.
Nathanael Premillieu's work with an increasing number of fixes and improvements of mine.
Change-Id: Iee65f4e8b03abfe1e94e6940a51b68d0977fd5bb Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> [ Fix RISCV build issues and CC reg free list initialisation ] Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2705 |
12100:5f19ea125548 |
17-May-2017 |
Curtis Dunham <Curtis.Dunham@arm.com> |
kvm: move Kvm check from ARM Kvm GIC to System
The check was nearly completely generic anyway, with the exception of the Kvm CPU type.
This will make it easier for other parts of the codebase to do similar checks.
Change-Id: Ibfdd3d65e9e6cc3041b53b73adfabee1999283da Reviewed-on: https://gem5-review.googlesource.com/3540 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12089:ab37c4e77c49 |
20-Jun-2017 |
Jason Lowe-Power <jason@lowepower.com> |
sim: Updated ClockedObject power state warning
To prevent this warning from printing for *every* simulation, this patch adds a check to only print the warning if we are not at the beginning of simulation.
Change-Id: I7f6154f0ca26bef6280f909f799aa1c7936b624a Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/3840 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12088:ffd7952e9929 |
08-Jun-2017 |
Sean Wilson <spwilson2@wisc.edu> |
sim, x86: Replace EventWrapper use with EventFunctionWrapper
Change-Id: Ie1df07b70776208fc3631a73d403024636fc05a9 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3749 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
12082:ffa559ffeecc |
06-Jun-2017 |
Sean Wilson <spwilson2@wisc.edu> |
sim: Add generic EventFunctionWrapper
Add EventFunctionWrapper, an event wrapper which takes any callable object to use as its callback. (This includes c++ lambdas, function pointers, bound functions, and std::functions.)
Change-Id: Iab140df47bd0f7e4b3fe3b568f9dd122a43cee1c Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3743 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> |
12080:2e61522397dd |
06-Jun-2017 |
Sean Wilson <spwilson2@wisc.edu> |
sim: Remove DelayFunction
`DelayFunction` is unused.
Change-Id: I28aa756054c9b121fe4cfa65c393366f26ccb128 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3741 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
12044:3fbbaad9c5cc |
24-May-2017 |
Gabe Black <gabeblack@google.com> |
x86: sim: Make 32 bit x86 processes work again.
When the LiveProcess class was renamed to be just Process, the CL author also changed the syscall function from a virtual function into a regular one. Unfortunately, the I386Process class overrode the syscall function to adjust the return address so that control would return to the right place. Without that adjustment, 32 bit x86 process would segfault and die immediately after their first system call.
This change reinstates the virtual specifier on the base syscall function, and adds an override keyword on the I386Process's version so that it won't be orphaned again in the future. It also fixes some small style issues the style checker script complained about.
Change-Id: I0d1178ea0eda6676050c8fc043820a2bb4d99c0d Reviewed-on: https://gem5-review.googlesource.com/3500 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
12040:8cd9d09aac7a |
10-May-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add hooks to implement event reference counting
We currently only support deleting an event if it is triggered and not re-scheduled. This is fine for most native code. However, there are cases where Python needs to count references to make sure that the Python object stays live while the native object is live.
Generalise the mechanism used to implement by adding reference counting hooks to the event base class:
* Event::acquire() / Event::acquireImpl() * Event::release() / Event::releaseImpl()
These calls can be used to implement both reference counting and the existing AutoDelete functionality. The default implementation in Event maintains backwards compatibility with the existing AutoDelete feature by ignoring acquireImpl() and deleting the event on releaseImpl() if it isn't scheduled anymore.
Since AutoDelete functionality is no longer the only way events can be managed, this change introduces the new Managed flag. This flag activates automatic memory management. The acquireImpl()/releaseImpl() methods are only called from acquire()/release() it is set. To maintain backwards compatibility, AutoDelete is used as an alias for Managed.
Change-Id: I5637984c906a9d44c22780712cf1c521b8297149 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3221 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12032:d218c2fe9440 |
18-May-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
base, sim, arch: Fix clang 5.0 warnings
Compiling gem5 with recent version of clang (4 and 5) triggers warnings that are treated as errors:
* Global templatized static functions result in a warning if they are not used. These should either be declared as static inline or without the static identifier to avoid the warning.
* Some templatized classes contain static variables. The instantiated versions of these variables / templates need to be explicitly declared to avoid a compiler warning.
Change-Id: Ie8261144836e94ebab7ea04ccccb90927672c257 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3420 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
12018:eb31fcce5ef7 |
10-May-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
syscall_emul: Fix undefined macro behavior
Clang's UBSAN implementation complains about macros that expand to expressions that contain 'defined'. Explicitly set the various feature macros to 1 or 0 to avoid this issue.
Change-Id: Iba239dacfe526c43ab9c5da5183a350fc4fdc57d Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3241 |
11994:211df6a05c5e |
02-May-2017 |
Alexandru Dutu <alexandru.dutu@amd.com> |
syscall_emul: Argument retrieval bug fix
This commit fixes a stack-buffer underflow by fixing the way the array is indexed.
Change-Id: I44400e2b99a2f8e1f48f673cd110b9dcd6480a72 Reviewed-on: https://gem5-review.googlesource.com/3040 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
11990:5fad911cc326 |
29-Jan-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
base, sim, dev: Remove SWIG
Remove SWIG guards and SWIG-specific C++ code.
Change-Id: Icaad6720513b6f48153727ef3f70e0dba0df4bee Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2921 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> |
11988:665cd5f8b52b |
27-Feb-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
python: Use PyBind11 instead of SWIG for Python wrappers
Use the PyBind11 wrapping infrastructure instead of SWIG to generate wrappers for functionality that needs to be exported to Python. This has several benefits:
* PyBind11 can be redistributed with gem5, which means that we have full control of the version used. This avoid a large number of hard-to-debug SWIG issues we have seen in the past.
* PyBind11 doesn't rely on a custom C++ parser, instead it relies on wrappers being explicitly declared in C++. The leads to slightly more boiler-plate code in manually created wrappers, but doesn't doesn't increase the overall code size. A big benefit is that this avoids strange compilation errors when SWIG doesn't understand modern language features.
* Unlike SWIG, there is no risk that the wrapper code incorporates incorrect type casts (this has happened on numerous occasions in the past) since these will result in compile-time errors.
As a part of this change, the mechanism to define exported methods has been redesigned slightly. New methods can be exported either by declaring them in the SimObject declaration and decorating them with the cxxMethod decorator or by adding an instance of PyBindMethod/PyBindProperty to the cxx_exports class variable. The decorator has the added benefit of making it possible to add a docstring and naming the method's parameters.
The new wrappers have the following known issues:
* Global events can't be memory managed correctly. This was the case in SWIG as well.
Change-Id: I88c5a95b6cf6c32fa9e1ad31dfc08b2e8199a763 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Andrew Bardsley <andrew.bardsley@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2231 Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
11972:9503a0d8c352 |
06-Apr-2017 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
power: Allow global stats in power equations
Allow global stats such as sim_seconds in power equations to make it possible to convert from event stats to rate stats.
Change-Id: I429abe0ffadc0dbd162eb39e0897143be472ef65 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2720 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
11969:206f7111d5aa |
06-Apr-2017 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
power: Clarify the unit used for the power equations (W)
Change-Id: Iab5070fc9b666fcb5b49b0e2b99a4a1605b3b721 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11968:f5da4fc4a6ff |
05-Apr-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
power: Add a voltage variable to power expressions
There is currently no good way of extracting the current operating voltage in MathExprPowerModels. This change adds a magic variable, 'voltage', that can be referenced from such expressions to get the current operating voltage.
Change-Id: Ice3c9a4a221921a542de5da52f83f3f88862d246 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2662 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11967:e963e6ce139b |
05-Apr-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
power: Add error checking to MathExprPowerModel
MathExprPower model currently doesn't print any useful error messages if an expression fails to evaluate. To add insult to injury, the model only detects a failure when dumping stats and not at initialization. This change adds a verification step in startup() that ensures that all of the referenced stats actually exist.
Change-Id: I8f71c73341578d5882c8d93e482f5383fbda5f1d Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2661 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11937:e6621fafa62d |
28-Mar-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Handle cases where Drainable::resume() creates objects
There are cases where Drainable objects need to create new objects in Drainable::resume(). In such cases, the local drain state will be inherited from the DrainManager. We currently set the state to Running as soon as we start resuming the simulator. This means that new objects are created in the Running state rather than the Drained state, which the resume code assumes. Depending on the traversal order in DrainManager::resume(), this sometimes triggers a panic because the object being resumed is in the wrong state.
This change introduces a new drain state, Resuming, that the DrainManager enters as soon as it starts resuming the simulator. Objects that are created while resuming are created in this state. Such objects are then resumed in a subsequent pass over the list of Drainable objects that need to be resumed. Once all objects have been resumed, the simulator enters the Running state.
Change-Id: Ieee8645351ffbdec477e9cd2ff86fc795e459617 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2600 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Weiping Liao <weipingliao@google.com> |
11920:fd3d65d70951 |
28-Jan-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Hotfix for FreeBSD/Mac builds
The clone system call added in 236719892 relies on header files from Linux systems. Obviously, this prevents compilation for anyone using FreeBSD or Mac to compile the simulator. This changeset is meant as a temporary fix to allow builds on non-Linux systems until a proper solution is found.
Change-Id: I404cc41c588ed193dd2c1ca0c1aea35b0786fe4e Reviewed-on: https://gem5-review.googlesource.com/2420 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
11919:54c2e390fc22 |
15-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: change NULL to nullptr in Process files
Change-Id: I9ff21092876593237f919e9f7fb7283bd865ba2e Reviewed-on: https://gem5-review.googlesource.com/2421 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com> |
11913:427ac0f00e57 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
style: change NULL to nullptr in syscall files
Change-Id: I02719f3572f6665cace1eb5681f297dcde9e71ce Reviewed-on: https://gem5-review.googlesource.com/2271 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11911:fecd8de0ec8e |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Rewrite system call exit code
The changeset does a major refactor on the exit, exit_group, and futex system calls regarding exit functionality.
A FutexMap class and related structures are added into a new file. This increases code clarity by encapsulating the futex operations and the futex state into an object.
Several exit conditions were added to allow the simulator to end processes under certain conditions. Also, the simulation only exits now when all processes have finished executing.
Change-Id: I1ee244caa9b5586fe7375e5b9b50fd3959b9655e Reviewed-on: https://gem5-review.googlesource.com/2269 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
11910:b33a207489a2 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Add the tgkill system call
This changeset adds support to kill a thread group by calling the tgkill system call. The functionality is needed in some pthread applications.
Change-Id: I0413a3331be69b74dfab30de95384113ec4efb63 Reviewed-on: https://gem5-review.googlesource.com/2268 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> |
11909:71fb1f21e9d6 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Adds SE mode signal feature
This changeset adds a simple class definition and a member in the System object to track signals sent between processes. The implementation cannot support all signals that might be sent between processes, but it can support some of the simple use cases like SIGCHLD.
Change-Id: Id5f95aa60e7f49da1c5b5596fbfa26e729453ac7 Reviewed-on: https://gem5-review.googlesource.com/2267 Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11908:2fd0307d03e9 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Add or extend dup, dup2, and pipe
This changeset extends the pipe system call to work with architectures other than Alpha (and enables the syscall for x86). For the dup system call, it sets the clone-on-exec flag by default. For the dup2 system call, the changeset adds an implementation (and enables it for x86).
Change-Id: I00ddb416744ee7dd61a5cd02c4c3d97f30543878 Reviewed-on: https://gem5-review.googlesource.com/2266 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> |
11907:48a3d32da9d8 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Add functionality to open syscalls
This changeset adds refactors the existing open system call, adds the openat variant (enabled for x86 builds), and adds additional "special file" test cases for /proc/meminfo and /etc/passwd.
Change-Id: I6f429db65bbf2a28ffa3fd12df518c2d0de49663 Reviewed-on: https://gem5-review.googlesource.com/2265 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> |
11906:4b99c1bb3b72 |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
style: Correct some style issues
This changeset fixes line alignment issues, spacing, spelling, etc. for files that are used during SE Mode.
Change-Id: Ie61b8d0eb4ebb5af554d72f1297808027833616e Reviewed-on: https://gem5-review.googlesource.com/2264 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> |
11905:4a771f8756ad |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Move memState into its own file
The Process class is full of implementation details and structures related to SE Mode. This changeset factors out an internal class from Process and moves it into a separate file. The purpose behind doing this is to clean up the code and make it a bit more modular.
Change-Id: Ic6941a1657751e8d51d5b6b1dcc04f1195884280 Reviewed-on: https://gem5-review.googlesource.com/2263 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> |
11899:d04da1f9c961 |
27-Feb-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
power: Avoid forward declarations that confuse wrappers
The Python wrappers get confused by the forward declarations in the power framework. This changeset restructures the code slightly to avoid the troublesome forward declarations.
Change-Id: Id8c93224f1988edb5fdf9d3abc6237f2f688c02d Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2227 Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11894:3afbe563324c |
01-Mar-2017 |
Brandon Potter <Brandon.Potter@amd.com> |
syscall-emul: Remove unused class and member
The WaitRec structure in the Process class is unnecessary. There is a member declaration inside of the Process class, waitList, that uses the WaitRec definition. However, waitList is unused so they are both dead bits of code. This changeset removes both the WaitRec struct and waitList member from Process.
Change-Id: Ia6ee7488b9f47fd0f0ae29c818fba6ea0710699c Reviewed-on: https://gem5-review.googlesource.com/2262 Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> |
11886:43b882cada33 |
27-Feb-2017 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [PATCH 15/22] add clone/execve for threading and multiprocess simulations
Modifies the clone system call and adds execve system call. Requires allowing processes to steal thread contexts from other processes in the same system object and the ability to detach pieces of process state (such as MemState) to allow dynamic sharing. |
11885:79af314e9f0d |
27-Feb-2017 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 14/22] adds identifier system calls
This changeset add fields to the process object and adds the following three system calls: setpgid, gettid, getpid. |
11877:5ea85692a53e |
20-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 13/22] add system call retry capability
This changeset adds functionality that allows system calls to retry without affecting thread context state such as the program counter or register values for the associated thread context (when system calls return with a retry fault).
This functionality is needed to solve problems with blocking system calls in multi-process or multi-threaded simulations where information is passed between processes/threads. Blocking system calls can cause deadlock because the simulator itself is single threaded. There is only a single thread servicing the event queue which can cause deadlock if the thread hits a blocking system call instruction.
To illustrate the problem, consider two processes using the producer/consumer sharing model. The processes can use file descriptors and the read and write calls to pass information to one another. If the consumer calls the blocking read system call before the producer has produced anything, the call will block the event queue (while executing the system call instruction) and deadlock the simulation.
The solution implemented in this changeset is to recognize that the system calls will block and then generate a special retry fault. The fault will be sent back up through the function call chain until it is exposed to the cpu model's pipeline where the fault becomes visible. The fault will trigger the cpu model to replay the instruction at a future tick where the call has a chance to succeed without actually going into a blocking state.
In subsequent patches, we recognize that a syscall will block by calling a non-blocking poll (from inside the system call implementation) and checking for events. When events show up during the poll, it signifies that the call would not have blocked and the syscall is allowed to proceed (calling an underlying host system call if necessary). If no events are returned from the poll, we generate the fault and try the instruction for the thread context at a distant tick. Note that retrying every tick is not efficient.
As an aside, the simulator has some multi-threading support for the event queue, but it is not used by default and needs work. Even if the event queue was completely multi-threaded, meaning that there is a hardware thread on the host servicing a single simulator thread contexts with a 1:1 mapping between them, it's still possible to run into deadlock due to the event queue barriers on quantum boundaries. The solution of replaying at a later tick is the simplest solution and solves the problem generally. |
11876:39bff8406c3b |
20-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
style: [patch 12/22] fix preliminary style issues for subsequent fault patch
This changeset add spaces in a few spots and removes an unnecessary comment. |
11875:8e928c0f98d1 |
20-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 11/22] extend functionality of fcntl
This changeset adds the ability to set a close-on-exec flag for a given file descriptor. It also reworks some of the logic surrounding setting and retrieving flags from the file description. |
11859:76c36516e0ae |
19-Feb-2017 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Ensure draining is deterministic
The traversal of drainable objects could potentially be non-deterministic when using an unordered set containing object pointers. To ensure that the iteration is deterministic, we switch to a vector. Note that the lookup and traversal of the drainable objects is not performance critical, so the change has no negative consequences. |
11856:103e2f92c965 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 10/22] refactor fdentry and add fdarray class
Several large changes happen in this patch.
The FDEntry class is rewritten so that file descriptors now correspond to types: 'File' which is normal file-backed file with the file open on the host machine, 'Pipe' which is a pipe that has been opened on the host machine, and 'Device' which does not have an open file on the host yet acts as a pseudo device with which to issue ioctls. Other types which might be added in the future are directory entries and sockets (off the top of my head).
The FDArray class was create to hold most of the file descriptor handling that was stuffed into the Process class. It uses shared pointers and the std::array type to hold the FDEntries mentioned above.
The changes to these two classes needed to be propagated out to the rest of the code so there were quite a few changes for that. Also, comments were added where I thought they were needed to help others and extend our DOxygen coverage. |
11855:c706f4ab5dd7 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 9/22] remove unused global variable (num_processes) |
11854:0e94e16e26ea |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 8/22] refactor process class
Moves aux_vector into its own .hh and .cc files just to get it out of the already crowded Process files. Arguably, it could stay there, but it's probably better just to move it and give it files.
The changeset looks ugly around the Process header file, but the goal here is to move methods and members around so that they're not defined randomly throughout the entire header file. I expect this is likely one of the reasons why I several unused variables related to this class. So, the methods are declared first followed by members. I've tried to aggregate them together so that similar entries reside near one another.
There are other changes coming to this code so this is by no means the final product. |
11853:4fb5223f1e0c |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 7/22] remove numCpus method
The numCpus method is misleading in that it's not really a measure of how many CPUs might be executing a process, but how many thread contexts are assigned to the process at any given point in time.
It's nice to highlight this distinction because thread contexts are never reused in the same way that a CPU can be reused for multiple processes. The reason that there is no reuse is that there is no CPU scheduler for SE.
The tru64 code intends to use this method and the accompanying contextIDs field to support SMT and track the number of threads with some system calls. With the up coming clone and exec patches, this paradigm must change. There needs to be a 1:1 mapping between the thread contexts and processes so that the process state between threads is allowed to vary when needed by Linux. This should not break SMT for tru64 if the Process class is refactored so that multiple Processes can share state between themselves. The following patches will do the refactoring incrementally as features are added. |
11852:df43a146a38a |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 6/22] remove unused fields from Process class
It looks like tru64 has some nxm* system calls, but the two fields that are defined in the Process class are unused by any of the code. There doesn't appear to be any reference in the tru64 code. |
11851:824055fe6b30 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 5/22] remove LiveProcess class and use Process instead
The EIOProcess class was removed recently and it was the only other class which derived from Process. Since every Process invocation is also a LiveProcess invocation, it makes sense to simplify the organization by combining the fields from LiveProcess into Process. |
11849:762d3c8e55f4 |
17-Feb-2017 |
Brandon Potter <brandon.potter@amd.com> |
sim: fix out-of-bounds error in syscall_desc |
11839:dd6df2e47c14 |
14-Feb-2017 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim, kvm: make KvmVM a System parameter
A KVM VM is typically a child of the System object already, but for solving future issues with configuration graph resolution, the most logical way to keep track of this object is for it to be an actual parameter of the System object.
Change-Id: I965ded22203ff8667db9ca02de0042ff1c772220 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11838:0b311345ac72 |
14-Feb-2017 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim,kvm,arm: fix typos
Change-Id: Ifc65d42eebfd109c1c622c82c3c3b3e523819e85 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11815:8caffc398ae7 |
09-Feb-2017 |
Christian Menard <Christian.Menard@tu-dresden.de> |
misc: Fix order of object construction in the CxxConfigManager
The CxxConfigManager schould create objects by traversing the object tree starting from the root object. However, currently objects are created in aplphabetical order, which only works if the root object alphabetically comes before any system object (e.g. 'root' < 'system'. Otherwise (e.g. 'a_system' < 'root'), object construction may fail. The reason for this behaviour is, that the call to findObject() in the sorting code also constructs the object if it is not yet existent. Then findTraversalOrder() calls findObject("root") and subseqeuently calls findObject() on all the children, and so on. However, the call to findTraversalOrder() is redundant, since all objects are already created in alphabetical order. This patch simply removes the alphabetical ordering, leading to the objects being created starting from 'root'.
Reviewed at http://reviews.gem5.org/r/3778/
Signed-off-by: Jason Lowe-Power <jason@lowepower.com> |
11813:d0586994a10e |
09-Feb-2017 |
Bjoern A. Zeeb <baz21@cam.ac.uk> |
sim: fix build breakage in process.cc after brandon@11801
Seeing build breakage after brandon@11801:
[ CXX] X86/sim/process.cc -> .o build/X86/sim/process.cc:137:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast<PageTableBase *>(new ArchPageTable(name(), _pid, system)) : ^ build/X86/sim/process.cc:138:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast<PageTableBase *>(new FuncPageTable(name(), _pid))), ^ 2 errors generated.
Testing Done: Compiles now on FreeBSD 10 with clang.
Reviewed at http://reviews.gem5.org/r/3804/
Signed-off-by: Jason Lowe-Power <jason@lowepower.com> |
11812:30aada507f03 |
09-Feb-2017 |
Bjoern A. Zeeb <baz21@cam.ac.uk> |
sim: Patch to fix the statfs build
See developers mailing list. Trying to unbreak statfs.
Testing Done: Builds on FreeBSD now.
Reviewed at http://reviews.gem5.org/r/3803/
Signed-off-by: Jason Lowe-Power <jason@lowepower.com> |
11808:f254d8a17da9 |
07-Feb-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
style: Force Python.h to be included before main header
Python's header files set various compiler macros (e.g., _XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings that end up being treated as errors. The Python integration manual [1] strongly recommends that Python.h is included before any system header. The style guide used to mandate that Python.h is included first in any file that needs it. This requirement was changed to always include a source file's main header first, which ended up triggering these errors.
This change updates the style checker to always include Python.h before the main header file.
[1] https://docs.python.org/2/extending/extending.html
Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr> |
11801:cd7f3a1dbf55 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 4/22] remove redundant M5_pid field from process |
11800:54436a1784dc |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
style: [patch 3/22] reduce include dependencies in some headers
Used cppclean to help identify useless includes and removed them. This involved erroneously included headers, but also cases where forward declarations could have been used rather than a full include. |
11799:e47703369039 |
20-Jan-2017 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: #ifdef new system calls to allow builds on OSX and BSD |
11794:97eebddaae84 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: [patch 2/22] move SyscallDesc into its own .hh and .cc
The class was crammed into syscall_emul.hh which has tons of forward declarations and template definitions. To clean it up a bit, moved the class into separate files and commented the class with doxygen style comments. Also, provided some encapsulation by adding some accessors and a mutator.
The syscallreturn.hh file was renamed syscall_return.hh to make it consistent with other similarly named files in the src/sim directory.
The DPRINTF_SYSCALL macro was moved into its own header file with the include the Base and Verbose flags as well. |
11793:ef606668d247 |
09-Nov-2016 |
Brandon Potter <brandon.potter@amd.com> |
style: [patch 1/22] use /r/3648/ to reorganize includes |
11789:c10c50cb8ac9 |
03-Jan-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove declaration of unused CountedDrainEvent
The CountedDrainEvent event was used to keep track of objects that required additional simulation to drain. It was removed as a part of the great drain rewrite, but the declaration remained.
Change-Id: I767a3213669040d3f27e2afafa2e4a5bb997e325 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> |
11787:af41594e9b3c |
02-Jan-2017 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove redundant export_method_cxx_predecls
The headers declared in export_method_cxx_predecls are redundant since a SimObject's main header is automatically included.
Change-Id: Ied9e84630b36960e54efe91d16f8c66fba7e0da0 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Joe Gross <joseph.gross@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> |
11785:6dc9ab9b2294 |
23-Dec-2016 |
Joel Hestness <jthestness@gmail.com> |
sim: Fix SE mode checkpoint restore file handling
When restoring from a checkpoint, the simulation used to use file handles from the checkpoint. This disallows multiple separate restore simulations from using separate input and output files and directories, and plays havoc when the checkpointed file locations may have changed. Add handling to allow the command line specified files to be used as input/output for the restored simulation (Note: this is the similar functionality to FS mode for output and error). |
11763:302c6b957854 |
19-Dec-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove redundant buildEnv import
Change-Id: Id6bdbc0c988aa92b96e292cabc913e6b974f14bb Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> |
11760:f9aa72424274 |
15-Dec-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: implement fallocate |
11759:deaf82fd2e7c |
15-Dec-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: add support for x86 statfs system calls |
11758:104a404d426e |
15-Dec-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: extend sysinfo system call to include mem_unit |
11723:0596db108c53 |
30-Nov-2016 |
Alec Roelke <ar4jc@virginia.edu> |
arch: [Patch 1/5] Added RISC-V base instruction set RV64I
First of five patches adding RISC-V to GEM5. This patch introduces the base 64-bit ISA (RV64I) in src/arch/riscv for use with syscall emulation. The multiply, floating point, and atomic memory instructions will be added in additional patches, as well as support for more detailed CPU models. The loader is also modified to be able to parse RISC-V ELF files, and a "Hello world\!" example for RISC-V is added to test-progs.
Patch 2 will implement the multiply extension, RV64M; patch 3 will implement the floating point (single- and double-precision) extensions, RV64FD; patch 4 will implement the atomic memory instructions, RV64A, and patch 5 will add support for timing, minor, and detailed CPU models that is missing from the first four patches (such as handling locked memory).
[Removed several unused parameters and imports from RiscvInterrupts.py, RiscvISA.py, and RiscvSystem.py.] [Fixed copyright information in RISC-V files copied from elsewhere that had ARM licenses attached.] [Reorganized instruction definitions in decoder.isa so that they are sorted by opcode in preparation for the addition of ISA extensions M, A, F, D.] [Fixed formatting of several files, removed some variables and instructions that were missed when moving them to other patches, fixed RISC-V Foundation copyright attribution, and fixed history of files copied from other architectures using hg copy.] [Fixed indentation of switch cases in isa.cc.] [Reorganized syscall descriptions in linux/process.cc to remove large number of repeated unimplemented system calls and added implmementations to functions that have received them since it process.cc was first created.] [Fixed spacing for some copyright attributions.] [Replaced the rest of the file copies using hg copy.] [Fixed style check errors and corrected unaligned memory accesses.] [Fix some minor formatting mistakes.] Signed-off by: Alec Roelke
Signed-off by: Jason Lowe-Power <jason@lowepower.com> |
11705:d40bdd3c5778 |
17-Nov-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
alpha: Remove ALPHA tru64 support and associated tests
No one appears to be using it, and it is causing build issues and increases the development and maintenance effort. |
11703:08b78e0a3717 |
26-Oct-2016 |
Michael LeBeane <michael.lebeane@amd.com> |
dev: Add m5 op to toggle synchronization for dist-gem5. This patch adds the ability for an application to request dist-gem5 to begin/ end synchronization using an m5 op. When toggling on sync, all nodes agree on the next sync point based on the maximum of all nodes' ticks. CPUs are suspended until the sync point to avoid sending network messages until sync has been enabled. Toggling off sync acts like a global execution barrier, where all CPUs are disabled until every node reaches the toggle off point. This avoids tricky situations such as one node hitting a toggle off followed by a toggle on before the other nodes hit the first toggle off. |
11684:b3c3893811af |
15-Oct-2016 |
Nicolas Derumigny <nderumigny@gmail.com> |
syscall: read() should not write anything if reading EOF.
Read() should not write anything when returning 0 (EOF). This patch does not correct the same bug occuring for :
nbr_read=read(file, buf, nbytes)
When nbr_read<nbytes, nbytes bytes are copied into the virtual RAM instead of nbr_read. If buf is smaller than nbytes, a page fault occurs, even if buf is in fact bigger than nbr_read.
Signed-off-by: Jason Lowe-Power <jason@lowepower.com> |
11655:6c21ab852ed2 |
04-Oct-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add a checkpoint function to test for entries
When loading a checkpoint, it's sometimes desirable to be able to test whether an entry within a secion exists. This is currently done automatically in the UNSERIALIZE_OPT_SCALAR macro, but it isn't possible to do for arrays, containers, or enums. Instead of adding even more macros, add a helper function (CheckpointIn::entryExists()) that tests for the presence of an entry.
Change-Id: I4b4646b03276b889fd3916efefff3bd552317dbc Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> |
11627:fe32a5238754 |
13-Sep-2016 |
Michael LeBeane <michael.lebeane@amd.com> |
sim: Refactor quiesce and remove FS asserts The quiesce family of magic ops can be simplified by the inclusion of quiesceTick() and quiesce() functions on ThreadContext. This patch also gets rid of the FS guards, since suspending a CPU is also a valid operation for SE mode. |
11624:9796e43e751d |
13-Sep-2016 |
Michael LeBeane <michael.lebeane@amd.com> |
sim, syscall_emul: Add mmap to EmulatedDriver Add support for calling mmap on an EmulatedDriver file descriptor. |
11594:0d151793b2f3 |
05-Aug-2016 |
Tony Gutierrez <anthony.gutierrez@amd.com> |
sim: fix issues with pwrite(); don't enable fstatfs
this patch fixes issues with changeset 11593
use the host's pwrite() syscall for pwrite64Func(), as opposed to pwrite64(), because pwrite64() does not work well on all distros.
undo the enabling of fstatfs, as we will add this in a separate pate. |
11593:ba45735a726a |
04-Aug-2016 |
Tony Gutierrez <anthony.gutierrez@amd.com> |
x86, sim: add some syscalls to X86
this patch adds an implementation for the pwrite64 syscall and enables it for x86_64, and enables fstatfs for x86_64. |
11567:560d7fbbddd1 |
21-Jul-2016 |
Mitch Hayenga <mitch.hayenga@arm.com> |
cpu: Add SMT support to MinorCPU
This patch adds SMT support to the MinorCPU. Currently RoundRobin or Random thread scheduling are supported.
Change-Id: I91faf39ff881af5918cca05051829fc6261f20e3 |
11548:91f58918a76a |
28-Jun-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
scons: Track swig packages when loading embedded swig code
This patch changes how the embedded swig code is loaded to ensure that gem5 works with swig 3.0.9. For Python 2.7 and above, swig 3.0.9 now relies on importlib, and actually looks in the appropriate packages, even for the wrapped C code. However, the swig wrapper does not explicitly place the module in the right package (it just calls Py_InitModule), and we have to take explicit action to ensure that the swig code can be loaded. This patch adds the information to the generated wrappers and the appropriate calls to set the context as part of the swig initialisation.
Previous versions of swig used to fall back on looking in the global namespace for the wrappers (and still do for Python 2.6), but technically things should not work without the functionality in this patch. |
11545:17b2ccafd139 |
20-Jun-2016 |
Reiley Jeapaul <Reiley.Jeyapaul@arm.com> |
sim: Added library include to fix build errors on clang-703.0.31
The use of array tuples, requires an explicit include of the array library
Change-Id: I06730051777a97edf80e41a5604184b387b12239 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11532:05ac17048f55 |
07-Jun-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Make clang happy
Once again appeasing clang. |
11531:76d0e456a9a9 |
07-Jun-2016 |
Sergei Trofimov <sergei.trofimov@arm.com> |
sim: added missing include to mathexpr.hh
mathexpr.hh uses std::function<> but was not including the appropriate header, which resulted in an error
build/ARM/sim/mathexpr.hh:51:18: error: 'function' in namespace 'std' does not name a template type typedef std::function<double(std::string)> EvalCallback;
This commit adds the missing include.
Change-Id: I6c01d77d4354c6de838538f137a38f75f9866166 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> |
11529:f17c012ecfa3 |
06-Jun-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Only print the power state transition warning once
A lot of objects seem to request no-op power transitions which currently results in large amounts of warnings. These warnings are benign and risk hiding more serious warnings. Make the warning a warn_once to prevent console flooding.
Change-Id: I86c74b4224b167f14469250ef86ab69fde7a227e Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11528:7ac58128fbc5 |
06-Jun-2016 |
David Guillen Fandos <david.guillen@arm.com> |
pwr: Closing power and thermal feedback loop
This patch makes thermal models use the power figures calculated by power models. Since there is a circular dependency between power and thermal (and thermal was pushed before) this patch closes that loop.
Change-Id: I8bd5acf6a5026fdbbcfac47e33d27397f24a6f7d Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
11527:9007a9729815 |
06-Jun-2016 |
David Guillen Fandos <david.guillen@arm.com> |
sim: Adding support for power models
This patch adds some basic support for power models in gem5.
The power interface is defined so it can interact with thermal models as well. It implements a simple power evaluator that can be used for simple power models that express power in the form of a math expression. These expressions can use stats within the same SimObject (or down its hierarchy) and some magic variables such as "temp" for temperature. In future patches we will extend this functionality to allow slightly more complex expressions.
The model allows it to be extended to use other kinds of models.
Change-Id: I76752f9638b6815e229fd74cdcb7721a305cbc4b |
11525:00ed0c11f4a3 |
06-Jun-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
stats: Silence unused power stats
The power stats are currently very noisy even if no power model has been loaded. Silence stats that are either zero or nan.
Change-Id: I7d0220c2fcf01131084a219228f140cfaddaf95b Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11524:3101ce98c55c |
06-Jun-2016 |
David Guillen Fandos <david.guillen@arm.com> |
pwr: Add power states to ClockedObject
Add 4 power states to the ClockedObject, provides necessary access functions to check and update the power state. Default power state is UNDEFINED, it is responsibility of the respective simulation model to provide the startup state and any other logic for state change. Add number of transition stat. Add distribution of time spent in clock gated state. Add power state residency stat. Add dump call back function to allow stats update of distribution and residency stats.
Change-Id: Id086090a2ed720c9fcb37812a3c98f0f724907c6 |
11523:81332eb10367 |
06-Jun-2016 |
David Guillen Fandos <david.guillen@arm.com> |
stats: Fixing regStats function for some SimObjects
Fixing an issue with regStats not calling the parent class method for most SimObjects in Gem5. This causes issues if one adds new stats in the base class (since they are never initialized properly!).
Change-Id: Iebc5aa66f58816ef4295dc8e48a357558d76a77c Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11522:348411ec525a |
06-Jun-2016 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
sim: Call regStats of base-class as well
We want to extend the stats of objects hierarchically and thus it is necessary to register the statistics of the base-class(es), as well. For now, these are empty, but generic stats will be added there.
Patch originally provided by Akash Bagdia at ARM Ltd. |
11442:b31738224fb0 |
12-Apr-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Appease clang...again
Once again, clang is having issues with recently committed code.
Unfortunately HSAIL_X86 is still broken. |
11437:210624864179 |
07-Apr-2016 |
Victor Garcia <victor.garcia@arm.com> |
mem: Add Program Counter to MemTraceProbe |
11430:bd1c6789c33f |
07-Apr-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
Revert to 74c1e6513bd0 (sim: Thermal support for Linux) |
11429:cf5af0cc3be4 |
06-Apr-2016 |
Andreas Sandberg <andreas.sandberg@arm.com> |
Revert power patch sets with unexpected interactions
The following patches had unexpected interactions with the current upstream code and have been reverted for now:
e07fd01651f3: power: Add support for power models 831c7f2f9e39: power: Low-power idle power state for idle CPUs 4f749e00b667: power: Add power states to ClockedObject
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11424:e07fd01651f3 |
05-Apr-2016 |
David Guillen Fandos <david.guillen@arm.com> |
power: Add support for power models
This patch adds some basic support for power models in gem5.
The power interface is defined so it can interact with thermal models as well. It implements a simple power evaluator that can be used for simple power models that express power in the form of a math expression. These expressions can use stats within the same SimObject (or down its hierarchy) and some magic variables such as "temp" for temperature. In future patches we will extend this functionality to allow slightly more complex expressions.
The model allows it to be extended to use other kinds of models.
Finally, the thermal model is updated to use the power usage as input. |
11422:4f749e00b667 |
18-Nov-2014 |
Akash Bagdia <akash.bagdia@ARM.com> |
power: Add power states to ClockedObject
Add 4 power states to the ClockedObject, provides necessary access functions to check and update the power state. Default power state is UNDEFINED, it is responsibility of the respective simulation model to provide the startup state and any other logic for state change.
Add number of transition stat. Add distribution of time spent in clock gated state. Add power state residency stat.
Add dump call back function to allow stats update of distribution and residency stats. |
11420:b48c0ba4f524 |
12-May-2015 |
David Guillen Fandos <david.guillen@arm.com> |
sim: Adding thermal model support
This patch adds basic thermal support to gem5. It models energy dissipation through a circuital equivalent, which allows us to use RC networks. This lays down the basic infrastructure to do so, but it does not "work" due to the lack of power models. For now some hardcoded number is used as a PoC. The solver is embedded in the patch. |
11417:6e89c756e1fb |
11-Dec-2015 |
Sascha Bischoff <sascha.bischoff@arm.com> |
sim: Add additional debug information when draining
This patch adds some additional information when draining the system which allows the user to debug which SimObject(s) in the system is failing to drain. Only enabled for the builds with tracing enabled and is subject to the Drain debug flag being set at runtime. |
11416:a10d9e2ef671 |
01-Apr-2016 |
Sascha Bischoff <sascha.bischoff@ARM.com> |
sim: Fix clock_domain unserialization
This patch addresses an issue with the unserialization of clock domains. Previously, the previous performance level was not restored due to a bug in the code, which detected the post-unserialize update as superfluous. This patch splits the setting of the clock domain into two parts. The original interface of perfLevel is retained, but the actual update takes place in signalPerfLevelUpdate, which is private to the class. The perfLevel method checks that if the new performance level is different to the previous performance level, and will only call signalPerfLevelUpdate if there is a change. Therefore, the performance level is only updated, and voltage domains notified, if there is an actual change. The split functionality allows signalPerfLevelUpdate to be called by startup() to explicitly force an update post unserialization. |
11392:5967db4cff04 |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
base: add symbol support for dynamic libraries
Libraries are loaded into the process address space using the mmap system call. Conveniently, this happens to be a good time to update the process symbol table with the library's incoming symbols so we handle the table update from within the system call.
This works just like an application's normal symbols. The only difference between a dynamic library and a main executable is when the symbol table update occurs. The symbol table update for an executable happens at program load time and is finished before the process ever begins executing. Since dynamic linking happens at runtime, the symbol loading happens after the library is first loaded into the process address space. The library binary is examined at this time for a symbol section and that section is parsed for symbol types with specific bindings (global, local, weak). Subsequently, these symbols are added to the table and are available for use by gem5 for things like trace generation.
Checkpointing should work just as it did previously. The address space (and therefore the library) will be recorded and the symbol table will be entirely recorded. (It's not possible to do anything clever like checkpoint a program and then load the program back with different libraries with LD_LIBRARY_PATH, because the library becomes part of the address space after being loaded.) |
11389:1e55f16160cb |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
base: support dynamic loading of Linux ELF objects in SE mode |
11386:94c09b607a84 |
17-Mar-2016 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: move mmapGrowsDown() to LiveProcess
The mmapGrowsDown() method was a static method on the OperatingSystem class (and derived classes), which worked OK for the templated syscall emulation methods, but made it hard to access elsewhere. This patch moves the method to be a virtual function on the LiveProcess method, where it can be overridden for specific platforms (for now, Alpha).
This patch also changes the value of mmapGrowsDown() from being false by default and true only on X86Linux32 to being true by default and false only on Alpha, which seems closer to reality (though in reality most people use ASLR and this doesn't really matter anymore).
In the process, also got rid of the unused mmap_start field on LiveProcess and OperatingSystem mmapGrowsUp variable. |
11385:dbbf54058f6f |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: fix bugs for mmap2 system call and x86-32 syscalls |
11383:5ac090acd180 |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: extend mmap system call to support file backed mmaps
For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected. |
11380:3370547fa302 |
17-Mar-2016 |
Alexandru Dutu <alexandru.dutu@amd.com> |
syscall_emul: add extra debug support for syscalls
Breaks the debug output from system calls into two levels: Base and Verbose. A macro is added specifically for system calls which allows developers to easily add new debug messages in a consistent manner. The macro also contains a field to print thread IDs along with the CPU ID. |
11379:bfe4c2a8ad36 |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul, style: refactor lseek |
11378:8457e0a24e5d |
17-Mar-2016 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul, style: fix newline issue inside assert |
11367:f85d49a098a7 |
08-Mar-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
syscall_emul: Fix erroneous use of delete
clang correctly points out an erroneous use of delete. |
11366:bbbb3df33d41 |
17-Jun-2015 |
David Guillen Fandos <david.guillen@arm.com> |
sim: Add voltage() function to clocked_object
Adding voltage function which returns the current voltage for a given clocked object. It's handy for power models and similar stuff that need to retrieve voltage. Function frequency() is already there, so I see no reason for not having this one too. |
11360:40be59176869 |
26-Nov-2015 |
Andreas Sandberg <andreas@sandberg.pp.se> |
sim: Add support for notifying Drainable objects of a fork
When forking a gem5 process, some objects need to clean up resources (mainly file descriptions) shared between the child and the parent of the fork. This changeset adds the notifyFork() method to Drainable, which is called in the child process.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se> [sascha.bischoff@arm.com: Rebased patches onto a newer gem5 version] Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11359:b0b976a1ceda |
27-Nov-2015 |
Andreas Sandberg <andreas@sandberg.pp.se> |
base: Add support for changing output directories
This changeset adds support for changing the simulator output directory. This can be useful when the simulation goes through several stages (e.g., a warming phase, a simulation phase, and a verification phase) since it allows the output from each stage to be located in a different directory. Relocation is done by calling core.setOutputDir() from Python or simout.setOutputDirectory() from C++.
This change affects several parts of the design of the gem5's output subsystem. First, files returned by an OutputDirectory instance (e.g., simout) are of the type OutputStream instead of a std::ostream. This allows us to do some more book keeping and control re-opening of files when the output directory is changed. Second, new subdirectories are OutputDirectory instances, which should be used to create files in that sub-directory.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se> [sascha.bischoff@arm.com: Rebased patches onto a newer gem5 version] Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> |
11337:4e3bf51208ba |
13-Feb-2016 |
Michael LeBeane <Michael.Lebeane@amd.com> |
syscall_emul: Implement clock_getres() system call
This patch implements the clock_getres() system call for arm and x86 in linux SE mode. |
11321:02e930db812d |
06-Feb-2016 |
Steve Reinhardt <steve.reinhardt@amd.com> |
style: fix missing spaces in control statements
Result of running 'hg m5style --skip-all --fix-control -a'. |
11320:42ecb523c64a |
06-Feb-2016 |
Steve Reinhardt <steve.reinhardt@amd.com> |
style: remove trailing whitespace
Result of running 'hg m5style --skip-all --fix-white -a'. |
11299:72046b9b3323 |
17-Jan-2016 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: don't ignore SIG_TRAP
By ignoring SIG_TRAP, using --debug-break <N> when not connected to a debugger becomes a no-op. Apparently this was intended to be a feature, though the rationale is not clear.
If we don't ignore SIG_TRAP, then using --debug-break <N> when not connected to a debugger causes the simulation process to terminate at tick N. This is occasionally useful, e.g., if you just want to collect a trace for a specific window of execution then you can combine this with --debug-start to do exactly that.
In addition to not ignoring the signal, this patch also updates the --debug-break help message and deletes a handful of unprotected calls to Debug::breakpoint() that relied on the prior behavior. |
11294:a368064a2ab5 |
11-Jan-2016 |
Andreas Hansson <andreas.hansson@arm.com> |
scons: Enable -Wextra by default
Make best use of the compiler, and enable -Wextra as well as -Wall. There are a few issues that had to be resolved, but they are all trivial. |
11290:1640dd68b0a4 |
07-Jan-2016 |
Gabor Dozsa <gabor.dozsa@arm.com> |
dev: Distributed Ethernet link for distributed gem5 simulations
Distributed gem5 (abbreviated dist-gem5) is the result of the convergence effort between multi-gem5 and pd-gem5 (from Univ. of Wisconsin). It relies on the base multi-gem5 infrastructure for packet forwarding, synchronisation and checkpointing but combines those with the elaborated network switch model from pd-gem5. |
11289:ab19693da8c9 |
07-Jan-2016 |
Gabor Dozsa <gabor.dozsa@arm.com> |
pseudo inst,util: Add optional key to initparam pseudo instruction
The key parameter can be used to read out various config parameters from within the simulated software. |
11273:36dfd27e4a4e |
18-Dec-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Use the old work item behavior by default
When adding an option to forward work items to the Python environment, the new behavior was accidentally enabled by default. Set the value of exit_on_work_items to False by default to revert to the old behavior unless the simulation scripts explicitly requests work item forwarding. |
11270:a3b41de1c4f1 |
14-Dec-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add an option to forward work items to Python
There are cases where we want the Python world to handle work items instead of the C++ world. However, that's currently not possible. This changeset adds the forward_work_items option to the System class. Then it is set to True, work items will generate workbegin/workend simulation exists with the work item ID as the exit code and the old C++ handling is completely bypassed. |
11259:4006183015a1 |
05-Nov-2015 |
Sascha Bischoff <sascha.bischoff@ARM.com> |
sim: Disable gzip compression for writefile pseudo instruction
The writefile pseudo instruction uses OutputDirectory::create and OutputDirectory::openFile to create the output files. However, by default these will check the file extention for .gz, and create a gzip compressed stream if the file ending matches. When writing out files, we want to write them out exactly as they are in the guest simulation, and never want to compress them with gzio. Additionally, this causes m5 writefile to fail when checking the error flags for the output steam.
With this patch we add an additional no_gz argument to OutputDirectory::create and OutputDirectory::openFile which allows us to override the gzip compression. Therefore, for m5 writefile we disable the filename check, and always create a standard ostream. |
11255:8ed230a0b28c |
09-Dec-2015 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: don't check host fd when allocating target fd
There's a well-meaning check in Process::allocFD() to return an invalid target fd (-1) if the incoming host fd is -1. However, this means that emulated drivers, which want to allocate a target fd that doesn't correspond to a host fd, can't use -1 to indicate an intentionally invalid host fd.
It turns out the allocFD() check is redundant, as callers always test the host fd for validity before calling. Also, callers never test the return value of allocFD() for validity, so even if the test failed, it would likely have the undesirable result of returning -1 to the target app as a file descriptor without setting errno.
Thus the check is pointless and is now getting in the way, so it seems we should just get rid of it. |
11240:651bf9238c11 |
04-Dec-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Get rid of the non-const serialize() method
The last SimObject using the legacy serialize API with non-const methods has now been transitioned to the new API. This changeset removes the serializeOld() methods from the serialization base class as they are no longer used. |
11235:4162427127e9 |
03-Dec-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add support for generating back traces on errors
Add functionality to generate a back trace if gem5 crashes (SIGABRT or SIGSEGV). The current implementation uses glibc's stack traversal support if available and stubs out the call to print_backtrace() otherwise. |
11169:44b5c183c3cd |
12-Oct-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Add explicit overrides and fix other clang >= 3.5 issues
This patch adds explicit overrides as this is now required when using "-Wall" with clang >= 3.5, the latter now part of the most recent XCode. The patch consequently removes "virtual" for those methods where "override" is added. The latter should be enough of an indication.
As part of this patch, a few minor issues that clang >= 3.5 complains about are also resolved (unused methods and variables). |
11168:f98eb2da15a4 |
12-Oct-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Remove redundant compiler-specific defines
This patch moves away from using M5_ATTR_OVERRIDE and the m5::hashmap (and similar) abstractions, as these are no longer needed with gcc 4.7 and clang 3.1 as minimum compiler versions. |
11164:b6c6c55b59ac |
09-Oct-2015 |
Dylan Johnson <Dylan.Johnson@ARM.com> |
sim: Add relative break scheduling
Add schedRelBreak() function, executable within a debugger, that sets a breakpoint by relative rather than absolute tick. |
11157:bc07f3764129 |
02-Sep-2015 |
Dylan Johnson <Dylan.Johnson@ARM.com> |
sim: Add ability to break at specific kernel function
Adds a GDB callable function that sets a breakpoint at the beginning of a kernel function. |
11146:0fd6976303bc |
30-Sep-2015 |
Mitch Hayenga <mitch.hayenga@arm.com> |
cpu: Change thread assignments for heterogenous SMT
Trying to run an SE system with varying threads per core (SMT cores + Non-SMT cores) caused failures due to the CPU id assignment logic. The comment about thread assignment (worrying about core 0 not having tid 0) seems not to be valid given that our configuration scripts initialize them in order.
This removes that constraint so a heterogenously threaded sytem can work. |
11140:cf07f8bf58db |
29-Sep-2015 |
Joel Hestness <jthestness@gmail.com> |
syscall_emul: Bandage readlink /proc/self/exe
The recent changeset to readlink() to handle reading the /proc/self/exe link introduces a number of problems. This patch fixes two:
1) Because readlink() called on /proc/self/exe now uses LiveProcess::progName() to find the binary path, it will only get the zeroth parameter of the simulated system command line. However, if a config script also specifies the process' executable, the executable parameter is used to create the LiveProcess rather than the zeroth command line parameter. Thus, the zeroth command line parameter is not necessarily the correct path to the binary executing in the simulated system. To fix this, add a LiveProcess data member, 'executable', which is correctly set during instantiation and returned from progName().
2) If a config script allows a user to pass a relative path as the zeroth simulated system command line parameter or process executable, readlink() will incorrecly return a relative path when called on '/proc/self/exe'. /proc/self/exe is always set to a full path, so running benchmarks can fail if a relative path is returned. To fix this, clean up the handling of LiveProcess::progName() within readlink() to get the full binary path.
NOTE: This patch still leaves the potential problem that host full path to the binary bleeds into the simulated system, potentially causing the appearance of non-deterministic simulated system execution. |
11139:bd894d2bdd7c |
25-Sep-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
mem: Add PacketInfo to be used for packet probe points
This patch fixes a use-after-delete issue in the packet probe points by adding a PacketInfo struct to retain the key fields before passing the packet onwards. We want to probe the packet after it is successfully sent, but by that time the fields may be modified, and the packet may even be deleted.
Amazingly enough the issue has gone undetected for months, and only recently popped up in our regressions. |
11080:31ab5ca6836d |
04-Sep-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Fix time unit in abort message |
11077:fae097742b7e |
02-Sep-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: tag-based checkpoint versioning
This commit addresses gem5 checkpoints' linear versioning bottleneck. Since development is distributed across many private trees, there exists a sort of 'race' for checkpoint version numbers: internally a checkpoint version may be used but then resynchronizing with the external tree causes a conflict on that version. This change replaces the linear version number with a set of unique strings called tags. Now the only conflicts that can arise are of tag names, where collisions are much easier to avoid.
The checkpoint upgrader (util/cpt_upgrader.py) upgrades the version representation, as one would expect. Each tag version implements its upgrader code in a python file in the util/cpt_upgraders directory rather than adding a function to the upgrader script itself.
The version tags are stored in the 'Globals' section rather than 'root' (as the version was previously) because 'Globals' gets unserialized first and can provide a warning before any other unserialization errors can occur. |
11076:463a4b0f0dda |
02-Sep-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: support checkpointing std::set<std::string>'s
This is in support of tag-based checkpoint versioning; the version tags are stored in string sets. This commit adds such support. |
11075:f959b7f89d4d |
02-Sep-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: make warning for absent optional parameters optional
This is in support of tag-based checkpoint versioning. It should be possible to examine an optional parameter in a checkpoint during unserialization and not have it throw a warning. |
11072:6a447a3138ef |
01-Sep-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove broken AutoSerialize support from the event queue
Event auto-serialization no longer in use and has been broken ever since the introduction of PDES support almost two years ago. Additionally, serializing the individual event queues is undesirable since it exposes the thread structure of the simulator. What this means in practice is that the number of threads in the simulator must be the same when taking a checkpoint and when loading the checkpoint.
This changeset removes support for the AutoSerialize event flag and the associated serialization code. |
11070:d9560edaf0a9 |
01-Sep-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove autoserialize support for exit events
This changeset removes the support for the autoserialize parameter in GlobalSimLoopExitEvent (including exitSimLoop()) and LocalSimLoopExitEvent.
Auto-serialization of the LocalSimLoopExitEvent was never used, so this is not expected to affect anything. However, it was sometimes used for GlobalSimLoopExitEvent. Unfortunately, serialization of global events has never been supported, so checkpoints with such events will currently cause simulation panics.
The serialize parameter to exitSimLoop() has been left in-place to maintain API compatibility (removing it would affect m5ops). Instead of just dropping it, we now print a warning if the parameter is set and the exit event is scheduled in the future (i.e., not at the current tick). |
11069:c5388db11c76 |
01-Sep-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Remove unused SerializeBuilder interface |
11068:9c39ca645966 |
01-Sep-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Replace fromInt/fromSimObject with decltype |
11067:5379f099e488 |
01-Sep-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Move SimObject resolver to sim_object.hh
The object resolver isn't serialization specific and shouldn't live in serialize.hh. Move it to sim_object.hh since it queries to the SimObject hierarchy. |
11058:d0934b57735a |
26-Aug-2015 |
Emilio Castillo <ecastill@bsc.es> |
cpu: quiesce pseudoinsts: Always do full quiesce
The O3CPU blocks the Fetch when it sees a quiesce instruction (IsQuiesce flag). When the inst. is executed, a quiesce event is created to reactivate the context and unblock the Fetch.
If the quiesceNs or quiesceCycles are called with a value of 0, the QuiesceEvent will not be created and the Fetch stage will remain blocked.
Committed by Joel Hestness <jthestness@gmail.com> |
11018:b998b5a6c5f5 |
11-Aug-2015 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: clocked object: function for converting cycles to ticks. |
11015:f35e317d2e1e |
07-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Flag EventQueue::getCurTick() as const |
11009:32e374b7cbdb |
07-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Split ClockedObject to make it usable to non-SimObjects
Split ClockedObject into two classes: Clocked that provides the basic clock functionality, and ClockedObject that inherits from Clocked and SimObject to provide the functionality of the old ClockedObject. |
11005:e7f403b6b76f |
07-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
base: Declare a type for context IDs
Context IDs used to be declared as ad hoc (usually as int). This changeset introduces a typedef for ContextIDs and a constant for invalid context IDs. |
11002:4413195267fd |
05-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Fixup comments and constness in draining infrastructure
Fix comments that got outdated by the draining rewrite. Also fixup constness for methods in the querying drain state in the DrainManager. |
10998:cd22d66592bf |
04-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Initialize Drainable::_drainState to the system's state
It is sometimes desirable to be able to instantiate Drainable objects when the simulator isn't in the Running state. Currently, we always initialize Drainable objects to the Running state. However, this confuses many of the sanity checks in the base class since objects aren't expected to be in the Running state if the system is in the Draining or Drained state.
Instead of always initializing the state variable in Drainable to DrainState::Running, initialize it to the state the DrainManager is in.
Note: This means an object can be created in the Draining/Drained state without first calling drain(). |
10994:51ff41f6a4a5 |
04-Aug-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
mem: Add probe support to the CommMonitor
This changeset adds a standardized probe point type to monitor packets in the memory system and adds two probe points to the CommMonitor class. These probe points enable monitoring of successfully delivered requests and successfully delivered responses.
Memory system probe listeners should use the BaseMemProbe base class to provide a unified configuration interface and reuse listener registration code. Unlike the ProbeListenerObject class, the BaseMemProbe allows objects to be wired to multiple ProbeManager instances as long as they use the same probe point name. |
10992:c88952d67db2 |
04-Aug-2015 |
Timothy Jones <timothy.jones@cl.cam.ac.uk> |
sim: function for testing for auto deletion
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10991:72781d410e48 |
04-Aug-2015 |
Timothy Jones <timothy.jones@cl.cam.ac.uk> |
uby: Fix checkpointing and restore
There are 2 problems with the existing checkpoint and restore code in ruby. The first is that when the event queue is altered by ruby during serialization, some events that are currently scheduled cannot be found (e.g. the event to stop simulation that always lives on the queue), causing a panic. The second is that ruby is sometimes serialized after the memory system, meaning that the dirty data in its cache is flushed back to memory too late and so isn't included in the checkpoint.
These are fixed by implementing memory writeback in ruby, using the same technique of hijacking the event queue, but first descheduling all events that are currently on it. They are saved, along with their scheduled time, so that the event queue can be faithfully reconstructed after writeback has finished. Events with the AutoDelete flag set will delete themselves when they are descheduled, causing an error when attempting to schedule them again. This is fixed by simply not recording them when taking them off the queue.
Writeback is still implemented using flushing, so the cache recorder object, that is created to generate the trace and manage flushing, is kept around and used during serialization to write the trace to disk.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10955:9abf6a7c14ab |
20-Jul-2015 |
David Hashe <david.hashe@amd.com> |
syscall: Add readlink to x86 with special case /proc/self/exe
This patch implements the correct behavior. |
10935:acd48ddd725f |
28-Jul-2015 |
Nilay Vaish <nilay@cs.wisc.edu> |
revert 5af8f40d8f2c |
10934:5af8f40d8f2c |
26-Jul-2015 |
Nilay Vaish <nilay@cs.wisc.edu> |
cpu: implements vector registers
This adds a vector register type. The type is defined as a std::array of a fixed number of uint64_ts. The isa_parser.py has been modified to parse vector register operands and generate the required code. Different cpus have vector register files now. |
10932:cafae9abd4e4 |
24-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
style: change Process function calls to use camelCase
The Process class methods were using an improper style and this subsequently bled into the system call code. The following regular expressions should be helpful if someone transitions private system call patches on top of these changesets:
s/alloc_fd/allocFD/ s/sim_fd(/simFD(/ s/sim_fd_obj/getFDEntry/ s/fix_file_offsets/fixFileOffsets/ s/find_file_offsets/findFileOffsets/ |
10931:42d846318962 |
24-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: standardized file descriptor name and add return checks.
The patch clarifies whether file descriptors are host file descriptors or target file descriptors in the system call code. (Host file descriptors are file descriptors which have been allocated through real system calls where target file descriptors are allocated from an array in the Process class.) |
10930:ddc3d96d6313 |
24-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
base: refactor process class (specifically FdMap and friends)
This patch extends the previous patch's alterations around fd_map. It cleans up some of the uglier code in the process file and replaces it with a more concise C++11 version. As part of the changes, the FdMap class is pulled out of the Process class and receives its own file. |
10929:b2bbfec74eca |
24-Jul-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: file descriptor interface changes
This patch gets rid of unused Process::dup_fd method and does minor refactoring in the process class files. The file descriptor max has been changed to be the number of file descriptors since this clarifies the loop boundary condition and cleans up the code a bit. The fd_map field has been altered to be dynamically allocated as opposed to being an array; the intention here is to build on this is subsequent patches to allow processes to share their file descriptors with the clone system call. |
10913:38dbdeea7f1f |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Refactor and simplify the drain API
The drain() call currently passes around a DrainManager pointer, which is now completely pointless since there is only ever one global DrainManager in the system. It also contains vestiges from the time when SimObjects had to keep track of their child objects that needed draining.
This changeset moves all of the DrainState handling to the Drainable base class and changes the drain() and drainResume() calls to reflect this. Particularly, the drain() call has been updated to take no parameters (the DrainManager argument isn't needed) and return a DrainState instead of an unsigned integer (there is no point returning anything other than 0 or 1 any more). Drainable objects should return either DrainState::Draining (equivalent to returning 1 in the old system) if they need more time to drain or DrainState::Drained (equivalent to returning 0 in the old system) if they are already in a consistent state. Returning DrainState::Running is considered an error.
Drain done signalling is now done through the signalDrainDone() method in the Drainable class instead of using the DrainManager directly. The new call checks if the state of the object is DrainState::Draining before notifying the drain manager. This means that it is safe to call signalDrainDone() without first checking if the simulator has requested draining. The intention here is to reduce the code needed to implement draining in simple objects. |
10912:b99a6662d7c2 |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Decouple draining from the SimObject hierarchy
Draining is currently done by traversing the SimObject graph and calling drain()/drainResume() on the SimObjects. This is not ideal when non-SimObjects (e.g., ports) need draining since this means that SimObjects owning those objects need to be aware of this.
This changeset moves the responsibility for finding objects that need draining from SimObjects and the Python-side of the simulator to the DrainManager. The DrainManager now maintains a set of all objects that need draining. To reduce the overhead in classes owning non-SimObjects that need draining, objects inheriting from Drainable now automatically register with the DrainManager. If such an object is destroyed, it is automatically unregistered. This means that drain() and drainResume() should never be called directly on a Drainable object.
While implementing the new functionality, the DrainManager has now been made thread safe. In practice, this means that it takes a lock whenever it manipulates the set of Drainable objects since SimObjects in different threads may create Drainable objects dynamically. Similarly, the drain counter is now an atomic_uint, which ensures that it is manipulated correctly when objects signal that they are done draining.
A nice side effect of these changes is that it makes the drain state changes stricter, which the simulation scripts can exploit to avoid redundant drains. |
10911:0ca18446a5bb |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Move mem(Writeback|Invalidate) to SimObject
The memWriteback() and memInvalidate() calls used to live in the Serializable interface. In this series of patches, the Serializable interface will be redesigned to make serialization independent of the object graph and always work on the entire simulator. This means that the Serialization interface won't be useful to perform maintenance of the caches in a sub-graph of the entire SimObject graph. This changeset moves these memory maintenance methods to the SimObject interface instead. |
10910:32f3d1c454ec |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Make the drain state a global typed enum
The drain state enum is currently a part of the Drainable interface. The same state machine will be used by the DrainManager to identify the global state of the simulator. Make the drain state a global typed enum to better cater for this usage scenario. |
10908:235d75ea01d8 |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add macros to serialize objects into a section
Add the SERIALIZE_OBJ / UNSERIALIZE_OBJ macros that serialize an object into a subsection of the current checkpoint section. |
10907:94d5a1476c5b |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
base: Add serialization support to Pixels and FrameBuffer
Serialize pixels as unsigned 32 bit integers by adding the required to_number() and stream operators. This is used by the FrameBuffer, which now implements the Serializable interface. Users of frame buffers are expected to serialize it into its own section by calling serializeSection(). |
10906:3ab1d7ed6545 |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Fix broken event unserialization
Events expected to be unserialized using an event-specific unserializeEvent call. This call was never actually used, which meant the events relying on it never got unserialized (or scheduled after unserialization).
Instead of relying on a custom call, we now use the normal serialization code again. In order to schedule the event correctly, the parrent object is expected to use the EventQueue::checkpointReschedule() call. This happens automatically for events that are serialized using the AutoSerialize mechanism. |
10905:a6ca6831e775 |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Refactor the serialization base class
Objects that are can be serialized are supposed to inherit from the Serializable class. This class is meant to provide a unified API for such objects. However, so far it has mainly been used by SimObjects due to some fundamental design limitations. This changeset redesigns to the serialization interface to make it more generic and hide the underlying checkpoint storage. Specifically:
* Add a set of APIs to serialize into a subsection of the current object. Previously, objects that needed this functionality would use ad-hoc solutions using nameOut() and section name generation. In the new world, an object that implements the interface has the methods serializeSection() and unserializeSection() that serialize into a named /subsection/ of the current object. Calling serialize() serializes an object into the current section.
* Move the name() method from Serializable to SimObject as it is no longer needed for serialization. The fully qualified section name is generated by the main serialization code on the fly as objects serialize sub-objects.
* Add a scoped ScopedCheckpointSection helper class. Some objects need to serialize data structures, that are not deriving from Serializable, into subsections. Previously, this was done using nameOut() and manual section name generation. To simplify this, this changeset introduces a ScopedCheckpointSection() helper class. When this class is instantiated, it adds a new /subsection/ and subsequent serialization calls during the lifetime of this helper class happen inside this section (or a subsection in case of nested sections).
* The serialize() call is now const which prevents accidental state manipulation during serialization. Objects that rely on modifying state can use the serializeOld() call instead. The default implementation simply calls serialize(). Note: The old-style calls need to be explicitly called using the serializeOld()/serializeSectionOld() style APIs. These are used by default when serializing SimObjects.
* Both the input and output checkpoints now use their own named types. This hides underlying checkpoint implementation from objects that need checkpointing and makes it easier to change the underlying checkpoint storage code. |
10903:022e5d110a22 |
07-Jul-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
sim: Add serialization macros for std containers |
10861:9141d87c7f71 |
01-Jun-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim, arm: add checkpoint upgrader for d02b45a5
The insertion of CONTEXTIDR_EL2 in the ARM miscellaneous registers obsoletes old checkpoints. |
10850:e4328e028961 |
26-May-2015 |
Giacomo Gabrielli <Giacomo.Gabrielli@arm.com> |
arm: Implement some missing syscalls (SE mode)
Adding a few syscalls that were previously considered unimplemented. |
10839:10cac0f0f419 |
23-May-2015 |
Andreas Sandberg <andreas.sandberg@arm.com> |
base: Redesign internal frame buffer handling
Currently, frame buffer handling in gem5 is quite ad hoc. In practice, we pass around naked pointers to raw pixel data and expect consumers to convert frame buffers using the (broken) VideoConverter.
This changeset completely redesigns the way we handle frame buffers internally. In summary, it fixes several color conversion bugs, adds support for more color formats (e.g., big endian), and makes the code base easier to follow.
In the new world, gem5 always represents pixel data using the Pixel struct when pixels need to be passed between different classes (e.g., a display controller and the VNC server). Producers of entire frames (e.g., display controllers) should use the FrameBuffer class to represent a frame.
Frame producers are expected to create one instance of the FrameBuffer class in their constructors and register it with its consumers once. Consumers are expected to check the dimensions of the frame buffer when they consume it.
Conversion between the external representation and the internal representation is supported for all common "true color" RGB formats of up to 32-bit color depth. The external pixel representation is expected to be between 1 and 4 bytes in either big endian or little endian. Color channels are assumed to be contiguous ranges of bits within each pixel word. The external pixel value is scaled to an 8-bit internal representation using a floating multiplication to map it to the entire 8-bit range. |
10834:f7a36ade78c2 |
15-May-2015 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Don't clear the active CPU vector in System::initState
The system class currently clears the vector of active CPUs in initState(). CPUs are added to the list by registerThreadContext() which is called from BaseCPU::init(). This obviously breaks when the System object is initialized after the CPUs. This changeset removes the offending clear() call since the list will be empty after it has been instantiated anyway. |
10831:fbdaa08aaa42 |
05-May-2015 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: fix warn_once behavior
The current ignoreWarnOnceFunc doesn't really work as expected, since it will only generate one warning total, for whichever "warn-once" syscall is invoked first. This patch fixes that behavior by keeping a "warned" flag in the SyscallDesc object, allowing suitably flagged syscalls to warn exactly once per syscall. |
10810:683ab55819fd |
29-Apr-2015 |
Ruslan Bukin <br@bsdpad.com> |
arch, base, dev, kern, sym: FreeBSD support
This adds support for FreeBSD/aarch64 FS and SE mode (basic set of syscalls only)
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10796:5bcba8001c7e |
22-Apr-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: implement clock_gettime system call |
10794:75f10b3e7938 |
22-Apr-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: update getrlimit to use warn Don't use std::cerr directly, and just return EINVAL instead of aborting. |
10793:0a4ec71cfddd |
22-Apr-2015 |
Brandon Potter <brandon.potter@amd.com> |
syscall_emul: fix warning with wrong syscall name Also nix extra whitespace. |
10782:0a78638881d7 |
13-Apr-2015 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: Use NULL instead of None for testing filenames. The filenames are initialized with NULL. So the test should be checking for them to be == NULL instead == None. |
10781:024af426b59a |
13-Apr-2015 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: fix function for emulating dup() The function was using the host fd to obtain the fd object from the simulated process. |
10776:20686329e673 |
03-Apr-2015 |
Ruslan Bukin <br@bsdpad.com> |
sim: correct check for endianess
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10762:fe0972727902 |
26-Mar-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: Update limit_event reuse to final version
Matching final version on reviewboard. |
10756:f9c0692f73ec |
23-Mar-2015 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: Reuse the same limit_event in simulate()
This patch accomplishes two things: 1. Makes simulate()'s GlobalSimLoopExitEvent a singleton reused across calls. This is slightly more efficient than recreating it every time. 2. Gives callers to simulate() (especially other simulators) a foolproof way of knowing that the simulation period ended successfully by hitting the limit event. They can call getLimitEvent() and compare it to the return value of simulate().
This change was motivated by an ongoing effort to integrate gem5 and SST, with SST as the master sim and gem5 as the slave sim. |
10713:eddb533708cb |
02-Mar-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
mem: Split port retry for all different packet classes
This patch fixes a long-standing isue with the port flow control. Before this patch the retry mechanism was shared between all different packet classes. As a result, a snoop response could get stuck behind a request waiting for a retry, even if the send/recv functions were split. This caused message-dependent deadlocks in stress-test scenarios.
The patch splits the retry into one per packet (message) class. Thus, sendTimingReq has a corresponding recvReqRetry, sendTimingResp has recvRespRetry etc. Most of the changes to the code involve simply clarifying what type of request a specific object was accepting.
The biggest change in functionality is in the cache downstream packet queue, facing the memory. This queue was shared by requests and snoop responses, and it is now split into two queues, each with their own flow control, but the same physical MasterPort. These changes fixes the previously seen deadlocks. |
10700:417ba77dedb4 |
16-Feb-2015 |
Andreas Hansson <andreas.hansson@arm.com> |
mem: mmap the backing store with MAP_NORESERVE
This patch ensures we can run simulations with very large simulated memories (at least 64 TB based on some quick runs on a Linux workstation). In essence this allows us to efficiently deal with sparse address maps without having to implement a redirection layer in the backing store.
This opens up for run-time errors if we eventually exhausts the hosts memory and swap space, but this should hopefully never happen. |
10687:276da6265ab8 |
11-Feb-2015 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Move the BaseTLB to src/arch/generic/
The TLB-related code is generally architecture dependent and should live in the arch directory to signify that. |
10673:a3cf30302e19 |
03-Feb-2015 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Remove test for non-NULL this in Event
The method Event::initialized() tests if this != NULL as a part of the expression that tests if an event is initialized. The only case when this check could be false is if the method is called on a null pointer, which is illegal and leads to undefined behavior (such as eating your pets) according to the C++ standard. Because of this, modern compilers (specifically, recent versions of clang) warn about this which we treat as an error. This changeset removes the redundant check to fix said warning. |
10670:3bfbaefa3844 |
19-Dec-2014 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: prioritize async events; prevent starvation
If a time quantum event is the only one in the queue, async events (Ctrl-C, I/O, etc.) will never be processed.
So process them first. |
10665:aef704eaedd2 |
25-Jan-2015 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim: Clean up InstRecord
Track memory size and flags as well as add some comments and consts. |
10664:61a0b02aa800 |
25-Jan-2015 |
Ali Saidi <Ali.Saidi@ARM.com> |
cpu: Remove all notion that we know when the cpu is misspeculating.
We have no way of knowing if a CPU model is on the wrong path with our execute-in-execute CPU models. Don't pretend that we do. |
10633:ae3b12c845b8 |
03-Jan-2015 |
mike upton <michaelupton@gmail.com> |
arm: Add unlinkat syscall implementation
added ARM aarch64 unlinkat syscall support, modeled on other <xxx>at syscalls. This gets all of the cpu2006 int workloads passing in SE mode on aarch64.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10629:7c649fc84bb9 |
27-Dec-2014 |
Joel Hestness <jthestness@gmail.com> |
syscall_emul: Return correct writev value
According to Linux man pages, if writev is successful, it returns the total number of bytes written. Otherwise, it returns an error code. Instead of returning 0, return the result from the actual call to writev in the system call. |
10559:62f5f7363197 |
24-Nov-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Another round of static analysis fixups
Mostly addressing uninitialised members. |
10558:426665ec11a9 |
23-Nov-2014 |
Alexandru Dutu <alexandru.dutu@amd.com> |
mem: Page Table map api modification
This patch adds uncacheable/cacheable and read-only/read-write attributes to the map method of PageTableBase. It also modifies the constructor of TlbEntry structs for all architectures to consider the new attributes. |
10554:fe2e2f06a7c8 |
23-Nov-2014 |
Alexandru Dutu <alexandru.dutu@amd.com> |
x86: Segment initialization to support KvmCPU in SE This patch sets up low and high privilege code and data segments and places them in the following order: cs low, ds low, ds, cs, in the GDT. Additionally, a syscall and page fault handler for KvmCPU in SE mode are defined. The order of the segment selectors in GDT is required in this manner for interrupt handling to work properly. Segment initialization is done for all the thread contexts. |
10553:c1ad57c53a36 |
23-Nov-2014 |
Alexandru Dutu <alexandru.dutu@amd.com> |
kvm, x86: Adding support for SE mode execution This patch adds methods in KvmCPU model to handle KVM exits caused by syscall instructions and page faults. These types of exits will be encountered if KvmCPU is run in SE mode. |
10500:5e0a421e2031 |
02-Sep-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: add retry flag to SyscallReturn
This hook allows blocking emulated system calls to indicate that they would block, but return control to the simulator so that the simulation does not hang. The actual retry functionality requires additional support, to be provided in a future changeset. |
10499:4e715fe2abbd |
22-Oct-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: minor style fix to LiveProcess constructor |
10498:91b05b34b074 |
22-Oct-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: devirtualize BaseBufferArg methods
Not clear why they were marked virtual to begin with, but that doesn't appear to be necessary. |
10497:73a59d5e0923 |
22-Oct-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: Put BufferArg classes in a separate header.
Move the BufferArg classes that support syscall buffer args (i.e., pointers into simulated user space) out of syscall_emul.hh and into a new header syscall_emul_buf.hh so they are accessible to emulated driver implementations.
Take the opportunity to add some comments as well. |
10496:0a5a8ecd0ec6 |
22-Oct-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: add EmulatedDriver object
Fake SE-mode device drivers can now be added by deriving from this abstract object. |
10495:75d2f19fecce |
22-Oct-2014 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: revert 6709bbcf564d The identifier SYS_getdents is not available on Mac OS X. Therefore, its use results in compilation failure. It seems there is no straight forward way to implement the system call getdents using readdir() or similar C functions. Hence the commit 6709bbcf564d is being rolled back. |
10494:ffe6ab7141ab |
20-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
x86: Fixes to avoid LTO warnings
This patch fixes a few minor issues that caused link-time warnings when using LTO, mainly for x86. The most important change is how the syscall array is created. Previously gcc and clang would complain that the declaration and definition types did not match. The organisation is now changed to match how it is done for ARM, moving the code that was previously in syscalls.cc into process.cc, and having a class variable pointing to the static array.
With these changes, there are no longer any warnings using gcc 4.6.3 with LTO. |
10486:9b848f3813c5 |
20-Oct-2014 |
Tom Jablin <tjablin@gmail.com> |
sim: invalid alignment checks in mmap and mremap Presently, the alignment checks in the mmap and mremap implementations in syscall_emul.hh are wrong. The checks are implemented as:
if ((start % TheISA::PageBytes) != 0 || (length % TheISA::PageBytes) != 0) { warn("mmap failing: arguments not page-aligned: " "start 0x%x length 0x%x", start, length); return -EINVAL; }
This checks that both the start and the length arguments of the mmap syscall are checked for page-alignment. However, the POSIX specification says:
The off argument is constrained to be aligned and sized according to the value returned by sysconf() when passed _SC_PAGESIZE or _SC_PAGE_SIZE. When MAP_FIXED is specified, the application shall ensure that the argument addr also meets these constraints. The implementation performs mapping operations over whole pages. Thus, while the argument len need not meet a size or alignment constraint, the implementation shall include, in any mapping operation, any partial page specified by the range [pa,pa+len).
So the length parameter should not be checked for page-alignment. By contrast, the current implementation fails to check the offset argument, which must be page aligned.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10485:5aa65300f44f |
20-Oct-2014 |
Michael Adler <Michael.Adler@intel.com> |
sim: mmap: correct behavior for fixed address Change mmap fixed address request to return an error if the mapping is impossible due to conflict instead of what I believe used to be silent corruption.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10484:6709bbcf564d |
20-Oct-2014 |
Michael Adler <Michael.Adler@intel.com> |
sim: implement getdents/getdents64 in user mode
Has been tested only for alpha. Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10483:8e18835c0dea |
20-Oct-2014 |
Severin Wischmann <wiseveri@student.ethz.ch>, Ioannis Ilkos <ioannis.ilkos09@imperial.ac.uk> |
x86: syscall: implementation of exit_group On exit_group syscall, we used to exit the simulator. But now we will only halt the execution of threads that belong to the group.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10476:f058e09b7d69 |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: EventQueue wakeup on events scheduled outside the event loop
This patch adds a 'wakeup' member function to EventQueue which should be called on an event queue whenever an event is scheduled on the event queue from outside code within the call tree of the gem5 event loop.
This clearly isn't necessary for normal gem5 EventQueue operation but becomes the minimum necessary interface to allow hosting gem5's event loop onto other schedulers where there may be calls into gem5 from external code which schedules events onto an EventQueue between the current time and the time of the next scheduled event.
The use case I have in mind is a SystemC hosting where the event loop is:
while (more events) { wait(time_to_next_event or wakeup) setCurTick service events at this time }
where the 'wait' needs to be woken up if time_to_next_event becomes shorter due to a scheduled event from SystemC arriving in a gem5 object.
Requiring 'wakeup' to be called is a more efficient interface than requiring all gem5 event scheduling actions to affect the host scheduler.
This interface could be located elsewhere, say on another global object, or by being passed by the host scheduler to objects which will schedule such events, but it seems cleanest to put it on EventQueue as it is actually a signal to the queue.
EventQueue::wakeup is called for async_event events on event queue 0 as it's only important that *some* queue be triggered for such events. |
10474:799c8ee4ecba |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Use shared_ptr for all Faults
This patch takes quite a large step in transitioning from the ad-hoc RefCountingPtr to the c++11 shared_ptr by adopting its use for all Faults. There are no changes in behaviour, and the code modifications are mostly just replacing "new" with "make_shared". |
10468:8c1b836edc92 |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
dev: Use shared_ptr for Arguments::Data
This patch takes a first few steps in transitioning from the ad-hoc RefCountingPtr to the c++11 shared_ptr. There are no changes in behaviour, and the code modifications are mainly introducing the use of make_shared.
Note that the class could use unique_ptr rather than shared_ptr, was it not for the postfix increment and decrement operators. |
10467:dcf27c8220ac |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
arch,x86,mem: Dynamically determine the ISA for Ruby store check
This patch makes the memory system ISA-agnostic by enabling the Ruby Sequencer to dynamically determine if it has to do a store check. To enable this check, the ISA is encoded as an enum, and the system is able to provide the ISA to the Sequencer at run time. |
10466:73b7549d979e |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
mem: Dynamically determine page bytes in memory components
This patch takes a step towards an ISA-agnostic memory system by enabling the components to establish the page size after instantiation. The swap operation in the memory is now also allowing any granularity to avoid depending on the IntReg of the ISA. |
10464:2a0fe8bca031 |
16-Oct-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
cpu: Probe points for basic PMU stats
This changeset adds probe points that can be used to implement PMU counters for CPU stats. The following probes are supported:
* BaseCPU::ppCycles / Cycles * BaseCPU::ppRetiredInsts / RetiredInsts * BaseCPU::ppRetiredLoads / RetiredLoads * BaseCPU::ppRetiredStores / RetiredStores * BaseCPU::ppRetiredBranches RetiredBranches |
10460:20443473c68a |
16-Oct-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Add typedefs for PMU probe points
In order to show make PMU probe points usable across different PMU implementations, we want a common probe interface. This patch the namespace ProbePoins that contains typedefs for probe points that are shared between multiple SimObjects. It also adds typedefs for the PMU probe interface. |
10459:810f5a48a920 |
16-Oct-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Add support for serializing BitUnionXX
BitUnion instances can normally not be used with the SERIALIZE_SCALAR and UNSERIALIZE_SCALAR macros due to the way they are converted between their storage type and their actual type. This changeset adds a set of parm(In|Out) functions specifically for gem5 bit unions to work around the issue. |
10458:64809024b924 |
16-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
config: Add the ability to read a config file using C++ and Python
This patch adds the ability to load in config.ini files generated from gem5 into another instance of gem5 built without Python configuration support. The intended use case is for configuring gem5 when it is a library embedded in another simulation system.
A parallel config file reader is also provided purely in Python to demonstrate the approach taken and to provided similar functionality for as-yet-unknown use models. The Python configuration file reader can read both .ini and .json files.
C++ configuration file reading:
A command line option has been added for scons to enable C++ configuration file reading: --with-cxx-config
There is an example in util/cxx_config that shows C++ configuration in action. util/cxx_config/README explains how to build the example.
Configuration is achieved by the object CxxConfigManager. It handles reading object descriptions from a CxxConfigFileBase object which wraps a config file reader. The wrapper class CxxIniFile is provided which wraps an IniFile for reading .ini files. Reading .json files from C++ would be possible with a similar wrapper and a JSON parser.
After reading object descriptions, CxxConfigManager creates SimObjectParam-derived objects from the classes in the (generated with this patch) directory build/ARCH/cxx_config
CxxConfigManager can then build SimObjects from those SimObjectParams (in an order dictated by the SimObject-value parameters on other objects) and bind ports of the produced SimObjects.
A minimal set of instantiate-replacing member functions are provided by CxxConfigManager and few of the member functions of SimObject (such as drain) are extended onto CxxConfigManager.
Python configuration file reading (configs/example/read_config.py):
A Python version of the reader is also supplied with a similar interface to CxxConfigFileBase (In Python: ConfigFile) to config file readers.
The Python config file reading will handle both .ini and .json files.
The object construction strategy is slightly different in Python from the C++ reader as you need to avoid objects prematurely becoming the children of other objects when setting parameters.
Port binding also needs to be strictly in the same port-index order as the original instantiation. |
10453:d0365cc3d05f |
16-Oct-2014 |
Andrew Bardsley <Andrew.Bardsley@arm.com> |
config: Add a --without-python option to build process
Add the ability to build libgem5 without embedded Python or the ability to configure with Python.
This is a prelude to a patch to allow config.ini files to be loaded into libgem5 using only C++ which would make embedding gem5 within other simulation systems easier.
This adds a few registration interfaces to things which cross between Python and C++. Namely: stats dumping and SimObject resolving |
10422:148b96b7bc77 |
01-Oct-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Fix issues identified by static analysis
Another bunch of issues addressed. |
10417:710ee116eb68 |
27-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Use const StaticInstPtr references where possible
This patch optimises the passing of StaticInstPtr by avoiding copying the reference-counting pointer. This avoids first incrementing and then decrementing the reference-counting pointer. |
10412:6400a2ab4e22 |
27-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Fix a bunch of minor issues identified by static analysis
Add some missing initialisation, and fix a handful benign resource leaks (including some false positives). |
10407:a9023811bf9e |
20-Sep-2014 |
Mitch Hayenga <mitch.hayenga@arm.com> |
alpha,arm,mips,power,x86,cpu,sim: Cleanup activate/deactivate
activate(), suspend(), and halt() used on thread contexts had an optional delay parameter. However this parameter was often ignored. Also, when used, the delay was seemily arbitrarily set to 0 or 1 cycle (no other delays were ever specified). This patch removes the delay parameter and 'Events' associated with them across all ISAs and cores. Unused activate logic is also removed. |
10398:d65768b9ffc2 |
12-Aug-2014 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
energy: Tighter checking of levels for DFS systems
There are cases where users might by accident / intention specify less voltage operating points thatn frequency points. We consider one of these cases special: giving only a single voltage to a voltage domain effectively renders it as a static domain. This patch adds additional logic in the auxiliary parts of the functionality to handle these cases properly (simple driver asking for N>1 operating levels, we should return the same voltage for all of them) and adds error checking code in the voltage domain. |
10395:77b9f96786c1 |
16-Jun-2014 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
energy: Small extentions and fixes for DVFS handler
These additions allow easier interoperability with and querying from an additional controller which will be in a separate patch. Also adding warnings for changing the enabled state of the handler across checkpoint / resume and deviating from the state in the configuration.
Contributed-by: Akash Bagdia <akash.bagdia@arm.com> |
10386:c81407818741 |
20-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
base: Clean up redundant string functions and use C++11
This patch does a bit of housekeeping on the string helper functions and relies on the C++11 standard library where possible. It also does away with our custom string hash as an implementation is already part of the standard library. |
10379:c00f6d7e2681 |
19-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Pass faults by const reference where possible
This patch changes how faults are passed between methods in an attempt to copy as few reference-counting pointer instances as possible. This should avoid unecessary copies being created, contributing to the increment/decrement of the reference counters. |
10375:b1bc989611da |
19-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Restore ostream flags where needed
This patch ensures we adhere to the normal ostream usage rules, and restore the flags after modifying them. |
10367:bf52480abd01 |
12-Sep-2014 |
Andrew Bardsley <Andrew.Bardsley@arm.com> |
style: Fix line continuation, especially in debug messages
This patch closes a number of space gaps in debug messages caused by the incorrect use of line continuation within strings. (There's also one consistency change to a similar, but correct, use of line continuation) |
10365:e2c43045a81b |
09-Sep-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Automatically unregister probe listeners
The ProbeListener base class automatically registers itself with a probe manager. Currently, the class does not unregister a itself when it is destroyed, which makes removing probes listeners somewhat cumbersome. This patch adds an automatic call to manager->removeListener in the ProbeListener destructor, which solves the problem. |
10361:280cc9b0794f |
09-Sep-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Fix resource leak in BaseGlobalEvent
Static analysis revealed that BaseGlobalEvent::barrier was never deallocated. This changeset solves this leak by making the barrier allocation a part of the BaseGlobalEvent instead of storing a pointer to a separate heap-allocated barrier. |
10360:919c02740209 |
09-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
misc: Fix a number of unitialised variables and members
Static analysis unearther a bunch of uninitialised variables and members, and this patch addresses the problem. In all cases these omissions seem benign in the end, but at least fixing them means less false positives next time round. |
10338:8bee5f4edb92 |
29-Apr-2014 |
Curtis Dunham <Curtis.Dunham@arm.com> |
arm: use condition code registers for ARM ISA
Analogous to ee049bf (for x86). Requires a bump of the checkpoint version and corresponding upgrader code to move the condition code register values to the new register file. |
10320:82a4fa2d19a0 |
03-Sep-2014 |
Andrew Bardsley <Andrew.Bardsley@arm.com> |
sim: Fix checkpoint restore for Ticked
This patch makes restoring the 'lastStopped' value for Ticked-containing objects (including MinorCPU) optional so that Ticked-containing objects can be restored from non-Ticked-containing objects (such as AtomicSimpleCPU). |
10318:98771a936b61 |
03-Sep-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Cleanup unused ISA traits constants
This patch prunes unused values, and also unifies how the values are defined (not using an enum for ALPHA), aligning the use of int vs Addr etc.
The patch also removes the duplication of PageBytes/PageShift and VMPageSize/LogVMPageSize. For all ISAs the two pairs had identical values and the latter has been removed. |
10299:bec0c5ffc323 |
28-Aug-2014 |
Alexandru <alexandru.dutu@amd.com> |
mem: adding architectural page table support for SE mode This patch enables the use of page tables that are stored in system memory and respect x86 specification, in SE mode. It defines an architectural page table for x86 as a MultiLevelPageTable class and puts a placeholder class for other ISAs page tables, giving the possibility for future implementation. |
10298:77af86f37337 |
01-Apr-2014 |
Alexandru <alexandru.dutu@amd.com> |
mem: adding a multi-level page table class This patch defines a multi-level page table class that stores the page table in system memory, consistent with ISA specifications. In this way, cpu models that use the actual hardware to execute (e.g. KvmCPU), are able to traverse the page table. |
10285:6cb378bad253 |
05-Feb-2014 |
Curtis Dunham <Curtis.Dunham@arm.com> |
sim: bump checkpoint version for multiple event queues
This patch adds a fix for older checkpoints before support for multiple event queues were added in changeset 2cce74fe359e. The change in checkpoint version should really hav ebeen part of the aforementioned changeset. |
10282:3ea92bc6393b |
13-Aug-2014 |
Dam Sunwoo <dam.sunwoo@arm.com> |
sim: remove kernel mapping check for baremetal workloads
Baremetal workloads are specified using the "kernel" parameter, but don't always have the correct address mappings. This patch adds a boolean flag to the system and bypasses the kernel addr mapping checks when running in baremetal mode. |
10276:4cbfdcdb2144 |
13-Aug-2014 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
cpu: Don't forward declare RefCountingPtr
RefCountingPtr is sometimes forward declared to avoid having to include refcnt.hh. This does not work since we typically return instances of RefCountingPtr rather than references to instances. The only reason this currently works is that we include refcnt.hh in cprintf.hh, which "leaks" the header to most other source files. This changeset replaces such forward declarations with an include of refcnt.hh. |
10268:9dac4c781ad6 |
10-Aug-2014 |
Geoffrey Blake <Geoffrey.Blake@arm.com> |
config: Add SubSystem container for simobjects
This patch adds the SubSystem container for grouping simobjects together in logical subsystems to facilitate building a larger system from constituent parts. The container is simply a non-abstract empty simobject to hold the components that will be connected as its children. In simulation the object does not participate, its only use is during configuration of the system. |
10259:ebb376f73dd2 |
23-Jul-2014 |
Andrew Bardsley <Andrew.Bardsley@arm.com> |
cpu: `Minor' in-order CPU model
This patch contains a new CPU model named `Minor'. Minor models a four stage in-order execution pipeline (fetch lines, decompose into macroops, decompose macroops into microops, execute).
The model was developed to support the ARM ISA but should be fixable to support all the remaining gem5 ISAs. It currently also works for Alpha, and regressions are included for ARM and Alpha (including Linux boot).
Documentation for the model can be found in src/doc/inside-minor.doxygen and its internal operations can be visualised using the Minorview tool utils/minorview.py.
Minor was designed to be fairly simple and not to engage in a lot of instruction annotation. As such, it currently has very few gathered stats and may lack other gem5 features.
Minor is faster than the o3 model. Sample results:
Benchmark | Stat host_seconds (s) ---------------+--------v--------v-------- (on ARM, opt) | simple | o3 | minor | timing | timing | timing ---------------+--------+--------+-------- 10.linux-boot | 169 | 1883 | 1075 10.mcf | 117 | 967 | 491 20.parser | 668 | 6315 | 3146 30.eon | 542 | 3413 | 2414 40.perlbmk | 2339 | 20905 | 11532 50.vortex | 122 | 1094 | 588 60.bzip2 | 2045 | 18061 | 9662 70.twolf | 207 | 2736 | 1036 |
10257:563696c791d2 |
19-Jul-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall emulation: fix fast build issue
Surprisingly gcc will complain about unused variables even inside an 'if (false)' block.
I thought I had tested this previously, but apparently not. |
10255:b71e6c577768 |
19-Jul-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: remove unused MemoryModeStrings array
The System object has a static MemoryModeStrings array that's (1) unused and (2) redundant, since there's an auto-generated version in the Enums namespace. No point in leaving it in. |
10253:00086092d9f7 |
19-Jul-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall emulation: fix DPRINTF arg ordering bug
When we switched getSyscallArg() from explicit arg indices to the implicit method, some DPRINTF arguments were left as calls to getSyscallArg(), even though C/C++ doesn't guarantee anything about the order of invocation of these calls. As a result, the args could be printed out in arbitrary orders.
Interestingly, this bug has been around since 2009: http://repo.gem5.org/gem5/rev/4842482e1bd1 |
10250:9f5e9bdc2f27 |
01-Jul-2014 |
Radhika Jagtap <radhika.jagtap@ARM.com> |
util: Add DVFS perfLevel to checkpoint upgrade script
This patch updates the checkpoint upgrader script. It adds the _perfLevel variable in the clock domain and voltage domain simObjects used for DVFS. |
10249:6bbb7ae309ac |
30-Jun-2014 |
Stephan Diestelhorst <stephan.diestelhorst@arm.com> |
power: Add basic DVFS support for gem5
Adds DVFS capabilities to gem5, by allowing users to specify lists for frequencies and voltages in SrcClockDomains and VoltageDomains respectively. A separate component, DVFSHandler, provides a small interface to change operating points of the associated domains.
Clock domains will be linked to voltage domains and thus allow separate clock, but shared voltage lines.
Currently all the valid performance-level updates are performed with a fixed transition latency as specified for the domain.
Config file example: ... vd = VoltageDomain(voltage = ['1V','0.95V','0.90V','0.85V']) tsys.cluster1.clk_domain.clock = ['1GHz','700MHz','400MHz','230MHz'] tsys.cluster2.clk_domain.clock = ['1GHz','700MHz','400MHz','230MHz'] tsys.cluster1.clk_domain.domain_id = 0 tsys.cluster2.clk_domain.domain_id = 1 tsys.cluster1.clk_domain.voltage_domain = vd tsys.cluster2.clk_domain.voltage_domain = vd tsys.dvfs_handler.domains = [tsys.cluster1.clk_domain, tsys.cluster2.clk_domain] tsys.dvfs_handler.enable = True |
10236:79af6cc0384d |
09-Jun-2014 |
Joel Hestness <jthestness@gmail.com> |
sim: More rigorous clocking comments
The language describing the clockEdge and nextCycle functions were ambiguous, and so were prone to misinterpretation/misuse. Clear up the comments to more rigorously describe their functionality. |
10223:34f48d0dac97 |
12-May-2014 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall emulation: clean up & comment SyscallReturn |
10203:3b9e1fa3da47 |
17-Apr-2014 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim, arm: implement more of the at variety syscalls
Needed for new AArch64 binaries |
10198:590ba8823163 |
09-May-2014 |
Andrew Bardsley <Andrew.Bardsley@arm.com> |
cpu: Allow setWhen on trace objects
Allow setting of 'when' in trace records. This allows later times than the arbitrary record creation point to be used as inst. times |
10194:e6d2e8083d9c |
09-May-2014 |
Geoffrey Blake <Geoffrey.Blake@arm.com> |
arch, arm: Preserve TLB bootUncacheability when switching CPUs
The ARM TLBs have a bootUncacheability flag used to make some loads and stores become uncacheable when booting in FS mode. Later the flag is cleared to let those loads and stores operate as normal. When doing a takeOverFrom(), this flag's state is not preserved and is momentarily reset until the CPSR is touched. On single core runs this is a non-issue. On multi-core runs this can lead to crashes on the O3 CPU model from the following series of events: 1) takeOverFrom executed to switch from Atomic -> O3 2) All bootUncacheability flags are reset to true 3) Core2 tries to execute a load covered by bootUncacheability, it is flagged as uncacheable 4) Core2's load needs to replay due to a pipeline flush 3) Core1 core does an action on CPSR 4) The handling code for CPSR then checks all other cores to determine if bootUncacheability can be set to false 5) Asynchronously set bootUncacheability on all cores to false 6) Core2 replays load previously set as uncacheable and notices it is now flagged as cacheable, leads to a panic. This patch implements takeOverFrom() functionality for the ARM TLBs to preserve flag values when switching from atomic -> detailed. |
10178:0d8e24faf1f8 |
23-Apr-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Use correct unit for abort message
This patch fixes the unit in the abort printout. |
10163:e8608cdddae2 |
19-Apr-2014 |
Marco Elver <marco.elver@ed.ac.uk> |
ruby: recorder: Fix (de-)serializing with different cache block-sizes
Upon aggregating records, serialize system's cache-block size, as the cache-block size can be different when restoring from a checkpoint. This way, we can correctly read all records when restoring from a checkpoints, even if the cache-block size is different.
Note, that it is only possible to restore from a checkpoint if the desired cache-block size is smaller or equal to the cache-block size when the checkpoint was taken; we can split one larger request into multiple small ones, but it is not reliable to do the opposite.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
10153:936a3a8006f6 |
03-Apr-2014 |
Andreas Sandberg <andreas@sandberg.pp.se> |
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! |
10104:ff709c429b7b |
07-Mar-2014 |
Mitch Hayenga <mitch.hayenga@arm.com> |
scons: Fixes uninitialized warnings issued by clang
Small fixes to appease recent clang versions. |
10101:39d9d14d084f |
06-Mar-2014 |
Andreas Sandberg <andreas@sandberg.pp.se> |
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. |
10037:5cac77888310 |
24-Jan-2014 |
ARM gem5 Developers |
arm: Add support for ARMv8 (AArch64 & AArch32)
Note: AArch64 and AArch32 interworking is not supported. If you use an AArch64 kernel you are restricted to AArch64 user-mode binaries. This will be addressed in a later patch.
Note: Virtualization is only supported in AArch32 mode. This will also be fixed in a later patch.
Contributors: Giacomo Gabrielli (TrustZone, LPAE, system-level AArch64, AArch64 NEON, validation) Thomas Grocutt (AArch32 Virtualization, AArch64 FP, validation) Mbou Eyole (AArch64 NEON, validation) Ali Saidi (AArch64 Linux support, code integration, validation) Edmund Grimley-Evans (AArch64 FP) William Wang (AArch64 Linux support) Rene De Jong (AArch64 Linux support, performance opt.) Matt Horsnell (AArch64 MP, validation) Matt Evans (device models, code integration, validation) Chris Adeniyi-Jones (AArch64 syscall-emulation) Prakash Ramrakhyani (validation) Dam Sunwoo (validation) Chander Sudanthi (validation) Stephan Diestelhorst (validation) Andreas Hansson (code integration, performance opt.) Eric Van Hensbergen (performance opt.) Gabe Black |
10027:532929273927 |
24-Jan-2014 |
Chris Adeniyi-Jones <Chris.Adeniyi-Jones@arm.com> |
sim: Add openat/fstatat syscalls and fix mremap
This patch adds support for the openat and fstatat syscalls and broadens the support for mremap to make it work on OS X. |
10023:91faf6649de0 |
24-Jan-2014 |
Matt Horsnell <matt.horsnell@ARM.com> |
base: add support for probe points and common probes
The probe patch is motivated by the desire to move analytical and trace code away from functional code. This is achieved by the probe interface which is essentially a glorified observer model.
What this means to users: * add a probe point and a "notify" call at the source of an "event" * add an isolated module, that is being used to carry out *your* analysis (e.g. generate a trace) * register that module as a probe listener Note: an example is given for reference in src/cpu/o3/simple_trace.[hh|cc] and src/cpu/SimpleTrace.py
What is happening under the hood: * every SimObject maintains has a ProbeManager. * during initialization (src/python/m5/simulate.py) first regProbePoints and the regProbeListeners is called on each SimObject. this hooks up the probe point notify calls with the listeners.
FAQs: Why did you develop probe points: * to remove trace, stats gathering, analytical code out of the functional code. * the belief that probes could be generically useful.
What is a probe point: * a probe point is used to notify upon a given event (e.g. cpu commits an instruction)
What is a probe listener: * a class that handles whatever the user wishes to do when they are notified about an event.
What can be passed on notify: * probe points are templates, and so the user can generate probes that pass any type of argument (by const reference) to a listener.
What relationships can be generated (1:1, 1:N, N:M etc): * there isn't a restriction. You can hook probe points and listeners up in a 1:1, 1:N, N:M relationship. They become useful when a number of modules listen to the same probe points. The idea being that you can add a small number of probes into the source code and develop a larger number of useful analysis modules that use information passed by the probes.
Can you give examples: * adding a probe point to the cpu's commit method allows you to build a trace module (outputting assembler), you could re-use this to gather instruction distribution (arithmetic, load/store, conditional, control flow) stats.
Why is the probe interface currently restricted to passing a const reference: * the desire, initially at least, is to allow an interface to observe functionality, but not to change functionality. * of course this can be subverted by const-casting.
What is the performance impact of adding probes: * when nothing is actively listening to the probes they should have a relatively minor impact. Profiling has suggested even with a large number of probes (60) the impact of them (when not active) is very minimal (<1%). |
10022:db307bac42fc |
24-Jan-2014 |
Andreas Hansson <Andreas.Hansson@ARM.com> |
sim: Expose the current voltage for each object as a stat |
10021:9d6d630f830e |
24-Jan-2014 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Expose the current clock period as a stat
This patch adds observability to the clock period of the clock domains by including it as a stat.
As a result of adding this, the regressions will be updated in a separate patch. |
10000:99bd071911cf |
29-Dec-2013 |
Christopher Torng <clt67@cornell.edu> |
sim: Add support for dynamic frequency scaling This patch provides support for DFS by having ClockedObjects register themselves with their clock domain at construction time in a member list. Using this list, a clock domain can update each member's tick to the curTick() before modifying the clock period.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
9990:12a0efdde000 |
29-Nov-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
base: Fix race in PollQueue and remove SIGALRM workaround
There is a race between enabling asynchronous IO for a file descriptor and IO events happening on that descriptor. A SIGIO won't normally be delivered if an event is pending when asynchronous IO is enabled. Instead, the signal will be raised the next time there is an event on the FD. This changeset simulates a SIGIO by setting the async_io flag when setting up asynchronous IO for an FD. This causes the main event loop to poll all file descriptors to check for pending IO. As a consequence of this, the old SIGALRM hack should no longer be needed and is therefore removed. |
9989:ba3be87e2a1d |
29-Nov-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
base: Clean up signal handling
The PollEvent class dynamically installs a SIGIO and SIGALRM handler when a file handler is registered. Most signal handlers currently get registered in the initSignals() function. This changeset moves the SIGIO/SIGALRM handlers to initSignals() to live with the other signal handlers. The original code installs SIGIO and SIGALRM with the SA_RESTART option to prevent syscalls from returning EINTR. This changeset consistently uses this flag for all signal handlers to ensure that other signals that trigger asynchronous behavior (e.g., statistics dumping) do not cause undesirable EINTR returns. |
9987:7efa5d115a4e |
26-Nov-2013 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: correct ticksToCycles() function. |
9983:2cce74fe359e |
25-Nov-2013 |
Steve Reinhardt <stever@gmail.com>, Nilay Vaish <nilay@cs.wisc.edu>, Ali Saidi <Ali.Saidi@ARM.com> |
sim: simulate with multiple threads and event queues This patch adds support for simulating with multiple threads, each of which operates on an event queue. Each sim object specifies which eventq is would like to be on. A custom barrier implementation is being added using which eventqs synchronize.
The patch was tested in two different configurations: 1. ruby_network_test.py: in this simulation L1 cache controllers receive requests from the cpu. The requests are replied to immediately without any communication taking place with any other level. 2. twosys-tsunami-simple-atomic: this configuration simulates a client-server system which are connected by an ethernet link.
We still lack the ability to communicate using message buffers or ports. But other things like simulation start and end, synchronizing after every quantum are working.
Committed by: Nilay Vaish |
9979:329b8a20958b |
12-Nov-2013 |
Anthony Gutierrez <atgutier@umich.edu> |
sim: fix event priority name for debug-start option |
9960:501c7384a5bc |
01-Nov-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Clarify the difference between tracing and debugging
This patch changes the name the command-line options related to debug output to all start with "debug" rather than being a mix of that and "trace". It also makes it clear that the breakpoint time is specified in ticks and not in cycles. |
9959:ad4564da49b5 |
31-Oct-2013 |
Chander Sudanthi <chander.sudanthi@arm.com> |
ARM: add support for TEEHBR access
Thumb2 ARM kernels may access the TEEHBR via thumbee_notifier in arch/arm/kernel/thumbee.c. The Linux kernel code just seems to be saving and restoring the register. This patch adds support for the TEEHBR cp14 register. Note, this may be a special case when restoring from an image that was run on a system that supports ThumbEE. |
9956:6f2b525b8f16 |
31-Oct-2013 |
Geoffrey Blake <Geoffrey.Blake@arm.com> |
dev: Fix race conditions in IDE device on newer kernels
Newer linux kernels and distros exercise more functionality in the IDE device than previously, exposing 2 races. The first race is the handling of aborted DMA commands would immediately report the device is ready back to the kernel and cause already in flight commands to assert the simulator when they returned and discovered an inconsitent device state. The second race was due to the Status register not being handled correctly, the interrupt status bit would get stuck at 1 and the driver eventually views this as a bad state and logs the condition to the terminal. This patch fixes these two conditions by making the device handle aborted commands gracefully and properly handles clearing the interrupt status bit in the Status register. |
9952:7437cc334df1 |
31-Oct-2013 |
Dam Sunwoo <dam.sunwoo@arm.com> |
sim: added option to serialize SimLoopExitEvent
SimLoopExitEvents weren't serialized by default. Some benchmarks utilize a delayed m5 exit pseudo op call to terminate the simulation and this event was lost when resuming from a checkpoint generated after the pseudo op call. This patch adds the capability to serialize the SimLoopExitEvents and enable serialization for m5_exit and m5_fail pseudo ops by default. Does not affect other generic SimLoopExitEvents. |
9879:5fad1d2eb314 |
18-Sep-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
sim: Fix undefined behavior in the pseudo-inst interface
The order between updating and using arg_num in PseudoInst::pseudoInst() is currently undefined. This changeset explicitly updates arg_num after it has been used to extract an argument. |
9855:a317086a3e19 |
05-Sep-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Fix clang warning for unused variable
This patch ensures the NULL ISA can build without causing issues with an unused variable. |
9850:87d6b41749e9 |
04-Sep-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Resurrect the NOISA build target and rename it NULL
This patch makes it possible to once again build gem5 without any ISA. The main purpose is to enable work around the interconnect and memory system without having to build any CPU models or device models.
The regress script is updated to include the NULL ISA target. Currently no regressions make use of it, but all the testers could (and perhaps should) transition to it. |
9848:a733a8eb6363 |
04-Sep-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
arch: Header clean up for NOISA resurrection
This patch is a first step to getting NOISA working again. A number of redundant includes make life more difficult than it has to be and this patch simply removes them. There are also some redundant forward declarations removed. |
9847:29941c87f7b0 |
04-Sep-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
alpha: Move system virtProxy to Alpha only
This patch moves the system virtual port proxy to the Alpha system only to make the resurrection of the NOISA slightly less painful. Alpha is the only ISA that is actually using it. |
9827:f47274776aa0 |
19-Aug-2013 |
Akash Bagdia <akash.bagdia@arm.com> |
power: Add voltage domains to the clock domains
This patch adds the notion of voltage domains, and groups clock domains that operate under the same voltage (i.e. power supply) into domains. Each clock domain is required to be associated with a voltage domain, and the latter requires the voltage to be explicitly set.
A voltage domain is an independently controllable voltage supply being provided to section of the design. Thus, if you wish to perform dynamic voltage scaling on a CPU, its clock domain should be associated with a separate voltage domain.
The current implementation of the voltage domain does not take into consideration cases where there are derived voltage domains running at ratio of native voltage domains, as with the case where there can be on-chip buck/boost (charge pumps) voltage regulation logic.
The regression and configuration scripts are updated with a generic voltage domain for the system, and one for the CPUs. |
9818:ebd7d3e04b5f |
07-Aug-2013 |
Nilay Vaish <nilay@cs.wisc.edu> |
x86: add tlb checkpointing This patch adds checkpointing support to x86 tlb. It upgrades the cpt_upgrader.py script so that previously created checkpoints can be updated. It moves the checkpoint version to 6. |
9814:7ad2b0186a32 |
18-Jul-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
mem: Set the cache line size on a system level
This patch removes the notion of a peer block size and instead sets the cache line size on the system level.
Previously the size was set per cache, and communicated through the interconnect. There were plenty checks to ensure that everyone had the same size specified, and these checks are now removed. Another benefit that is not yet harnessed is that the cache line size is now known at construction time, rather than after the port binding. Hence, the block size can be locally stored and does not have to be queried every time it is used.
A follow-on patch updates the configuration scripts accordingly. |
9793:6e6cefc1db1f |
27-Jun-2013 |
Akash Bagdia <akash.bagdia@arm.com> |
sim: Add the notion of clock domains to all ClockedObjects
This patch adds the notion of source- and derived-clock domains to the ClockedObjects. As such, all clock information is moved to the clock domain, and the ClockedObjects are grouped into domains.
The clock domains are either source domains, with a specific clock period, or derived domains that have a parent domain and a divider (potentially chained). For piece of logic that runs at a derived clock (a ratio of the clock its parent is running at) the necessary derived clock domain is created from its corresponding parent clock domain. For now, the derived clock domain only supports a divider, thus ensuring a lower speed compared to its parent. Multiplier functionality implies a PLL logic that has not been modelled yet (create a separate clock instead).
The clock domains should be used as a mechanism to provide a controllable clock source that affects clock for every clocked object lying beneath it. The clock of the domain can (in a future patch) be controlled by a handler responsible for dynamic frequency scaling of the respective clock domains.
All the config scripts have been retro-fitted with clock domains. For the System a default SrcClockDomain is created. For CPUs that run at a different speed than the system, there is a seperate clock domain created. This domain incorporates the CPU and the associated caches. As before, Ruby runs under its own clock domain.
The clock period of all domains are pre-computed, such that no virtual functions or multiplications are needed when calling clockPeriod. Instead, the clock period is pre-computed when any changes occur. For this to be possible, each clock domain tracks its children. |
9790:ccc428657233 |
27-Jun-2013 |
Akash Bagdia <akash.bagdia@arm.com> |
config: Add a system clock command-line option
This patch adds a 'sys_clock' command-line option and use it to assign clocks to the system during instantiation.
As part of this change, the default clock in the System class is removed and whenever a system is instantiated a system clock value must be set. A default value is provided for the command-line option.
The configs and tests are updated accordingly. |
9750:4e1f22617336 |
11-Jun-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
sim: Revert [34e3295b0e39] (sim: Fix early termination in mult...)
HG changset 34e3295b0e39 introduced a check in the main simulation loop that discards exit events that happen at the same tick as another exit event. This was supposed to fix a problem where a simulation script got confused by multiple exit events. This obviously breaks the simulator since it can hide important simulation events, such as a simulation failure, that happen at the same time as a non-fatal simulation event. |
9738:304a37519d11 |
03-Jun-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
arch: Create a method to finalize physical addresses in the TLB
Some architectures (currently only x86) require some fixing-up of physical addresses after a normal address translation. This is usually to remap devices such as the APIC, but could be used for other memory mapped devices as well. When running the CPU in a using hardware virtualization, we still need to do these address fix-ups before inserting the request into the memory system. This patch moves this patch allows that code to be used by such CPUs without doing full address translations. |
9733:9d85dfa4696c |
03-Jun-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
sim: Add debug output when executing pseudo-instructions |
9681:4597012dfa97 |
02-May-2013 |
Andreas Sandberg <andreas@sandberg.pp.se> |
sim: Add support for m5fail in pseudoInst() |
9659:403a4d20799a |
22-Apr-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Add a helper function to execute pseudo instructions
All architectures execute m5 pseudo instructions by setting up arguments according to the ABI and executing a magic instruction that contains an operation number. Handling of such instructions is currently spread across the different ISA implementations. This changeset introduces the PseudoInst::pseudoInst function which handles most of this in an architecture independent way. This is function is mainly intended to be used from KVM, but can also be used from the simulated CPUs. |
9648:f10eb34e3e38 |
22-Apr-2013 |
Dam Sunwoo <dam.sunwoo@arm.com> |
sim: separate nextCycle() and clockEdge() in clockedObjects
Previously, nextCycle() could return the *current* cycle if the current tick was already aligned with the clock edge. This behavior is not only confusing (not quite what the function name implies), but also caused problems in the drainResume() function. When exiting/re-entering the sim loop (e.g., to take checkpoints), the CPUs will drain and resume. Due to the previous behavior of nextCycle(), the CPU tick events were being rescheduled in the same ticks that were already processed before draining. This caused divergence from runs that did not exit/re-entered the sim loop. (Initially a cycle difference, but a significant impact later on.)
This patch separates out the two behaviors (nextCycle() and clockEdge()), uses nextCycle() in drainResume, and uses clockEdge() everywhere else. Nothing (other than name) should change except for the drainResume timing. |
9645:c483700ae0ce |
22-Apr-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Add helper functions that add PCEvents with custom arguments
This changeset adds support for forwarding arguments to the PC event constructors to following methods:
addKernelFuncEvent addFuncEvent
Additionally, this changeset adds the following helper method to the System base class:
addFuncEventOrPanic - Hook a PCEvent to a symbol, panic on failure.
addKernelFuncEventOrPanic - Hook a PCEvent to a kernel symbol, panic on failure.
System implementations have been updated to use the new functionality where appropriate. |
9641:2285b98847d7 |
17-Apr-2013 |
Deyuan Guo <guodeyuan@tsinghua.org.cn>, Nilay Vaish <nilay@cs.wisc.edu> |
base: load weak symbols from object file Without loading weak symbols into gem5, some function names and the given PC cannot correspond correctly, because the binding attributes of unction names in an ELF file are not only STB_GLOBAL or STB_LOCAL, but also STB_WEAK. This patch adds a function for loading weak symbols.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
9571:bd5fad6638b3 |
02-Mar-2013 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: remove duplicate check on stack size |
9554:406fbcf60223 |
19-Feb-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
scons: Add warning for missing declarations
This patch enables warnings for missing declarations. To avoid issues with SWIG-generated code, the warning is only applied to non-SWIG code. |
9550:e0e2c8f83d08 |
19-Feb-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
scons: Fix up numerous warnings about name shadowing
This patch address the most important name shadowing warnings (as produced when using gcc/clang with -Wshadow). There are many locations where constructor parameters and function parameters shadow local variables, but these are left unchanged. |
9545:508784fad4e5 |
19-Feb-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Make clock private and access using clockPeriod()
This patch makes the clock member private to the ClockedObject and forces all children to access it using clockPeriod(). This makes it impossible to inadvertently change the clock, and also makes it easier to transition to a situation where the clock is derived from e.g. a clock domain, or through a multiplier. |
9524:d6ffa982a68b |
15-Feb-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Add a system-global option to bypass caches
Virtualized CPUs and the fastmem mode of the atomic CPU require direct access to physical memory. We currently require caches to be disabled when using them to prevent chaos. This is not ideal when switching between hardware virutalized CPUs and other CPU models as it would require a configuration change on each switch. This changeset introduces a new version of the atomic memory mode, 'atomic_noncaching', where memory accesses are inserted into the memory system as atomic accesses, but bypass caches.
To make memory mode tests cleaner, the following methods are added to the System class:
* isAtomicMode() -- True if the memory mode is 'atomic' or 'direct'. * isTimingMode() -- True if the memory mode is 'timing'. * bypassCaches() -- True if caches should be bypassed.
The old getMemoryMode() and setMemoryMode() methods should never be used from the C++ world anymore. |
9493:890fc69ba53c |
31-Jan-2013 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: remove unused struct priority_compare |
9457:a4739b6f799d |
08-Jan-2013 |
LluÃs Vilanova <vilanova@ac.upc.edu> |
util: add m5_fail op.
Used as a command in full-system scripts helps the user ensure the benchmarks have finished successfully.
For example, one can use:
/path/to/benchmark args || /sbin/m5 fail 1
and thus ensure gem5 will exit with an error if the benchmark fails. |
9456:34e3295b0e39 |
08-Jan-2013 |
Tao Zhang <tao.zhang.0924@gmail.com> |
sim: Fix early termination in multi-core simulation under SE mode.
When "-I" (maximum instruction number) and "-F" (fastforward instruction number) are applied together, gem5 immediately exits after the cpu switching. The reason is that multiple exit events may be generated in the same cycle by Atomic CPU and inserted to mainEventQueue. However, mainEventQueue can only serve one exit event in one cycle. Therefore, the rest exit events are left in mainEventQueue without being descheduled or deleted, which causes gem5 exits immediately after the system resumes by cpu switching. |
9455:31afddc29cd4 |
08-Jan-2013 |
Mitch Hayenga <mitch.hayenga+gem5@gmail.com> |
arm: add access syscall for ARM SE mode
This patch adds the "access" syscall for ARM SE as required by some spec2006 benchmarks. |
9450:35d4879ad7c2 |
07-Jan-2013 |
Sascha Bischoff <sascha.bischoff@arm.com> |
stats: Fix swig wrapping for Tick in stats
Tick was not correctly wrapped for the stats system, and therefore it was not possible to configure the stats dumping from the python scripts without defining Ticks as long long. This patch fixes the wrapping of Tick by copying the typemap of uint64_t to Tick. |
9434:987d04d37a77 |
07-Jan-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
sim: Remove unused variables |
9431:8bb372a49e1b |
07-Jan-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
arm: Remove the register mapping hack used when copying TCs
In order to see all registers independent of the current CPU mode, the ARM architecture model uses the magic MISCREG_CPSR_MODE register to change the register mappings without actually updating the CPU mode. This hack is no longer needed since the thread context now provides a flat interface to the register file. This patch replaces the CPSR_MODE hack with the flat register interface. |
9425:a24092160ec7 |
07-Jan-2013 |
Andreas Sandberg <Andreas.Sandberg@ARM.com> |
arch: Move the ISA object to a separate section
After making the ISA an independent SimObject, it is serialized automatically by the Python world. Previously, this just resulted in an empty ISA section. This patch moves the contents of the ISA to that section and removes the explicit ISA serialization from the thread contexts, which makes it behave like a normal SimObject during serialization.
Note: This patch breaks checkpoint backwards compatibility! Use the cpt_upgrader.py utility to upgrade old checkpoints to the new format. |
9423:43caa4ca5979 |
07-Jan-2013 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
arch: Add support for invalidating TLBs when draining
This patch adds support for the memInvalidate() drain method. TLB flushing is requested by calling the virtual flushAll() method on the TLB.
Note: This patch renames invalidateAll() to flushAll() on x86 and SPARC to make the interface consistent across all supported architectures. |
9418:9923a5ab8c13 |
07-Jan-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
sim: Fatal if a clocked object is set to have a clock of 0
This patch adds a check to the clocked object constructor to ensure it is not configured to have a clock period of 0. |
9408:10a84dceab25 |
07-Jan-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
config: Do not use hardcoded physmem in fs script
This patch generalises the address range resolution for the I/O cache and I/O bridge such that they do not assume a single memory. The patch involves adding a parameter to the system which is then defined based on the memories that are to be visible from the I/O subsystem, whether behind a cache or a bridge.
The change is needed to allow interleaved memory controllers in the system. |
9397:6e6b8d8ab258 |
07-Jan-2013 |
Andreas Hansson <andreas.hansson@arm.com> |
base: Add wrapped protobuf output streams
This patch adds support for outputting protobuf messages through a ProtoOutputStream which hides the internal streams used by the library. The stream is created based on the name of an output file and optionally includes compression using gzip.
The output stream will start by putting a magic number in the file, and then for every message that is serialized prepend the size such that the stream can be written and read incrementally. At this point this merely serves as a proof of concept. |
9375:ecfd5607d5e9 |
04-Jan-2013 |
Gabe Black <gblack@eecs.umich.edu> |
SPARC: Keep a copy of the current ASI in the decoder.
Committed by: Nilay Vaish <nilay@cs.wisc.edu> |
9356:b279bad40aa3 |
16-Nov-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim: have a curTick per eventq This patch adds a _curTick variable to an eventq. This variable is updated whenever an event is serviced in function serviceOne(), or all events upto a particular time are processed in function serviceEvents(). This change helps when there are eventqs that do not make use of curTick for scheduling events. |
9346:7a9b5e0335a6 |
02-Nov-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Add drain methods to request additional cleanup operations
This patch adds the following two methods to the Drainable base class:
memWriteback() - Write back all dirty cache lines to memory using functional accesses.
memInvalidate() - Invalidate memory system buffers. Dirty data won't be written back.
Specifying calling memWriteback() after draining will allow us to checkpoint systems with caches. memInvalidate() can be used to drop memory system buffers in preparation for switching to an accelerated CPU model that bypasses the gem5 memory system (e.g., hardware virtualized CPUs).
Note: This patch only adds the methods to Drainable, the code for flushing the TLB and the cache is committed separately. |
9342:6fec8f26e56d |
02-Nov-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Move the draining interface into a separate base class
This patch moves the draining interface from SimObject to a separate class that can be used by any object needing draining. However, objects not visible to the Python code (i.e., objects not deriving from SimObject) still depend on their parents informing them when to drain. This patch also gets rid of the CountedDrainEvent (which isn't really an event) and replaces it with a DrainManager. |
9338:97b4a2be1e5b |
02-Nov-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Include object header files in SWIG interfaces
When casting objects in the generated SWIG interfaces, SWIG uses classical C-style casts ( (Foo *)bar; ). In some cases, this can degenerate into the equivalent of a reinterpret_cast (mainly if only a forward declaration of the type is available). This usually works for most compilers, but it is known to break if multiple inheritance is used anywhere in the object hierarchy.
This patch introduces the cxx_header attribute to Python SimObject definitions, which should be used to specify a header to include in the SWIG interface. The header should include the declaration of the wrapped object. We currently don't enforce header the use of the header attribute, but a warning will be generated for objects that do not use it. |
9332:ae2a5329ce96 |
02-Nov-2012 |
Dam Sunwoo <dam.sunwoo@arm.com> |
ARM: dump stats and process info on context switches
This patch enables dumping statistics and Linux process information on context switch boundaries (__switch_to() calls) that are used for Streamline integration (a graphical statistics viewer from ARM). |
9328:2fa2b16bdfc2 |
02-Nov-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim: Fix as issue where exit events on instr queues are used after freed. |
9313:0ad73254027b |
25-Oct-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
dev: Make default clock more reasonable for system and devices
This patch changes the default system clock from 1THz to 1GHz. This clock is used by all modules that do not override the default (parent clock), and primarily affects the IO subsystem. Every DMA device uses its clock to schedule the next transfer, and the change will thus cause this inter-transfer delay to be longer.
The default clock of the bus is removed, as the clock inherited from the system provides exactly the same value.
A follow-on patch will bump the stats. |
9296:f4ba9a861e65 |
15-Oct-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
ruby: reset timing after cache warm up Ruby system was recently converted to a clocked object. Such objects maintain state related to the time that has passed so far. During the cache warmup, Ruby system changes its own time and the global time. Later on, the global time is restored. So Ruby system also needs to reset its own time. |
9294:8fb03b13de02 |
15-Oct-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Port: Add protocol-agnostic ports in the port hierarchy
This patch adds an additional level of ports in the inheritance hierarchy, separating out the protocol-specific and protocl-agnostic parts. All the functionality related to the binding of ports is now confined to use BaseMaster/BaseSlavePorts, and all the protocol-specific parts stay in the Master/SlavePort. In the future it will be possible to add other protocol-specific implementations.
The functions used in the binding of ports, i.e. getMaster/SlavePort now use the base classes, and the index parameter is updated to use the PortID typedef with the symbolic InvalidPortID as the default. |
9293:df7c3f99ebca |
15-Oct-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Mem: Separate the host and guest views of memory backing store
This patch moves all the memory backing store operations from the independent memory controllers to the global physical memory. The main reason for this patch is to allow address striping in a future set of patches, but at this point it already provides some useful functionality in that it is now possible to change the number of memory controllers and their address mapping in combination with checkpointing. Thus, the host and guest view of the memory backing store are now completely separate.
With this patch, the individual memory controllers are far simpler as all responsibility for serializing/unserializing is moved to the physical memory. Currently, the functionality is more or less moved from AbstractMemory to PhysicalMemory without any major changes. However, in a future patch the physical memory will also resolve any ranges that are interleaved and properly assign the backing store to the memory controllers, and keep the host memory as a single contigous chunk per address range.
Functionality for future extensions which involve CPU virtualization also enable the host to get pointers to the backing store. |
9292:e57c7d9736a5 |
15-Oct-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Checkpoint: Make system serialize call children
This patch changes how the serialization of the system works. The base class had a non-virtual serialize and unserialize, that was hidden by a function with the same name for a number of subclasses (most likely not intentional as the base class should have been virtual). A few of the derived systems had no specialization at all (e.g. Power and x86 that simply called the System::serialize), but MIPS and Alpha adds additional symbol table entries to the checkpoint.
Instead of overriding the virtual function, the additional entries are now printed through a virtual function (un)serializeSymtab. The reason for not calling System::serialize from the two related systems is that a follow up patch will require the system to also serialize the PhysicalMemory, and if this is done in the base class if ends up being between the general parts and the specialized symbol table.
With this patch, the checkpoint is not modified, as the order of the segments is unchanged. |
9281:9b6882b58a3f |
15-Oct-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Clock: Inherit the clock from parent by default
This patch changes the default 1 Tick clock period to a proxy that resolves the parents clock. As a result of this, the caches and L1-to-L2 bus, for example, will automatically use the clock period of the CPU unless explicitly overridden.
To ensure backwards compatibility, the System class overrides the proxy and specifies a 1 Tick clock. We could change this to something more reasonable in a follow-on patch, perhaps 1 GHz or something similar.
With this patch applied, all clocked objects should have a reasonable clock period set, and could start specifying delays in Cycles instead of absolute time. |
9262:547845010c08 |
25-Sep-2012 |
Sascha Bischoff <sascha.bischoff@arm.com> |
Statistics: Add a function to configure periodic stats dumping
This patch adds a function, periodicStatDump(long long period), which will dump and reset the statistics every period. This function is designed to be called from the python configuration scripts. This allows the periodic stats dumping to be configured more easilly at run time.
The period is currently specified as a long long as there are issues passing Tick into the C++ from the python as they have conflicting definitions. If the period is less than curTick, the first occurance occurs at curTick. If the period is set to 0, then the event is descheduled and the stats are not periodically dumped.
Due to issues when resumung from a checkpoint, the StatDump event must be moved forward such that it occues AFTER the current tick. As the function is called from the python, the event is scheduled before the system resumes from the checkpoint. Therefore, the event is moved using the updateEvents() function. This is called from simulate.py once the system has resumed from the checkpoint.
NOTE: It should be noted that this is a fairly temporary patch which re-adds the capability to extract temporal information from the communication monitors. It should not be used at the same time as anything that relies on dumping the statistics based on in simulation events i.e. a context switch. |
9258:baa17ba80e06 |
25-Sep-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
ARM: Squash outstanding walks when instructions are squashed. |
9254:f1b35c618252 |
25-Sep-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Move CPU-specific methods from SimObject to the BaseCPU class |
9253:e0d2a8e9f445 |
25-Sep-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Remove SimObject::setMemoryMode
Remove SimObject::setMemoryMode from the main SimObject class since it is only valid for the System class. In addition to removing the method from the C++ sources, this patch also removes getMemoryMode and changeTiming from SimObject.py and updates the simulation code to call the (get|set)MemoryMode method on the System object instead. |
9238:9fa13250abd8 |
21-Sep-2012 |
Lluc Alvarez <lluc.alvarez@bsc.es> |
SE: Ignore FUTEX_PRIVATE_FLAG of sys_futex
This patch ignores the FUTEX_PRIVATE_FLAG of the sys_futex system call in SE mode.
With this patch, when sys_futex with the options FUTEX_WAIT_PRIVATE or FUTEX_WAKE_PRIVATE is emulated, the FUTEX_PRIVATE_FLAG is ignored and so their behaviours are the regular FUTEX_WAIT and FUTEX_WAKE.
Emulating FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE as if they were non-private is safe from a functional point of view. The FUTEX_PRIVATE_FLAG does not change the semantics of the futex, it's just a mechanism to improve performance under certain circunstances that can be ignored in SE mode. |
9202:5c8e92f3d6f7 |
10-Sep-2012 |
Palle Lyckegaard <palle@lyckegaard.dk> |
NetBSD: Build on NetBSD
Minor patch against so building on NetBSD is possible. |
9196:87967784f101 |
07-Sep-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Update the SimObject documentation
Includes a small change in sim_object.cc that adds the name space to the output stream parameter in serializeAll. Leaving out the name space unfortunately confuses Doxygen. |
9195:77fd8912c9d4 |
07-Sep-2012 |
Andreas Sandberg <Andreas.Sandberg@arm.com> |
sim: Remove the unused SimObject::regFormulas method
Simulation objects normally register derived statistics, presumably what regFormulas originally was meant for, in regStats(). This patch removes regRegformulas since there is no need to have a separate method call to register formulas. |
9187:fd9a83e5178a |
07-Sep-2012 |
Krishnendra Nathella <Krishnendra.Nathella@arm.com> |
sim: add validation to make sure there is memory where we're loading the kernel |
9180:ee8d7a51651d |
28-Aug-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Clock: Add a Cycles wrapper class and use where applicable
This patch addresses the comments and feedback on the preceding patch that reworks the clocks and now more clearly shows where cycles (relative cycle counts) are used to express time.
Instead of bumping the existing patch I chose to make this a separate patch, merely to try and focus the discussion around a smaller set of changes. The two patches will be pushed together though.
This changes done as part of this patch are mostly following directly from the introduction of the wrapper class, and change enough code to make things compile and run again. There are definitely more places where int/uint/Tick is still used to represent cycles, and it will take some time to chase them all down. Similarly, a lot of parameters should be changed from Param.Tick and Param.Unsigned to Param.Cycles.
In addition, the use of curTick is questionable as there should not be an absolute cycle. Potential solutions can be built on top of this patch. There is a similar situation in the o3 CPU where lastRunningCycle is currently counting in Cycles, and is still an absolute time. More discussion to be had in other words.
An additional change that would be appropriate in the future is to perform a similar wrapping of Tick and probably also introduce a Ticks class along with suitable operators for all these classes. |
9179:666bc9df1e49 |
28-Aug-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Clock: Rework clocks to avoid tick-to-cycle transformations
This patch introduces the notion of a clock update function that aims to avoid costly divisions when turning the current tick into a cycle. Each clocked object advances a private (hidden) cycle member and a tick member and uses these to implement functions for getting the tick of the next cycle, or the tick of a cycle some time in the future.
In the different modules using the clocks, changes are made to avoid counting in ticks only to later translate to cycles. There are a few oddities in how the O3 and inorder CPU count idle cycles, as seen by a few locations where a cycle is subtracted in the calculation. This is done such that the regression does not change any stats, but should be revisited in a future patch.
Another, much needed, change that is not done as part of this patch is to introduce a new typedef uint64_t Cycle to be able to at least hint at the unit of the variables counting Ticks vs Cycles. This will be done as a follow-up patch.
As an additional follow up, the thread context still uses ticks for the book keeping of last activate and last suspend and this should probably also be changed into cycles as well. |
9174:2171e04a2ee5 |
27-Aug-2012 |
Anthony Gutierrez <atgutier@umich.edu> |
sim: fix overflow check in simulate because Tick is now unsigned |
9172:2f2e4582014f |
27-Aug-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
System: Remove redundant call to startupCPU |
9159:8adc048515b8 |
21-Aug-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
EventManager: Remove test for NULL pointer in constructor
This patch tidies up the EventManager constructor and prunes a corner case where the EventManager would initialise its eventq pointer to NULL. This would cause segmentation faults on actual use and should never happen. |
9158:d152d34a4adf |
21-Aug-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Clock: Make Tick unsigned and remove UTick
This patch makes the Tick unsigned and removes the UTick typedef. The ticks should never be negative, and there was only one major issue with removing it, caused by the o3 CPU using a -1 as an initial value.
The patch has no impact on any regressions. |
9157:e0bad9d7bbd6 |
21-Aug-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Clock: Move the clock and related functions to ClockedObject
This patch moves the clock of the CPU, bus, and numerous devices to the new class ClockedObject, that sits in between the SimObject and MemObject in the class hierarchy. Although there are currently a fair amount of MemObjects that do not make use of the clock, they potentially should do so, e.g. the caches should at some point have the same clock as the CPU, potentially with a 1:n ratio. This patch does not introduce any new clock objects or object hierarchies (clusters, clock domains etc), but is still a step in the direction of having a more structured approach clock domains.
The most contentious part of this patch is the serialisation of clocks that some of the modules (but not all) did previously. This serialisation should not be needed as the clock is set through the parameters even when restoring from the checkpoint. In other words, the state is "stored" in the Python code that creates the modules.
The nextCycle methods are also simplified and the clock phase parameter of the CPU is removed (this could be part of a clock object once they are introduced). |
9152:86c0e6ca5e7c |
15-Aug-2012 |
Anthony Gutierrez <atgutier@umich.edu> |
O3,ARM: fix some problems with drain/switchout functionality and add Drain DPRINTFs
This patch fixes some problems with the drain/switchout functionality for the O3 cpu and for the ARM ISA and adds some useful debug print statements.
This is an incremental fix as there are still a few bugs/mem leaks with the switchout code. Particularly when switching from an O3CPU to a TimingSimpleCPU. However, when switching from O3 to O3 cores with the ARM ISA I haven't encountered any more assertion failures; now the kernel will typically panic inside of simulation. |
9147:05137f17887e |
08-Aug-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
System: set kernel to null, if unspecified. |
9144:c773314f7098 |
06-Aug-2012 |
Steve Reinhardt <steve.reinhardt@amd.com> |
process: add progName() virtual function
This replaces a (potentially uninitialized) string field with a virtual function so that we can have a safe interface without requiring changes to the eio code. |
9143:db55c4b5136e |
06-Aug-2012 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: clean up open() code a bit. |
9142:e9b713df4e1d |
06-Aug-2012 |
Steve Reinhardt <steve.reinhardt@amd.com> |
str: add an overloaded startswith() utility method for various string types and use it in a few places. |
9141:593fe25c86a6 |
06-Aug-2012 |
Marc Orr <marc.orr@gmail.com> |
syscall emulation: Clean up ioctl handling, and implement for x86.
Enable different whitelists for different OS/arch combinations, since some use the generic Linux definitions only, and others use definitions inherited from earlier Unix flavors on those architectures.
Also update x86 function pointers so ioctl is no longer unimplemented on that platform.
This patch is a revised version of Vince Weaver's earlier patch. |
9112:6e854ea87bab |
11-Jul-2012 |
Marc Orr <marc.orr@gmail.com> |
syscall emulation: Add the futex system call. |
9110:09dcdb40b109 |
11-Jul-2012 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Add hook to call map() on Process from python. This enables configuration scripts to set up mappings from process virtual addresses to specific physical addresses in SE mode. This feature is needed to support modeling of user-accessible memories or devices in SE mode, avoiding the complexities of FS mode and the need to write a device driver. |
9099:7dee77da691b |
09-Jul-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
EventManager: Rename queue accessor and remove cast operator
This patch renames the queue() accessor to the less ambigious eventQueue, and also removes the cast operator. The queue() member function cause problems in derived classes that declare members with the same name, e.g. a MemObject subclass that has a packet queue on its own. The operator is not causing any harm at this point, but as it is not used there is little point in keeping it. |
9086:496304c8017d |
09-Jul-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
Fix: Address a few benign memory leaks
This patch is the result of static analysis identifying a number of memory leaks. The leaks are all benign as they are a result of not deallocating memory in the desctructor. The fix still has value as it removes false positives in the static analysis. |
9056:0e38b529c387 |
05-Jun-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
cpt: update some comments in the checkpoint migration script |
9053:9cad1c26c3b3 |
05-Jun-2012 |
Dam Sunwoo <dam.sunwoo@arm.com> |
Mem: add per-master stats to physmem
Added per-master stats (similar to cache stats) to physmem. |
9048:950298f29140 |
05-Jun-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim: Provide a framework for detecting out of data checkpoints and migrating them. |
9044:904ddeecc653 |
05-Jun-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
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. |
9034:8b9f227b64d8 |
30-May-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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. |
9008:59d2bcf37782 |
19-May-2012 |
Gabe Black <gblack@eecs.umich.edu> |
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. |
9007:7100059f7bfd |
14-May-2012 |
Lena Olson <lena@cs.wisc.edu> |
Mem: Fix size check when allocating physical memory |
8990:5d80de4bbf96 |
10-May-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
gem5: fix a number of use after free issues |
8986:4cc63185478b |
10-May-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
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(). |
8975:7f36d4436074 |
01-May-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
MEM: Separate requests and responses for timing accesses
This patch moves send/recvTiming and send/recvTimingSnoop from the Port base class to the MasterPort and SlavePort, and also splits them into separate member functions for requests and responses: send/recvTimingReq, send/recvTimingResp, and send/recvTimingSnoopReq, send/recvTimingSnoopResp. A master port sends requests and receives responses, and also receives snoop requests and sends snoop responses. A slave port has the reciprocal behaviour as it receives requests and sends responses, and sends snoop requests and receives snoop responses.
For all MemObjects that have only master ports or slave ports (but not both), e.g. a CPU, or a PIO device, this patch merely adds more clarity to what kind of access is taking place. For example, a CPU port used to call sendTiming, and will now call sendTimingReq. Similarly, a response previously came back through recvTiming, which is now recvTimingResp. For the modules that have both master and slave ports, e.g. the bus, the behaviour was previously relying on branches based on pkt->isRequest(), and this is now replaced with a direct call to the apprioriate member function depending on the type of access. Please note that send/recvRetry is still shared by all the timing accessors and remains in the Port base class for now (to maintain the current bus functionality and avoid changing the statistics of all regressions).
The packet queue is split into a MasterPort and SlavePort version to facilitate the use of the new timing accessors. All uses of the PacketQueue are updated accordingly.
With this patch, the type of packet (request or response) is now well defined for each type of access, and asserts on pkt->isRequest() and pkt->isResponse() are now moved to the appropriate send member functions. It is also worth noting that sendTimingSnoopReq no longer returns a boolean, as the semantics do not alow snoop requests to be rejected or stalled. All these assumptions are now excplicitly part of the port interface itself. |
8948:e95ee70f876c |
14-Apr-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
MEM: Separate snoops and normal memory requests/responses
This patch introduces port access methods that separates snoop request/responses from normal memory request/responses. The differentiation is made for functional, atomic and timing accesses and builds on the introduction of master and slave ports.
Before the introduction of this patch, the packets belonging to the different phases of the protocol (request -> [forwarded snoop request -> snoop response]* -> response) all use the same port access functions, even though the snoop packets flow in the opposite direction to the normal packet. That is, a coherent master sends normal request and receives responses, but receives snoop requests and sends snoop responses (vice versa for the slave). These two distinct phases now use different access functions, as described below.
Starting with the functional access, a master sends a request to a slave through sendFunctional, and the request packet is turned into a response before the call returns. In a system without cache coherence, this is all that is needed from the functional interface. For the cache-coherent scenario, a slave also sends snoop requests to coherent masters through sendFunctionalSnoop, with responses returned within the same packet pointer. This is currently used by the bus and caches, and the LSQ of the O3 CPU. The send/recvFunctional and send/recvFunctionalSnoop are moved from the Port super class to the appropriate subclass.
Atomic accesses follow the same flow as functional accesses, with request being sent from master to slave through sendAtomic. In the case of cache-coherent ports, a slave can send snoop requests to a master through sendAtomicSnoop. Just as for the functional access methods, the atomic send and receive member functions are moved to the appropriate subclasses.
The timing access methods are different from the functional and atomic in that requests and responses are separated in time and send/recvTiming are used for both directions. Hence, a master uses sendTiming to send a request to a slave, and a slave uses sendTiming to send a response back to a master, at a later point in time. Snoop requests and responses travel in the opposite direction, similar to what happens in functional and atomic accesses. With the introduction of this patch, it is possible to determine the direction of packets in the bus, and no longer necessary to look for both a master and a slave port with the requested port id.
In contrast to the normal recvFunctional, recvAtomic and recvTiming that are pure virtual functions, the recvFunctionalSnoop, recvAtomicSnoop and recvTimingSnoop have a default implementation that calls panic. This is to allow non-coherent master and slave ports to not implement these functions. |
8946:fb6c89334b86 |
14-Apr-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
clang/gcc: Fix compilation issues with clang 3.0 and gcc 4.6
This patch addresses a number of minor issues that cause problems when compiling with clang >= 3.0 and gcc >= 4.6. Most importantly, it avoids using the deprecated ext/hash_map and instead uses unordered_map (and similarly so for the hash_set). To make use of the new STL containers, g++ and clang has to be invoked with "-std=c++0x", and this is now added for all gcc versions >= 4.6, and for clang >= 3.0. For gcc >= 4.3 and <= 4.5 and clang <= 3.0 we use the tr1 unordered_map to avoid the deprecation warning.
The addition of c++0x in turn causes a few problems, as the compiler is more stringent and adds a number of new warnings. Below, the most important issues are enumerated:
1) the use of namespaces is more strict, e.g. for isnan, and all headers opening the entire namespace std are now fixed.
2) another other issue caused by the more stringent compiler is the narrowing of the embedded python, which used to be a char array, and is now unsigned char since there were values larger than 128.
3) a particularly odd issue that arose with the new c++0x behaviour is found in range.hh, where the operator< causes gcc to complain about the template type parsing (the "<" is interpreted as the beginning of a template argument), and the problem seems to be related to the begin/end members introduced for the range-type iteration, which is a new feature in c++11.
As a minor update, this patch also fixes the build flags for the clang debug target that used to be shared with gcc and incorrectly use "-ggdb". |
8931:7a1dfb191e3f |
06-Apr-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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. |
8922:17f037ad8918 |
30-Mar-2012 |
William Wang <william.wang@arm.com> |
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. |
8902:75b524b64c28 |
19-Mar-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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). |
8901:bba76d164f9e |
19-Mar-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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. |
8885:52bbd95b31ed |
09-Mar-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
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. |
8852:c744483edfcf |
24-Feb-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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. |
8839:eeb293859255 |
13-Feb-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
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. |
8834:21e8d54ecf07 |
12-Feb-2012 |
Anthony Gutierrez <atgutier@umich.edu> |
cpu: add separate stats for insts/ops both globally and per cpu model |
8832:247fee427324 |
12-Feb-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
mem: Add a master ID to each request object.
This change adds a master id to each request object which can be used identify every device in the system that is capable of issuing a request. This is part of the way to removing the numCpus+1 stats in the cache and replacing them with the master ids. This is one of a series of changes that make way for the stats output to be changed to python. |
8826:6cc162805986 |
10-Feb-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
sim/system: initialize the pagePtr variable |
8813:223945df5510 |
03-Feb-2012 |
Gabe Black <gblack@eecs.umich.edu> |
System: Forgot to qrefresh with my last change. |
8812:8bdfb1947cff |
03-Feb-2012 |
Gabe Black <gblack@eecs.umich.edu> |
System: Fix the check which detects running out of physical memory.
The code that checks whether pages allocated by allocPhysPages only checks that the first page fits into physical memory, not that all of them do. This change makes the code check the last page which should work properly. This function used to only allocate one page at a time, so the first page and last page used to be the same thing. |
8809:bb10807da889 |
01-Feb-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Merge with head, hopefully the last time for this batch. |
8806:669e93d79ed9 |
29-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Implement Ali's review feedback.
Try to decrease indentation, and remove some redundant FullSystem checks. |
8801:1a84c6a81299 |
28-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Make SE vs. FS mode a runtime parameter. |
8799:dac1e33e07b0 |
28-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Merge with the main repo. |
8798:adaa92be9037 |
16-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Merge yet again with the main repository. |
8796:a2ae5c378d0a |
07-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Merge with the main repository again. |
8795:0909f8ed7aa0 |
07-Jan-2012 |
Gabe Black <gblack@eecs.umich.edu> |
Merge with main repository. |
8794:e2ac2b7164dd |
18-Nov-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Get rid of includes of config/full_system.hh. |
8784:05fb20d7064b |
02-Nov-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Get rid of FULL_SYSTEM in sim. |
8777:dd43f1c9fa0a |
31-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Make the functions available from the TC consistent between SE and FS. |
8774:232b5574d9c3 |
30-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Compile in system events in SE mode. |
8773:ac39e3421c34 |
30-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
System: Push boot_cpu_frequency down into the subclasses that actually use it.
This parameter depends on a number of coincidences to work properly. First, there must be an array assigned to system called "cpu" even though there's no parameter called that. Second, the items in the "cpu" array have to have a "clock" parameter which has a "frequency" member. This is true of the normal CPUs, but isn't true of the memory tester CPUs. This happened to work before because the memory tester CPUs were only used in SE mode where this parameter was being excluded. Since everything is being pulled into a common binary, this won't work any more. Since the boot_cpu_frequency parameter is only used by Alpha's Linux System object (and Mips's through copy and paste), the definition of that parameter is moved down to those objects specifically. |
8770:81354d3836d4 |
30-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Build syscall_emul.cc in FS mode. |
8769:f95b2a679eb0 |
30-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Make the system object more consistent between SE and FS. |
8766:b0773af78423 |
30-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Build the base process class in FS. |
8765:659670964330 |
16-Oct-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Make some system funcs available in SE and FS. |
8741:491297d019f3 |
30-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Remove System::platform and Platform::intrFrequency.
In order for a system object to work in SE mode and FS mode, it has to either always require a platform object even in SE mode, or get rid of the requirement all together. Making SE mode carry around unnecessary/unused bits of FS seems less than ideal, so I decided to go with the second option. The platform pointer in the System class was used for exactly one purpose, a path for the Alpha Linux system object to get to the real time clock and read its frequency so that it could short cut the loops_per_jiffy calculation. There was also a copy and pasted implementation in MIPS, but since it was only there because it was there in Alpha I still count that as one use.
This change reverses the mechanism that communicates the RTC frequency so that the Tsunami platform object pushes it up to the AlphaSystem object. This is slightly less specific than it could be because really only the AlphaLinuxSystem uses it. Because the intrFrequency function on the Platform class was no longer necessary (and unimplemented on anything but Alpha) it was eliminated.
After this change, a platform will need to have a system, but a system won't have to have a platform. |
8737:770ccf3af571 |
31-Jan-2012 |
Koan-Sin Tan <koansin.tan@gmail.com> |
clang: Enable compiling gem5 using clang 2.9 and 3.0
This patch adds the necessary flags to the SConstruct and SConscript files for compiling using clang 2.9 and later (on Ubuntu et al and OSX XCode 4.2), and also cleans up a bunch of compiler warnings found by clang. Most of the warnings are related to hidden virtual functions, comparisons with unsigneds >= 0, and if-statements with empty bodies. A number of mismatches between struct and class are also fixed. clang 2.8 is not working as it has problems with class names that occur in multiple namespaces (e.g. Statistics in kernel_stats.hh).
clang has a bug (http://llvm.org/bugs/show_bug.cgi?id=7247) which causes confusion between the container std::set and the function Packet::set, and this is currently addressed by not including the entire namespace std, but rather selecting e.g. "using std::vector" in the appropriate places. |
8734:79592b2b1d55 |
31-Jan-2012 |
Dam Sunwoo <dam.sunwoo@arm.com> |
util: implements "writefile" gem5 op to export file from guest to host filesystem
Usage: m5 writefile <filename>
File will be created in the gem5 output folder with the identical filename. Implementation is largely based on the existing "readfile" functionality. Currently does not support exporting of folders. |
8720:32e4b41c10e5 |
25-Jan-2012 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim: display final value of curTick in stats Different from sim_ticks in that this value is restored from checkpoints and is never reset. Useful for aligning with framebuffer output ticks |
8711:c7e14f52c682 |
17-Jan-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
MEM: Separate queries for snooping and address ranges
This patch simplifies the address-range determination mechanism and also unifies the naming across ports and devices. It further splits the queries for determining if a port is snooping and what address ranges it responds to (aiming towards a separation of cache-maintenance ports and pure memory-mapped ports). Default behaviours are such that most ports do not have to define isSnooping, and master ports need not implement getAddrRanges. |
8706:b1838faf3bcc |
17-Jan-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
MEM: Add port proxies instead of non-structural ports
Port proxies are used to replace non-structural ports, and thus enable all ports in the system to correspond to a structural entity. This has the advantage of accessing memory through the normal memory subsystem and thus allowing any constellation of distributed memories, address maps, etc. Most accesses are done through the "system port" that is used for loading binaries, debugging etc. For the entities that belong to the CPU, e.g. threads and thread contexts, they wrap the CPU data port in a port proxy.
The following replacements are made: FunctionalPort > PortProxy TranslatingPort > SETranslatingPortProxy VirtualPort > FSTranslatingPortProxy |
8703:f2ac0bca75df |
17-Jan-2012 |
Andreas Hansson <andreas.hansson@arm.com> |
MEM: Add the system port as a central access point
The system port is used as a globally reachable access point to the memory subsystem. The benefit of using an actual port is that the usual infrastructure is used to resolve any access and thus makes the overall system able to handle distributed memories in any configuration, and also makes the accesses agnostic to the address map. This patch only introduces the port and does not actually use it for anything. |
8666:97d873b8b13e |
09-Jan-2012 |
Prakash Ramrakhyani <Prakash.Ramrakhyani@arm.com> |
sim: Enable sampling of run-time for code-sections marked using pseudo insts.
This patch adds a mechanism to collect run time samples for specific portions of a benchmark, using work_begin and work_end pseudo instructions.It also enhances the histogram stat to report geometric mean. |
8648:974f0e4a9ff6 |
05-Jan-2012 |
Nilay Vaish <nilay@cs.wisc.edu> |
eventq: add a function for replacing head of the queue This patch adds a function for replacing the event at the head of the queue with another event. This helps in running a different set of events. Events already scheduled can processed by replacing the original head event back. This function has been specifically added to support cache warmup and cooldown required for creating and restoring checkpoints. |
8633:91be9d7942c7 |
01-Dec-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
SE: Don't warn when not extending stack as it's too noisy with O3. |
8603:690417d95f6d |
28-Oct-2011 |
Nilay Vaish<nilay@cs.wisc.edu> |
Merged with recent changes. |
8601:af28085882dc |
23-Oct-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
SE: move page allocation from PageTable to Process
PageTable supported an allocate() call that called back through the Process to allocate memory, but did not have a method to map addresses without allocating new pages. It makes more sense for Process to do the allocation, so this method was renamed allocateMem() and moved to Process, and uses a new map() call on PageTable.
The remaining uses of the process pointer in PageTable were only to get the name and the PID, so by passing these in directly in the constructor, we can make PageTable completely independent of Process. |
8600:b0d7c64ada19 |
23-Oct-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: implement MAP_FIXED option to mmap() |
8597:45c9f664a365 |
20-Oct-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
SimObject: add export_method* hooks to export C++ methods to Python
Replace the (broken as of previous changeset) swig_objdecl() method that allowed/forced you to substitute a whole new C++ struct definition for SWIG to wrap with a set of export_method* hooks that let you just declare a set of C++ methods (or other declarations) that get inserted in the auto-generated struct.
Restore the System get/setMemoryMode methods, and use this mechanism to specialize SimObject as well, eliminating teh need for sim_object.i. Needed bits of sim_object.i are moved to the new pyobject.i. Also sucked a little SimObject specialization into cxx_param_decl() allowing us to get rid of src/sim/sim_object_params.hh. Now the generation and wrapping of the base SimObject param struct is more in line with how derived objects are handled. |
8596:e6e22fa77883 |
20-Oct-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
scons/swig: refactor some of the scons/SWIG code
- Move the random bits of SWIG code generation out of src/SConscript file and into methods on the objects being wrapped. - Cleaned up some variable naming and added some comments to make the process a little clearer. - Did a little generated file/module renaming: - vptype_Foo now Foo_vector - init_Foo is now Foo_init This makes it easier to see all the Foo-related files in a sorted directory listing. - Made cxx_predecls and swig_predecls normal SimObject classmethods. - Got rid of swig_objdecls hook, even though this breaks the System objects get/setMemoryMode method exports. Will be fixing this in a future changeset. |
8589:d0772caaeacd |
27-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Faults: Make the generic faults more consistent between SE and FS.
All of the classes will now be available in both modes, and only GenericPageTableFault will continue to check the mode for conditional compilation. It uses a process object to handle the fault in SE mode, and for now those aren't available in FS mode. |
8586:cf26f9578cd0 |
26-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
SE/FS: Define a const bool FullSystem which will equal FULL_SYSTEM.
This constant will have the same value as FULL_SYSTEM but will not be usable by the preprocessor. It can be substituted into places where FULL_SYSTEM is used in a C++ context and will make it easier to find which parts of the simulator still use FULL_SYSTEM with the preprocessor using grep. |
8581:56f97760eadd |
22-Sep-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
event: minor cleanup Initialize flags via the Event constructor instead of calling setFlags() in the body of the derived class's constructor. I forget exactly why, but this made life easier when implementing multi-queue support.
Also rename Event::getFlags() to isFlagSet() to better match common usage, and get rid of some unused Event methods. |
8580:a32e8ce374d6 |
22-Sep-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
pseudo_inst: clean up workbegin/workend functions Use exitSimLoop() function instead of explicitly scheduling on mainEventQueue (which won't work once we go to multiple event queues). Also introduced a local params variable to shorten a lot of expressions. |
8569:498d3aacd292 |
19-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Faults: Get rid of the unused isAlignmentFault and isMachineCheckFault.
These functions aren't called anywhere and are probably only theoretically useful. |
8561:26593b179f01 |
19-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Endianness: Make it easier to check the compiled in guest endianness.
It was technically possible but clumsy to determine what endianness a guest was configured with using the state in byteswap.hh. This change makes that information available more directly.
Also get rid of unused (and mildly redundant) ByteOrderDiffers constant. |
8559:614bcf7e11b4 |
19-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
PseudoInst: Make all the pseudo insts available in SE and FS. |
8555:6fd8d0432d8d |
19-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Pseudoinst: Add an initParam pseudo inst function. |
8545:a3992291e230 |
13-Sep-2011 |
Ali Saidi <saidi@eecs.umich.edu> |
LSQ: Only trigger a memory violation with a load/load if the value changes.
Only create a memory ordering violation when the value could have changed between two subsequent loads, instead of just when loads go out-of-order to the same address. While not very common in the case of Alpha, with an architecture with a hardware table walker this can happen reasonably frequently beacuse a translation will miss and start a table walk and before the CPU re-schedules the faulting instruction another one will pass it to the same address (or cache block depending on the dendency checking).
This patch has been tested with a couple of self-checking hand crafted programs to stress ordering between two cores.
The performance improvement on SPEC benchmarks can be substantial (2-10%). |
8543:9678812ccb62 |
10-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
PseudoInst: Add compiler guards to pseudo_inst.hh. |
8539:7d3ea3c65c66 |
09-Sep-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Stack: Tidy up some comments, a warning, and make stack extension consistent.
Do some minor cleanup of some recently added comments, a warning, and change other instances of stack extension to be like what's now being done for x86. |
8534:09745e0c3dd9 |
02-Sep-2011 |
Lisa Hsu <Lisa.Hsu@amd.com> |
TLB: comments and a helpful warning.
Nothing big here, but when you have an address that is not in the page table request to be allocated, if it falls outside of the maximum stack range all you get is a page fault and you don't know why. Add a little warn() to explain it a bit. Also add some comments and alter logic a little so that you don't totally ignore the return value of checkAndAllocNextPage(). |
8460:3893d9d2c6c2 |
10-Jul-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
O3: Make sure fetch doesn't go off into the weeds during speculation. |
8335:9228e00459d4 |
02-Jun-2011 |
Nathan Binkert <nate@binkert.org> |
scons: rename TraceFlags to DebugFlags |
8332:23711432221f |
02-Jun-2011 |
Nathan Binkert <nate@binkert.org> |
copyright: clean up copyright blocks |
8325:76095b05f4da |
23-May-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: style fixes in sim/process.hh |
8324:aa7a67647c7b |
23-May-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall emul: fix Power Linux mmap constant, plus other cleanup
We were getting a spurious warning in the regressions that turned out to be due to having the wrong value for TGT_MAP_ANONYMOUS for Power Linux, but in the process of tracking it down I ended up doing some cleanup of the mmap handling in general. |
8320:c03e683e83fe |
23-May-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: add some DPRINTFs for debugging unserialization Also got rid of unused C++ unserializeAll() method (this is now handled in Python) |
8278:4fe5f7f5094c |
04-May-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
Debug: Add a function to cause the simulator to create a checkpoint from GDB. |
8274:883ab6df7e69 |
04-May-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
Core: Add some documentation about the sim clocks. |
8240:38befb82b2c9 |
19-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
stats: rename stats so they can be used as python expressions |
8234:a08c5fb4cd89 |
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
python: cleanup python code so stuff doesn't automatically happen at startup this allows things to be overridden at startup (e.g. for tests) |
8233:15b5ea80fd95 |
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
scons: make a flexible system for guarding source files This is similar to guards on mercurial queues and they're used for selecting which files are compiled into some given object. We already do something similar, but it's mostly hard coded for the m5 binary and the m5 library and I'd like to make it more flexible to better support the unittests |
8232:b28d06a175be |
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
trace: reimplement the DTRACE function so it doesn't use a vector At the same time, rename the trace flags to debug flags since they have broader usage than simply tracing. This means that --trace-flags is now --debug-flags and --trace-help is now --debug-help |
8231:51cf7f3cf9ac |
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
debug: create a Debug namespace |
8229:78bf55f23338 |
15-Apr-2011 |
Nathan Binkert <nate@binkert.org> |
includes: sort all includes |
8186:d54b7775a6b0 |
29-Mar-2011 |
Korey Sewell <ksewell@umich.edu> |
sim: typecast Tick to UTick for eventQ assert |
8149:12bd3ad81f9d |
17-Mar-2011 |
Chris Emmons <Chris.Emmons@ARM.com> |
ARM: Add minimal ARM_SE support for m5threads.
Updated some of the assembly code sequences to use armv7 instructions and coprocessor 15 for storing the TLS pointer. |
8142:e08035e1a1f6 |
17-Mar-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
ARM: Allow conditional quiesce instructions.
This patch prevents not executed conditional instructions marked as IsQuiesce from stalling the pipeline indefinitely. If the instruction is not executed the quiesceSkip psuedoinst is called which schedules a wakes up call to the fetch stage. |
7948:20da8e9ed59f |
11-Feb-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
Serialization: Allow serialization of stl lists |
7944:1daf51f62013 |
11-Feb-2011 |
Giacomo Gabrielli <Giacomo.Gabrielli@arm.com> |
O3: Enhance data address translation by supporting hardware page table walkers.
Some ISAs (like ARM) relies on hardware page table walkers. For those ISAs, when a TLB miss occurs, initiateTranslation() can return with NoFault but with the translation unfinished.
Instructions experiencing a delayed translation due to a hardware page table walk are deferred until the translation completes and kept into the IQ. In order to keep track of them, the IQ has been augmented with a queue of the outstanding delayed memory instructions. When their translation completes, instructions are re-executed (only their initiateAccess() was already executed; their DTB translation is now skipped). The IEW stage has been modified to support such a 2-pass execution. |
7942:c122a3e1b204 |
11-Feb-2011 |
Ali Saidi <Ali.Saidi@ARM.com> |
Timesync: Make sure timesync event is setup after curTick is unserialized
Setup initial timesync event in initState or loadState so that curTick has been updated to the new value, otherwise the event is scheduled in the past. |
7914:eee5bb0fb8ea |
07-Feb-2011 |
Brad Beckmann <Brad.Beckmann@amd.com> |
m5: added work completed monitoring support |
7897:d9e8b1fd1a9f |
07-Feb-2011 |
Joel Hestness <hestness@cs.utexas.edu> |
mcpat: Adds McPAT performance counters
Updated patches from Rick Strong's set that modify performance counters for McPAT |
7891:57dec8c3e03f |
04-Feb-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Fault: Forgot to refresh to grab these header guard updates. |
7878:d3e6ebcccabf |
04-Feb-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Fault: Rename sim/fault.hh to fault_fwd.hh to distinguish it from faults.hh. |
7867:3ee9e6c2e8f7 |
31-Jan-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Fault: Move the definition of NoFault from faults.hh to fault.hh.
Moving the definition of NoFault into fault.hh doesn't bring any new dependencies with it, and allows some files to include just fault.hh which has less baggage. NoFault will still be available to everything that includes faults.hh because it includes fault.hh. |
7864:494b5426e70d |
21-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
checkpointing: fix bug from curTick accessor conversion.
Regex replacement of curTick with curTick() accidentally changed checkpoint key string for serialization but not for unserialization. |
7863:f84bfd45d607 |
19-Jan-2011 |
Gabe Black <gblack@eecs.umich.edu> |
TimeSync: Use the new setTick and getTick functions. |
7861:4ebff121cc0e |
19-Jan-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Time: Add a mechanism to prevent M5 from running faster than real time.
M5 skips over any simulated time where it doesn't have any work to do. When the simulation is active, the time skipped is short and the work done at any point in time is relatively substantial. If the time between events is long and/or the work to do at each event is small, it's possible for simulated time to pass faster than real time. When running a benchmark that can be good because it means the simulation will finish sooner in real time. When interacting with the real world through, for instance, a serial terminal or bridge to a real network, this can be a problem. Human or network response time could be greatly exagerated from the perspective of the simulation and make simulated events happen "too soon" from an external perspective.
This change adds the capability to force the simulation to run no faster than real time. It does so by scheduling a periodic event that checks to see if its simulated period is shorter than its real period. If it is, it stalls the simulation until they're equal. This is called time syncing.
A future change could add pseudo instructions which turn time syncing on and off from within the simulation. That would allow time syncing to be used for the interactive parts of a session but then turned off when running a benchmark using the m5 utility program inside a script. Time syncing would probably not happen anyway while running a benchmark because there would be plenty of work for M5 to do, but the event overhead could be avoided. |
7840:ed75cee5c793 |
15-Jan-2011 |
Nathan Binkert <nate@binkert.org> |
time: improve time datastructure
Use posix clock functions (and librt) if it is available. Inline a bunch of functions and implement more operators. * * * time: more cleanup |
7826:c06505ff551e |
10-Jan-2011 |
Gabe Black <gblack@eecs.umich.edu> |
Root: Get rid of unnecessary includes in root.cc. |
7823:dac01f14f20f |
08-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Replace curTick global variable with accessor functions. This step makes it easy to replace the accessor functions (which still access a global variable) with ones that access per-thread curTick values. |
7822:fc475ac7d2a4 |
08-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
stats: rename StatEvent() function to schedStatEvent(). This follows the style rules and is more descriptive. |
7821:f1d298b7416c |
08-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: clean up CountedDrainEvent slightly. There's no reason for it to derive from SimLoopExitEvent. This whole drain thing needs to be redone eventually, but this is a stopgap to make later changes to SimLoopExitEvent feasible. |
7820:4ee66d8c1dd8 |
08-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: delete unused CheckSwapEvent code. There's no way to even create one of these anymore. |
7819:afe8476ee9e9 |
08-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
pseudoinst: get rid of mainEventQueue references. Avoid direct references to mainEventQueue in pseudo-insts by indirecting through associated CPU object. Made exitSimLoop() more flexible to enable some of these. |
7811:a8fc35183c10 |
03-Jan-2011 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Make commenting on close namespace brackets consistent.
Ran all the source files through 'perl -pi' with this script:
s|\s*(};?\s*)?/\*\s*(end\s*)?namespace\s*(\S+)\s*\*/(\s*})?|} // namespace $3|; s|\s*};?\s*//\s*(end\s*)?namespace\s*(\S+)\s*|} // namespace $2\n|; s|\s*};?\s*//\s*(\S+)\s*namespace\s*|} // namespace $1\n|;
Also did a little manual editing on some of the arch/*/isa_traits.hh files and src/SConscript. |
7781:a9f9eed35b18 |
07-Dec-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
ARM: Support switchover with hardware table walkers |
7770:6286bb50127e |
19-Nov-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
SE: Fix simulating more than 4GB of RAM in SE mode
This change removes some dead code in PhysicalMemory, uses a 64 bit type for the page pointer in System (instead of 32 bit) and cleans up some style. |
7768:cdb18c1b51ea |
19-Nov-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
SCons: Support building without an ISA |
7733:08d6a773d1b6 |
08-Nov-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
ARM: Add checkpointing support |
7723:ee4ac00d0774 |
08-Nov-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
sim: Use forward declarations for ports.
Virtual ports need TLB data which means anything touching a file in the arch directory rebuilds any file that includes system.hh which in everything. |
7720:65d338a8dba4 |
31-Oct-2010 |
Gabe Black <gblack@eecs.umich.edu> |
ISA,CPU,etc: Create an ISA defined PC type that abstracts out ISA behaviors.
This change is a low level and pervasive reorganization of how PCs are managed in M5. Back when Alpha was the only ISA, there were only 2 PCs to worry about, the PC and the NPC, and the lsb of the PC signaled whether or not you were in PAL mode. As other ISAs were added, we had to add an NNPC, micro PC and next micropc, x86 and ARM introduced variable length instruction sets, and ARM started to keep track of mode bits in the PC. Each CPU model handled PCs in its own custom way that needed to be updated individually to handle the new dimensions of variability, or, in the case of ARMs mode-bit-in-the-pc hack, the complexity could be hidden in the ISA at the ISA implementation's expense. Areas like the branch predictor hadn't been updated to handle branch delay slots or micropcs, and it turns out that had introduced a significant (10s of percent) performance bug in SPARC and to a lesser extend MIPS. Rather than perpetuate the problem by reworking O3 again to handle the PC features needed by x86, this change was introduced to rework PC handling in a more modular, transparent, and hopefully efficient way.
PC type:
Rather than having the superset of all possible elements of PC state declared in each of the CPU models, each ISA defines its own PCState type which has exactly the elements it needs. A cross product of canned PCState classes are defined in the new "generic" ISA directory for ISAs with/without delay slots and microcode. These are either typedef-ed or subclassed by each ISA. To read or write this structure through a *Context, you use the new pcState() accessor which reads or writes depending on whether it has an argument. If you just want the address of the current or next instruction or the current micro PC, you can get those through read-only accessors on either the PCState type or the *Contexts. These are instAddr(), nextInstAddr(), and microPC(). Note the move away from readPC. That name is ambiguous since it's not clear whether or not it should be the actual address to fetch from, or if it should have extra bits in it like the PAL mode bit. Each class is free to define its own functions to get at whatever values it needs however it needs to to be used in ISA specific code. Eventually Alpha's PAL mode bit could be moved out of the PC and into a separate field like ARM.
These types can be reset to a particular pc (where npc = pc + sizeof(MachInst), nnpc = npc + sizeof(MachInst), upc = 0, nupc = 1 as appropriate), printed, serialized, and compared. There is a branching() function which encapsulates code in the CPU models that checked if an instruction branched or not. Exactly what that means in the context of branch delay slots which can skip an instruction when not taken is ambiguous, and ideally this function and its uses can be eliminated. PCStates also generally know how to advance themselves in various ways depending on if they point at an instruction, a microop, or the last microop of a macroop. More on that later.
Ideally, accessing all the PCs at once when setting them will improve performance of M5 even though more data needs to be moved around. This is because often all the PCs need to be manipulated together, and by getting them all at once you avoid multiple function calls. Also, the PCs of a particular thread will have spatial locality in the cache. Previously they were grouped by element in arrays which spread out accesses.
Advancing the PC:
The PCs were previously managed entirely by the CPU which had to know about PC semantics, try to figure out which dimension to increment the PC in, what to set NPC/NNPC, etc. These decisions are best left to the ISA in conjunction with the PC type itself. Because most of the information about how to increment the PC (mainly what type of instruction it refers to) is contained in the instruction object, a new advancePC virtual function was added to the StaticInst class. Subclasses provide an implementation that moves around the right element of the PC with a minimal amount of decision making. In ISAs like Alpha, the instructions always simply assign NPC to PC without having to worry about micropcs, nnpcs, etc. The added cost of a virtual function call should be outweighed by not having to figure out as much about what to do with the PCs and mucking around with the extra elements.
One drawback of making the StaticInsts advance the PC is that you have to actually have one to advance the PC. This would, superficially, seem to require decoding an instruction before fetch could advance. This is, as far as I can tell, realistic. fetch would advance through memory addresses, not PCs, perhaps predicting new memory addresses using existing ones. More sophisticated decisions about control flow would be made later on, after the instruction was decoded, and handed back to fetch. If branching needs to happen, some amount of decoding needs to happen to see that it's a branch, what the target is, etc. This could get a little more complicated if that gets done by the predecoder, but I'm choosing to ignore that for now.
Variable length instructions:
To handle variable length instructions in x86 and ARM, the predecoder now takes in the current PC by reference to the getExtMachInst function. It can modify the PC however it needs to (by setting NPC to be the PC + instruction length, for instance). This could be improved since the CPU doesn't know if the PC was modified and always has to write it back.
ISA parser:
To support the new API, all PC related operand types were removed from the parser and replaced with a PCState type. There are two warts on this implementation. First, as with all the other operand types, the PCState still has to have a valid operand type even though it doesn't use it. Second, using syntax like PCS.npc(target) doesn't work for two reasons, this looks like the syntax for operand type overriding, and the parser can't figure out if you're reading or writing. Instructions that use the PCS operand (which I've consistently called it) need to first read it into a local variable, manipulate it, and then write it back out.
Return address stack:
The return address stack needed a little extra help because, in the presence of branch delay slots, it has to merge together elements of the return PC and the call PC. To handle that, a buildRetPC utility function was added. There are basically only two versions in all the ISAs, but it didn't seem short enough to put into the generic ISA directory. Also, the branch predictor code in O3 and InOrder were adjusted so that they always store the PC of the actual call instruction in the RAS, not the next PC. If the call instruction is a microop, the next PC refers to the next microop in the same macroop which is probably not desirable. The buildRetPC function advances the PC intelligently to the next macroop (in an ISA specific way) so that that case works.
Change in stats:
There were no change in stats except in MIPS and SPARC in the O3 model. MIPS runs in about 9% fewer ticks. SPARC runs with 30%-50% fewer ticks, which could likely be improved further by setting call/return instruction flags and taking advantage of the RAS.
TODO:
Add != operators to the PCState classes, defined trivially to be !(a==b). Smooth out places where PCs are split apart, passed around, and put back together later. I think this might happen in SPARC's fault code. Add ISA specific constructors that allow setting PC elements without calling a bunch of accessors. Try to eliminate the need for the branching() function. Factor out Alpha's PAL mode pc bit into a separate flag field, and eliminate places where it's blindly masked out or tested in the PC. |
7707:e5b6f1157be3 |
16-Oct-2010 |
Gabe Black <gblack@eecs.umich.edu> |
GetArgument: Rework getArgument so that X86_FS compiles again.
When no size is specified for an argument, push the decision about what size to use into the ISA by passing a size of -1. |
7693:f1db1000d957 |
01-Oct-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
Debug: Implement getArgument() and function skipping for ARM.
In the process make add skipFuction() to handle isa specific function skipping instead of ifdefs and other ugliness. For almost all ABIs, 64 bit arguments can only start in even registers. Size is now passed to getArgument() so that 32 bit systems can make decisions about register selection for 64 bit arguments. The number argument is now passed by reference because getArgument() will need to change it based on the size of the argument and the current argument number.
For ARM, if the argument number is odd and a 64-bit register is requested the number must first be incremented to because all 64 bit arguments are passed in an even argument register. Then the number will be incremented again to access both halves of the argument. |
7680:f4eda002333b |
14-Sep-2010 |
Gabe Black <gblack@eecs.umich.edu> |
CPU: Trim unnecessary includes from some common files.
This reduces the scope of those includes and makes it less likely for there to be a dependency loop. This also moves the hashing functions associated with ExtMachInst objects to be with the ExtMachInst definitions and out of utility.hh. |
7678:f19b6a3a8cec |
13-Sep-2010 |
Gabe Black <gblack@eecs.umich.edu> |
Faults: Pass the StaticInst involved, if any, to a Fault's invoke method.
Also move the "Fault" reference counted pointer type into a separate file, sim/fault.hh. It would be better to name this less similarly to sim/faults.hh to reduce confusion, but fault.hh matches the name of the type. We could change Fault to FaultPtr to match other pointer types, and then changing the name of the file would make more sense. |
7674:8e3734851770 |
09-Sep-2010 |
Nathan Binkert <nate@binkert.org> |
init: don't build files that centralize python and swig code
Instead of putting all object files into m5/object/__init__.py, interrogate the importer to find out what should be imported. Instead of creating a single file that lists all of the embedded python modules, use static object construction to put those objects onto a list. Do something similar for embedded swig (C++) code. |
7673:b28bd1fa9a35 |
09-Sep-2010 |
Nathan Binkert <nate@binkert.org> |
scons: use code_formatter wherever we can in the build system |
7637:ee8afda92b31 |
25-Aug-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
Tracing: Fix trace so 'Predicated False' doesn't show up |
7630:ffea4f79784f |
23-Aug-2010 |
Gabe Black <gblack@eecs.umich.edu> |
Faults: Get rid of some commented out code in sim/faults.hh. |
7600:eff7f79f7dfd |
23-Aug-2010 |
Min Kyu Jeong <minkyu.jeong@arm.com> |
CPU: Make Exec trace to print predication result (if false) for memory instructions |
7580:6f77f379a594 |
23-Aug-2010 |
Ali Saidi <Ali.Saidi@arm.com> |
Loader: Make the load address mask be a parameter of the system rather than a constant.
This allows one two different OS requirements for the same ISA to be handled. Some OSes are compiled for a virtual address and need to be loaded into physical memory that starts at address 0, while other bare metal tools generate images that start at address 0. |
7576:4154f3e1edae |
23-Aug-2010 |
Ali Saidi <Ali.Saidi@ARM.com> |
Compiler: Fixes for GCC 4.5. |
7534:c76a14014c27 |
17-Aug-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
misc: add some AMD copyright notices Meant to add these with the previous batch of csets. |
7532:3f6413fc37a2 |
17-Aug-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: revamp unserialization procedure
Replace direct call to unserialize() on each SimObject with a pair of calls for better control over initialization in both ckpt and non-ckpt cases.
If restoring from a checkpoint, loadState(ckpt) is called on each SimObject. The default implementation simply calls unserialize() if there is a corresponding checkpoint section, so we get backward compatibility for existing objects. However, objects can override loadState() to get other behaviors, e.g., doing other programmed initializations after unserialize(), or complaining if no checkpoint section is found. (Note that the default warning for a missing checkpoint section is now gone.)
If not restoring from a checkpoint, we call the new initState() method on each SimObject instead. This provides a hook for state initializations that are only required when *not* restoring from a checkpoint.
Given this new framework, do some cleanup of LiveProcess subclasses and X86System, which were (in some cases) emulating initState() behavior in startup via a local flag or (in other cases) erroneously doing initializations in startup() that clobbered state loaded earlier by unserialize(). |
7527:fe90827a663f |
17-Aug-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: move iterating over SimObjects into Python. |
7525:722f2ad014a7 |
17-Aug-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: make Python Root object a singleton Enforce that the Python Root SimObject is instantiated only once. The C++ Root object already panics if more than one is created. This change avoids the need to track what the root object is, since it's available from Root.getInstance() (if it exists). It's now redundant to have the user pass the root object to functions like instantiate(), checkpoint(), and restoreCheckpoint(), so that arg is gone. Users who use configs/common/Simulate.py should not notice. |
7508:02b471d9d400 |
22-Jul-2010 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
Syscall: Don't close the simulator's standard file descriptors. |
7502:3ef7ff12c788 |
21-Jul-2010 |
Nathan Binkert <nate@binkert.org> |
python: Add mechanism to override code compiled into the exectuable If the user sets the environment variable M5_OVERRIDE_PY_SOURCE to True, then imports that would normally find python code compiled into the executable will instead first check in the absolute location where the code was found during the build of the executable. This only works for files in the src (or extras) directories, not automatically generated files.
This is a developer feature! |
7494:249f174e6f37 |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
checkpointing: another small overload fix On Nate's advice, overload 'char' as well as 'signed char' and 'unsigned char'. |
7492:acc1fbbef239 |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
sim: fold StartupCallback into SimObject There used to be a reason to have StartupCallback be a separate object, but not any more. Now it's just confusing. |
7491:e8ff1fb26dbc |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
checkpointing: minor cleanup. Move some static checkpoint stuff into the Checkpoint object namespace. |
7490:1803e46ddf57 |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
checkpointing: fix minor bug Somehow we now need to explicitly specialize on 'signed char' and not just 'char' to catch cases like int8_t |
7488:cf7c4345ea82 |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
process: get rid of some unused code & vars |
7487:2a5e4070155e |
06-Jul-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
process: minor format/style cleanup |
7460:41550bb10e08 |
15-Jun-2010 |
Nathan Binkert <nate@binkert.org> |
stats: get rid of the never-really-used event stuff |
7452:f98fe16f50ee |
09-Jun-2010 |
Lisa Hsu <Lisa.Hsu@amd.com> |
flags: add comment to avoid future deletions since code appears redundant. |
7451:97c34fea328a |
08-Jun-2010 |
Lisa Hsu <Lisa.Hsu@amd.com> |
flags: Unserializing old checkpoints before the introduction of the Initialized flag would break, set Initialized for events upon unserialization. |
7447:3fc243687abb |
03-Jun-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
More minor gdb-related cleanup. Found several more stale includes and forward decls. |
7445:dfd04ffc1773 |
03-Jun-2010 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Minor remote GDB cleanup. Expand the help text on the --remote-gdb-port option so people know you can use it to disable remote gdb without reading the source code, and thus don't waste any time trying to add a separate option to do that. Clean up some gdb-related cruft I found while looking for where one would add a gdb disable option, before I found the comment that told me that I didn't need to do that. |
7096:e81026b9dfe0 |
02-Jun-2010 |
Gabe Black <gblack@eecs.umich.edu> |
ARM: Allow ARM processes to start in Thumb mode. |
7095:f7bb2d93cc49 |
02-Jun-2010 |
Gabe Black <gblack@eecs.umich.edu> |
ARM: Detect thumb mode elf images. |
7075:091062b018b7 |
06-May-2010 |
Nathan Binkert <nate@binkert.org> |
compile: don't #include unnecessary stuff Time from base/time.hh has a name clash with Time from Ruby's TypeDefines.hh. Eventually Ruby's Time should go away, so instead of fixing this properly just try to avoid the clash. |
7068:08c34d3fb19d |
18-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
stats: make simTicks and simFreq accessible from stats.hh |
7066:5389824adf3d |
18-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
event: Allow EventWrapper to take an object reference |
7064:586b0e3a12b3 |
15-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
tick: rename Clock namespace to SimClock |
7063:c0ea4df1ddab |
15-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: move EventQueue constructor to cc file Also make copy constructor and assignment operator private. |
7060:ad784e759a74 |
02-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: allow an implicit cast from an EventManager to an EventQueue * |
7059:4fb4eeb5f412 |
02-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: Clean up some flags - Make the initialized flag always available, not just in debug mode. - Make the Initialized flag actually use several bits so it is very unlikely that something that's uninitialized accidentally looks initialized. - Add an initialized() function that tells you if the current event is indeed initialized. - Clear the flags on delete so it can't be accidentally thought of as initialized. - Fix getFlags assert statement. "How did this ever work?" |
7058:5c7416199efd |
02-Apr-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: Make priorities just an integer instead of an enum. Symbolic names should still be used, but this makes it easier to do things like: Event::Priority MyObject_Pri = Event::Default_Pri + 1
Remember that higher numbers are lower priority (should we fix this?) |
7005:3d5c4acb6015 |
12-Mar-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: rearrange a little bit so I can add some stuff |
7004:b9e4f8a3fea7 |
12-Mar-2010 |
Nathan Binkert <nate@binkert.org> |
eventq: remove some unused includes |
6982:16963bc29912 |
26-Feb-2010 |
Nathan Binkert <nate@binkert.org> |
events: Give EventWrapped a default name and description |
6820:2980bd04e6df |
20-Jan-2010 |
Lisa Hsu <Lisa.Hsu@amd.com> |
util: do checkpoint aggregation more cleanly, fix last changeset. 1) Move alpha-specific code out of page_table.cc:serialize(). 2) Begin serializing M5_pid and unserializing it, but adding an function to do optional paramIn so that old checkpoints don't need to be fixed up. 3) Fix up alpha startup code so that the unserialized M5_pid value is properly written to DTB_IPR_ASN. 4) Fix the memory unserialize that I forgot somehow in the last changeset. 5) Add in an agg_se.py to handle aggregated checkpoints. --bench foo-bar plus positional arguments foo bar are the only changes in usage from se.py. Note this aggregation stuff has only been tested for Alpha and nothing else, though it should take a very minimal amount of work to get it to work with another ISA. |
6818:5a0e3a283826 |
18-Jan-2010 |
Lisa Hsu <Lisa.Hsu@amd.com> |
util: make a generic checkpoint aggregator that can aggregate different cpts into one multi-programmed cpt. Make minor changes to serialization/unserialization to get it to work properly. Note that checkpoints were made with a comment at the beginning with // - this must be changed to ## to work properly with the python config parser in the aggregator. |
6815:9eb8c185c548 |
12-Jan-2010 |
Lisa Hsu <Lisa.Hsu@amd.com> |
faults: i think these fault invocations should be panic and not fatal. it definitely made implementing a trace cpu easier this way. |
6744:408673e38566 |
14-Nov-2009 |
Ali Saidi <Ali.Saidi@arm.com> |
SE: Fix SE mode OS X compilation. |
6731:2e67bb7c9b4c |
09-Nov-2009 |
Vince Weaver <vince@csl.cornell.edu> |
syscall: missing initializer in getcwd call
This one case was missed during the update to stack-based arguments. Without this fix, m5 will crash during a gwtcwd call, at least with X86. |
6712:b95abe00dd9d |
04-Nov-2009 |
Nathan Binkert <nate@binkert.org> |
build: fix compile problems pointed out by gcc 4.4 |
6703:2707e7b63f53 |
30-Oct-2009 |
Vince Weaver <vince@csl.cornell.edu> |
SysCalls: Implement truncate64 system call
This uses the new stack-based argument infrastructure.
Tested on x86 and x86_64. |
6702:21f032e2ee9b |
31-Oct-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Syscalls: Fix a warning turned error about an unused variable in m5.fast. |
6701:4842482e1bd1 |
30-Oct-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Syscalls: Make system calls access arguments like a stack, not an array.
When accessing arguments for a syscall, the position of an argument depends on the policies of the ISA, how much space preceding arguments took up, and the "alignment" of the index for this particular argument into the number of possible storate locations. This change adjusts getSyscallArg to take its index parameter by reference instead of value and to adjust it to point to the possible location of the next argument on the stack, basically just after the current one. This way, the rules for the new argument can be applied locally without knowing about other arguments since those have already been taken into account implicitly.
All system calls have also been changed to reflect the new interface. In a number of cases this made the implementation clearer since it encourages arguments to be collected in one place in order and then used as necessary later, as opposed to scattering them throughout the function or using them in place in long expressions. It also discourages using getSyscallArg over and over to retrieve the same value when a temporary would do the job. |
6691:cd68b6ecd68d |
27-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
POWER: Add support for the Power ISA
This adds support for the 32-bit, big endian Power ISA. This supports both integer and floating point instructions based on the Power ISA Book I v2.06. |
6689:67d980fcbc7a |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Addition of an ioctl command code for Power. |
6687:9e2f25dcf8c8 |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Zero out memory that already exists during the brk system call.
Glibc often assumes that memory it receives from the kernel after a brk system call will contain only zeros. This is important during a calloc, because it won't clear the new memory itself. In the simulator, if the new page exists, it will be cleared using this patch, to mimic the kernel's functionality. |
6686:db7e5f2778cf |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Fix conversion of the stat64 buffer during system calls. |
6685:af13eb1b7f81 |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Implementation of the ftruncate64 system call. |
6684:04cba5a03e2e |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Implementation of the time system call. |
6683:5e0fcc528fe5 |
24-Oct-2009 |
Timothy M. Jones <tjones1@inf.ed.ac.uk> |
syscall: Implementation of the times system call |
6672:b636411c118e |
02-Oct-2009 |
Gabe Black <gblack@eecs.umich.edu> |
SE mode: Make the direction anonymous mmaps move through memory configurable. |
6658:f4de76601762 |
23-Sep-2009 |
Nathan Binkert <nate@binkert.org> |
arch: nuke arch/isa_specific.hh and move stuff to generated config/the_isa.hh |
6654:4c84e771cca7 |
22-Sep-2009 |
Nathan Binkert <nate@binkert.org> |
python: Move more code into m5.util allow SCons to use that code. Get rid of misc.py and just stick misc things in __init__.py Move utility functions out of SCons files and into m5.util Move utility type stuff from m5/__init__.py to m5/util/__init__.py Remove buildEnv from m5 and allow access only from m5.defines Rename AddToPath to addToPath while we're moving it to m5.util Rename read_command to readCommand while we're moving it Rename compare_versions to compareVersions while we're moving it. |
6640:30d92d2b66a1 |
16-Sep-2009 |
Vince Weaver <vince@csl.cornell.edu> |
Syscalls: Implement sysinfo() syscall. |
6399:bf122a97f88b |
27-Jul-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Elf: Add in some new aux vector type constants. |
6392:9345de6fca33 |
27-Jul-2009 |
Ali Saidi <saidi@eecs.umich.edu> |
ARM: Detect OABI binaries and complain that they're no-longer supported. |
6364:a71fd8e252b7 |
20-Jul-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Tracing: Add accessors so tracers can get at data in trace records. |
6337:cac56cd6b015 |
10-Jul-2009 |
Gabe Black <gblack@eecs.umich.edu> |
SPARC: Set up a lookup table for integer register flattening. Using a look up table changed the run time of the SPARC_FS solaris boot regression from:
real 14m45.951s user 13m57.528s sys 0m3.452s
to:
real 12m19.777s user 12m2.685s sys 0m2.420s |
6329:5d8b91875859 |
09-Jul-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Registers: Add a registers.hh file as an ISA switched header. This file is for register indices, Num* constants, and register types. copyRegs and copyMiscRegs were moved to utility.hh and utility.cc. |
6227:a17798f2a52c |
05-Jun-2009 |
Nathan Binkert <nate@binkert.org> |
types: clean up types, especially signed vs unsigned |
6225:ec76e5c7cdd3 |
05-Jun-2009 |
Nathan Binkert <nate@binkert.org> |
style: cleanup style |
6221:58a3c04e6344 |
26-May-2009 |
Nathan Binkert <nate@binkert.org> |
types: add a type for thread IDs and try to use it everywhere |
6216:2f4020838149 |
17-May-2009 |
Nathan Binkert <nate@binkert.org> |
includes: sort includes again |
6215:9aed64c9f10f |
17-May-2009 |
Nathan Binkert <nate@binkert.org> |
includes: use base/types.hh not inttypes.h or stdint.h |
6214:1ec0ec8933ae |
17-May-2009 |
Nathan Binkert <nate@binkert.org> |
types: Move stuff for global types into src/base/types.hh |
6143:010490fd482a |
04-May-2009 |
Nathan Binkert <nate@binkert.org> |
scons: re-work the *Source functions to take more information. Start by turning all of the *Source functions into classes so we can do more calculations and more easily collect the data we need. Add parameters to the new classes for indicating what sorts of flags the objects should be compiled with so we can allow certain files to be compiled without Werror for example. |
6134:8652636856b3 |
25-Apr-2009 |
Gabe Black <gblack@eecs.umich.edu> |
SPARC: Tighten up the clone system call and SPARCs copyRegs. |
6118:a1d388751779 |
21-Apr-2009 |
Nathan Binkert <nate@binkert.org> |
pseudo: only include kernel stats if FULL_SYSTEM. |
6111:5666d4eb6bbd |
21-Apr-2009 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall_emul: style fixes (mostly wrapping overly long lines) |
6110:5051aafec8d5 |
21-Apr-2009 |
Steve Reinhardt <steve.reinhardt@amd.com> |
syscall: Resolve conflicts between m5threads and Gabe's recent SE changes. |
6109:083d8a76b7a6 |
21-Apr-2009 |
Daniel Sanchez <sanchezd@stanford.edu> |
Commit m5threads package.
This patch adds limited multithreading support in syscall-emulation mode, by using the clone system call. The clone system call works for Alpha, SPARC and x86, and multithreaded applications run correctly in Alpha and SPARC. |
6029:007c36616f47 |
15-Apr-2009 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Get rid of the Unallocated thread context state. Basically merge it in with Halted. Also had to get rid of a few other functions that called ThreadContext::deallocate(), including: - InOrderCPU's setThreadRescheduleCondition. - ThreadContext::exit(). This function was there to avoid terminating simulation when one thread out of a multi-thread workload exits, but we need to find a better (non-cpu-centric) way. |
6023:47b4fcb10c11 |
09-Apr-2009 |
Nathan Binkert <nate@binkert.org> |
tlb: More fixing of unified TLB |
6022:410194bb3049 |
09-Apr-2009 |
Gabe Black <gblack@eecs.umich.edu> |
tlb: Don't separate the TLB classes into an instruction TLB and a data TLB |
5999:3cf8e71257e0 |
05-Mar-2009 |
Nathan Binkert <nate@binkert.org> |
stats: Fix all stats usages to deal with template fixes |
5992:9c04119e93af |
05-Mar-2009 |
Nathan Binkert <nate@binkert.org> |
serialize: Allow floats and doubles to be serialized |
5958:2d9737bf3c2f |
27-Feb-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Processes: Make getting and setting system call arguments part of a process object. |
5955:d35d2b28df38 |
27-Feb-2009 |
Gabe Black <gblack@eecs.umich.edu> |
X86: Add a class to support 32 bit x86 linux process. |
5952:c1ee8282291d |
26-Feb-2009 |
Ali Saidi <saidi@eecs.umich.edu> |
CPA: Add new object for gathering critical path annotations. |
5894:8091ac99341a |
25-Feb-2009 |
Gabe Black <gblack@eecs.umich.edu> |
CPU: Implement translateTiming which defers to translateAtomic, and convert the timing simple CPU to use it. |
5891:73084c6bb183 |
25-Feb-2009 |
Gabe Black <gblack@eecs.umich.edu> |
ISA: Replace the translate functions in the TLBs with translateAtomic. |
5883:c810b7d4383d |
23-Feb-2009 |
Nathan Binkert <nate@binkert.org> |
stats: cleanup static stats to make startup work. This is mainly to allow the unit test to run without requiring the standard M5 stats from being initialized (e.g. sim_seconds, sim_ticks, host_seconds) |
5882:5a047c3f3795 |
23-Feb-2009 |
Nathan Binkert <nate@binkert.org> |
debug: Move debug_break into src/base |
5877:9fe574944f31 |
16-Feb-2009 |
Lisa Hsu <hsul@eecs.umich.edu> |
sycalls: implement mremap() and add DATA flag for getrlimit(). mremap has been tested on Alpha, compiles for the rest but not tested. I don't see why it wouldn't work though. |
5874:7a74edaa8741 |
16-Feb-2009 |
Gabe Black <gblack@eecs.umich.edu> |
X86: Make the loader recognize 32 bit x86 processes. |
5823:9f7efe90084e |
30-Jan-2009 |
Ali Saidi <saidi@eecs.umich.edu> |
Errors: Use the correct panic/warn/fatal/info message in some places. |
5820:dad5aad2dc2d |
30-Jan-2009 |
Nathan Binkert <nate@binkert.org> |
Fix typo |
5808:baf5d5c96c68 |
24-Jan-2009 |
Nathan Binkert <nate@binkert.org> |
pseudo inst: Add new wake cpu instruction for sending a message to wake a cpu. It's instantaneous and so it's somewhat bogus, but it's a first step. |
5798:edbf23127462 |
19-Jan-2009 |
Nathan Binkert <nate@binkert.org> |
python: Rework how things are imported |
5795:72ce7502dc71 |
17-Jan-2009 |
Ali Saidi <saidi@eecs.umich.edu> |
Fix issue 326: glibc non-deterministic because it reads /proc |
5784:8a28646c4bc2 |
07-Jan-2009 |
Gabe Black <gblack@eecs.umich.edu> |
Tracing: Make tracing aware of macro and micro ops. |
5780:50c9d48de3ca |
17-Dec-2008 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Make Alpha pseudo-insts available from SE mode. |
5774:a7ce656e32a0 |
08-Dec-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: Add some debugging code to the eventq. |
5771:f58d82cb8b7f |
07-Dec-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
imported patch aux-fix.patch |
5769:e53bdd0e4bf1 |
06-Dec-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: use the flags data structure |
5768:ba6f2477d870 |
06-Dec-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: move virtual function definitiions to the .cc file. |
5759:6e65ac8a2c80 |
05-Dec-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
This brings M5 closer to modernity - the kernel being advertised is newer so it won't die on binaries compiled with newer glibc's, and enables use of TLS-toolchain built binaries for ALPHA_SE by putting auxiliary vectors on the stack. There are some comments in the code to help. Finally, stats changes for ALPHA are from slight perturbations to the initial stack frame, all minimal diffs. |
5758:9c3edb28db1a |
04-Dec-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
This patch pulls out the auxiliary vector struct from individual ISA LiveProcesses to the base LiveProcess definition so anyone can use them. |
5753:db1653549204 |
20-Nov-2008 |
Steve Reinhardt <steve.reinhardt@amd.com> |
Assume files w/o obvious OS are Linux (with warning) instead of giving a fatal error. |
5748:f28f020f3006 |
15-Nov-2008 |
Steve Reinhardt <Steve.Reinhardt@amd.com> |
syscalls: fix latent brk/obreak bug. Bogus calls to ChunkGenerator with negative size were triggering a new assertion that was added there. Also did a little renaming and cleanup in the process. |
5741:323dac95e72c |
10-Nov-2008 |
Nathan Binkert <nate@binkert.org> |
pseudo inst: Add rpns (read processor nanoseconds) instruction. This instruction basically returns the number of nanoseconds that the CPU has been running. |
5739:27c1d1048c65 |
10-Nov-2008 |
Nathan Binkert <nate@binkert.org> |
clean: Move some stuff from the hh file to the cc file. |
5738:6ea35903c420 |
10-Nov-2008 |
Nathan Binkert <nate@binkert.org> |
python: Fix the reference counting for python events placed on the eventq. We need to add a reference when an object is put on the C++ queue, and remove a reference when the object is removed from the queue. This was not happening before and caused a memory problem. |
5718:323cfbfec1a4 |
05-Nov-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
Right now a single thread cpu 1 could get assigned context Id != 1, depending on the order in which it's registered with the system. To make them match, here is a little change. |
5714:76abee886def |
02-Nov-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
Add in Context IDs to the simulator. From now on, cpuId is almost never used, the primary identifier for a hardware context should be contextId(). The concept of threads within a CPU remains, in the form of threadId() because sometimes you need to know which context within a cpu to manipulate. |
5713:993c7952b930 |
02-Nov-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
Make it so that all thread contexts are registered with the System, even in SE. Process still keeps track of the tc's it owns, but registration occurs with the System, this eases the way for system-wide context Ids based on registration. |
5712:199d31b47f7b |
02-Nov-2008 |
Lisa Hsu <hsul@eecs.umich.edu> |
make BaseCPU the provider of _cpuId, and cpuId() instead of being scattered across the subclasses. generally make it so that member data is _cpuId and accessor functions are cpuId(). The ID val comes from the python (default -1 if none provided), and if it is -1, the index of cpuList will be given. this has passed util/regress quick and se.py -n4 and fs.py -n4 as well as standard switch. |
5695:82f3a613cc58 |
14-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: revert code for unserializing events. Since I never implemented a proper solution, put it back to something that at least works for now. Once I add more event queues, I'll have to really fix this though |
5664:3b3756efad89 |
12-Oct-2008 |
Gabe Black <gblack@eecs.umich.edu> |
CPU: Create a microcode ROM object in the CPU which is defined by the ISA. |
5628:f79155751e1d |
11-Oct-2008 |
Gabe Black <gblack@eecs.umich.edu> |
TLB: Make all tlbs derive from a common base class in both python and C++. |
5622:e93e5b190bcc |
10-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
Rename the info function to inform to avoid likely name conflicts |
5620:c13b446714ca |
10-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
output: Make panic/fatal/warn more flexible so we can add some new ones. The major thrust of this change is to limit the amount of code duplication surrounding the code for these functions. This code also adds two new message types called info and hack. Info is meant to be less harsh than warn so people don't get confused and start thinking that the simulator is broken. Hack is a way for people to add runtime messages indicating that the simulator just executed a code "hack" that should probably be fixed. The benefit of knowing about these code hacks is that it will let people know what sorts of inaccuracies or potential bugs might be entering their experiments. Finally, I've added some flags to turn on and off these message types so command line options can change them. |
5619:4b50a0d875da |
10-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
gdb: add a debugging function that enters the python interpreter. |
5610:0e1e9c186769 |
10-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
SimObjects: Clean up handling of C++ namespaces. Make them easier to express by only having the cxx_type parameter which has the full namespace name, and drop the cxx_namespace thing. Add support for multiple levels of namespace. |
5606:6da7a58b0bc8 |
09-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: convert all usage of events to use the new API. For now, there is still a single global event queue, but this is necessary for making the steps towards a parallelized m5. |
5605:b194a80157e2 |
09-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: Major API change for the Event and EventQueue structures.
Since the early days of M5, an event needed to know which event queue it was on, and that data was required at the time of construction of the event object. In the future parallelized M5, this sort of requirement does not work well since the proper event queue will not always be known at the time of construction of an event. Now, events are created, and the EventQueue itself has the schedule function, e.g. eventq->schedule(event, when). To simplify the syntax, I created a class called EventManager which holds a pointer to an EventQueue and provides the schedule interface that is a proxy for the EventQueue. The intent is that objects that frequently schedule events can be derived from EventManager and then they have the schedule interface. SimObject and Port are examples of objects that will become EventManagers. The end result is that any SimObject can just call schedule(event, when) and it will just call that SimObject's eventq->schedule function. Of course, some objects may have more than one EventQueue, so this interface might not be perfect for those, but they should be relatively few. |
5602:9abcc140f346 |
09-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: Don't use inline friend function when a static function will do. Another good reason to avoid this is that swig will try to wrap the friend, but it won't try to wrap a private static function. |
5601:1acb7016d0e4 |
09-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
SCons: add code to provide a libm5 shared library. Targets look like libm5_debug.so. This target can be dynamically linked into another C++ program and provide just about all of the M5 features. Additionally, this library is a standalone module that can be imported into python with an "import libm5_debug" type command line. |
5600:9209138dbef2 |
09-Oct-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: I'm sick of the warning about MaxTick being unused. |
5581:5e1863e9afa2 |
02-Oct-2008 |
Ali Saidi <saidi@eecs.umich.edu> |
Output: Verify output files are open after opening them. |
5577:d67a7becce5c |
30-Sep-2008 |
Steve Reinhardt <Steve.Reinhardt@amd.com> |
Fix EVENTQ_DEBUG vs DEBUG_EVENTQ #define inconsistency. |
5549:ed9b39dce0aa |
19-Sep-2008 |
Nathan Binkert <nate@binkert.org> |
We're using the static keyword improperly in some cases. |
5546:4ffc3cafba9b |
19-Sep-2008 |
Nathan Binkert <nate@binkert.org> |
Use the proper version of C++ headers |
5543:3af77710f397 |
10-Sep-2008 |
Ali Saidi <saidi@eecs.umich.edu> |
style: Remove non-leading tabs everywhere they shouldn't be. Developers should configure their editors to not insert tabs |
5530:bbfff6d0c42c |
11-Aug-2008 |
Nathan Binkert <nate@binkert.org> |
params: Get rid of the remnants of the old style parameter configuration stuff. |
5529:9ae69b9cd7fd |
11-Aug-2008 |
Nathan Binkert <nate@binkert.org> |
params: Convert the CPU objects to use the auto generated param structs. A whole bunch of stuff has been converted to use the new params stuff, but the CPU wasn't one of them. While we're at it, make some things a bit more stylish. Most of the work was done by Gabe, I just cleaned stuff up a bit more at the end. |
5527:cdcfaac59d70 |
04-Aug-2008 |
Steve Reinhardt <stever@gmail.com> |
Get rid of outputStream... wasn't really being used (except for warn()) and new -r/-e options make it not worth fixing. |
5522:e56c3d89be79 |
03-Aug-2008 |
Nathan Binkert <nate@binkert.org> |
libm5: Create a libm5 static library for embedding m5.
This should allow m5 to be more easily embedded into other simulators. The m5 binary adds a simple main function which then calls into the m5 libarary to start the simulation. In order to make this work correctly, it was necessary embed python code directly into the library instead of the zipfile hack. This is because you can't just append the zipfile to the end of a library the way you can a binary. As a result, Python files that are part of the m5 simulator are now compile, marshalled, compressed, and then inserted into the library's data section with a certain symbol name. Additionally, a new Importer was needed to allow python to get at the embedded python code.
Small additional changes include: - Get rid of the PYTHONHOME stuff since I don't think anyone ever used it, and it just confuses things. Easy enough to add back if I'm wrong. - Create a few new functions that are key to initializing and running the simulator: initSignals, initM5Python, m5Main.
The original code for creating libm5 was inspired by a patch Michael Adler, though the code here was done by me. |
5521:123049ae8ae5 |
03-Aug-2008 |
Nathan Binkert <nate@binkert.org> |
syscall: Avoid a compiler warning which turns into a bug. Simply cast the result to an int and life is good. |
5515:cff9ed9899c3 |
24-Jul-2008 |
Michael Adler <Michael.Adler@intel.com> |
syscall: Fix TTY emulation in fstat() user-mode simulation for fd 1 (stdout). The code didn't set S_IFCHR in the st_mode |
5514:9a903bf83a33 |
23-Jul-2008 |
Michael Adler <Michael.Adler@intel.com> |
process: separate stderr from stdout - Add the option of redirecting stderr to a file. With the old behaviour, stderr would follow stdout if stdout was to a file, but stderr went to the host stderr if stdout went to the host stdout. The new default maintains stdout and stderr going to the host. Now the two can specify different files, but they will share a file descriptor if the name of the files is the same. - Add --output and --errout options to se.py to go with --input. |
5513:8631b29873a2 |
23-Jul-2008 |
Michael Adler <Michael.Adler@intel.com> |
syscalls: Add a bunch of missing system calls. readlink, umask, truncate, ftruncate, mkdir, and getcwd. |
5512:755fcaf7a4cf |
23-Jul-2008 |
Michael Adler <Michael.Adler@intel.com> |
RemoteGDB: add an m5 command line option for setting or disabling remote gdb. |
5505:90d6811d5ea6 |
11-Jul-2008 |
Nathan Binkert <nate@binkert.org> |
m5ops: clean up the m5ops stuff. - insert warnings for deprecated m5ops - reserve opcodes for Ali's stuff - remove code for stuff that has been deprecated forever - simplify m5op_alpha |
5504:288b54c2fd8d |
11-Jul-2008 |
Nathan Binkert <nate@binkert.org> |
style: fix indentation and formatting of the pseudo insts. |
5503:cf464d02bc57 |
11-Jul-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: change the event datastructure back to LIFO.
The status quo is preferred since it is less likely that people will rely on LIFO than FIFO, and when we move to a parallelized M5, no ordering between events of the same time/priority will be guaranteed. |
5502:f0f8a3ee5aad |
11-Jul-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: new eventq data structure. The new data structure is singly linked list sorted by time and priority. For things of the same time and priority, a second, circularly linked list maintains the data structure. Events of the same time and priority are now inserted in FIFO order instead of LIFO order. This dramatically improves the performance of systems that schedule multiple events at the same time.
The FIFO order version is not preferred to LIFO (because it may cause people to rely on it), but I'm going to commit it anyway and immediately commit the preferred LIFO version on top. |
5501:b1beee9351a4 |
11-Jul-2008 |
Nathan Binkert <nate@binkert.org> |
eventq: Clean up the Event class so that it uses fewer bytes. This will hopefullly allow it to fit in a cache line. |
5499:8bfc7650c344 |
01-Jul-2008 |
Ali Saidi <saidi@eecs.umich.edu> |
Remove delVirtPort() and make getVirtPort() only return cached version. |
5498:2af99511ded4 |
01-Jul-2008 |
Ali Saidi <saidi@eecs.umich.edu> |
Change everything to use the cached virtPort rather than created their own each time. This appears to work, but I don't want to commit it until it gets tested a lot more. I haven't deleted the functionality in this patch that will come later, but one question is how to enforce encourage objects that call getVirtPort() to not cache the virtual port since if the CPU changes out from under them it will be worse than useless. Perhaps a null function like delVirtPort() is still useful in that case. |
5491:c2509c70de08 |
21-Jun-2008 |
Gabe Black <gblack@eecs.umich.edu> |
SimObject: Add in missing includes of <string> and fix minor style problem. |
5488:c8571e8ce7b6 |
18-Jun-2008 |
Nathan Binkert <nate@binkert.org> |
imported patch sim_object_params.diff |
5474:a9b2504432d1 |
15-Jun-2008 |
Nathan Binkert <nate@binkert.org> |
add compile flags to m5 |
5361:e379019a1abd |
27-Feb-2008 |
Rick Strong <rstrong@cs.ucsd.edu> |
Configs: Make using Simpoints easier with some config files that support them easily |
5358:e9acb84bbafb |
26-Feb-2008 |
Gabe Black <gblack@eecs.umich.edu> |
TLB: Make a TLB base class and put a virtual demapPage function in it. |
5336:c7e21f4e5a2e |
06-Feb-2008 |
Stephen Hines <hines@cs.fsu.edu> |
Make the Event::description() a const function |
5335:69d45f5f21a2 |
05-Feb-2008 |
Stephen Hines <hines@cs.fsu.edu> |
Add base ARM code to M5 |
5315:30997e988446 |
02-Jan-2008 |
Steve Reinhardt <stever@gmail.com> |
Additional comments and helper functions for PrintReq. |
5314:e902f12a3af1 |
02-Jan-2008 |
Steve Reinhardt <stever@gmail.com> |
Add functional PrintReq command for memory-system debugging. |
5282:2dba627b6646 |
29-Nov-2007 |
Rick Strong <rstrong@cs.ucsd.edu> |
Serialization: Fix serialization of file descriptors. Make sure open file descriptors are reopened and the file pointer is in the same place as when the checkpoint occured.
Signed-off by: Ali Saidi |
5258:fcccd87d5178 |
15-Nov-2007 |
Korey Sewell <ksewell@umich.edu> |
put the flattenIndex stuff back in O3 AND put fatal() back in faults |
5224:0e354459fb8a |
14-Nov-2007 |
Korey Sewell <ksewell@umich.edu> |
Get MIPS_SE actually working again by actually by fixing TLB stuff and running hello world |
5222:bb733a878f85 |
13-Nov-2007 |
Korey Sewell <ksewell@umich.edu> |
Add in files from merge-bare-iron, get them compiling in FS and SE mode |
5208:8ec8ba9ee9fd |
02-Nov-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
SE: fix stat64 syscall on os x |
5202:ff56fa8c2091 |
31-Oct-2007 |
Steve Reinhardt <stever@gmail.com> |
String constant const-ness changes to placate g++ 4.2. Also some bug fixes in MIPS ISA uncovered by g++ warnings (Python string compares don't work in C++!). |
5192:582e583f8e7e |
31-Oct-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Traceflags: Add SCons function to created a traceflag instead of having one file with them all. |
5191:bebbfea0baf3 |
31-Oct-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Linux Support: Finally update vptr for new memory system. |
5184:8782de2949e5 |
25-Oct-2007 |
Gabe Black <gblack@eecs.umich.edu> |
TLB: Fix serialization issues with the tlb entries and make the page table store the process, not the system. |
5183:b4decf133fe4 |
25-Oct-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
SE: Fix page table and system serialization, don't reinit process if this is a checkpoint restore. |
5154:7e6431213487 |
16-Oct-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Make the process objects use the Params structs in their constructors, and use a limit to check if access are on the stack. |
5109:386c765572f5 |
02-Oct-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Remote GDB: Turn on remote gdb in SE mode. |
5100:7a0180040755 |
28-Sep-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Rename cycles() function to ticks() |
5089:26461daa3819 |
25-Sep-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Loader: Only complain about TLS sections if you're using Alpha. |
5074:14404677893a |
13-Sep-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Syscall Emulation: Add stat64 syscall.
Patch submitted by: Jonas Diemer [diemer (a) ida.ing.tu-bs.de] |
5070:3d6a1e37b944 |
11-Sep-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Loader: Error if a TLS section is found in the binary. |
5034:6186ef720dd4 |
30-Aug-2007 |
Miles Kaufmann <milesck@eecs.umich.edu> |
params: Deprecate old-style constructors; update most SimObject constructors.
SimObjects not yet updated: - Process and subclasses - BaseCPU and subclasses
The SimObject(const std::string &name) constructor was removed. Subclasses that still rely on that behavior must call the parent initializer as : SimObject(makeParams(name)) |
5019:2762e580f5db |
28-Aug-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Address translation: De-templatize the GenericTLB class. |
5016:ff150203e22d |
27-Aug-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Address Translation: Make the Generic TLB only compile in SE mode. |
5004:7d94cedab264 |
26-Aug-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Address translation: Make the page table more flexible. The page table now stores actual page table entries. It is still a templated class here, but this will be corrected in the near future. |
4997:e7380529bd2d |
26-Aug-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Address Translation: Make SE mode use an actual TLB/MMU for translation like FS. |
4941:595b53060bc1 |
04-Aug-2007 |
Nathan Binkert <nate@binkert.org> |
main: return an an exit code of 1 when we exit due to a python exception. This requires us to not use PyRun_SimpleString, but PyRun_String since the latter actually returns a result |
4918:3214e3694fb2 |
27-Jul-2007 |
Nathan Binkert <nate@binkert.org> |
Merge python and x86 changes with cache branch |
4859:97c7749896a6 |
03-Aug-2007 |
Nathan Binkert <nate@binkert.org> |
python: Improve support for python calling back to C++ member functions. Add support for declaring SimObjects to swig so their members can be wrapped. Make sim_object.i only contain declarations for SimObject. Create system.i to contain declarations for System. Update python code to properly call the C++ given the new changes. |
4857:dbae4a395f46 |
02-Aug-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Serialize: This shouldn't have been commited, I got a little bit carried away it seems. |
4841:89a9419e7361 |
02-Aug-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Serialization: Provide array serialization methods that work on std::vector |
4838:286c4b41f425 |
02-Aug-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
debugSymbolTable is a global variable and only needs to be created once, not once per system |
4832:20a1360a5341 |
01-Aug-2007 |
Nathan Binkert <nate@binkert.org> |
Twin64_t is in base/bigint.hh |
4826:259b996a6da6 |
01-Aug-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Arguments: Get rid of duplicate code for the Arguments class in each architecture. Move the argument files to src/sim and add a utility.cc file with a function getArguments() that returns the given argument in the architecture specific fashion. getArguments() was getArg() is the architecture specific Argument class and has had all magic numbers replaced with meaningful constants. Also add a function to the Argument class for testing if an argument is NULL. |
4793:315e1db6bd39 |
29-Jul-2007 |
Gabe Black <gblack@eecs.umich.edu> |
X86: Initial stack frame fixes and constant shuffling. The initial stack frame for x86 is now substantially more correct. The fixes made here can be back ported to SPARC and possible the other ISAs as well. The auxiliary vector types were moved to the LiveProcess base class because they are independent of ISA. Some of the types may only apply to Linux, though, so they may have to be moved. |
4776:8c8407243a2c |
28-Jul-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Turn the instruction tracing code into pluggable sim objects. These need to be refined a little still and given parameters. |
4772:f08370a81812 |
27-Jul-2007 |
Gabe Black <gblack@eecs.umich.edu> |
X86: Fix argument register indexing. Code was assuming that all argument registers followed in order from ArgumentReg0. There is now an ArgumentReg array which is indexed to find the right index. There is a constant, NumArgumentRegs, which can be used to protect against using an invalid ArgumentReg. |
4763:fef9a47b3732 |
24-Jul-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Merge with head. |
4762:c94e103c83ad |
24-Jul-2007 |
Nathan Binkert <nate@binkert.org> |
Major changes to how SimObjects are created and initialized. Almost all creation and initialization now happens in python. Parameter objects are generated and initialized by python. The .ini file is now solely for debugging purposes and is not used in construction of the objects in any way. |
4695:a63378aed062 |
18-Jul-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Make name, isMachineCheckFault, and isAlignmentFault const. |
4597:063f25d13229 |
20-Jun-2007 |
Nathan Binkert <binkertn@umich.edu> |
Make sure all parameters have default values if they're supposed to and make sure parameters have the right type. Also make sure that any object that should be an intermediate type has the right options set. |
4486:aaeb03a8a6e1 |
27-May-2007 |
Nathan Binkert <binkertn@umich.edu> |
Move SimObject python files alongside the C++ and fix the SConscript files so that only the objects that are actually available in a given build are compiled in. Remove a bunch of files that aren't used anymore. |
4471:4d86c4d096ad |
21-May-2007 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add new EventWrapper constructor that takes a Tick value and schedules the event immediately. |
4437:b6e304245729 |
09-May-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
update for new reschedule semantics |
4434:2ea7b6e0b78f |
09-May-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
fix the translating ports so it can add a page on a fault |
4385:5beaa4f8f821 |
18-Apr-2007 |
Nathan Binkert <binkertn@umich.edu> |
fix SIGUSR1 and SIGUSR2 by clearing the variables after they're used |
4358:df3dc985264a |
09-Apr-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Comment out the remote gdb object for SE mode. |
4212:0d50e6c98d13 |
12-Mar-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
remove the extern C around gdb helper functions. It's need needed for any new version of gdb to work and it causes at least mine to segfault |
4202:f7a05daec670 |
11-Mar-2007 |
Nathan Binkert <binkertn@umich.edu> |
Rework the way SCons recurses into subdirectories, making it automatic. The point is that now a subdirectory can be added to the build process just by creating a SConscript file in it. The process has two passes. On the first pass, all subdirs of the root of the tree are searched for SConsopts files. These files contain any command line options that ought to be added for a particular subdirectory. On the second pass, all subdirs of the src directory are searched for SConscript files. These files describe how to build any given subdirectory. I have added a Source() function. Any file (relative to the directory in which the SConscript resides) passed to that function is added to the build. Clean up everything to take advantage of Source(). function is added to the list of files to be built. |
4194:af4f6022394b |
09-Mar-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
implement ipi stufff for SPARC
src/arch/alpha/utility.hh: src/arch/mips/utility.hh: src/arch/sparc/utility.hh: src/arch/x86/utility.hh: add hook for system to startup the cpu or not... in the case of FS sparc, only the first cpu would get spunup.. the rest sit in an idle state until they get an ipi src/arch/sparc/isa/decoder.isa: handle writable bits of strandstatus register in miscregfile src/arch/sparc/miscregfile.hh: some constants for the strand status register src/arch/sparc/ua2005.cc: properly implement the strand status register src/dev/sparc/iob.cc: implement ipi generation properly src/sim/system.cc: call into the ISA to start the CPU (or not) |
4189:8e5222bea9ba |
09-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Use the TheISA namespace in case we're coming from a file that doesn't do that for us. This should be contained in the scope of the function and not leak elsewhere. |
4184:b0612b5646dd |
07-Mar-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
fix compiling of FS after Gabe's last compile |
4183:3d19c1d46946 |
07-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Move the magic m5 PageTableFault into sim/faults.[hh,cc] since it's the same across all architectures. |
4176:2d52a9751dfc |
07-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Make byteswap work correctly on Twin??_t types. |
4167:ce5d0f62f13b |
06-Mar-2007 |
Nathan Binkert <binkertn@umich.edu> |
Move all of the parameters of the Root SimObject so they are directly configured by python. Move stuff from root.(cc|hh) to core.(cc|hh) since it really belogs there now. In the process, simplify how ticks are used in the python code. |
4166:ecebe3ac19b4 |
06-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Get X86 to load an elf and start a process for it.
src/arch/x86/SConscript: Add in process source files. src/arch/x86/isa_traits.hh: Replace magic constant numbers with the x86 register names. src/arch/x86/miscregfile.cc: Make clear the miscreg file succeed. There aren't any misc regs, so clearing them is very easy. src/arch/x86/process.hh: An X86 process class. src/base/loader/elf_object.cc: Add in code to recognize x86 as an architecture. src/base/traceflags.py: Add an x86 traceflag src/sim/process.cc: Add in code to create an x86 process. src/arch/x86/intregs.hh: A file which declares names for the integer register indices. src/arch/x86/linux/linux.cc: src/arch/x86/linux/linux.hh: A very simple translation of SPARC's linux.cc and linux.hh. It's probably not correct for x86, but it might not be correct for SPARC either. src/arch/x86/linux/process.cc: src/arch/x86/linux/process.hh: An x86 linux process. The syscall table is split out into it's own file. src/arch/x86/linux/syscalls.cc: The x86 Linux syscall table and the uname function. src/arch/x86/process.cc: The x86 process base class. tests/test-progs/hello/bin/x86/linux/hello: An x86 hello world test binary. |
4157:96f036a83480 |
05-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Add stub for x86 process creation |
4131:660ebc4994a9 |
04-Mar-2007 |
Nathan Binkert <binkertn@umich.edu> |
Don't use the exact same name as a system header #define |
4128:5f4ef6ceb5c4 |
03-Mar-2007 |
Nathan Binkert <binkertn@umich.edu> |
include signal.h |
4123:9c80390ea1bb |
03-Mar-2007 |
Nathan Binkert <binkertn@umich.edu> |
Factor code out of main.cc and main.i into a bunch of files so things are organized in a more sensible manner. Take apart finalInit and expose the individual functions which are now called from python. Make checkpointing a bit easier to use. |
4118:ddd23e5282d7 |
02-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Implement the _llseek syscall. It's Linux only, so we'll actually use the lseek syscall. |
4117:2807cee7b892 |
02-Mar-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Fix some issues with 32 bit processes. |
4111:65fffcb4fae9 |
28-Feb-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Make trap instructions always generate TrapInstruction Fault objects which call into the Process object to handle system calls. Refactored the Process objects, and move the handler code into it's own file, and add some syscalls which are used in a natively compiled hello world. Software traps with trap number 3 (not syscall number 3) are supposed to cause the register windows to be flushed but are ignored right now. Finally, made uname for SPARC report a 2.6.12 kernel which is what m22-018.pool happens to be running. |
4095:44792b4db1b9 |
22-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Make it easier to turn off the remote debugger |
4090:08bd6439b907 |
21-Feb-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
add pseduo instruction support for sparc
util/m5/Makefile.alpha: Clean up to make it a bit easier to muck with util/m5/Makefile.alpha: Make the makefile more reasonable util/m5/Makefile.alpha: Remove authors from copyright. util/m5/Makefile.alpha: Updated Authors from bk prs info util/m5/Makefile.alpha: bk cp Makefile Makefile.alpha src/arch/sparc/tlb.cc: Clean up the cache code a little bit and make sure the uncacbale bit is set when appropriate src/arch/alpha/isa/decoder.isa: src/sim/pseudo_inst.cc: src/sim/pseudo_inst.hh: Rename AlphaPseudo -> PseudoInst since it's all generic src/arch/sparc/isa/bitfields.isa: src/arch/sparc/isa/decoder.isa: src/arch/sparc/isa/includes.isa: src/arch/sparc/isa/operands.isa: Add support for pseudo instructions in sparc util/m5/Makefile.alpha: util/m5/Makefile.sparc: split off alpha make file and sparc make file for m5 app util/m5/m5.c: ivle and ivlb aren't used anymore util/m5/m5op.h: stdint seems like a more generic better fit here util/m5/m5op_alpha.S: move the op ids into their own header file since we can share them between sparc and alpha |
4081:80f1e833d118 |
18-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Get rid of the stand alone ParamContext since all of the relevant stuff has now been moved to python. |
4078:3f73f808bbd4 |
18-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Get rid of the Statistics and Statreset ParamContexts, and expose all of the relevant functionality to python. Clean up the mysql code while we're at it. |
4077:5189db184356 |
18-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Check that there is a param context list before trying to loop through it. This is more important as we get rid of param contexts |
4076:e1c56b6b3072 |
18-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Remove the event_ignore stuff since it was never really used |
4075:cc018a738853 |
18-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Give the progress event its own priority |
4073:62f6ab072e2e |
17-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Pass an exception from a python event through the event queue back into python so we don't just silently ignore those errors |
4061:45162dc462a7 |
14-Feb-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Force the st_blksize field of a stat call to be 8k. |
4046:ef34b290091e |
10-Feb-2007 |
Nathan Binkert <binkertn@umich.edu> |
Clean up tracing stuff more, get rid of the trace log since its not all that useful. Fix a few bugs with python/C++ integration. |
4017:6bbb3b9b0e88 |
06-Feb-2007 |
Steve Reinhardt <stever@eecs.umich.edu> |
Fix for previous commit: need to ifdef NDEBUG on the definition as well as the declaration. |
4016:1d09f041eefa |
06-Feb-2007 |
Steve Reinhardt <stever@eecs.umich.edu> |
Use an instance counter to give Events repeatable IDs in debugging mode (especially valuable for tracediff). |
4000:9bf49767a9e4 |
30-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Make SPARC checkpointing work
src/arch/sparc/floatregfile.cc: Fix serialization for fpreg src/arch/sparc/intregfile.cc: fix serialization for intreg src/arch/sparc/miscregfile.cc: fix serialization from miscreg src/arch/sparc/pagetable.cc: fix serialization for page table src/arch/sparc/regfile.cc: need to serialize nnpc src/arch/sparc/tlb.cc: write serialization code for tlb src/cpu/base.cc: provide a way to find the thread number a context is serialize the instruction counter src/cpu/base.hh: provide a way to find the thread number a context is and given a thread number find a context pointer src/cpu/cpuevent.hh: provide method to get thread context from a cpu event for serialization src/dev/sparc/t1000.cc: src/dev/sparc/t1000.hh: nothing to serialize in t1000 src/sim/serialize.cc: src/sim/serialize.hh: Make findObj() work (it hasn't since we did the python conversion stuff) |
3980:9bcb2a2e9bb8 |
27-Jan-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Merge zizzer:/bk/newmem into zower.eecs.umich.edu:/eecshome/m5/newmem
src/arch/sparc/isa/formats/mem/util.isa: src/arch/sparc/isa_traits.hh: src/arch/sparc/system.cc: Hand Merge |
3972:2c65c89843c5 |
23-Jan-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Merge zizzer.eecs.umich.edu:/bk/newmem into ewok.(none):/home/gblack/m5/newmemo3
src/sim/byteswap.hh: Hand Merge |
3971:e935846cccfa |
23-Jan-2007 |
Gabe Black <gblack@eecs.umich.edu> |
Added remote gdb objects to each process |
3960:1dca397b2bab |
20-Dec-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Initial work to make remote gdb available in SE mode. This is completely untested. |
3943:68e673d2db04 |
28-Jan-2007 |
Nathan Binkert <binkertn@umich.edu> |
Stick the conversion of python to unix time with all of the other param code so that other functions can use it as well. |
3940:b87f85bb4275 |
27-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
While I'm waiting for legion to run make m5 compile with a few more compilers
SConstruct: src/SConscript: Add flags for Intel CC while i'm at it src/base/compiler.hh: the _Pragma stuff needst to be called this way unless someone happens to have a cleaner way src/base/cprintf_formats.hh: add std:: where appropriate src/base/statistics.hh: use this->map since icc was getting confused about std::map vs the locally defined map src/cpu/static_inst.hh: Add some more dummy returns where needed src/mem/packet.hh: add more dummy returns where needed src/sim/host.hh: use limits to come up with max tick |
3930:f96f7e258255 |
26-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
Merge zeep.pool:/z/saidi/work/m5.newmem into zeep.pool:/z/saidi/work/m5.suncc |
3927:126dd9ba2d5d |
22-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
fix compiling on x86/Solaris |
3918:1f9a98d198e8 |
26-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
make our code a little more standards compliant pretty close to compiling w/ suns compiler
briefly: add dummy return after panic()/fatal() split out flags by compiler vendor include cstring and cmath where appropriate use std namespace for string ops
SConstruct: Add code to detect compiler and choose cflags based on detected compiler Fix zlib check to work with suncc src/SConscript: split out flags by compiler vendor src/arch/sparc/isa/decoder.isa: use correct namespace for sqrt src/arch/sparc/isa/formats/basic.isa: add dummy return around panic src/arch/sparc/isa/formats/integerop.isa: use correct namespace for stringops src/arch/sparc/isa/includes.isa: include cstring and cmath where appropriate src/arch/sparc/isa_traits.hh: remove dangling comma src/arch/sparc/system.cc: dummy return to make sun cc front end happy src/arch/sparc/tlb.cc: src/base/compression/lzss_compression.cc: use std namespace for string ops src/arch/sparc/utility.hh: no reason to say something is unsigned unsigned int src/base/compression/null_compression.hh: dummy returns to for suncc front end src/base/cprintf.hh: use standard variadic argument syntax instead of gnuc specefic renaming src/base/hashmap.hh: don't need to define hash for suncc src/base/hostinfo.cc: need stdio.h for sprintf src/base/loader/object_file.cc: munmap is in std namespace not null src/base/misc.hh: use M5 generic noreturn macros use standard variadic macro __VA_ARGS__ src/base/pollevent.cc: we need file.h for file flags src/base/random.cc: mess with include files to make suncc happy src/base/remote_gdb.cc: malloc memory for function instead of having a non-constant in an array size src/base/statistics.hh: use std namespace for floor src/base/stats/text.cc: include math.h for rint (cmath won't work) src/base/time.cc: use suncc version of ctime_r src/base/time.hh: change macro to work with both gcc and suncc src/base/timebuf.hh: include cstring from memset and use std:: src/base/trace.hh: change variadic macros to be normal format src/cpu/SConscript: add dummy returns where appropriate src/cpu/activity.cc: include cstring for memset src/cpu/exetrace.hh: include cstring fro memcpy src/cpu/simple/base.hh: add dummy return for panic src/dev/baddev.cc: src/dev/pciconfigall.cc: src/dev/platform.cc: src/dev/sparc/t1000.cc: add dummy return where appropriate src/dev/ide_atareg.h: make define work for both gnuc and suncc src/dev/io_device.hh: add dummy returns where approirate src/dev/pcidev.hh: src/mem/cache/cache_impl.hh: src/mem/cache/miss/blocking_buffer.cc: src/mem/cache/tags/lru.hh: src/mem/cache/tags/split.hh: src/mem/cache/tags/split_lifo.hh: src/mem/cache/tags/split_lru.hh: src/mem/dram.cc: src/mem/packet.cc: src/mem/port.cc: include cstring for string ops src/dev/sparc/mm_disk.cc: add dummy return where appropriate include cstring for string ops src/mem/cache/miss/blocking_buffer.hh: src/mem/port.hh: Add dummy return where appropriate src/mem/cache/tags/iic.cc: cast hastSets to double for log() call src/mem/physical.cc: cast pmemAddr to char* for munmap src/sim/byteswap.hh: make define work for suncc and gnuc |
3917:a6cc1842f529 |
22-Jan-2007 |
Ali Saidi <saidi@eecs.umich.edu> |
check if an executable is dynamic and die if it is Only implemented for ELf. Someone might want to implement it for ecoff and some point
src/base/loader/elf_object.cc: src/base/loader/elf_object.hh: src/base/loader/object_file.cc: src/base/loader/object_file.hh: add a function to check if an executable is dynamic src/sim/process.cc: check if an executable is dynamic and die if it is |
3868:5a58b399e883 |
21-Dec-2006 |
Nathan Binkert <binkertn@umich.edu> |
move the swig initialization calls from src/sim/main.cc to src/python/swig/init.cc so that it's not as easy to forget about it when you add a new swig module. |
3812:eaa215123a26 |
30-Nov-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Load the hypervisor symbols twice, once with an address mask so that we can get symbols for where it's copied to in memory Add the ability to use an address mask for symbol loading Rather then silently failing on platform accesses panic Move BadAddr/IsaFake no Device from Tsunami Let the system kernel be none, but warn about it
configs/common/FSConfig.py: We don't have a kernel for sparc yet src/arch/sparc/system.cc: Load the hypervisor symbols twice, once with an address mask so that we can get symbols for where it's copied to in memory src/base/loader/aout_object.cc: src/base/loader/aout_object.hh: src/base/loader/ecoff_object.cc: src/base/loader/ecoff_object.hh: src/base/loader/elf_object.cc: src/base/loader/elf_object.hh: src/base/loader/object_file.hh: src/base/loader/raw_object.cc: src/base/loader/raw_object.hh: Add the ability to use an address mask for symbol loading src/dev/sparc/t1000.cc: Rather then silently failing on platform accesses panic src/dev/sparc/t1000.hh: fix up a couple of platform comments src/python/m5/objects/Bus.py: src/python/m5/objects/Device.py: src/python/m5/objects/T1000.py: src/python/m5/objects/Tsunami.py: Move BadAddr/IsaFake no Device from Tsunami src/python/m5/objects/System.py: Let kernel be none src/sim/system.cc: Let the system kernel be none, but warn about it |
3804:fa7a01dddc7a |
23-Nov-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
first cut at a sparc tlb
src/arch/sparc/SConscript: Add code to serialize/unserialze tlb entries src/arch/sparc/asi.cc: src/arch/sparc/asi.hh: update asi names for how they're listed in the supplement add asis add more asi functions src/arch/sparc/isa_traits.hh: move the interrupt stuff and some basic address space stuff into isa traits src/arch/sparc/miscregfile.cc: src/arch/sparc/miscregfile.hh: add mmu registers to tlb get rid of implicit asi stuff... the tlb will handle it src/arch/sparc/regfile.hh: make isnt/dataAsid return ints not asis src/arch/sparc/tlb.cc: src/arch/sparc/tlb.hh: first cut at sparc tlb src/arch/sparc/vtophys.hh: pagatable nedes to be included here src/mem/request.hh: add asi and if the request is a memory mapped register to the requset object src/sim/host.hh: fix incorrect definition of LL |
3799:c8f88e7d82c1 |
16-Dec-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Add in constants which let you explicitly check if endian conversion would do anything. This was needed for a case where a piece of data was within a larger data type. When the larger data type was swapped, the location of the smaller data type would move. |
3761:b7c7f547d5a3 |
05-Dec-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Move the SyscallReturn class into sim/syscallreturn.hh. Also move some miscregs into the integer register file so they get renamed.
src/arch/alpha/syscallreturn.hh: src/arch/mips/syscallreturn.hh: src/sim/syscallreturn.hh: Move the SyscallReturn class into sim/syscallreturn.hh src/arch/sparc/faults.cc: src/arch/sparc/isa/operands.isa: src/arch/sparc/isa_traits.hh: src/arch/sparc/miscregfile.cc: src/arch/sparc/miscregfile.hh: src/arch/sparc/process.cc: src/arch/sparc/sparc_traits.hh: Move some miscregs into the integer register file so they get renamed. |
3670:1ad04efc333e |
16-Nov-2006 |
Nathan Binkert <binkertn@umich.edu> |
implement RUSAGE_CHILDREN for getrusage since it's trivial |
3669:3607aaed36b6 |
16-Nov-2006 |
Nathan Binkert <binkertn@umich.edu> |
Implement current working directory for LiveProcesses |
3645:2bf1f7c69254 |
13-Nov-2006 |
Nathan Binkert <binkertn@umich.edu> |
Expose debugBreakCycle through swig and get rid of the Debug param context |
3624:aaba7e06ece4 |
12-Nov-2006 |
Nathan Binkert <binkertn@umich.edu> |
Create a module called internal where swigged stuff goes. Rename cc_main to internal.main |
3617:384e3b1eae06 |
11-Nov-2006 |
Nathan Binkert <binkertn@umich.edu> |
Get rid of the ParamContext for pseudo instructions and move the parameters to the BaseCPU object. |
3603:714467743f9b |
10-Nov-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
fix endian issues with condition codes use memcpy instead of bcopy s/u_int32_t/uint32_t/g fixup endian code to work with solaris hack to make sure htole() works... Nate, have a good idea to fix this?
src/arch/sparc/faults.cc: set the reset address to be 40 bits. Makes PC printing easier at least for now. src/arch/sparc/isa/base.isa: fix endian issues with condition codes src/arch/sparc/tlb.hh: add implemented physical addres constants src/arch/sparc/utility.hh: add tlb.hh to utilities src/base/loader/raw_object.cc: add a symbol <filename>_start to the symbol table for binaries files src/base/remote_gdb.cc: use memcpy instead of bcopy src/cpu/exetrace.cc: clean up printing a bit more src/cpu/m5legion_interface.h: add tons to the shared interface src/dev/ethertap.cc: s/u_int32_t/uint32_t/g src/dev/ide_atareg.h: fixup endian code to work with solaris src/dev/pcidev.cc: src/sim/param.hh: hack to make sure htole() works... |
3565:6ad587fb7dfd |
07-Nov-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Put kernel_stats back into arch. |
3545:a49b07ba610e |
06-Nov-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Cleaned up remnants of ivlb and ivle |
3538:76ab83131a79 |
06-Nov-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Got rid of obsolete ivlb and ivle psuedo instructions. |
3536:89aa06409e4d |
06-Nov-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Remote GDB support has been changed to use inheritance. Alpha should work, but isn't tested. Other architectures will not. |
3511:8cb26619b6ec |
08-Nov-2006 |
Lisa Hsu <hsul@eecs.umich.edu> |
simplify maxtick parsing in both the python and the c++.
configs/common/Simulation.py: simplify maxtick code a little bit - instead of checking for -1, just set it at MaxTick. src/python/m5/__init__.py: make a new m5 param called MaxTick. src/sim/host.hh: fix the M5 def. of MaxTick src/sim/main.cc: Simplify the MaxTick/num_cycles parsing within main.cc |
3483:edede8473667 |
04-Nov-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
fixes so that M5 will compile under solaris
SConstruct: Add check to see if we need to include libsocket src/arch/sparc/floatregfile.cc: src/arch/sparc/intregfile.cc: use memset rather than bzero and include the appropriate headerfile src/base/pollevent.cc: If we're compling under solaris we need sys/file.h src/base/random.cc: src/base/random.hh: solaris doesn't have random(), so use rint with the correct rounding mode if we're compiling on solaris src/base/stats/flags.hh: u_int32_t?? src/base/time.hh: grab the timersub() define from freebsd since it doesn't exist in solaris src/cpu/inst_seq.hh: we don't need to include stdint here src/sim/byteswap.hh: the method to detect endianness on Solaris is a little more complex... |
3451:185232d74b31 |
31-Oct-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
remove connectAll() and connect() code since it isn't used anymore. (The python does it all) |
3373:999202ee312c |
22-Oct-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add DPRINTF for non-timed quiesce. |
3368:3342dd3f5248 |
22-Oct-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add Quiesce trace flag to track CPU quiesce/wakeup events. |
3363:8ed27e349b3d |
21-Oct-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Tweak a few things for better page fault debugging.
src/sim/faults.cc: Fix fault message. src/kern/tru64/tru64.hh: Add DPRINTF to see where new thread stacks are allocated. src/arch/alpha/faults.cc: Add print statement so we know what the faulting address is in SE mode. |
3356:39c17056dd41 |
20-Oct-2006 |
Nathan Binkert <binkertn@umich.edu> |
Construct a correct value of PYTHONHOME from the interpreter running SCons, make it into a sticky option that can be overridden at build time, and set it up before the interpreter is started. Also, fix the code that turns sticky options into config/*.hh so that it works with types other than bool. |
3329:1f5c70ca9f3e |
19-Oct-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add new event priority for trace enable events so that tracing gets turned on as the very first thing in the selected cycle (tick). |
3311:7eb47a60dbd4 |
17-Oct-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add code to serialize se structures. Lisa is working on the python side of things and will test
src/mem/page_table.cc: src/mem/page_table.hh: add code to serialize/unserialize page table src/sim/process.cc: src/sim/process.hh: add code to serialize/unserialize process |
3277:8eb197592935 |
15-Oct-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Added in missing portions of the stat structure copying function. |
3202:c095cfd0da96 |
11-Oct-2006 |
Lisa Hsu <hsul@eecs.umich.edu> |
since memoryMode was put into the System (from SimObject), things got broken - this fixes it so that changeToTiming/changeToAtomic works.
src/python/m5/SimObject.py: now that setMemoryMode is a method in System, need to convert the SimObject * _ccObject into a system ptr to call setMemoryMode. src/sim/main.cc: need this conversion now. src/sim/sim_object.hh: put the enum back into SimObject. src/sim/system.hh: memoryMode is now a part of SimObject, need the ::'s |
3162:e664ad1ab5fe |
06-Oct-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
system.cc: Make new_page() check for an out of memory condition
src/sim/system.cc: Make new_page() check for an out of memory condition |
3144:b6e9e1811d71 |
06-Oct-2006 |
Lisa Hsu <hsul@eecs.umich.edu> |
there are two main thrusts of this changeset.
1) return the periodicity of checkpoints back into the code (i.e. make m5 checkpoint n m meaningful again). 2) to do this, i had to much around with being able to repeatedly schedule and SimLoopExitEvent, which led to changes in how exit simloop events are handled to make this easier.
src/arch/alpha/isa/decoder.isa: src/mem/cache/cache_impl.hh: modify arg. order for new calling convention of exitSimLoop. src/cpu/base.cc: src/sim/main.cc: src/sim/pseudo_inst.cc: src/sim/root.cc: now, instead of creating a new SimLoopExitEvent, call a wrapper schedExitSimLoop which handles all the default args. src/sim/sim_events.cc: src/sim/sim_events.hh: src/sim/sim_exit.hh: add the periodicity of checkpointing back into the code.
to facilitate this, there are now two wrappers (instead of just overloading exitSimLoop). exitSimLoop is only for exiting NOW (i.e. at curTick), while schedExitSimLoop schedules and exit event for the future. |
3133:ad45cbafebdd |
05-Oct-2006 |
Lisa Hsu <hsul@eecs.umich.edu> |
fix the argument to m5.simulate() on a checkpoint.
src/sim/stat_control.cc: add curTick to reset stats printf. |
3132:a7dbdfa5958f |
05-Oct-2006 |
Nathan Binkert <binkertn@umich.edu> |
Static global object don't work well, if the variables are accessed during the construction of another static global object because there are no guarantees on ordering of construction, so stick the static global into a function as a static local and return a reference to the variable. This fixes the exit callback stuff on my Mac. |
3126:756092c6383c |
02-Oct-2006 |
Kevin Lim <ktlim@umich.edu> |
Updates to fix merge issues and bring almost everything up to working speed. Ozone CPU remains untested, but everything else compiles and runs.
src/arch/alpha/isa_traits.hh: This got changed to the wrong version by accident. src/cpu/base.cc: Fix up progress event to not schedule itself if the interval is set to 0. src/cpu/base.hh: Fix up the CPU Progress Event to not print itself if it's set to 0. Also remove stats_reset_inst (something I added to m5 but isn't necessary here). src/cpu/base_dyn_inst.hh: src/cpu/checker/cpu.hh: Remove float variable of instResult; it's always held within the double part now. src/cpu/checker/cpu_impl.hh: Use thread and not cpuXC. src/cpu/o3/alpha/cpu_builder.cc: src/cpu/o3/checker_builder.cc: src/cpu/ozone/checker_builder.cc: src/cpu/ozone/cpu_builder.cc: src/python/m5/objects/BaseCPU.py: Remove stats_reset_inst. src/cpu/o3/commit_impl.hh: src/cpu/ozone/lw_back_end_impl.hh: Get TC, not XCProxy. src/cpu/o3/cpu.cc: Switch out updates from the version of m5 I have. Also remove serialize code that got added twice. src/cpu/o3/iew_impl.hh: src/cpu/o3/lsq_impl.hh: src/cpu/thread_state.hh: Remove code that was added twice. src/cpu/o3/lsq_unit.hh: Add back in stats that got lost in the merge. src/cpu/o3/lsq_unit_impl.hh: Use proper method to get flags. Also wake CPU if we're coming back from a cache miss. src/cpu/o3/thread_context_impl.hh: src/cpu/o3/thread_state.hh: Support profiling. src/cpu/ozone/cpu.hh: Update to use proper typename. src/cpu/ozone/cpu_impl.hh: src/cpu/ozone/dyn_inst_impl.hh: Updates for newmem. src/cpu/ozone/lw_lsq_impl.hh: Get flags correctly. src/cpu/ozone/thread_state.hh: Reorder constructor initialization, use tc. src/sim/pseudo_inst.cc: Allow for loading of symbol file. Be sure to use ThreadContext and not ExecContext. |
3125:febd811bccc6 |
30-Sep-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge ktlim@zamp:./local/clean/o3-merge/m5 into zamp.eecs.umich.edu:/z/ktlim2/clean/o3-merge/newmem
configs/boot/micro_memlat.rcS: configs/boot/micro_tlblat.rcS: src/arch/alpha/ev5.cc: src/arch/alpha/isa/decoder.isa: src/arch/alpha/isa_traits.hh: src/cpu/base.cc: src/cpu/base.hh: src/cpu/base_dyn_inst.hh: src/cpu/checker/cpu.hh: src/cpu/checker/cpu_impl.hh: src/cpu/o3/alpha/cpu_impl.hh: src/cpu/o3/alpha/params.hh: src/cpu/o3/checker_builder.cc: src/cpu/o3/commit_impl.hh: src/cpu/o3/cpu.cc: src/cpu/o3/decode_impl.hh: src/cpu/o3/fetch_impl.hh: src/cpu/o3/iew.hh: src/cpu/o3/iew_impl.hh: src/cpu/o3/inst_queue.hh: src/cpu/o3/lsq.hh: src/cpu/o3/lsq_impl.hh: src/cpu/o3/lsq_unit.hh: src/cpu/o3/lsq_unit_impl.hh: src/cpu/o3/regfile.hh: src/cpu/o3/rename_impl.hh: src/cpu/o3/thread_state.hh: src/cpu/ozone/checker_builder.cc: src/cpu/ozone/cpu.hh: src/cpu/ozone/cpu_impl.hh: src/cpu/ozone/front_end.hh: src/cpu/ozone/front_end_impl.hh: src/cpu/ozone/lw_back_end.hh: src/cpu/ozone/lw_back_end_impl.hh: src/cpu/ozone/lw_lsq.hh: src/cpu/ozone/lw_lsq_impl.hh: src/cpu/ozone/thread_state.hh: src/cpu/simple/base.cc: src/cpu/simple_thread.cc: src/cpu/simple_thread.hh: src/cpu/thread_state.hh: src/dev/ide_disk.cc: src/python/m5/objects/O3CPU.py: src/python/m5/objects/Root.py: src/python/m5/objects/System.py: src/sim/pseudo_inst.cc: src/sim/pseudo_inst.hh: src/sim/system.hh: util/m5/m5.c: Hand merge. |
3114:7a4771b9b720 |
17-Sep-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Finished changing how stat structures are translated, fixed the handling of various ids as LiveProcess parameters.
src/arch/alpha/linux/process.cc: src/arch/alpha/linux/process.hh: src/arch/alpha/process.cc: src/arch/alpha/process.hh: src/arch/alpha/tru64/process.cc: src/arch/alpha/tru64/process.hh: src/arch/mips/linux/process.cc: src/arch/mips/linux/process.hh: src/arch/mips/process.cc: src/arch/mips/process.hh: src/arch/sparc/linux/process.cc: src/arch/sparc/linux/process.hh: src/arch/sparc/process.cc: src/arch/sparc/process.hh: src/arch/sparc/solaris/process.cc: src/arch/sparc/solaris/process.hh: src/sim/process.cc: src/sim/process.hh: src/sim/syscall_emul.cc: src/sim/syscall_emul.hh: Changed Process to LiveProcess in syscall handlers and fixed the implementation of uid, euid, gid, egid, pid and ppid as LiveProcess parameters. src/kern/tru64/tru64.hh: Changed Process to LiveProcess in syscall handlers and fixed the implementation of uid, euid, gid, egid, pid and ppid as LiveProcess parameters. Also fit tru64 in with the new way to handle stat calls. |
3113:a6811aaea654 |
15-Sep-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Changes to correct stat behavior |
3112:76b70de314b6 |
15-Sep-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Merge zizzer.eecs.umich.edu:/bk/newmem into ewok.(none):/home/gblack/m5/newmem |
3102:225b76c8ac68 |
04-Sep-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
More Python hacking to deal with config.py split and resulting recursive import trickiness. |
3089:0ea2eb13c4de |
11-Sep-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add annotation code to m5
configs/common/Benchmarks.py: add annotate test app src/SConscript: add annotate.cc to lis src/arch/alpha/isa/decoder.isa: add annotate instructions src/base/traceflags.py: Add annotate trace flag src/sim/pseudo_inst.cc: src/sim/pseudo_inst.hh: add annotate pseudo ops util/m5/m5op.S: util/m5/m5op.h: add anotate ops |
3079:13d9c24a7bba |
28-Aug-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add dup() support (from Antti Miettinen). |
3071:12e952ddba98 |
03-Sep-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Made system calls use the uid, etc parameters from the live process. |
3066:254e37051d65 |
03-Sep-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Added uid, euid, gid, egid, pid and ppid parameters to a live process. |
3005:ceb86e85d62d |
16-Aug-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Finish test clean-up & reorg.
configs/common/FSConfig.py: Add default Machine() param configs/example/fs.py: configs/example/se.py: make it work again src/python/m5/objects/BaseCPU.py: Make mem PhysicalMemory so that a Parent.any proxy works well src/sim/process.cc: Increase default stack size so we don't get an 'increasing stack' message on 'hello world' tests/SConscript: Add full list of current configs. tests/configs/simple-atomic.py: tests/configs/simple-timing.py: don't need SEConfig anymore tests/quick/00.hello/test.py: tests/quick/20.eio-short/test.py: fix tests/run.py: move configs to separate dir |
2989:9a6f66c38acc |
15-Aug-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
fixes for gcc 4.1 Nate needs to fix sinic builder stuff Gabe needs to verify my fixes to decoder.isa
OPT/DEBUG compiles for ALPHA_FS, ALPHA_SE, MIPS_SE, SPARC_SE with this changeset
README: Fix the swig version in the readme src/SConscript: remove sinic until nate fixes the builder crap for it src/arch/alpha/system.hh: src/arch/mips/isa/includes.isa: src/arch/sparc/isa/decoder.isa: src/base/stats/visit.cc: src/base/timebuf.hh: src/dev/ide_disk.cc: src/dev/sinic.cc: src/mem/cache/miss/mshr.cc: src/mem/cache/miss/mshr_queue.cc: src/mem/packet.hh: src/mem/request.hh: src/sim/builder.hh: src/sim/system.hh: fixes for gcc 4.1 |
2986:99640058db70 |
15-Aug-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Some touchup to the reorganized includes and "using" directives. |
2980:eab855f06b79 |
15-Aug-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Cleaned up include files and got rid of many using directives in header files. |
2956:790b4f39c21c |
23-Jul-2006 |
Gabe Black <gblack@eecs.umich.edu> |
Added myself to the authors list. |
2928:39faed6ca129 |
19-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Get the path to load the ini file from. I'm not sure if this fix is needed in other places as well.
src/sim/main.cc: Get the path to load the ini file from. |
2902:695d4683916e |
13-Jul-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add system.mem_mode = ['timing', 'atomic'] update scripts acordingly
configs/test/SysPaths.py: new syspaths from nate, this one allows you to set script, binary, and disk paths like system.dir = 'aouaou' in your script configs/test/fs.py: update for system mem_mode Put small checkpoint example Make clock 1THz configs/test/test.py: src/arch/alpha/freebsd/system.cc: src/arch/alpha/linux/system.cc: src/arch/alpha/system.cc: src/arch/alpha/tru64/system.cc: src/arch/sparc/system.cc: src/python/m5/objects/System.py: src/sim/system.cc: src/sim/system.hh: update for system mem_mode src/dev/io_device.cc: Use time returned from sendAtomic to delay |
2901:f9a45473ab55 |
12-Jul-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
memory mode information now contained in system object States are now running, draining, or drained. memory state information moved into system object system parameter is not fs only for cpus Implement drain() support in devices Update for drain() call that returns number of times drain_event->process() will be called
Break O3 CPU! No sense in putting in a hack change that kevin is going to remove in a few minutes i imagine
src/cpu/simple/atomic.cc: src/cpu/simple/atomic.hh: Since se mode has a system, allow access to it Verify that the atomic cpu is connected to an atomic system on resume src/cpu/simple/base.cc: Since se mode has a system, allow access to it src/cpu/simple/timing.cc: src/cpu/simple/timing.hh: Update for new drain() call that returns number of times drain_event->process() will be called and memory state being moved into the system Since se mode has a system, allow access to it Verify that the timing cpu is connected to an timing system on resume src/dev/ide_disk.cc: src/dev/io_device.cc: src/dev/io_device.hh: src/dev/ns_gige.cc: src/dev/ns_gige.hh: src/dev/pcidev.cc: src/dev/pcidev.hh: src/dev/sinic.cc: src/dev/sinic.hh: Implement drain() support in devices src/python/m5/config.py: Allow drain to return number of times drain_event->process() will be called. Normally 0 or 1 but things like O3 cpu or devices with multiple ports may want to call it many times src/python/m5/objects/BaseCPU.py: move system parameter out of fs to everyone src/sim/sim_object.cc: src/sim/sim_object.hh: States are now running, draining, or drained. memory state information moved into system object src/sim/system.cc: src/sim/system.hh: memory mode information now contained in system object |
2889:9e367e03d656 |
10-Jul-2006 |
Nathan Binkert <binkertn@umich.edu> |
Migrate most of main() and and all option parsing to python
configs/test/fs.py: configs/test/test.py: update for the new way that m5 deals with options src/python/SConscript: Compile AUTHORS, LICENSE, README, and RELEASE_NOTES into the python stuff. src/python/m5/__init__.py: redo the way options work. Move them all to main.py src/sim/main.cc: Migrate more functionality for main() into python. Namely option parsing src/python/m5/attrdict.py: A dictionary object that overrides attribute access to do item access. src/python/m5/main.py: The new location for M5's option parsing, and the main() routine to set up the simulation. |
2875:9b6f6b75b187 |
07-Jul-2006 |
Korey Sewell <ksewell@umich.edu> |
Fix so that O3CPU doesnt segfault on exit. Major thing was to not execute commit if there are no active threads in CPU.
src/cpu/o3/alpha/thread_context.hh: call deallocate instead of deallocateContext src/cpu/o3/commit_impl.hh: dont run commit stage if there are no instructions src/cpu/o3/cpu.cc: add deallocate event, deactivateThread function, and edit deallocateContext. src/cpu/o3/cpu.hh: add deallocate event and add optional delay to deallocateContext src/cpu/o3/thread_context.hh: optional delay for deallocate src/cpu/o3/thread_context_impl.hh: edit DPRINTFs to say Thread Context instead of Alpha TC src/cpu/thread_context.hh: optional delay src/sim/syscall_emul.hh: name stuff |
2868:6a7e69fa92d3 |
07-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Take the name of the checkpoint directory in when calling checkpoint() or restoreCheckpoint().
src/sim/main.cc: src/sim/serialize.cc: src/sim/serialize.hh: Take in the directory name when checkpointing. |
2861:0265b505b50a |
06-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Two minor FS compile fixes.
src/dev/tsunami_pchip.hh: Need ULL() for 32-bit hosts. src/sim/pseudo_inst.cc: Forgot to remove sampler include from here. |
2842:feca0c70f45d |
06-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Change the return value of drain. False means the object wasn't able to drain yet.
src/python/m5/config.py: Invert the return value. src/sim/sim_object.cc: Invert the return value of drain. src/sim/sim_object.hh: Change the return value of drain. |
2841:d874ac38161c |
05-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
For now using the checkpoint or switchcpu pseudo instructions will return control to Python, returning the cause to be the instruction name. The user's script must then interpret the reason for exiting the simulation loop and handle the action accordingly. This may change in the future.
src/sim/pseudo_inst.cc: Exit sim loop with a specific string to indicate to Python what caused the exit. The user's script needs to interpret the exit events and handle them as desired. |
2840:227f7c4f8c81 |
05-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Remove sampler and serializer. Now they are handled through C++ interacting with Python.
src/SConscript: src/cpu/base.cc: src/cpu/base.hh: src/cpu/checker/cpu.hh: src/cpu/checker/cpu_impl.hh: src/cpu/o3/cpu.cc: src/cpu/o3/cpu.hh: src/cpu/o3/fetch.hh: src/cpu/ozone/cpu.hh: src/cpu/ozone/cpu_impl.hh: src/cpu/simple/base.cc: src/cpu/simple/base.hh: src/sim/pseudo_inst.cc: Remove sampler. src/sim/sim_object.cc: Remove serializer. |
2839:d5dd8a3cdea0 |
05-Jul-2006 |
Kevin Lim <ktlim@umich.edu> |
Rename quiesce to drain to avoid confusion with the pseudo instruction.
src/cpu/simple/timing.cc: src/cpu/simple/timing.hh: src/python/m5/__init__.py: src/python/m5/config.py: src/sim/main.cc: src/sim/sim_events.cc: src/sim/sim_events.hh: src/sim/sim_object.cc: src/sim/sim_object.hh: Rename quiesce to drain. |
2834:c8342a71404b |
03-Jul-2006 |
Korey Sewell <ksewell@umich.edu> |
Fix for FS O3CPU compile ... missing forward class declaration/header file after files got split for ISA-independence
src/cpu/o3/alpha/thread_context.hh: Use 'this' when accessing cpu src/cpu/o3/cpu.hh: add numActiveThreds function src/cpu/o3/thread_context.hh: forward class declarations src/cpu/o3/thread_context_impl.hh: add quiesce event header file src/cpu/thread_context.hh: add exit() function to thread context (read comments in file) src/sim/syscall_emul.cc: adjust exitFunc syscall |
2817:273f7fb94f83 |
30-Jun-2006 |
Korey Sewell <ksewell@umich.edu> |
Make O3CPU model independent of the ISA
Use O3CPU when building instead of AlphaO3CPU.
I could use some better python magic in the cpu_models.py file!
AUTHORS: add middle initial SConstruct: change from AlphaO3CPU to O3CPU src/cpu/SConscript: edits to build O3CPU instead of AlphaO3CPU src/cpu/cpu_models.py: change substitution template to use proper CPU EXEC CONTEXT For O3CPU Model...
Actually, some Python expertise could be used here. The 'env' variable is not passed to this file, so I had to parse through the ARGV to find the ISA... src/cpu/o3/base_dyn_inst.cc: src/cpu/o3/bpred_unit.cc: src/cpu/o3/commit.cc: src/cpu/o3/cpu.cc: src/cpu/o3/cpu.hh: src/cpu/o3/decode.cc: src/cpu/o3/fetch.cc: src/cpu/o3/iew.cc: src/cpu/o3/inst_queue.cc: src/cpu/o3/lsq.cc: src/cpu/o3/lsq_unit.cc: src/cpu/o3/mem_dep_unit.cc: src/cpu/o3/rename.cc: src/cpu/o3/rob.cc: use isa_specific.hh src/sim/process.cc: only initi NextNPC if not ALPHA src/cpu/o3/alpha/cpu.cc: alphao3cpu impl src/cpu/o3/alpha/cpu.hh: move AlphaTC to it's own file src/cpu/o3/alpha/cpu_impl.hh: Move AlphaTC to it's own file ... src/cpu/o3/alpha/dyn_inst.cc: src/cpu/o3/alpha/dyn_inst.hh: src/cpu/o3/alpha/dyn_inst_impl.hh: include paths src/cpu/o3/alpha/impl.hh: include paths, set default MaxThreads to 2 instead of 4 src/cpu/o3/alpha/params.hh: set Alpha Specific Params here src/python/m5/objects/O3CPU.py: add O3CPU class src/cpu/o3/SConscript: include isa-specific build files src/cpu/o3/alpha/thread_context.cc: NEW HOME of AlphaTC src/cpu/o3/alpha/thread_context.hh: new home of AlphaTC src/cpu/o3/isa_specific.hh: includes ISA specific files src/cpu/o3/params.hh: base o3 params src/cpu/o3/thread_context.hh: base o3 thread context src/cpu/o3/thread_context_impl.hh: base o3 thead context impl |
2816:776562207565 |
29-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge ktlim@zizzer:/bk/newmem into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge |
2806:2e42ac0e7bd0 |
29-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge ktlim@zamp:/z/ktlim2/clean/newmem-merge into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem |
2802:babfc298ac86 |
26-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
remove extern "C" from the functions we all from gdb. This isn't requried and trips up GDB sometimes when i thinks the extern name should be mangled, but it isn't |
2800:18a615ca6e19 |
26-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add syscall emulation page table fault so we can allocate more stack pages
src/cpu/simple/base.cc: add syscall emulation page table fault so we can allocate more stack pages FaultBase::invoke will do this, we don't need to do it here src/sim/faults.hh: I have no idea why this #if was there... gone src/sim/process.cc: make stack_min actually be the current minimum |
2799:1c93aed5aa4a |
29-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Remove function that no longer can be used. We should figure out if we want to allow the m5checkpoint pseudoinstruction or not.
src/sim/pseudo_inst.cc: Remove the setup function from Checkpoint. I'm not sure what we want to do with this pseudoinst. src/sim/serialize.hh: Remove setup function. |
2797:b5f26b4eacef |
29-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Add in support for quiescing the system, taking checkpoints, restoring from checkpoints, changing memory modes, and switching CPUs.
Key new functions that can be called on the m5 object at the python interpreter: doQuiesce(root) - A helper function that quiesces the object passed in and all of its children. resume(root) - Another helper function that tells the object and all of its children that the quiesce is over. checkpoint(root) - Takes a checkpoint of the system. Checkpoint directory must be set before hand. setCheckpointDir(name) - Sets the checkpoint directory. restoreCheckpoint(root) - Restores the values from the checkpoint located in the checkpoint directory. changeToAtomic(system) - Changes the system and all of its children to atomic memory mode. changeToTiming(system) - Changes the system and all of its children to timing memory mode. switchCpus(list) - Takes in a list of tuples, where each tuple is a pair of (old CPU, new CPU). Quiesces the old CPUs, and then switches over to the new CPUs.
src/SConscript: Remove serializer, replaced by python code. src/python/m5/__init__.py: Updates to support quiescing, checkpointing, changing memory modes, and switching CPUs. src/python/m5/config.py: Several functions defined on the SimObject for quiescing, changing timing modes, and switching CPUs src/sim/main.cc: Add some extra functions that are exported to python through SWIG. src/sim/serialize.cc: Change serialization around a bit. Now it is controlled through Python, so there's no need for SerializeEvents or SerializeParams.
Also add in a new unserializeAll() function that loads a checkpoint and handles unserializing all objects. src/sim/serialize.hh: Add unserializeAll function and a setCheckpointName function. src/sim/sim_events.cc: Add process() function for CountedQuiesceEvent, which calls exitSimLoop() once its counter reaches 0. src/sim/sim_events.hh: Add in a CountedQuiesceEvent, which is used when the system is preparing to quiesce. Any objects that can't be quiesced immediately are given a pointer to a CountedQuiesceEvent. The event has its counter set via Python, and as objects finish quiescing they call process() on the event. Eventually the event causes the simulation to stop once all objects have quiesced. src/sim/sim_object.cc: Add a few functions for quiescing, checkpointing, and changing memory modes. src/sim/sim_object.hh: Add a state variable to all SimObjects that tracks both the timing mode of the object and the quiesce state of the object. Currently this isn't serialized, and I'm not sure it needs to be so long as the timing mode starts up the same after a checkpoint. |
2779:b20a0595a0a3 |
17-Jun-2006 |
Nathan Binkert <binkertn@umich.edu> |
include misc.hh for panic |
2778:1bd913a180a1 |
17-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add mac os x fast byte swap code |
2777:599e7940aba5 |
17-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Merge zizzer:/bk/newmem into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem |
2772:f0f52cbe744d |
17-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
minor header cleanups
src/dev/alpha_console.cc: Remove my name twice from header src/dev/ide_disk.cc: Spell my full name correctly src/mem/bus.hh: I think I edited much of this src/sim/byteswap.hh: I believe most of this code is mine or nate's |
2770:07a93a0da45b |
17-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
remove profile.cc |
2769:04c9a7db403f |
17-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Merge zizzer:/bk/newmem into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem |
2768:5f23b83c8b0c |
15-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Merge zizzer:/bk/newmem into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem |
2764:e6fea7527b3c |
17-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Fixes to compile under Cygwin.
src/kern/linux/linux.hh: src/kern/solaris/solaris.hh: Rename BSD_HOST to the more specific NO_STAT64. src/sim/byteswap.hh: Replace set of swap_byte functions with a single templated version. Hope this fixes compiler issues with e.g. int32_t vs int disambiguation. src/sim/syscall_emul.hh: Rename BSD_HOST to the more specific NO_STAT64. Set this for __CYGWIN__. |
2763:c3741c707d53 |
17-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Rename SWIG "main" module to "cc_main" so it's clear from the Python side that this is the interface to C++.
src/SConscript: main_wrap.cc -> cc_main_wrap.cc src/python/SConscript: src/python/m5/__init__.py: src/sim/main.cc: s/main/cc_main/ src/python/m5/config.py: s/main/cc_main/ Also directly import cc_main so we don't need to put the "m5." in front all the time. |
2762:470f9e55fe54 |
17-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add --outdir option. Didn't call it "-d" since that's already being used for "detailed cpu". Needed to add extra function for user script to pass parsed options back to m5 module.
configs/test/fs.py: configs/test/test.py: Call setStandardOptions(). src/python/m5/__init__.py: Add --outdir option. Add setStandardOptions() so user script can pass parsed options back to m5 module. src/sim/main.cc: Add SWIG-wrappable function to set output dir. |
2760:4dbf498165ac |
17-Jun-2006 |
Nathan Binkert <binkertn@umich.edu> |
Add myself to list of authors |
2738:5d7a31c7fa29 |
13-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Move SimObject creation and Port connection loops into Python. Add Port and VectorPort objects and support for specifying port connections via assignment. The whole C++ ConfigNode hierarchy is gone now, as are C++ Connector objects.
configs/test/fs.py: configs/test/test.py: Rewrite for new port connector syntax. src/SConscript: Remove unneeded files: - mem/connector.* - sim/config* src/dev/io_device.hh: src/mem/bridge.cc: src/mem/bridge.hh: src/mem/bus.cc: src/mem/bus.hh: src/mem/mem_object.hh: src/mem/physical.cc: src/mem/physical.hh: Allow getPort() to take an optional index to support vector ports (eventually). src/python/m5/__init__.py: Move SimObject construction and port connection operations into Python (with C++ calls). src/python/m5/config.py: Move SimObject construction and port connection operations into Python (with C++ calls). Add support for declaring and connecting MemObject ports in Python. src/python/m5/objects/Bus.py: src/python/m5/objects/PhysicalMemory.py: Add port declaration. src/sim/builder.cc: src/sim/builder.hh: src/sim/serialize.cc: src/sim/serialize.hh: ConfigNodes are gone; builder just gets the name of a .ini file section now. src/sim/main.cc: Move SimObject construction and port connection operations into Python (with C++ calls). Split remaining initialization operations into two parts, loadIniFile() and finalInit(). src/sim/param.cc: src/sim/param.hh: SimObject resolution done globally in Python now (not via ConfigNode hierarchy). src/sim/sim_object.cc: Remove unneeded #include. |
2737:f712ccc4b1f9 |
14-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
add a comment that should be able to pass --help after config file |
2729:d5b88a725a9b |
13-Jun-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
allow long opts to m5 and add a help flag back. |
2720:695250d6fa42 |
12-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge fixes to make full system compile and run.
src/arch/alpha/linux/system.cc: src/cpu/o3/alpha_cpu_impl.hh: src/sim/system.cc: Merge fixes. |
2716:b9114064d77a |
11-Jun-2006 |
Nathan Binkert <binkertn@umich.edu> |
Merge iceaxe.:/Volumes/work/research/m5/head into iceaxe.:/Volumes/work/research/m5/merge
src/cpu/simple/base.cc: src/kern/kernel_stats.cc: src/kern/kernel_stats.hh: src/kern/system_events.cc: src/kern/system_events.hh: src/python/m5/objects/System.py: src/sim/system.cc: src/sim/system.hh: hand merge |
2715:4032e02b525e |
11-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Move LiveProcess::create() from arch-specific files bcak to main LiveProcess, then automatically select ISA based on object file type. Now simulation scripts no longer need to care about the ISA, as they can just call LiveProcess().
configs/test/test.py: Script no longer cares about ISA. src/arch/alpha/process.cc: src/arch/alpha/process.hh: src/arch/mips/process.cc: src/arch/mips/process.hh: src/arch/sparc/process.cc: src/arch/sparc/process.hh: src/sim/process.cc: src/sim/process.hh: Move create() from arch-specific files back to main LiveProcess, then automatically select ISA based on object file type. |
2708:c4157b162e7b |
09-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Merge vm1.(none):/home/stever/bk/newmem into vm1.(none):/home/stever/bk/newmem-py
src/python/m5/__init__.py: src/sim/syscall_emul.cc: Hand merge. |
2707:ee2a3f82ac56 |
09-Jun-2006 |
Korey Sewell <ksewell@umich.edu> |
Authorship stuff
src/sim/syscall_emul.cc: Authorship Stuff |
2689:dbf969c18a65 |
07-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Update copyright. |
2687:9721a59675b8 |
09-Jun-2006 |
Korey Sewell <ksewell@umich.edu> |
add fcntl64Func
use ThreadContext rename
src/arch/mips/isa/formats/branch.isa: src/arch/mips/isa/formats/fp.isa: src/arch/mips/isa/includes.isa: Use ThreadContext src/sim/syscall_emul.cc: fcntl64 function using TC src/sim/syscall_emul.hh: Add fcntl64func |
2683:d6b72bb2ed97 |
07-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Reorganization/renaming of CPUExecContext. Now it is called SimpleThread in order to clear up the confusion due to the many ExecContexts. It also derives from a common ThreadState object, which holds various state common to threads across CPU models.
Following with the previous check-in, ExecContext now refers only to the interface provided to the ISA in order to access CPU state. ThreadContext refers to the interface provided to all objects outside the CPU in order to access thread state. SimpleThread provides all thread state and the interface to access it, and is suitable for simple execution models such as the SimpleCPU.
src/SConscript: Include thread state file. src/arch/alpha/ev5.cc: src/cpu/checker/cpu.cc: src/cpu/checker/cpu.hh: src/cpu/checker/thread_context.hh: src/cpu/memtest/memtest.cc: src/cpu/memtest/memtest.hh: src/cpu/o3/cpu.cc: src/cpu/ozone/cpu_impl.hh: src/cpu/simple/atomic.cc: src/cpu/simple/base.cc: src/cpu/simple/base.hh: src/cpu/simple/timing.cc: Rename CPUExecContext to SimpleThread. src/cpu/base_dyn_inst.hh: Make thread member variables protected.. src/cpu/o3/alpha_cpu.hh: src/cpu/o3/cpu.hh: Make various members of ThreadState protected. src/cpu/o3/alpha_cpu_impl.hh: Push generation of TranslatingPort into the CPU itself. Make various members of ThreadState protected. src/cpu/o3/thread_state.hh: Pull a lot of common code into the base ThreadState class. src/cpu/ozone/thread_state.hh: Rename CPUExecContext to SimpleThread, move a lot of common code into base ThreadState class. src/cpu/thread_state.hh: Push a lot of common code into base ThreadState class. This goes along with renaming CPUExecContext to SimpleThread, and making it derive from ThreadState. src/cpu/simple_thread.cc: Rename CPUExecContext to SimpleThread, make it derive from ThreadState. This helps push a lot of common code/state into a single class that can be used by all CPUs. src/cpu/simple_thread.hh: Rename CPUExecContext to SimpleThread, make it derive from ThreadState. src/kern/system_events.cc: Rename cpu_exec_context to thread_context. src/sim/process.hh: Remove unused forward declaration. |
2680:246e7104f744 |
06-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Change ExecContext to ThreadContext. This is being renamed to differentiate between the interface used objects outside of the CPU, and the interface used by the ISA. ThreadContext is used by objects outside of the CPU and is specifically defined in thread_context.hh. ExecContext is more implicit, and is defined by files such as base_dyn_inst.hh or cpu/simple/base.hh.
Further renames/reorganization will be coming shortly; what is currently CPUExecContext (the old ExecContext from m5) will be renamed to SimpleThread or something similar.
src/arch/alpha/arguments.cc: src/arch/alpha/arguments.hh: src/arch/alpha/ev5.cc: src/arch/alpha/faults.cc: src/arch/alpha/faults.hh: src/arch/alpha/freebsd/system.cc: src/arch/alpha/freebsd/system.hh: src/arch/alpha/isa/branch.isa: src/arch/alpha/isa/decoder.isa: src/arch/alpha/isa/main.isa: src/arch/alpha/linux/process.cc: src/arch/alpha/linux/system.cc: src/arch/alpha/linux/system.hh: src/arch/alpha/linux/threadinfo.hh: src/arch/alpha/process.cc: src/arch/alpha/regfile.hh: src/arch/alpha/stacktrace.cc: src/arch/alpha/stacktrace.hh: src/arch/alpha/tlb.cc: src/arch/alpha/tlb.hh: src/arch/alpha/tru64/process.cc: src/arch/alpha/tru64/system.cc: src/arch/alpha/tru64/system.hh: src/arch/alpha/utility.hh: src/arch/alpha/vtophys.cc: src/arch/alpha/vtophys.hh: src/arch/mips/faults.cc: src/arch/mips/faults.hh: src/arch/mips/isa_traits.cc: src/arch/mips/isa_traits.hh: src/arch/mips/linux/process.cc: src/arch/mips/process.cc: src/arch/mips/regfile/float_regfile.hh: src/arch/mips/regfile/int_regfile.hh: src/arch/mips/regfile/misc_regfile.hh: src/arch/mips/regfile/regfile.hh: src/arch/mips/stacktrace.hh: src/arch/sparc/faults.cc: src/arch/sparc/faults.hh: src/arch/sparc/isa_traits.hh: src/arch/sparc/linux/process.cc: src/arch/sparc/linux/process.hh: src/arch/sparc/process.cc: src/arch/sparc/regfile.hh: src/arch/sparc/solaris/process.cc: src/arch/sparc/stacktrace.hh: src/arch/sparc/ua2005.cc: src/arch/sparc/utility.hh: src/arch/sparc/vtophys.cc: src/arch/sparc/vtophys.hh: src/base/remote_gdb.cc: src/base/remote_gdb.hh: src/cpu/base.cc: src/cpu/base.hh: src/cpu/base_dyn_inst.hh: src/cpu/checker/cpu.cc: src/cpu/checker/cpu.hh: src/cpu/checker/exec_context.hh: src/cpu/cpu_exec_context.cc: src/cpu/cpu_exec_context.hh: src/cpu/cpuevent.cc: src/cpu/cpuevent.hh: src/cpu/exetrace.hh: src/cpu/intr_control.cc: src/cpu/memtest/memtest.hh: src/cpu/o3/alpha_cpu.hh: src/cpu/o3/alpha_cpu_impl.hh: src/cpu/o3/alpha_dyn_inst_impl.hh: src/cpu/o3/commit.hh: src/cpu/o3/commit_impl.hh: src/cpu/o3/cpu.cc: src/cpu/o3/cpu.hh: src/cpu/o3/fetch_impl.hh: src/cpu/o3/regfile.hh: src/cpu/o3/thread_state.hh: src/cpu/ozone/back_end.hh: src/cpu/ozone/cpu.hh: src/cpu/ozone/cpu_impl.hh: src/cpu/ozone/front_end.hh: src/cpu/ozone/front_end_impl.hh: src/cpu/ozone/inorder_back_end.hh: src/cpu/ozone/lw_back_end.hh: src/cpu/ozone/lw_back_end_impl.hh: src/cpu/ozone/lw_lsq.hh: src/cpu/ozone/lw_lsq_impl.hh: src/cpu/ozone/thread_state.hh: src/cpu/pc_event.cc: src/cpu/pc_event.hh: src/cpu/profile.cc: src/cpu/profile.hh: src/cpu/quiesce_event.cc: src/cpu/quiesce_event.hh: src/cpu/simple/atomic.cc: src/cpu/simple/base.cc: src/cpu/simple/base.hh: src/cpu/simple/timing.cc: src/cpu/static_inst.cc: src/cpu/static_inst.hh: src/cpu/thread_state.hh: src/dev/alpha_console.cc: src/dev/ns_gige.cc: src/dev/sinic.cc: src/dev/tsunami_cchip.cc: src/kern/kernel_stats.cc: src/kern/kernel_stats.hh: src/kern/linux/events.cc: src/kern/linux/events.hh: src/kern/system_events.cc: src/kern/system_events.hh: src/kern/tru64/dump_mbuf.cc: src/kern/tru64/tru64.hh: src/kern/tru64/tru64_events.cc: src/kern/tru64/tru64_events.hh: src/mem/vport.cc: src/mem/vport.hh: src/sim/faults.cc: src/sim/faults.hh: src/sim/process.cc: src/sim/process.hh: src/sim/pseudo_inst.cc: src/sim/pseudo_inst.hh: src/sim/syscall_emul.cc: src/sim/syscall_emul.hh: src/sim/system.cc: src/cpu/thread_context.hh: src/sim/system.hh: src/sim/vptr.hh: Change ExecContext to ThreadContext. |
2670:9107b8bd08cd |
02-Jun-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge ktlim@zizzer:/bk/newmem into zizzer.eecs.umich.edu:/.automount/zamp/z/ktlim2/clean/newmem |
2667:fe64b8353b1c |
09-Jun-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Move main control from C++ into Python. User script now invokes initialization and simulation loop after building configuration. These functions are exported from C++ to Python using SWIG.
SConstruct: Set up SWIG builder & scanner. Set up symlinking of source files into build directory (by not disabling the default behavior). configs/test/test.py: Rewrite to use new script-driven interface. Include a sample option. src/SConscript: Set up symlinking of source files into build directory (by not disabling the default behavior). Add SWIG-generated main_wrap.cc to source list. src/arch/SConscript: Set up symlinking of source files into build directory (by not disabling the default behavior). src/arch/alpha/ev5.cc: src/arch/alpha/isa/decoder.isa: src/cpu/o3/alpha_cpu_impl.hh: src/cpu/trace/opt_cpu.cc: src/cpu/trace/trace_cpu.cc: src/sim/pseudo_inst.cc: src/sim/root.cc: src/sim/serialize.cc: src/sim/syscall_emul.cc: SimExit() is now exitSimLoop(). src/cpu/base.cc: SimExitEvent is now SimLoopExitEvent src/python/SConscript: Add SWIG build command for main.i. Use python/m5 in build dir as source for zip archive... easy now with file duplication enabled. src/python/m5/__init__.py: - Move copyright notice back to C++ so we can print it right away, even for interactive sessions. - Get rid of argument parsing code; just provide default option descriptors for user script to call optparse with. - Don't clutter m5 namespace by sucking in all of m5.config and m5.objects. - Move instantiate() function here from config.py. src/python/m5/config.py: - Move instantiate() function to __init__.py. - Param.Foo deferred type lookups must use m5.objects namespace now (not m5). src/python/m5/objects/AlphaConsole.py: src/python/m5/objects/AlphaFullCPU.py: src/python/m5/objects/AlphaTLB.py: src/python/m5/objects/BadDevice.py: src/python/m5/objects/BaseCPU.py: src/python/m5/objects/BaseCache.py: src/python/m5/objects/Bridge.py: src/python/m5/objects/Bus.py: src/python/m5/objects/CoherenceProtocol.py: src/python/m5/objects/Device.py: src/python/m5/objects/DiskImage.py: src/python/m5/objects/Ethernet.py: src/python/m5/objects/Ide.py: src/python/m5/objects/IntrControl.py: src/python/m5/objects/MemObject.py: src/python/m5/objects/MemTest.py: src/python/m5/objects/Pci.py: src/python/m5/objects/PhysicalMemory.py: src/python/m5/objects/Platform.py: src/python/m5/objects/Process.py: src/python/m5/objects/Repl.py: src/python/m5/objects/Root.py: src/python/m5/objects/SimConsole.py: src/python/m5/objects/SimpleDisk.py: src/python/m5/objects/System.py: src/python/m5/objects/Tsunami.py: src/python/m5/objects/Uart.py: Fix up imports (m5 namespace no longer includes m5.config). src/sim/eventq.cc: src/sim/eventq.hh: Support for Python-called simulate() function: - Use IsExitEvent flag to signal events that want to exit the simulation loop gracefully (instead of calling exit() to terminate the process). - Modify interface to hand exit event object back to caller so it can be inspected for cause. src/sim/host.hh: Add MaxTick constant. src/sim/main.cc: Move copyright notice back to C++ so we can print it right away, even for interactive sessions. Use PYTHONPATH environment var to set module path (instead of clunky code injection method). Move main control from here into Python: - Separate initialization code and simulation loop into separate functions callable from Python. - Make Python interpreter invocation more pure (more like directly invoking interpreter). Add -i and -p flags (only options on binary itself; other options processed by Python). Import readline package when using interactive mode. src/sim/sim_events.cc: SimExitEvent is now SimLoopExitEvent, and uses IsSimExit flag to terminate loop (instead of exiting simulator process). src/sim/sim_events.hh: SimExitEvent is now SimLoopExitEvent, and uses IsSimExit flag to terminate loop (instead of exiting simulator process). Get rid of a few unused constructors. src/sim/sim_exit.hh: SimExit() is now exitSimLoop(). Get rid of unused functions. Add comments. |
2665:a124942bacb8 |
31-May-2006 |
Ali Saidi <saidi@eecs.umich.edu> |
Updated Authors from bk prs info |
2656:320826b719a8 |
30-May-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Clean up Python embedding to build on zizzer (where python2.4 is currently in /usr/local instead of /usr).
SConstruct: Use information from the Python interpreter used to run scons to find the version & paths for include & library files. This means that linking with a different interpreter requires invoking scons with that interpreter... add comment to that effect. src/sim/main.cc: Check return codes of Python interpreter calls for errors. Get rid of include of obsolete header. |
2655:da93a2088efa |
30-May-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Link in Python interpreter. Use embedded zip archive to carry Python code instead of homegrown embedded string/file mechanism. Do argument parsing in Python instead of C++.
SConstruct: Add Python interpreter include path & library. Define two new simple builders which copy & concatenate files, respectively, for use by the Python embedded zipfile code. src/SConscript: Encapsulate environment creation in a function. Add code to append Python zip archive to final executable. Eliminate references to obsolete files. src/python/SConscript: Rewrite to generate embedded zip archive of Python code (replacing old "embedded string" mechanism). src/python/m5/__init__.py: Move main arg-parsing loop here (out of C++ main()). src/python/m5/config.py: Minor fix (version incompatibility?). src/sim/main.cc: Invoke embedded Python interpreter to parse args and generate config.ini, replacing C++ arg parsing code. |
2654:9559cfa91b9d |
30-May-2006 |
Kevin Lim <ktlim@umich.edu> |
Merge ktlim@zizzer:/bk/m5 into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem
SConstruct: src/SConscript: src/arch/SConscript: src/arch/alpha/faults.cc: src/arch/alpha/tlb.cc: src/base/traceflags.py: src/cpu/SConscript: src/cpu/base.cc: src/cpu/base.hh: src/cpu/base_dyn_inst.cc: src/cpu/cpu_exec_context.cc: src/cpu/cpu_exec_context.hh: src/cpu/exec_context.hh: src/cpu/o3/alpha_cpu.hh: src/cpu/o3/alpha_cpu_impl.hh: src/cpu/o3/alpha_dyn_inst.hh: src/cpu/o3/cpu.cc: src/cpu/o3/cpu.hh: src/cpu/o3/regfile.hh: src/cpu/ozone/cpu.hh: src/cpu/simple/base.cc: src/cpu/base_dyn_inst.hh: src/cpu/o3/2bit_local_pred.cc: src/cpu/o3/2bit_local_pred.hh: src/cpu/o3/alpha_cpu.cc: src/cpu/o3/alpha_cpu_builder.cc: src/cpu/o3/alpha_dyn_inst.cc: src/cpu/o3/alpha_dyn_inst_impl.hh: src/cpu/o3/alpha_impl.hh: src/cpu/o3/alpha_params.hh: src/cpu/o3/bpred_unit.cc: src/cpu/o3/bpred_unit.hh: src/cpu/o3/bpred_unit_impl.hh: src/cpu/o3/btb.cc: src/cpu/o3/btb.hh: src/cpu/o3/comm.hh: src/cpu/o3/commit.cc: src/cpu/o3/commit.hh: src/cpu/o3/commit_impl.hh: src/cpu/o3/cpu_policy.hh: src/cpu/o3/decode.cc: src/cpu/o3/decode.hh: src/cpu/o3/decode_impl.hh: src/cpu/o3/fetch.cc: src/cpu/o3/fetch.hh: src/cpu/o3/fetch_impl.hh: src/cpu/o3/free_list.cc: src/cpu/o3/free_list.hh: src/cpu/o3/iew.cc: src/cpu/o3/iew.hh: src/cpu/o3/iew_impl.hh: src/cpu/o3/inst_queue.cc: src/cpu/o3/inst_queue.hh: src/cpu/o3/inst_queue_impl.hh: src/cpu/o3/mem_dep_unit.cc: src/cpu/o3/mem_dep_unit.hh: src/cpu/o3/mem_dep_unit_impl.hh: src/cpu/o3/ras.cc: src/cpu/o3/ras.hh: src/cpu/o3/rename.cc: src/cpu/o3/rename.hh: src/cpu/o3/rename_impl.hh: src/cpu/o3/rename_map.cc: src/cpu/o3/rename_map.hh: src/cpu/o3/rob.cc: src/cpu/o3/rob.hh: src/cpu/o3/rob_impl.hh: src/cpu/o3/sat_counter.cc: src/cpu/o3/sat_counter.hh: src/cpu/o3/store_set.cc: src/cpu/o3/store_set.hh: src/cpu/o3/tournament_pred.cc: src/cpu/o3/tournament_pred.hh: Hand merges. |
2640:266b80dd5eca |
26-May-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
Add names to memory Port objects for tracing. |
2632:1bb2f91485ea |
22-May-2006 |
Steve Reinhardt <stever@eecs.umich.edu> |
New directory structure: - simulator source now in 'src' subdirectory - imported files from 'ext' repository - support building in arbitrary places, including outside of the source tree. See comment at top of SConstruct file for more details. Regression tests are temporarily disabled; that syetem needs more extensive revisions.
SConstruct: Update for new directory structure. Modify to support build trees that are not subdirectories of the source tree. See comment at top of file for more details. Regression tests are temporarily disabled. src/arch/SConscript: src/arch/isa_parser.py: src/python/SConscript: Update for new directory structure. |