Mostly addressing uninitialised members.
struct m5_twin64_t {
uint64_t a;
uint64_t b;
- m5_twin64_t()
+ m5_twin64_t() : a(0), b(0)
+ {}
+ m5_twin64_t(const uint64_t x) : a(x), b(x)
{}
- m5_twin64_t(const uint64_t x)
- {
- a = x;
- b = x;
- }
inline m5_twin64_t& operator=(const uint64_t x)
{
a = x;
* After the debugger is "active" (connected) it will be
* waiting for a "signaled" message from us.
*/
- if (!active)
+ if (!active) {
active = true;
- else
+ } else {
// Tell remote host that an exception has occurred.
snprintf((char *)buffer, bufferSize, "S%02x", type);
send(buffer);
+ }
// Stick frame regs into our reg cache.
getregs();
VirtDescriptor::VirtDescriptor(PortProxy &_memProxy, VirtQueue &_queue,
Index descIndex)
- : memProxy(&_memProxy), queue(&_queue), _index(descIndex)
+ : memProxy(&_memProxy), queue(&_queue), _index(descIndex),
+ desc{0, 0, 0, 0}
{
}
} M5_ATTR_PACKED;
VirtRing<T>(PortProxy &proxy, uint16_t size)
- : ring(size), _proxy(proxy), _base(0) {}
+ : header{0, 0}, ring(size), _proxy(proxy), _base(0) {}
/**
* Set the base address of the VirtIO ring buffer.
VirtIO9PDiod::VirtIO9PDiod(Params *params)
: VirtIO9PProxy(params),
- fd_to_diod(-1), fd_from_diod(-1)
+ fd_to_diod(-1), fd_from_diod(-1), diod_pid(-1)
{
}
#include "params/PciVirtIO.hh"
PciVirtIO::PciVirtIO(const Params *params)
- : PciDevice(params), vio(*params->vio),
- callbackKick(this)
+ : PciDevice(params), queueNotify(0), interruptDeliveryPending(false),
+ vio(*params->vio), callbackKick(this)
{
// Override the subsystem ID with the device ID from VirtIO
config.subsystemID = htole(vio.deviceId);
StubSlavePort(const std::string &name_,
ExternalSlave &owner_) :
ExternalSlave::Port(name_, owner_),
- responseEvent(*this), responsePacket(NULL)
+ responseEvent(*this), responsePacket(NULL), mustRetry(false)
{ }
Tick recvAtomic(PacketPtr packet);
: when(_when), thread(_thread),
staticInst(_staticInst), pc(_pc),
macroStaticInst(_macroStaticInst),
- misspeculating(spec), predicate(true)
+ misspeculating(spec), predicate(true), addr(0), addr_valid(false),
+ data_status(DataInvalid),
+ fetch_seq(0), fetch_seq_valid(false), cp_seq(0), cp_seq_valid(false)
{
- data_status = DataInvalid;
- addr_valid = false;
-
- fetch_seq_valid = false;
- cp_seq_valid = false;
}
virtual ~InstRecord() { }
Process::Process(ProcessParams * params)
: SimObject(params), system(params->system),
+ brk_point(0), stack_base(0), stack_size(0), stack_min(0),
max_stack_size(params->max_stack_size),
+ next_thread_stack_base(0),
M5_pid(system->allocatePID()),
useArchPT(params->useArchPT),
kvmInSE(params->kvmInSE),
{
int index = 0;
int fd = p->sim_fd(p->getSyscallArg(tc, index));
+ assert(fd >= 0);
Addr bufPtr = p->getSyscallArg(tc, index);
int nbytes = p->getSyscallArg(tc, index);
BufferArg bufArg(bufPtr, nbytes);
{
int index = 0;
int fd = p->sim_fd(p->getSyscallArg(tc, index));
+ assert(fd >= 0);
uint64_t offs = p->getSyscallArg(tc, index);
int whence = p->getSyscallArg(tc, index);
{
int index = 0;
int fd = p->sim_fd(p->getSyscallArg(tc, index));
+ assert(fd >= 0);
uint64_t offset_high = p->getSyscallArg(tc, index);
uint32_t offset_low = p->getSyscallArg(tc, index);
Addr result_ptr = p->getSyscallArg(tc, index);
result_buf.copyOut(tc->getMemProxy());
return 0;
}
-
-
- return (result == (off_t)-1) ? -errno : result;
}