1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2003 The Regents of The University of Michigan 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 31 unchanged lines hidden (view full) --- 40#include <string> 41 42#include "base/compiler.hh" 43#include "base/trace.hh" 44#include "debug/MMU.hh" 45#include "sim/faults.hh" 46#include "sim/serialize.hh" 47 |
48void 49EmulationPageTable::map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags) 50{ 51 bool clobber = flags & Clobber; 52 // starting address must be page aligned 53 assert(pageOffset(vaddr) == 0); 54 55 DPRINTF(MMU, "Allocating Page: %#x-%#x\n", vaddr, vaddr + size); --- 37 unchanged lines hidden (view full) --- 93 new_vaddr += pageSize; 94 } 95} 96 97void 98EmulationPageTable::getMappings(std::vector<std::pair<Addr, Addr>> *addr_maps) 99{ 100 for (auto &iter : pTable) |
101 addr_maps->push_back(std::make_pair(iter.first, iter.second.paddr)); |
102} 103 104void 105EmulationPageTable::unmap(Addr vaddr, int64_t size) 106{ 107 assert(pageOffset(vaddr) == 0); 108 109 DPRINTF(MMU, "Unmapping page: %#x-%#x\n", vaddr, vaddr + size); --- 98 unchanged lines hidden --- |