Deleted Added
sdiff udiff text old ( 14007:36f842f523c6 ) new ( 14008:e36048ba1c2c )
full compact
1/*
2 * Copyright (c) 2011-2013, 2018 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

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

87 const unsigned int _cacheLineSize;
88
89 public:
90 PortProxy(MasterPort &port, unsigned int cacheLineSize) :
91 _port(port), _cacheLineSize(cacheLineSize)
92 {}
93 virtual ~PortProxy() { }
94
95 /**
96 * Read size bytes memory at address and store in p.
97 */
98 virtual void
99 readBlob(Addr addr, uint8_t* p, int size) const
100 {
101 readBlobPhys(addr, 0, p, size);
102 }
103
104 /**
105 * Write size bytes from p to address.
106 */
107 virtual void
108 writeBlob(Addr addr, const uint8_t* p, int size) const
109 {
110 writeBlobPhys(addr, 0, p, size);
111 }
112
113 /**
114 * Fill size bytes starting at addr with byte value val.
115 */
116 virtual void
117 memsetBlob(Addr addr, uint8_t v, int size) const
118 {
119 memsetBlobPhys(addr, 0, v, size);
120 }
121
122 /**
123 * Read size bytes memory at physical address and store in p.
124 */
125 void readBlobPhys(Addr addr, Request::Flags flags,
126 uint8_t* p, int size) const;
127
128 /**
129 * Write size bytes from p to physical address.
130 */
131 void writeBlobPhys(Addr addr, Request::Flags flags,
132 const uint8_t* p, int size) const;
133
134 /**
135 * Fill size bytes starting at physical addr with byte value val.
136 */
137 void memsetBlobPhys(Addr addr, Request::Flags flags,
138 uint8_t v, int size) const;
139
140 /**
141 * Read sizeof(T) bytes from address and return as object T.
142 */
143 template <typename T>
144 T read(Addr address) const;
145
146 /**

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

157 T read(Addr address, ByteOrder guest_byte_order) const;
158
159 /**
160 * Write object T to address. Writes sizeof(T) bytes.
161 * Performs endianness conversion from host to the selected guest order.
162 */
163 template <typename T>
164 void write(Addr address, T data, ByteOrder guest_byte_order) const;
165};
166
167
168template <typename T>
169T
170PortProxy::read(Addr address) const
171{
172 T data;

--- 29 unchanged lines hidden ---