48 #include "debug/Iob.hh"
84 panic(
"Invalid address reached Iob\n");
116 panic(
"Read to unknown IOB offset 0x%x\n", accessAddr);
166 panic(
"Read to unknown JBus offset 0x%x\n", accessAddr);
177 panic(
"Invalid address reached Iob\n");
194 data = pkt->
get<uint64_t>();
197 DPRINTF(
Iob,
"Wrote IntMan %d cpu %d, vec %d\n", index,
204 data = pkt->
get<uint64_t>();
208 DPRINTF(
Iob,
"Wrote IntCtl %d pend %d cleared %d\n", index,
224 data = pkt->
get<uint64_t>();
226 cpu_id =
bits(data, 12,8);
227 vector =
bits(data,5,0);
232 panic(
"Write to unknown IOB offset 0x%x\n", accessAddr);
245 data = pkt->
get<uint64_t>();
247 DPRINTF(
Iob,
"Wrote jIntBusy index %d busy: %d\n", index,
252 data = pkt->
get<uint64_t>();
254 DPRINTF(
Iob,
"Wrote jIntBusy index %d busy: %d\n", cpuid,
259 panic(
"Write to unknown JBus offset 0x%x\n", accessAddr);
270 DPRINTF(
Iob,
"Receiving Device interrupt: %d for cpu %d vec %d\n",
285 DPRINTF(
Iob,
"Generating interrupt because of I/O write to cpu: %d vec %d\n",
290 warn(
"Sending reset to CPU: %d\n", cpu_id);
292 panic(
"Don't know how to set non-POR reset to cpu\n");
297 DPRINTF(
Iob,
"Idling CPU because of I/O write cpu: %d\n", cpu_id);
301 DPRINTF(
Iob,
"Resuming CPU because of I/O write cpu: %d\n", cpu_id);
305 panic(
"Invalid type to generate ipi\n");
317 DPRINTF(
Iob,
"Receiving jBus interrupt: %d for cpu %d vec %d\n",
383 return new Iob(
this);
AddrRange RangeSize(Addr start, Addr size)
This device implements the niagara I/O Bridge chip.
void set(T v, ByteOrder endian)
Set the value in the data pointer to v using the specified endianness.
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)
ContextID contextId() const
Accessor function for context ID.
void post(int cpu_id, int int_num, int index)
IntMan intMan[NumDeviceIds]
T get(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness.
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)
const RequestPtr req
A pointer to the original request.
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.