port_proxy.hh (13893:0e863b6c441a) | port_proxy.hh (14007:36f842f523c6) |
---|---|
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 --- 151 unchanged lines hidden (view full) --- 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 | 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 --- 151 unchanged lines hidden (view full) --- 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 |
168/** 169 * This object is a proxy for a structural port, to be used for debug 170 * accesses to secure memory. 171 * 172 * The addresses are interpreted as physical addresses to secure memory. 173 */ 174class SecurePortProxy : public PortProxy 175{ 176 public: 177 SecurePortProxy(MasterPort &port, unsigned int cache_line_size) 178 : PortProxy(port, cache_line_size) {} 179 180 void readBlob(Addr addr, uint8_t *p, int size) const override; 181 void writeBlob(Addr addr, const uint8_t *p, int size) const override; 182 void memsetBlob(Addr addr, uint8_t val, int size) const override; 183}; 184 | |
185template <typename T> 186T 187PortProxy::read(Addr address) const 188{ 189 T data; 190 readBlob(address, (uint8_t*)&data, sizeof(T)); 191 return data; 192} --- 26 unchanged lines hidden --- | 168template <typename T> 169T 170PortProxy::read(Addr address) const 171{ 172 T data; 173 readBlob(address, (uint8_t*)&data, sizeof(T)); 174 return data; 175} --- 26 unchanged lines hidden --- |