X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmem%2Ftranslating_port.hh;h=76c7947be9be809f34cdf48bc876e2f161488793;hb=245b0bd9b94bfaaa188b7e945f91c0e4a9909cbe;hp=d078158a3ef46a84fbbd18054061a8500f5ac4d7;hpb=f456360bbcd6e4e4fd1550e96658934affac3eb9;p=gem5.git diff --git a/src/mem/translating_port.hh b/src/mem/translating_port.hh index d078158a3..76c7947be 100644 --- a/src/mem/translating_port.hh +++ b/src/mem/translating_port.hh @@ -24,6 +24,9 @@ * 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. + * + * Authors: Ron Dreslinski + * Ali Saidi */ #ifndef __MEM_TRANSLATING_PROT_HH__ @@ -32,16 +35,25 @@ #include "mem/port.hh" class PageTable; +class Process; class TranslatingPort : public FunctionalPort { + public: + enum AllocType { + Always, + Never, + NextPage + }; + private: PageTable *pTable; - bool allocating; + Process *process; + AllocType allocating; public: TranslatingPort(const std::string &_name, - PageTable *p_table, bool alloc = false); + Process *p, AllocType alloc); virtual ~TranslatingPort(); bool tryReadBlob(Addr addr, uint8_t *p, int size);