diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index f310ccde31..31b50d0ac3 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,4 +1,4 @@ -# Verion 24.1 +# Version 24.1 ## User facing changes @@ -32,6 +32,13 @@ The complete list of changes are: * You may no longer call `RubySystem::getBlockSizeBytes()`, `RubySystem::getBlockSizeBits()`, etc. You must have a pointer to the `RubySystem` you are a part of and call, for example, `ruby_system->getBlockSizeBytes()`. * `MessageBuffer::enqueue()` has two new parameters indicating if the `RubySystem` has randomization and warmup enabled. You must explicitly specify these values now. +# Version 24.0.0.1 + +**[HOTFIX]** Fixes a bug affecting the use of the `IndirectMemoryPrefetcher`, `SignaturePathPrefetcher`, `SignaturePathPrefetcherV2`, `STeMSPrefetcher`, and `PIFPrefetcher` SimObjects. +Use of these resulted in gem5 crashing a gem5 crash with the error message "Need is_secure arg". + +The fix to this introduced to the gem5 develop branch in the Pull Request. +The commits in this PR were cherry-picked on the gem5 stable branch to create the v24.0.0.1 hotfix release. # Version 24.0 diff --git a/src/Doxyfile b/src/Doxyfile index 12dff49c52..fc95f17d62 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = [DEVELOP-FOR-v24.1] +PROJECT_NUMBER = v24.0.0.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index e9960c39ed..ffbc7bd38d 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -32,6 +32,6 @@ namespace gem5 /** * @ingroup api_base_utils */ -const char *gem5Version = "DEVELOP-FOR-24.1"; +const char *gem5Version = "24.0.0.1"; } // namespace gem5 diff --git a/src/mem/cache/prefetch/associative_set.hh b/src/mem/cache/prefetch/associative_set.hh new file mode 100644 index 0000000000..232844f247 --- /dev/null +++ b/src/mem/cache/prefetch/associative_set.hh @@ -0,0 +1,100 @@ +/** + * Copyright (c) 2018 Metempsy Technology Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ +#define __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ + +#include + +#include "base/cache/associative_cache.hh" +#include "mem/cache/replacement_policies/base.hh" +#include "mem/cache/tags/indexing_policies/base.hh" +#include "mem/cache/tags/tagged_entry.hh" + +namespace gem5 +{ + +/** + * Associative container based on the previosuly defined Entry type + * Each element is indexed by a key of type Addr, an additional + * bool value is used as an additional tag data of the entry. + */ +template +class AssociativeSet : public AssociativeCache +{ + static_assert(std::is_base_of_v, + "Entry must derive from TaggedEntry"); + + public: + /** + * Public constructor + * @param name Name of the cache + * @param num_entries total number of entries of the container, the number + * of sets can be calculated dividing this balue by the 'assoc' + * value + * @param assoc number of elements in each associative set + * @param rpl_policy replacement policy + * @param idx_policy indexing policy + * @param init_val initial value of the elements of the set + */ + AssociativeSet(const char *name, const size_t num_entries, + const size_t associativity_, + replacement_policy::Base *repl_policy, + BaseIndexingPolicy *indexing_policy, + Entry const &init_val = Entry()); + + /** + * Find an entry within the set + * @param addr key element + * @param is_secure tag element + * @return returns a pointer to the wanted entry or nullptr if it does not + * exist. + */ + Entry* findEntry(Addr addr, bool is_secure) const; + + /** + * Indicate that an entry has just been inserted + * @param addr key of the container + * @param is_secure tag component of the container + * @param entry pointer to the container entry to be inserted + */ + void insertEntry(Addr addr, bool is_secure, Entry* entry); + + private: + // The following APIs are excluded since they lack the secure bit + using AssociativeCache::getTag; + using AssociativeCache::accessEntryByAddr; + using AssociativeCache::findEntry; + using AssociativeCache::insertEntry; + using AssociativeCache::replPolicy; + using AssociativeCache::indexingPolicy; +}; + +} // namespace gem5 + +#endif//__CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ diff --git a/src/mem/cache/prefetch/indirect_memory.hh b/src/mem/cache/prefetch/indirect_memory.hh index 92b010d4ab..289c7e9566 100644 --- a/src/mem/cache/prefetch/indirect_memory.hh +++ b/src/mem/cache/prefetch/indirect_memory.hh @@ -124,7 +124,7 @@ class IndirectMemory : public Queued } }; /** Prefetch table */ - AssociativeCache prefetchTable; + AssociativeSet prefetchTable; /** Indirect Pattern Detector entrt */ struct IndirectPatternDetectorEntry : public TaggedEntry diff --git a/src/mem/cache/prefetch/pif.hh b/src/mem/cache/prefetch/pif.hh index 00b25c5d5a..99984ed992 100644 --- a/src/mem/cache/prefetch/pif.hh +++ b/src/mem/cache/prefetch/pif.hh @@ -150,7 +150,7 @@ class PIF : public Queued * The index table is a small cache-like structure that facilitates * fast search of the history buffer. */ - AssociativeCache index; + AssociativeSet index; /** * A Stream Address Buffer (SAB) tracks a window of consecutive diff --git a/src/mem/cache/prefetch/signature_path.hh b/src/mem/cache/prefetch/signature_path.hh index 1b3a91845e..888983ac41 100644 --- a/src/mem/cache/prefetch/signature_path.hh +++ b/src/mem/cache/prefetch/signature_path.hh @@ -154,7 +154,7 @@ class SignaturePath : public Queued }; /** Pattern table */ - AssociativeCache patternTable; + AssociativeSet patternTable; /** * Generates a new signature from an existing one and a new stride diff --git a/src/mem/cache/prefetch/signature_path_v2.hh b/src/mem/cache/prefetch/signature_path_v2.hh index 8e068e341e..17bc2dab6d 100644 --- a/src/mem/cache/prefetch/signature_path_v2.hh +++ b/src/mem/cache/prefetch/signature_path_v2.hh @@ -70,7 +70,7 @@ class SignaturePathV2 : public SignaturePath } }; /** Global History Register */ - AssociativeCache globalHistoryRegister; + AssociativeSet globalHistoryRegister; double calculateLookaheadConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override; diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc index dadda26327..6009923494 100644 --- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc +++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc @@ -222,6 +222,7 @@ STeMS::reconstructSequence( // Now query the PST with the PC of each RMOB entry idx = 0; + constexpr bool is_secure = false; for (auto it = rmob_it; it != rmob.end() && (idx < reconstructionEntries); it++) { auto pst_entry = patternSequenceTable.findEntry( diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh index b5ee66856f..f814699d51 100644 --- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh +++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh @@ -157,7 +157,7 @@ class STeMS : public Queued /** Active Generation Table (AGT) */ AssociativeCache activeGenerationTable; /** Pattern Sequence Table (PST) */ - AssociativeCache patternSequenceTable; + AssociativeSet patternSequenceTable; /** Data type of the Region Miss Order Buffer entry */ struct RegionMissOrderBufferEntry