Gabe Black [Tue, 29 Oct 2019 02:02:24 +0000 (19:02 -0700)]
x86: Remove TheISA from x86 devices.
This was really only in the PC platform class.
Change-Id: I5365d965ea335a7c45be9f80706a875b19ed0417
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22263
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Fri, 4 Oct 2019 09:08:13 +0000 (02:08 -0700)]
sparc: Create a helper functions to install firmware images.
The first function handles the repetitive process of creating an
ObjectFile for a particular purpose and checking if that was
successful.
The second conditionally offsets the images in case they were, for
instance, loaded from an ELF file which already had them in the right
place. It offsets them so that their entry point (which will be zero
for raw images) lines up with the appropriate entry address (which will
be at the start of raw images).
This is more correct in more cases, and also removes a lot of
redundancy. There's still a lot of redundancy in the code which sets
up the symbol tables, but there are some irregularities which make that
harder to wrap in a helper function.
Change-Id: I2fee8b2175faff284ff9e007307f7769043497a1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21469
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Tue, 17 Sep 2019 09:45:01 +0000 (11:45 +0200)]
mem-cache: Add a repeated value pattern to compressors
The repeated value pattern checks if values are composed of multiple
instances of the same value. If successful, the bits of the repeated
value are included only once in the compressed data.
Change-Id: Ia7045b4e33a91fd8d712fe1ca689f7f8cb4e5feb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21153
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Thu, 12 Sep 2019 15:11:54 +0000 (17:11 +0200)]
mem-cache: Inform unused bits instead of bytes in compressor pattern
Increase pattern precision by giving the number of unmatched bits
instead of bytes.
Change-Id: I5efbe9c31672cc973b4c89c741cdc8cc28d26285
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21152
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Tue, 17 Sep 2019 09:22:28 +0000 (11:22 +0200)]
mem-cache: Add a masked const value pattern to compressors
The masked pattern compares values to masked const non-dictionary values
to determine whether these match. If successful, the bits that do not
match must be added to the compressed data.
Change-Id: I4c53568694dab916136fe384cb2ee10e554f7136
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21151
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Mon, 16 Sep 2019 14:22:55 +0000 (16:22 +0200)]
mem-cache: Add a masked pattern to compressors
The masked pattern compares masked values to masked dictionary entries
to determine whether these values match. If successful, the bits that
do not match must be added to the compressed data.
Change-Id: I4b1c8feb0faa99576382b54a73a20c353f965d2a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21150
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Tue, 17 Sep 2019 15:02:04 +0000 (17:02 +0200)]
mem-cache: Add an uncompressed pattern to compressors
The uncompressed pattern always stores the original data, and therefore
it is always successful. All of the derived classes of the dictionary
compressor must have this pattern as the last pattern of the pattern
factory.
Change-Id: I2a38fd56630d88ef8b918220dc4c2824a196a8a2
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21149
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Thu, 5 Sep 2019 15:39:38 +0000 (17:39 +0200)]
mem-cache: Templatize DictionaryCompressor
Templatize DictionaryCompressor so that the dictionary entries' sizes
can be changed.
Change-Id: I3d89e3c692a721cefcd7e3c55d2ccdefa425f614
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21148
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Daniel R. Carvalho [Mon, 15 Jul 2019 14:21:24 +0000 (16:21 +0200)]
mem-cache: Factor out CPack's dictionary functionality
Factor out dictionary functionality of CPack, so that it can be
used easily for other compressors.
As a side effect, create an addToDictionary function to allow
subclasses to chose how to handle insertion.
Change-Id: I02fae4e98b02db5a40467ec470b71020d5e867cb
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21147
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Daniel R. Carvalho [Tue, 16 Jul 2019 08:51:08 +0000 (10:51 +0200)]
mem-cache: Use shouldAllocate() instead of CPack's decompress()
Split decompression functionality using the proper function to
determine if a dictionary entry should be allocated after
decompression or not.
Change-Id: I4995304f4c4508c03c9fc1685f04511622969556
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21146
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Daniel R. Carvalho [Wed, 21 Aug 2019 12:44:00 +0000 (14:44 +0200)]
mem-cache: Limit compression size
Add a threshold so that if the compressed size is greater than it,
the compression is abandoned, and the data is considered uncompressible.
Change-Id: Ic416195b06ec440a40263b75bd0f0383cde2ea6a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21144
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Daniel R. Carvalho [Fri, 25 Oct 2019 16:30:10 +0000 (18:30 +0200)]
mem-cache: Do not try to compress dataless packets
Fix filling blocks so that packets that do not contain data do not
generate a compression attempt. This can happen, for example, with
invalidation responses, which will trigger a packet data access
assertion.
Change-Id: I2a1e7983657f6e5e770b148ab62c9de9ac3986ac
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22164
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Andreas Sandberg [Fri, 25 Oct 2019 08:25:40 +0000 (09:25 +0100)]
ext: Remove non-source files from fputils
Remove the autoconf-based build system and GNU-style information files
from fputils. After this change, we only keep the files we will need
to integrate into gem5's main source tree.
Change-Id: I2ddf1d07d9cb51bcd91fc63f1ae43c7f46129933
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22163
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Nikos Nikoleris [Thu, 12 Sep 2019 15:10:26 +0000 (16:10 +0100)]
mem: Fix DRAM controller to operate on its own address space
Typically, a memory controller is assigned an address range of the
form [start, end). This address range might be interleaved and
therefore only a non-continuous subset of the addresses in the address
range is handed by this controller.
Prior to this patch, the DRAM controller was unaware of the
interleaving and as a result the address range could affect the
mapping of addresses to DRAM ranks, rows and columns. This patch
changes the DRAM controller, to transform the input address to a
continuous range of the form [0, size). As a result the DRAM
controller always operates on a dense and continuous address range
regardlesss of the system configuration.
Change-Id: I7d273a630928421d1854658c9bb0ab34e9360851
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19328
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Wendy Elsasser <wendy.elsasser@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Nikos Nikoleris [Wed, 2 Oct 2019 12:40:51 +0000 (13:40 +0100)]
mem-cache: Avoid promotion of incompatible deferred targets
Often a request that hits on an MSHR has to be deferred as it can't be
serviced by the current response.
For example, a request that requires writable has to be deferred when
the response is expected to bring in a read-only copy of the
block. However, there are cases where the response, although not
expected to do so, brings a writable copy and as a result we also
service deferred targets. In such cases, we promote deferred targets
up until the first that can't be serviced by the current response
(e.g., cache maintainance operation). If the first deferred target is
incompatible we don't promote any targets at all.
Change-Id: Ib3e13be51120b7c0f0053b83b76bde03e1b7dd4e
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22127
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Nikos Nikoleris [Tue, 25 Jun 2019 12:55:42 +0000 (13:55 +0100)]
mem-cache: Fix MSHR whole line write tracking
The MSHR keeps track of outstanding writes and services them as a
whole line write whenever possible. To do this the outstanding writes
have to be compatible (e.g., not strictly ordered). Prior to this
change, due to this tracking mechanism, the MSHR would not service a
WriteLineReq with flags that do not allow merging as a full line write
even if it was the first target triggering an assertion. This
changeset fixes this bug.
Change-Id: I2cbf5ece0c108c1fcfe6855e8f194408d5ab8ce2
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22126
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Sat, 26 Oct 2019 05:16:16 +0000 (22:16 -0700)]
configs: Update HPI to use ArmDTB and ArmITB.
Change-Id: I67693e9d79e89f151e30c585ad565deac53c77c1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22203
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Sat, 19 Oct 2019 13:10:04 +0000 (15:10 +0200)]
configs: Fix undefined BaseCPU
When using NULL ISA BaseCPU is undefined, and therefore the
isinstance call generates a NameError.
Change-Id: Ia4582606b775cdb20829966f8e312a333a55b6f3
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21959
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Thu, 24 Oct 2019 21:11:31 +0000 (14:11 -0700)]
tests, base: Fixed incorrect implementation of StrTest.ToLower test.
Change-Id: I96672052f8c9da9d4f61ff0e8eed324032b1afac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22123
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Andreas Sandberg [Fri, 25 Oct 2019 08:19:02 +0000 (09:19 +0100)]
ext: Update fputils to rev
0721843
This patch updates fputils to the latest revision (
0721843) from the
upstream repository (github.com/andysan/fputils). This effectively
only updates the license of the library to match gem5's 3-clause BSD
license.
Change-Id: I46d8a5dfac2f4a95e66ee82a15288ac424d7df90
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22125
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 00:10:08 +0000 (17:10 -0700)]
mips,riscv: Get rid of some Alpha cruft in these System classes.
The consolePanicEvent pointer and addConsoleFuncEvent template were
inherited from Alpha and were not used (and probably make no sense) for
MIPS or RISCV which (to my knowledge) don't have the idea of a
"console" binary.
Change-Id: I109b866a65f69c7334062f7304c7b18acc51d99d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21782
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Gabe Black [Tue, 15 Oct 2019 00:51:15 +0000 (17:51 -0700)]
cpu: Get rid of the nextInstEventCount method.
This was only used by the KVM CPU, and it has access to all it needs to
figure out that value locally without requiring all the ThreadContexts
to implement an equivalent function.
Change-Id: I17a14ce669db2519edf129db761ebd8dc3bd4129
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22114
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 22:59:42 +0000 (15:59 -0700)]
cpu: Get rid of the serviceInstCountEvents method.
This was useful when transitioning away from the CPU based
comInstEventQueue, but now that objects backing the ThreadContexts have
access to the underlying comInstEventQueue and can manipulate it
directly, they don't need to do so through a generic interface.
Getting rid of this function narrows and simplifies the interface.
Change-Id: I202d466d266551675ef6792d38c658d8a8f1cb8b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22113
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 06:57:22 +0000 (23:57 -0700)]
fastmodel: Use getCurrentInstCount for totalInsts().
This had been using a custom totalInsts method on the iris
ThreadContext, but since that's equivalent to what the totalInsts
method does only through a different mechanism, we can
drop that and use getCurrentInstCount instead.
Change-Id: I058fec13e81f28285281e136635d53a2e849cb47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22112
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 06:56:30 +0000 (23:56 -0700)]
fastmodel: Implement getCurrentInstCount.
This uses the step counter the iris API provides.
Change-Id: Ic916888fa256d0aa65042d3e6695d9bf4ba32c86
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22111
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 06:40:04 +0000 (23:40 -0700)]
cpu: Switch off of the CPU's comInstEventQueue.
This switches to letting the ThreadContexts use a thread based/local
comInstEventQueue instead of falling back to the CPU's array. Because
the implementation is no longer shared and it's not given where the
comInstEventQueue (or other implementation) should be accessed, the
default implementation has been removed.
Also, because nobody is using the CPU's array of event queues, those
have been removed.
Change-Id: I515e6e00a2174067a928c33ef832bc5c840bdf7f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22110
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 22:31:26 +0000 (15:31 -0700)]
cpu: Access inst events through ThreadContext instead of the CPU.
Also delete the CPU interface.
Change-Id: I62a6b0a9a303d672f4083bdedf393f9f6d07331f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22109
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 05:54:11 +0000 (22:54 -0700)]
cpu: Delegate comInstEventQueue methods to the ThreadContexts.
These then just use the comInstEventQueue array from the CPU, but soon
they will actually be self contained and allow the thread context to
use whatever mechanism it wants.
Also, now that the thread contexts need to exist before instruction
count based events can be scheduled, setting up max instruction based
events needs to happen in init after the CPU subclasses have had a
chance to set up the threadContexts vector.
Change-Id: I34bb401633d277a60be74e30d5a478a149b972ea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22108
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 05:02:35 +0000 (22:02 -0700)]
cpu: Make accesses to comInstEventQueue indirect through methods.
This lets us move the event queue itself around, or change how those
services are provided.
Change-Id: Ie36665b353cf9788968f253cf281a854a6eff4f4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22107
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 05:07:27 +0000 (22:07 -0700)]
cpu,sim: Delegate PCEvent scheduling from Systems to ThreadContexts.
The System keeps track of what events are live so new ThreadContexts
can have the same set of events as the other ThreadContexts.
Change-Id: Id22bfa0af7592a43d97be1564ca067b08ac1de7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22106
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 04:32:11 +0000 (21:32 -0700)]
cpu: Make the ThreadContext a PCEventScope.
Both the thread and system's PCEventQueue are checked when appropriate.
Change-Id: I16c371339c91a37b5641860d974e546a30e23e13
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22105
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 04:04:22 +0000 (21:04 -0700)]
cpu,sim: Get rid of a bunch of conditional compilation for PCEvents.
These can now be built without referring to anything in ThreadContext
and so can be built even with the NULL ISA. This means the pcEventQueue
can be unconditionally built into the System class. Even though the
pcEventQueue is going away, this still makes it possible for System to
be a PCEventScope unconditionally.
Change-Id: Ia342bb7972b1b5ce95033176d72af4bfa343560f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22104
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 03:53:09 +0000 (20:53 -0700)]
cpu: Don't print the CPU name when a (Break|Panic)PCEvent happens.
This requires reaching into the threadcontext to access the CPU
pointer, and also isn't all that useful since it's more important what
event happened, not what CPU happened to be running the code at that
time.
Change-Id: I368707c804dff9bd349f3261bdcd08be55c5d04a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22103
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 03:14:21 +0000 (20:14 -0700)]
cpu: Pass the address to check into the PCEventQueue service method.
This prevents having to access it from within the ThreadContext.
Change-Id: I34f5815a11201b8fc41871c18bdbbcd0f40305cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22102
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 02:22:37 +0000 (19:22 -0700)]
sim: Make the System object a PCEventScope.
This abstracts away the raw PCEventQueue managed by the System.
Change-Id: I04d773e6be90a891884a76841f15c3eecd5796ed
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22101
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 02:39:34 +0000 (19:39 -0700)]
cpu: Stop checking for PC changes when servicing a PCEventQueue.
First of all, this would arbitrarily skip events based on when they
were encountered in the queue. Second, this is one of the three places
where the ThreadContext is actually accessed in pc_event.cc. By
removing this and the other uses, this file can be included even when
using the NULL ISA, and a lot of #ifdefs can be removed.
Change-Id: If81f5e9ff9d3f9833145fec0b6062b4bda8d2e47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22100
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 00:47:19 +0000 (17:47 -0700)]
cpu: Create a PCEventScope class to abstract the scope of PCEvents.
This abstraction will allow scheduling PCEvents for a particular
ThreadContext, all contexts on a CPU, all contexts in a system, etc.,
and delegates scheduling and removing events to each particular scope.
Right now the PCEventQueue is the only implementor of the PCEventSCope
interface.
Change-Id: I8fb62931511136229915c2e19d36aae7ffdec9df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22099
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Tue, 22 Oct 2019 23:16:10 +0000 (16:16 -0700)]
tests: Added GTests for base/str.cc
Adding these tests supercedes the unittest/strnumtest.cc
and unittest/tokentest.cc tests. They have thereby been removed.
Function "to_number" in base/str.hh previously failed to cast negative
float/double numbers. This was due to the use of
std::numeric_limits<T>::min() instead of std::numeric_limits<T>::lowest()
to determine whether a string-to-float/double conversion was
"Out of range". Tests "StrTest.ToNumberFloatNegative" and
"StrTest.ToNumberDoubleNegative" exposed this bug. It has been fixed.
Methods "split_first" and "split_last" in base/str.hh have had their
documentation updated to remove abiguity in their functionality.
Change-Id: I16e0fe40d884e22dd010db4045857eb6e7f33d4a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22084
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Ciro Santilli [Tue, 8 Oct 2019 17:23:15 +0000 (18:23 +0100)]
cpu, sim-se: don't wake up threads that are awake in futex
FutexMap::wakeup is called when the futex(TGT_FUTEX_WAKE syscall is done.
FutexMap maintains a list of sleeping threads for each futex address
added on FutexMap::suspend, and entries are removed from the list
at FutexMap::wakeup.
The problem is that this system was not taking into account that threads
can be woken up by memory accesses to locked addresses via the path:
SimpleThread::activate
BaseSimpleCPU::wakeup
AbstractMemory::checkLockedAddrList
AbstractMemory::access
DRAMCtrl::recvAtomic
CoherentXBar::recvAtomicBackdoor
SimpleExecContext::writeMem
which happens on trivial pthread examples on ARM at least. The instruction
that locked memory in those test cases was LDAXR.
This could lead futex(TGT_FUTEX_WAKE to awake a thread that is already
awake but is first on the sleeping thread list, instead of a sleeping one,
which can lead all threads to incorrectly sleep and in turn to
"simulate() limit reached".
To implement this, ThreadContext::activate return now returns a boolean
that indicates if the state changed. suspend and halt are also modified
to also return a boolean in the same case for symmetry, although this is
not strictly necessary for the current patch.
Change-Id: Ia6b4d3e6148c64721d810b8f1fffaa208a394b06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21606
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Ciro Santilli [Mon, 7 Oct 2019 10:47:19 +0000 (11:47 +0100)]
sim-se: fix futexFunc TGT_FUTEX_WAIT always selects bitset
Change-Id: I3e2bd1dd34d7cc00b2685547ab74b56bd8126128
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21605
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Sat, 21 Sep 2019 00:43:06 +0000 (17:43 -0700)]
fastmodel: Add string constructors which delegate to const char * ones.
Change-Id: I22d88111409fc477c135b15c8f898adad4f6d4ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21502
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Gabe Black [Mon, 21 Oct 2019 18:43:53 +0000 (11:43 -0700)]
cpu: Apply the ARM TLB rework to the O3 checker CPU.
The TLBs now create the stage 2 MMUs as children, and since those are
specialized for instruction and data, the CPU needs to use ArmITB or
ArmDTB instead of ArmTLB which is the base class without an MMU. This
was changed for the BaseCPU and SimpleCPU checker already, but the TLBs
are added in the O3 checker CPU as well.
Change-Id: I498f247f376c8721fb70ce26c0f1b0815b12fe2d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22039
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Tommaso Marinelli [Sun, 6 Oct 2019 19:12:06 +0000 (21:12 +0200)]
arch: Drop sysctl support if built against glibc
Since glibc 2.30 the sysctl() function has been declared deprecated and
it will be deleted in future versions. This patch removes the support
for the sysctl system call in SE mode (which is currently serviced
calling the sysctl() function) if gem5 is built against glibc, keeping
it with other libc implementations, as a temporary measure to prevent
the generation of a compilation error. Note that this system call in
gem5 is only supported for the arm/freebsd architecture.
Change-Id: Ie5fcb983d15c0a27c7820d24250d7ae5dbe12355
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21519
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Wed, 16 Oct 2019 12:21:28 +0000 (13:21 +0100)]
configs: Clean setupBootLoader signature
This is because the bus parameter is not used anymore
Change-Id: I27aa8cc064904a6e3e0376f61eb7db74ea1a4d6c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22002
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Giacomo Travaglini [Wed, 16 Oct 2019 12:08:28 +0000 (13:08 +0100)]
configs: Do not assume bootmem is a System child
As far as I can see bootmem is used in Arm systems only.
With
https://gem5-review.googlesource.com/c/public/gem5/+/21604
bootmem has been moved from system to system.realview.
This patch fix things by removing the assumption that the bootmem
SimObject lives under the system.
It is now trying to getattr a reference of the bootmem.
It is the ISA specific system builder's duty to bind the bootmem
reference (_bootmem) to the real bootmem object
Change-Id: I1e7405b5cb186de13c44bfd93fb4c8a1a5447f24
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22001
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Wed, 16 Oct 2019 12:02:13 +0000 (13:02 +0100)]
dev-arm, configs: Using _on_chip_memory for on chip memory
This patch is pulling the on-chip memory outside of the on_chip_devices
list.
The external interface will be more or less the same: configuration
scripts will still use the attachOnChipIO method; a new kw argument has
been added in order to store mem_ports.
We want to provide to on-chip memory the same mechanism used when
collecting on-chip dma ports. This is needed when using Ruby, since
we need to pass a non None mem_ports to prevent the bootmem to be
wired to the bus.
Change-Id: Ifc519c3072dc5de1530772c70c80dc2094e2c54c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22000
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Sun, 20 Oct 2019 08:06:49 +0000 (01:06 -0700)]
cpu: Apply the ARM TLB rework to the checker CPU.
The TLBs now create the stage 2 MMUs as children, and since those are
specialized for instruction and data, the CPU needs to use ArmITB or
ArmDTB instead of ArmTLB which is the base class without an MMU. This
was changed for the BaseCPU already, but the TLBs are added in the
checker CPU as well.
Change-Id: Ide8ce950622b40f69c37bbe2ea0d22295b76d7a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21979
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Andreas Sandberg [Fri, 18 Oct 2019 10:55:44 +0000 (11:55 +0100)]
misc: Add Giacomo Travaglini as an Arm maintainer
I have been delegating a lot of changes to Giacomo T for a long time,
making him a de facto Arm co-maintainer. Make this official by adding
him to the list of maintainers.
Change-Id: I69c53316e2fc6ca162d07ac2d167ac2ae2b6bbee
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21899
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Gabe Black [Wed, 16 Oct 2019 04:48:31 +0000 (21:48 -0700)]
cpu,arm: Push the stage 2 MMUs out of the CPU into the TLBs.
This regularizes the TLB setup in the CPU so that ARM is no longer a
special case with extra objects.
Change-Id: I739b82578ff74f8f9777cd7e34cd5227b47b186c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21842
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Gabe Black [Thu, 12 Sep 2019 02:27:45 +0000 (19:27 -0700)]
arch: Remove the "interrupts.hh" switching header file.
That switching header is no longer necessary since everything outside
of the ISA can use the BaseInterrupts class.
Change-Id: Ie3ed45c38fec24234ff51fb05ba94f6f3cd02afd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20832
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Gabe Black [Tue, 3 Sep 2019 04:26:12 +0000 (21:26 -0700)]
arch: Make a base class for Interrupts.
That abstracts the ISA further from the CPU, getting us a small step
closer to being able to build in more than one ISA at a time.
Change-Id: Ibf7e26a3df411ffe994ac1e11d2a53b656863223
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20831
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tiago Muck [Thu, 16 May 2019 21:25:17 +0000 (16:25 -0500)]
dev-arm: Check for gem5 extensions in GicV2
Using GicV2 without setting the gem5_extensions parameter in a
config with more than 8 is not allowed to prevent overflow of
the 8-bit mask.
Change-Id: I780c6985e8f44ed780b4f74f9a27805124e23a7b
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19288
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Thu, 10 Oct 2019 23:02:46 +0000 (16:02 -0700)]
tests: Added GTests for base/bitfield.hh
In addition to the tests, a more detailed explanation of how
"insertBits(..)" functions has been included in its doxygen
documentation. The previous explanation was ambigious and led to
confusion.
Change-Id: I2ae8608733ebaa8f8f726cbb3a2cd8639b69c6b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21700
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Gabe Black [Wed, 16 Oct 2019 04:25:18 +0000 (21:25 -0700)]
arch: Get rid of the unused GenericTLB.
Nothing is using it, and it's actually not use*able* at the moment
because it doesn't have implementations for all the pure virtual
methods that exist in the BaseTLB class.
Change-Id: I03d47c2e116f354c7247a2fa19a9f33dfe4c5eec
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21841
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 16 Oct 2019 04:20:39 +0000 (21:20 -0700)]
cpu: Turn the stage 2 ARM MMUs from params to children.
These aren't referred to in the C++, so there's no reason for them to
be parameters. By making them children, they can still be modified,
replaced wholesale, or even replaced by an entirely different object
to, for instance, mask them when they're not needed.
Change-Id: Ic7f144a3cd3d1fca12fec220918aa72af885f61c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21839
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 11 Sep 2019 23:45:41 +0000 (16:45 -0700)]
x86: Turn the local APIC Interrupts class into a SimObject.
It will no longer be a PioDevice or a ClockedObject, but will carry
forward the little bits and pieces of those classes that it was using.
Those are a PIO port for memory mapped register accesses, and a clock
domain parameter for setting the apic tick frequency.
This brings the x86 Interrupts class in line with the Interrupts of the
other ISAs so that they can inherit from a standard base class.
Change-Id: I6b25fa21911b39a756e0cf9408c5489a81d6ca56
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20829
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>
Bobby R. Bruce [Wed, 9 Oct 2019 00:28:39 +0000 (17:28 -0700)]
tests: Added GTests for base/atomicio.cc
Change-Id: I586a06c70f4e7331b4a31208ef7831e8473509c5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21699
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Andreas Sandberg [Wed, 9 Oct 2019 08:45:51 +0000 (09:45 +0100)]
base: Add classes that encapsulate a channel address
There are cases where the memory system needs to reason about
channel-local addresses. These are currently represented using the
Addr and AddrRange classes. This is not ideal since it doesn't provide
any type safety when working with global addresses and channel-local
addresses. This is particularly problematic when porting existing
components to work in multi-channel configurations.
This changeset introduces the new ChannelAddr and ChannelAddrRange
classes. These classes encapsulate channel-local addresses in a
contiguous address space. These can, for example, be used in a memory
controller to represent a flat address space when calculating timings
or in a sectored cache.
Change-Id: I45d4061ebc8507a10d0a4577b28796dc5ec7a469
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21600
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 11 Sep 2019 20:54:42 +0000 (13:54 -0700)]
mem: Delete the MessageReq and MessageResp memory commands.
Now that Message*Port is gone, there are no users of these two memory
commands. They can now be deleted, simplifying the memory system
slightly.
Change-Id: If157dade4a3fb2610756c2ee81dc0c3fac670a26
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20824
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 16 Oct 2019 04:22:35 +0000 (21:22 -0700)]
arm: Don't force the ArmISA::TLB in vtophys.cc.
The only reason the TLB pointer is being cast to an ArmISA::TLB is so
that it can call a version of translateFunctional which takes more
arguments, when the standard version of translateFunctional just calls
that underlying function with the same arguments.
Change-Id: I3ffd3a8ecc2dda91ddca77f516e2b2ac7313a227
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21840
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Gabe Black [Tue, 8 Oct 2019 22:44:29 +0000 (15:44 -0700)]
cpu: Clean up some style issues in pc_event.(hh|cc).
The record_t typedef isn't all that helpful, and is also not consistent
with gem5 style. The map_t style is more useful but is also not
compliant. This change eliminates the first typedef and replaces the
second with a type called Map.
There are some other small style fixups added in as well, like making
the member variable pc_map pcMap.
Change-Id: I8ffea529004fd6d5b42fdc60250804e2e4987e88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21781
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Thu, 10 Oct 2019 05:29:36 +0000 (22:29 -0700)]
cpu: Get rid of load count based events.
This was initially added in 2003 and only supported in the simple CPUs.
It's oddly specific since there are no other similar event queues for,
for instance, stores, branches, system calls, etc.
Given that this seems like a historical oddity which is only partially
supported and would be very hard to support on more diverse CPU types
like KVM or fast model which don't generally have hooks for counts of
specific instruction types.
Change-Id: I29209b7ffcf896cf424b71545c9c7546f439e2b9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21780
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Andreas Sandberg [Mon, 7 Oct 2019 15:11:48 +0000 (16:11 +0100)]
base: Add addIntlvBits to AddrRange
This method performs the opposite operation of removeIntlvBits and can
be used to transform a channel-local address to a global PA.
Change-Id: I2fab587d7c094597e52422305775ac7f31efba34
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21599
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Tue, 15 Oct 2019 13:11:17 +0000 (14:11 +0100)]
base: Using scoped string in DPRINTFNR
We would otherwise need to add a using namespace std wherever we
use DPRINTFNR.
Change-Id: I30bf9ba474408133abded66141f6dc96dfdba8d6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21821
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Tue, 15 Oct 2019 11:54:08 +0000 (12:54 +0100)]
base: Fix gem5.fast compilation
Change-Id: I86c83e8622ae5a88ff802ccb1cb919194c1251ef
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21820
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Fri, 4 Oct 2019 08:21:24 +0000 (01:21 -0700)]
arch,base,sim: Move Process loader hooks into the Process class.
This code was originally in the ObjectFile class, but not all object
files will become Processes. All Processes will ultimately come from
ObjectFiles though, so it makes more sense to put that class there.
Change-Id: Ie73e4cdecbb51ce53d24cf68911a6cfc0685d771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21468
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Gabe Black [Wed, 11 Sep 2019 23:11:11 +0000 (16:11 -0700)]
x86: Use a std::function to handle MSI completion.
This removes the recvResponse callback from the IntMasterPort, and
makes it easier to handle the default case where we just need to clean
up the Packet.
Change-Id: I8bcbfee0aaf68b12310d773f925c399fc87ea65d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20828
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Gabe Black [Fri, 4 Oct 2019 06:42:18 +0000 (23:42 -0700)]
arch,base: Restructure the object file loaders.
This change creates a distinction between object files which hold
executable code, and flat files which don't. The first type of files
have entry points, symbols, etc., while the others are just blobs which
can be shoved into memory. Rather than have those aspects but stub
them out, this change creates a new base class which simply doesn't
have them.
This change also restructures the ELF loader since it's main function
was quite long and doing multiple jobs.
It stops passing the architecture and operating system to the
ObjectFile constructor, since those might not be known at the very top
of the constructor. Instead, those default to Uknown*, and then are
filled in in the constructor body if appropriate. This removes a lot
of plumbing that was hard to actually use in practice.
It also introduces a mechanism to collect generic object file formats
so that they can be tried one by one by the general createObjectFile
function, rather than listing them all there one by one. It's unlikely
that new types of object files will need to be added in a modular way
without being able to modify the core loader code, but it's cleaner to
have that abstraction and modularization like is already there for
process loaders.
Finally, to make it possible to share the code which handles zipped
files for both true object files and also files which will be loaded
into memory but are just blobs, that mechanism is pulled out into a
new class called ImageFileData. It holds a collection of segments
which are set up by the object file and may refer to regions of the
original file, buffers maintained elsewhere, or even nothing to support
bss-es. shared_ptr is used to make it easier to keep track of that
information without having to do so explicitly or worry about deleting
a buffer before everyone was done using it.
Change-Id: I92890266f2ba0a703803cccad675a3ab41f2c4af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21467
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Gabe Black [Tue, 8 Oct 2019 22:30:10 +0000 (15:30 -0700)]
cpu: Delete the unused sched_break_pc(_sys) functions.
Change-Id: I2adae2858897e665fd28cfe9de3fdcf95ffc2a2e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21779
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Isaac Richter [Fri, 30 Mar 2018 14:01:11 +0000 (10:01 -0400)]
arch-x86: Make LFENCE a serializing instruction
According to the Intel SDM, no instruction following an LFENCE can begin
execution until after the LFENCE has executed. (This is
less strict than an actual serializing instruction, such as CPUID.)
Serializing instructions (per intel SDM Volume 3A Chapter 8.3) ensure
that no future instruction is fetched until after the serializing
instruction is completed.
By contrast, LFENCE (and other memory-ordering instructions) allows
future instructions to have been fetched; it just prohibits them from
being executed.
Change-Id: If89fcb552192326ab69a581f57d71c95cf5d90e7
Signed-off-by: Isaac Richter <isaac.richter@rochester.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/10321
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Mon, 30 Sep 2019 14:02:21 +0000 (15:02 +0100)]
dev-arm: Carve out a portion of VExpress_GEM5 for the bootloader
This patch is carving out a portion of VExpress_GEM5 memory for the
bootloader. Prior to this patch this was only happening
conditionally/dynamically via the setupBootLoader call. With this patch
the region is always present and the setupBootLoader doesn't instantiate
memory, it is only setting up some bootloader parameters.
Change-Id: Iaa5cdf471b14e8faa37353a25631bf7c6fc64afc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21604
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Wed, 25 Sep 2019 12:11:22 +0000 (13:11 +0100)]
configs: Add simpleSystem helper to generate devices.SimpleSystem
This patch will make it possible to generate a SimpleSystem inheriting
from a configurable base class. More practically it will be possible to
inherit from a baremetal System (ArmSystem) rather than from a
LinuxArmSystem
Change-Id: I11553ae8045519059e159c555c6c9141bb4519b7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21603
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Mon, 14 Oct 2019 04:43:36 +0000 (21:43 -0700)]
sim,cpu: Get rid of the unused instEventQueue.
This queue was set up to allow triggering events based on the total
number of instructions executed at the system level, and was added in
a change which added a number of things to support McPAT. No code
checked into gem5 actually schedules an event on that queue, and no
code in McPAT (which seems to have gone dormant) either downloadable
from github or found in ext modify gem5 in a way that makes it use
the instEventQueue.
Also, the KVM CPU does not interact with the instEventQueue correctly.
While it does check the per-thread instruction event queue when
deciding how long to run, it does not check the instEventQueue. It will
poke it to run events when it stops for other reasons, but it may (and
likely will) have run beyond the point where it was supposed to stop.
Since this queue doesn't seem to actually be used for anything, isn't
being used properly in all cases anyway, and adds overhead to all the
CPU models, this change eliminates it.
Change-Id: I0e126df14788c37a6d58ca9e1bb2686b70e60d88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21783
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tiago Mück <tiago.muck@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 11 Sep 2019 22:17:38 +0000 (15:17 -0700)]
x86: De-x86ify the IntMasterPort.
The devices which host an IntMasterPort are very specific to x86 at the
moment, but the ports don't have to be. This change moves
responsibilities around so that the x86 specific aspects are handled
in the device, and the ports themselves are ISA agnostic.
Change-Id: I50141b66895be7d8f6303605505002ef424af7fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20827
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Wed, 9 Oct 2019 20:13:36 +0000 (13:13 -0700)]
Tests: Added GTests for base/callback.cc
Change-Id: Icebd0fdec4be86e0f0fd86ef58f52ddbfdf8d714
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21619
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 11 Sep 2019 21:44:09 +0000 (14:44 -0700)]
x86: Simplify and consolidate the code that assembles an MSI on x86.
There is no interrupt response message, and so no need for a function
which would construct one. The other functions which construct the
request can be consolidated since the work being done by each is
incremental. The template parameters can be used to support multiple
types and offsets in a single function, and since that function also
doesn't have to do much work, it makes sense to do everything in one
shot.
Change-Id: I41b202a263a697c5ada6817f3ab2a4728281b894
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20826
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Gabe Black [Mon, 16 Sep 2019 21:58:43 +0000 (14:58 -0700)]
fastmodel: Expose all CPU communication ports from the GIC.
The unconnected CPU ports/sockets still need to be connected for TLM to
be happy, so this change also adds a terminator module which finds all
unbound sockets, creates pair sockets for them to connect to, binds
everything together, and implements the target interface with a dummy
stub that will complain and crash gem5 if it ever gets called.
This will allow us to use the same GIC model to connect an arbitrary
number of cores, up to the architected limit of 256.
Change-Id: Iaa83fe4f023217dc91a3734b31f764fc4176130e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21500
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Thu, 3 Oct 2019 20:11:06 +0000 (13:11 -0700)]
misc: Updating contributing.md to discuss Gerrit guidelines
Change-Id: I2449d4b0384f33d9635fc2a314a24341816dab1d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21419
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Mingyuan [Mon, 2 Sep 2019 22:48:03 +0000 (17:48 -0500)]
mem-cache: set the second chance to false when inserting a block
Modify second chance replacement policy so that entries are inserted
without a second chance. Previously, the second chance bit was set
to true when a cache line was inserted. So the cache line would gain
its second chance when inserting. This is wrong because the cache
block will only get a second chance when it hits.
Here's a quoted citation for the second chance replacement policy:
"Whenever the algorithm examines a page entry, it extracts the associated
usage bit and enters it into the high-order position of a k-bit shift
register after shifting the contents of the register one bit-position
lower. Then if the shift register is nonzero, the page is retained; if the
shift register is zero, the page is replaced by the new page. In either
case the usage bit for the page is turned off and the circular list
pointer is advanced."
(A Paging Experiment with the Multics System, FJ Corbato, 1968)
Change-Id: I0d07e56aa16c67dd36e0d490c3f457f91e46f320
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20882
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Mingyuan [Mon, 2 Sep 2019 22:43:59 +0000 (17:43 -0500)]
mem-cache: Fixed a bug in MRU replacement policy
The lastTouchTick is set to 0 when instantiate. This will cause the
candidate[0] to get evicted over and over again in MRU replacement
policy. To resolve this, break the search loop whenever it finds a
cold cache line.
Change-Id: I33aa57ebe0efca15986f62c3ae10a146bd2b779f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20881
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Gabe Black [Wed, 11 Sep 2019 21:18:25 +0000 (14:18 -0700)]
x86: Stop using and delete the x86 IntDevice class.
Most of its functionality has been exported already. This change makes
the two classes which were inheriting IntDevice create an IntMasterPort
themselves.
Change-Id: I73d17cd79cf8252b0e26dd2576f552bf9054adf4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20825
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 2 Oct 2019 04:15:06 +0000 (21:15 -0700)]
arch,base: Separate the idea of a memory image and object file.
A memory image can be described by an object file, but an object file
is more than a memory image. Also, it makes sense to manipulate a
memory image to, for instance, change how it's loaded into memory. That
takes on larger implications (relocations, the entry point, symbols,
etc.) when talking about the whole object file, and also modifies
aspects which may not need to change. For instance if an image needs
to be loaded into memory at addresses different from what's in the
object file, but other things like symbols need to stay unmodified.
Change-Id: Ia360405ffb2c1c48e0cc201ac0a0764357996a54
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21466
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
JingQuJQ [Fri, 14 Jun 2019 02:29:56 +0000 (21:29 -0500)]
mem-ruby: Allow Ruby to use all replacement policies in Classic
Add support in Ruby to use all replacement policies in Classic.
Furthermore, if new replacement policies are added to the
Classic system, the Ruby system will recognize new policies
without any other changes in Ruby system. The following list
all the major changes:
* Make Ruby cache entries (AbstractCacheEntry) inherit from
Classic cache entries (ReplaceableEntry). By doing this,
replacement policies can use cache entries from Ruby caches.
AccessPermission and print function are moved from
AbstractEntry to AbstractCacheEntry, so AbstractEntry is no
longer needed.
* DirectoryMemory and all SLICC files are changed to use
AbstractCacheEntry as their cache entry interface. So do the
python files in mem/slicc/ast which check the entry
interface.
* "main='false'" argument is added to the protocol files where
the DirectoryEntry is defined. This change helps
differentiate DirectoryEntry from CacheEntry because they are
both the instances of AbstractCacheEntry now.
* Use BaseReplacementPolicy in Ruby caches instead of
AbstractReplacementPolicy so that Ruby caches will recognize
the replacement policies from Classic.
* Add getLastAccess() and useOccupancy() function to Classic
system so that Ruby caches can use them. Move lastTouchTick
to ReplacementData struct because it's needed by
getLastAccess() to return the correct value.
* Add a 2-dimensional array of ReplacementData in Ruby caches
to store information for different replacement policies. Note
that, unlike Classic caches, where policy information is
stored in cache entries, the policy information needs to be
stored in a new 2-dimensional array. This is due to Ruby
caches deleting the cache entry every time the corresponding
cache line get evicted.
Change-Id: Idff6fdd2102a552c103e9d5f31f779aae052943f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20879
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 2 Oct 2019 04:22:07 +0000 (21:22 -0700)]
arch,base: Stop loading the interpreter in ElfObject.
The interpreter is a separate object file, and while it's convenient to
hide loading it in the code which loads the main object file, it breaks
the conceptual abstraction since you only asked it to load the main
object file.
Also, this makes every object file format reimplement the idea of
loading the interpreter. Admittedly only ELF recognizes and sets up
an interpreter, but other formats conceptually could too.
This does move that limitted hypothetical redundancy out of the object
file formats and moves it into the process objects, but I think
conceptually that's where it belongs. It would also probably be pretty
easy to add a method to the base Process class that would handle
loading an image and also the interpreter image.
This change does not (yet) separate reading symbol tables.
Change-Id: I4a165eac599a9bcd30371a162379e833c4cc89b4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21465
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Giacomo Travaglini [Mon, 30 Sep 2019 15:37:52 +0000 (16:37 +0100)]
arch-arm: Move generateDtb to ArmSystem
This is aligning with the fact that dtb autogeneration is already
possible with an ArmSystem.
Change-Id: I72149927ee70d29458f8718a03845bb293c12145
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21602
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Giacomo Travaglini [Mon, 30 Sep 2019 10:06:08 +0000 (11:06 +0100)]
dev-arm, configs: Remove RealViewPBX platform
This is an old unused platform. We should support VExpress_GEM5 based
platforms only.
Change-Id: If9c29047b2d068992dfbbe0dc268c70b788cce5f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21601
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Tue, 1 Oct 2019 08:25:53 +0000 (01:25 -0700)]
arch, base: Stop assuming object files have three segments.
The ObjectFile class has hardcoded assumptions that there are three
segments, text, bss and data. There are some files which have one
"segment" like raw files, where the entire file's contents are
considered a single segment. There are also ELF files which can have
an arbitrary number of segments, and those segments can hold any
number of sections, including the text, data and/or bss sections.
Removing this assumption frees up some object file formats from having
to twist themselves to fit in that structure, possibly introducing
ambiguities when some segments may fulfill multiple roles.
Change-Id: I976e06a3a90ef852b17a6485e2595b006b2090d5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21463
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Gabe Black [Sat, 31 Aug 2019 00:02:43 +0000 (17:02 -0700)]
fastmodel: Export GICV3Comms directly.
This lets us avoid having to have two levels of bridging and twice as
many ports on both the CPU and GIC side. The direct communication ports
can be instantiated and connected using array syntax, where the bridges
require instantiating each bridge individually and wiring them up one
at a time with a lot of boilerplate/duplicate code.
Change-Id: I815ee47bcd19994e46a5220e0c23e89c497d7aa5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21050
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Bobby R. Bruce [Fri, 4 Oct 2019 20:25:44 +0000 (13:25 -0700)]
tests, misc: Updating TESTING.md to describe running unit tests
Previously we did not have any documentation discussing how gem5's GTests
were built and executed. TESTING.md has thereby been updated to highlight
how this is done. These unit tests should be run prior to each new
submission to Gerrit. This has been noted in TESTING.md also.
Change-Id: If5867fa0a2e4f6ea0921191a51e779c19a28117a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21479
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Bobby R. Bruce [Tue, 8 Oct 2019 21:03:49 +0000 (14:03 -0700)]
tests: Migrated refcnt.cc test from src/unitttest to a gtest
refcnt.cc was previously tested in src/unittest/refcnttest.cc. This has
now been translated into a GTest as faithfully to the original as
possible.
Change-Id: I51f7a3d1e0a85b128c4eebd97cfe79b87406dc29
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21499
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Chun-Chen TK Hsu [Tue, 8 Oct 2019 11:02:33 +0000 (19:02 +0800)]
system-arm: Initialize ICC_SRE_EL3 register of all CPUs
Fix a bug that only CPU0 initialized ICC_SRE_EL3 register.
Change-Id: I625c9a25bada80b864e5eb5a8b8be14ee324b801
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21539
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Gabe Black [Wed, 2 Oct 2019 03:17:06 +0000 (20:17 -0700)]
arch-mips,arch-riscv,base: Get rid of the unused HexFile class.
A pointer to it was set up in the MIPS and RISCV system classes, but
nothing ever set that pointer. The class was put in base/loader, but
didn't have anything to do (as far as I can see) with loading anything
it had a loadSegments method, but was not a subclass of ObjectFile.
Change-Id: I4b711a31df20e20ffc306709227f60aa020fca15
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21464
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Gabe Black [Sun, 29 Sep 2019 02:26:02 +0000 (19:26 -0700)]
base: Rename Section to Segment, and some of its members.
ELF is, in my opinion, the most important object file format gem5
currently understands, and in ELF terminolgy the blob of data that
needs to be loaded into memory to a particular location is called a
segment. A section is a software level view of what's in a region
of memory, and a single segment may contain multiple sections which
happen to follow each other in memory.
Change-Id: Ib810c5050723d5a96bd7550515b08ac695fb1b02
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21462
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Gabe Black [Sun, 29 Sep 2019 02:07:17 +0000 (19:07 -0700)]
base: Get rid of the unused global pointer in object files.
This was only ever read from Alpha, and nothing ever set it.
It defaulted to zero, so this change just propogates that value through
to the Alpha Process class.
Change-Id: I569cf9d61a37322dbd88de1038a2af74c64bbe7a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21461
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Fri, 4 Oct 2019 06:42:35 +0000 (23:42 -0700)]
base: Ensure %p format arguments are printed as pointers.
If the %p format is used, char * arguments should be printed as the
hex value of their pointer, not as strings. Unfortunately blindly
passing them to an ostream using << will not do that. This change adds
some casting in that case to ensure that they're treated as numbers and
not as strings.
Change-Id: If02bae6d5e468b352266702fcba62b6beddffcbd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21459
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 28 Aug 2019 22:16:05 +0000 (15:16 -0700)]
fastmodel: Make CortexA76x1's interrupts use gem5's mechanisms.
This makes it easier to wire up CPUs to the interrupt controller, and
makes things more modular.
Change-Id: I8d3ab26e4bb588b8efb198ed145d0f58b7ee04cb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21049
Reviewed-by: Chun-Chen TK Hsu <chunchenhsu@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Daniel R. Carvalho [Thu, 3 Oct 2019 20:39:41 +0000 (22:39 +0200)]
configs: Isolate ISA related object lists
Some objects are not compiled when using NULL ISA, and therefore
their object lists cannot exist.
Change-Id: I93ec576229916c892de50bb6c73cd602e18a3654
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21439
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Ciro Santilli [Mon, 30 Sep 2019 15:52:32 +0000 (16:52 +0100)]
kvm, arm: fix the size of MISCREG_FPSR and MISCREG_FPCR
Those registers are 32-bit instead of 64 in the KVM API.
The Linux kernel 5.2 linux/Documentation/virtual/kvm/api.txt contains:
0x6020 0000 0010 00d4 FPSR 32 fp_regs.fpsr
0x6020 0000 0010 00d5 FPCR 32 fp_regs.fpcr
The register itself is 64-bit in the ARM manual, but the top 32 are
RES0.
This fixes the following error when running ARM KVM early in the
simulation:
panic: KVM: Failed to set register (0x60300000001000d4) value
(errno: 22)
Change-Id: I8fe6e12df4809992173200a42e3ce5414748bdad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21300
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Ciro Santilli [Mon, 23 Sep 2019 14:43:52 +0000 (15:43 +0100)]
config: skip access to branchPred in ARM KVM
Prevents runtime error:
AttributeError: object 'ArmV8KvmCPU' has no attribute 'branchPred'
Change-Id: Ic5765fd560381cbacc2fa2fd2e6f79d98433c535
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21299
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Gabe Black [Wed, 2 Oct 2019 02:26:12 +0000 (19:26 -0700)]
base: ELF segment types are not bitfields.
The ELF segment type had been checked by bitwise &-ing it with the
PT_LOAD constant to check if it was loadable. This is incorrect. The
value is a flat integer, with different values selecting different
types of segments.
Change-Id: I644dd985bda4ad2d992557c90ffe8048c0ae6aac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21460
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>