Deleted Added
sdiff udiff text old ( 12532:a86ce386add1 ) new ( 14008:e36048ba1c2c )
full compact
1/*
2 * Copyright (c) 2011 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

56using namespace TheISA;
57
58SETranslatingPortProxy::SETranslatingPortProxy(MasterPort& port, Process *p,
59 AllocType alloc)
60 : PortProxy(port, p->system->cacheLineSize()), pTable(p->pTable),
61 process(p), allocating(alloc)
62{ }
63
64bool
65SETranslatingPortProxy::tryReadBlob(Addr addr, uint8_t *p, int size) const
66{
67 int prevSize = 0;
68
69 for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
70 Addr paddr;
71
72 if (!pTable->translate(gen.addr(),paddr))
73 return false;
74
75 PortProxy::readBlobPhys(paddr, 0, p + prevSize, gen.size());
76 prevSize += gen.size();
77 }
78
79 return true;
80}
81
82
83bool
84SETranslatingPortProxy::tryWriteBlob(Addr addr, const uint8_t *p,
85 int size) const
86{
87 int prevSize = 0;
88
89 for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
90 Addr paddr;

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

107 PortProxy::writeBlobPhys(paddr, 0, p + prevSize, gen.size());
108 prevSize += gen.size();
109 }
110
111 return true;
112}
113
114
115bool
116SETranslatingPortProxy::tryMemsetBlob(Addr addr, uint8_t val, int size) const
117{
118 for (ChunkGenerator gen(addr, size, PageBytes); !gen.done(); gen.next()) {
119 Addr paddr;
120
121 if (!pTable->translate(gen.addr(), paddr)) {
122 if (allocating == Always) {

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

128 }
129 }
130
131 PortProxy::memsetBlobPhys(paddr, 0, val, gen.size());
132 }
133
134 return true;
135}