57#ifndef __MEM_PORT_PROXY_HH__
58#define __MEM_PORT_PROXY_HH__
102 panic(
"Port proxies should never receive snoops.");
123 void *
p, uint64_t size)
const;
129 const void *
p, uint64_t size)
const;
135 uint8_t
v, uint64_t size)
const;
185 fatal(
"readBlob(%#x, ...) failed",
addr);
195 fatal(
"writeBlob(%#x, ...) failed",
addr);
205 fatal(
"memsetBlob(%#x, ...) failed",
addr);
211 template <
typename T>
217 template <
typename T>
224 template <
typename T>
225 T
read(
Addr address, ByteOrder guest_byte_order)
const;
231 template <
typename T>
232 void write(
Addr address, T
data, ByteOrder guest_byte_order)
const;
247 fatal(
"writeString(%#x, ...) failed",
addr);
263 fatal(
"readString(%#x, ...) failed",
addr);
280 fatal(
"readString(%#x, ...) failed",
addr);
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
This object is a proxy for a port or other object which implements the functional response protocol,...
void memsetBlobPhys(Addr addr, Request::Flags flags, uint8_t v, uint64_t size) const
Fill size bytes starting at physical addr with byte value val.
const Addr _cacheLineSize
Granularity of any transactions issued through this proxy.
void readBlob(Addr addr, void *p, uint64_t size) const
Higher level interfaces based on the above.
T read(Addr address) const
Read sizeof(T) bytes from address and return as object T.
void readBlobPhys(Addr addr, Request::Flags flags, void *p, uint64_t size) const
Fixed functionality for use in base classes.
virtual bool tryMemsetBlob(Addr addr, uint8_t val, uint64_t size) const
Fill size bytes starting at addr with byte value val.
PortProxy(SendFunctionalFunc func, Addr cache_line_size)
std::function< void(PacketPtr pkt)> SendFunctionalFunc
bool tryWriteString(Addr addr, const char *str) const
Write the string str into guest memory at address addr.
void writeBlob(Addr addr, const void *p, uint64_t size) const
Same as tryWriteBlob, but insists on success.
void write(Addr address, const T &data) const
Write object T to address.
virtual bool tryWriteBlob(Addr addr, const void *p, uint64_t size) const
Write size bytes from p to address.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
virtual bool tryReadBlob(Addr addr, void *p, uint64_t size) const
Methods to override in base classes.
void readString(std::string &str, Addr addr) const
Same as tryReadString, but insists on success.
void readString(char *str, Addr addr, size_t maxlen) const
Same as tryReadString, but insists on success.
void writeBlobPhys(Addr addr, Request::Flags flags, const void *p, uint64_t size) const
Write size bytes from p to physical address.
bool tryReadString(std::string &str, Addr addr) const
Reads the string at guest address addr into the std::string str.
void writeString(Addr addr, const char *str) const
Same as tryWriteString, but insists on success.
void memsetBlob(Addr addr, uint8_t v, uint64_t size) const
Same as tryMemsetBlob, but insists on success.
SendFunctionalFunc sendFunctional
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
ThreadContext is the external interface to all thread state for anything outside of the CPU.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
T gtoh(T value, ByteOrder guest_byte_order)
T htog(T value, ByteOrder guest_byte_order)