Deleted Added
sdiff udiff text old ( 12536:0a1d2ced2d4c ) new ( 12637:bfc3cb9c7e6c )
full compact
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
48using namespace std;
49
50void
51EmulationPageTable::map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags)
52{
53 bool clobber = flags & Clobber;
54 // starting address must be page aligned
55 assert(pageOffset(vaddr) == 0);
56
57 DPRINTF(MMU, "Allocating Page: %#x-%#x\n", vaddr, vaddr + size);

--- 37 unchanged lines hidden (view full) ---

95 new_vaddr += pageSize;
96 }
97}
98
99void
100EmulationPageTable::getMappings(std::vector<std::pair<Addr, Addr>> *addr_maps)
101{
102 for (auto &iter : pTable)
103 addr_maps->push_back(make_pair(iter.first, iter.second.paddr));
104}
105
106void
107EmulationPageTable::unmap(Addr vaddr, int64_t size)
108{
109 assert(pageOffset(vaddr) == 0);
110
111 DPRINTF(MMU, "Unmapping page: %#x-%#x\n", vaddr, vaddr + size);

--- 98 unchanged lines hidden ---