49 #include "debug/Iob.hh" 85 panic(
"Invalid address reached Iob\n");
117 panic(
"Read to unknown IOB offset 0x%x\n", accessAddr);
167 panic(
"Read to unknown JBus offset 0x%x\n", accessAddr);
178 panic(
"Invalid address reached Iob\n");
195 data = pkt->
getBE<uint64_t>();
198 DPRINTF(
Iob,
"Wrote IntMan %d cpu %d, vec %d\n", index,
205 data = pkt->
getBE<uint64_t>();
209 DPRINTF(
Iob,
"Wrote IntCtl %d pend %d cleared %d\n", index,
225 data = pkt->
getBE<uint64_t>();
227 cpu_id =
bits(data, 12,8);
228 vector =
bits(data,5,0);
233 panic(
"Write to unknown IOB offset 0x%x\n", accessAddr);
246 data = pkt->
getBE<uint64_t>();
248 DPRINTF(
Iob,
"Wrote jIntBusy index %d busy: %d\n", index,
253 data = pkt->
getBE<uint64_t>();
255 DPRINTF(
Iob,
"Wrote jIntBusy index %d busy: %d\n", cpuid,
260 panic(
"Write to unknown JBus offset 0x%x\n", accessAddr);
271 DPRINTF(
Iob,
"Receiving Device interrupt: %d for cpu %d vec %d\n",
286 DPRINTF(
Iob,
"Generating interrupt because of I/O write to cpu: %d vec %d\n",
291 warn(
"Sending reset to CPU: %d\n", cpu_id);
293 panic(
"Don't know how to set non-POR reset to cpu\n");
298 DPRINTF(
Iob,
"Idling CPU because of I/O write cpu: %d\n", cpu_id);
302 DPRINTF(
Iob,
"Resuming CPU because of I/O write cpu: %d\n", cpu_id);
306 panic(
"Invalid type to generate ipi\n");
318 DPRINTF(
Iob,
"Receiving jBus interrupt: %d for cpu %d vec %d\n",
384 return new Iob(
this);
#define panic(...)
This implements a cprintf based panic() function.
AddrRange RangeSize(Addr start, Addr size)
This device implements the niagara I/O Bridge chip.
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
void receiveDeviceInterrupt(DeviceId devid)
void post(int cpu_id, int int_num, int index)
void setBE(T v)
Set the value in the data pointer to v as big endian.
IntMan intMan[NumDeviceIds]
RequestPtr req
A pointer to the original request.
const Addr JIntDataA1Addr
#define UNSERIALIZE_SCALAR(scalar)
void generateIpi(Type type, int cpu_id, int vector)
std::string csprintf(const char *format, const Args &...args)
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void writeJBus(PacketPtr pkt)
void makeAtomicResponse()
uint64_t Tick
Tick count type.
void writeIob(PacketPtr pkt)
void paramOut(CheckpointOut &cp, const string &name, ExtMachInst const &machInst)
std::vector< ThreadContext * > threadContexts
#define SERIALIZE_ARRAY(member, size)
unsigned numContexts() const
bool receiveJBusInterrupt(int cpu_id, int source, uint64_t d0, uint64_t d1)
uint64_t jBusData0[MaxNiagaraProcs]
This device is the base class which all devices senstive to an address range inherit from...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void readIob(PacketPtr pkt)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void readJBus(PacketPtr pkt)
#define SERIALIZE_SCALAR(scalar)
#define UNSERIALIZE_ARRAY(member, size)
std::ostream CheckpointOut
const Params * params() const
IntBusy jIntBusy[MaxNiagaraProcs]
void paramIn(CheckpointIn &cp, const string &name, ExtMachInst &machInst)
const int MaxNiagaraProcs
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
const Addr JIntDataA0Addr
uint64_t jBusData1[MaxNiagaraProcs]
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
Scoped checkpoint section helper class.
IntCtl intCtl[NumDeviceIds]
void unserialize(CheckpointIn &cp) override
Unserialize an object.
int ContextID
Globally unique thread context ID.
T getBE() const
Get the data in the packet byte swapped from big endian to host endian.