fs_translating_port_proxy.cc (11793:ef606668d247) fs_translating_port_proxy.cc (12532:a86ce386add1)
1/*
2 * Copyright (c) 2011,2013 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

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

79 for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
80 gen.next())
81 {
82 if (_tc)
83 paddr = TheISA::vtophys(_tc,gen.addr());
84 else
85 paddr = TheISA::vtophys(gen.addr());
86
1/*
2 * Copyright (c) 2011,2013 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

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

79 for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
80 gen.next())
81 {
82 if (_tc)
83 paddr = TheISA::vtophys(_tc,gen.addr());
84 else
85 paddr = TheISA::vtophys(gen.addr());
86
87 PortProxy::readBlob(paddr, p, gen.size());
87 PortProxy::readBlobPhys(paddr, 0, p, gen.size());
88 p += gen.size();
89 }
90}
91
92void
93FSTranslatingPortProxy::writeBlob(Addr addr, const uint8_t *p, int size) const
94{
95 Addr paddr;
96 for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
97 gen.next())
98 {
99 if (_tc)
100 paddr = TheISA::vtophys(_tc,gen.addr());
101 else
102 paddr = TheISA::vtophys(gen.addr());
103
88 p += gen.size();
89 }
90}
91
92void
93FSTranslatingPortProxy::writeBlob(Addr addr, const uint8_t *p, int size) const
94{
95 Addr paddr;
96 for (ChunkGenerator gen(addr, size, TheISA::PageBytes); !gen.done();
97 gen.next())
98 {
99 if (_tc)
100 paddr = TheISA::vtophys(_tc,gen.addr());
101 else
102 paddr = TheISA::vtophys(gen.addr());
103
104 PortProxy::writeBlob(paddr, p, gen.size());
104 PortProxy::writeBlobPhys(paddr, 0, p, gen.size());
105 p += gen.size();
106 }
107}
108
109void
110FSTranslatingPortProxy::memsetBlob(Addr address, uint8_t v, int size) const
111{
112 Addr paddr;
113 for (ChunkGenerator gen(address, size, TheISA::PageBytes); !gen.done();
114 gen.next())
115 {
116 if (_tc)
117 paddr = TheISA::vtophys(_tc,gen.addr());
118 else
119 paddr = TheISA::vtophys(gen.addr());
120
105 p += gen.size();
106 }
107}
108
109void
110FSTranslatingPortProxy::memsetBlob(Addr address, uint8_t v, int size) const
111{
112 Addr paddr;
113 for (ChunkGenerator gen(address, size, TheISA::PageBytes); !gen.done();
114 gen.next())
115 {
116 if (_tc)
117 paddr = TheISA::vtophys(_tc,gen.addr());
118 else
119 paddr = TheISA::vtophys(gen.addr());
120
121 PortProxy::memsetBlob(paddr, v, gen.size());
121 PortProxy::memsetBlobPhys(paddr, 0, v, gen.size());
122 }
123}
124
125void
126CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen)
127{
128 uint8_t *dst = (uint8_t *)dest;
129 tc->getVirtProxy().readBlob(src, dst, cplen);

--- 38 unchanged lines hidden ---
122 }
123}
124
125void
126CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen)
127{
128 uint8_t *dst = (uint8_t *)dest;
129 tc->getVirtProxy().readBlob(src, dst, cplen);

--- 38 unchanged lines hidden ---