gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::BackdoorManager Class Reference

This class manages the backdoors for RangeAddrMapper. More...

#include <backdoor_manager.hh>

Inheritance diagram for gem5::BackdoorManager:
gem5::backdoor_manager_test::BackdoorManagerTest

Public Member Functions

 BackdoorManager (const std::vector< AddrRange > &original_ranges, const std::vector< AddrRange > &remapped_ranges)
 
MemBackdoorPtr getRevertedBackdoor (MemBackdoorPtr backdoor, const AddrRange &pkt_range)
 

Protected Member Functions

MemBackdoorPtr createRevertedBackdoor (MemBackdoorPtr backdoor, const AddrRange &pkt_range)
 This function creates a new backdoor, whose address range contains the original request address.
 
MemBackdoorPtr findBackdoor (const AddrRange &pkt_range) const
 This function returns a created backdoor that fulfills the request, or returns nullptr if there's no.
 

Protected Attributes

const std::vector< AddrRange > & originalRanges
 
const std::vector< AddrRange > & remappedRanges
 
std::vector< std::list< std::unique_ptr< MemBackdoor > > > backdoorLists
 In this vector, each entry contains a list of backdoors that in the range in original address view.
 

Detailed Description

This class manages the backdoors for RangeAddrMapper.

It provides functionalities such as backdoor remapping, resource managing.

Definition at line 55 of file backdoor_manager.hh.

Constructor & Destructor Documentation

◆ BackdoorManager()

gem5::BackdoorManager::BackdoorManager ( const std::vector< AddrRange > & original_ranges,
const std::vector< AddrRange > & remapped_ranges )
explicit

Definition at line 46 of file backdoor_manager.cc.

Member Function Documentation

◆ createRevertedBackdoor()

MemBackdoorPtr gem5::BackdoorManager::createRevertedBackdoor ( MemBackdoorPtr backdoor,
const AddrRange & pkt_range )
protected

This function creates a new backdoor, whose address range contains the original request address.

The address range is in initiator address view, and shouldn't exceed the original address range.

Does not support interleaved range backdoors.

Shrink the backdoor to fit inside address range.

Create the backdoor in original address view.

The backdoor pointer also needs to be shrinked to point to the beginning of the range.

Bind the life cycle of the created backdoor with the target backdoor. Invalid and delete the created backdoor when the target backdoor is invalidated.

Definition at line 66 of file backdoor_manager.cc.

References gem5::MemBackdoor::addInvalidationCallback(), gem5::X86ISA::addr, backdoorLists, gem5::MemBackdoor::flags(), gem5::ArmISA::i, originalRanges, panic, gem5::MemBackdoor::ptr(), gem5::MemBackdoor::range(), remappedRanges, gem5::AddrRange::size(), and gem5::AddrRange::start().

Referenced by getRevertedBackdoor().

◆ findBackdoor()

MemBackdoorPtr gem5::BackdoorManager::findBackdoor ( const AddrRange & pkt_range) const
protected

This function returns a created backdoor that fulfills the request, or returns nullptr if there's no.

The original ranges should be disjoint, so at most one range contains the begin address.

The request range doesn't fit in any address range.

Definition at line 124 of file backdoor_manager.cc.

References gem5::X86ISA::addr, backdoorLists, gem5::ArmISA::i, originalRanges, gem5::AddrRange::size(), and gem5::AddrRange::start().

Referenced by getRevertedBackdoor().

◆ getRevertedBackdoor()

MemBackdoorPtr gem5::BackdoorManager::getRevertedBackdoor ( MemBackdoorPtr backdoor,
const AddrRange & pkt_range )

Member Data Documentation

◆ backdoorLists

std::vector<std::list<std::unique_ptr<MemBackdoor> > > gem5::BackdoorManager::backdoorLists
protected

In this vector, each entry contains a list of backdoors that in the range in original address view.

Definition at line 85 of file backdoor_manager.hh.

Referenced by createRevertedBackdoor(), and findBackdoor().

◆ originalRanges

const std::vector<AddrRange>& gem5::BackdoorManager::originalRanges
protected

Definition at line 78 of file backdoor_manager.hh.

Referenced by createRevertedBackdoor(), and findBackdoor().

◆ remappedRanges

const std::vector<AddrRange>& gem5::BackdoorManager::remappedRanges
protected

Definition at line 79 of file backdoor_manager.hh.

Referenced by createRevertedBackdoor().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0