Go to the documentation of this file.
44 #include "debug/GIC.hh"
45 #include "debug/Interrupt.hh"
68 "Exceeding maximum number of PEs supported by GICv3: "
69 "using %u while maximum is %u.", threads,
params()->cpu_max);
71 for (
int i = 0;
i < threads;
i++) {
86 for (
int i = 0;
i < threads;
i++) {
102 const size_t size = pkt->
getSize();
103 bool is_secure_access = pkt->
isSecure();
111 delay =
params()->dist_pio_delay;
112 DPRINTF(GIC,
"Gicv3::read(): (distributor) context_id %d register %#x "
113 "size %d is_secure_access %d (value %#x)\n",
114 pkt->
req->contextId(), daddr, size, is_secure_access, resp);
119 resp = redist->
read(daddr, size, is_secure_access);
121 delay =
params()->redist_pio_delay;
122 DPRINTF(GIC,
"Gicv3::read(): (redistributor %d) context_id %d "
123 "register %#x size %d is_secure_access %d (value %#x)\n",
125 is_secure_access, resp);
127 panic(
"Gicv3::read(): unknown address %#x\n",
addr);
130 pkt->
setUintX(resp, ByteOrder::little);
138 const size_t size = pkt->
getSize();
141 bool is_secure_access = pkt->
isSecure();
147 DPRINTF(GIC,
"Gicv3::write(): (distributor) context_id %d "
148 "register %#x size %d is_secure_access %d value %#x\n",
149 pkt->
req->contextId(), daddr, size, is_secure_access,
data);
151 delay =
params()->dist_pio_delay;
156 DPRINTF(GIC,
"Gicv3::write(): (redistributor %d) context_id %d "
157 "register %#x size %d is_secure_access %d value %#x\n",
159 is_secure_access,
data);
161 redist->
write(daddr,
data, size, is_secure_access);
163 delay =
params()->redist_pio_delay;
165 panic(
"Gicv3::write(): unknown address %#x\n",
addr);
175 DPRINTF(Interrupt,
"Gicv3::sendInt(): received SPI %d\n", int_id);
182 DPRINTF(Interrupt,
"Gicv3::clearInt(): received SPI %d\n", int_id);
190 DPRINTF(Interrupt,
"Gicv3::sendPPInt(): received PPI %d cpuTarget %#x\n",
199 DPRINTF(Interrupt,
"Gicv3::clearPPInt(): received PPI %d cpuTarget %#x\n",
240 if (redistributor->getAffinity() == affinity) {
241 return redistributor;
252 "Address not pointing to a valid redistributor\n");
255 const uint32_t redistributor_id = daddr /
redistSize;
258 "Invalid redistributor_id!");
269 for (uint32_t redistributor_id = 0;
272 csprintf(
"redistributors.%i", redistributor_id));
274 for (uint32_t cpu_interface_id = 0;
277 csprintf(
"cpuInterface.%i", cpu_interface_id));
287 for (uint32_t redistributor_id = 0;
290 csprintf(
"redistributors.%i", redistributor_id));
292 for (uint32_t cpu_interface_id = 0;
295 csprintf(
"cpuInterface.%i", cpu_interface_id));
299 Gicv3Params::create()
301 return new Gicv3(
this);
std::vector< Gicv3CPUInterface * > cpuInterfaces
void makeAtomicResponse()
void unserializeSection(CheckpointIn &cp, const char *name)
Unserialize an a child object.
void clear(int cpu_id, int int_num, int index)
Gicv3Redistributor * getRedistributorByAddr(Addr address) const
bool havePosted(int cpu_id) const
void post(int cpu_id, int int_num, int index)
uint64_t read(Addr addr, size_t size, bool is_secure_access)
void clearAll(int cpu_id)
uint64_t Tick
Tick count type.
bool contains(const Addr &a) const
Determine if the range contains an address.
RequestPtr req
A pointer to the original request.
void clearPPInt(uint32_t int_id, uint32_t cpu) override
void clearInt(uint32_t int_id)
void serializeSection(CheckpointOut &cp, const char *name) const
Serialize an object into a new section.
Gicv3Redistributor * getRedistributorByAffinity(uint32_t affinity) const
const Params * params() const
Gicv3Distributor * distributor
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void clearInt(uint32_t int_id) override
Clear an interrupt from a device that is connected to the GIC.
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
AddrRange RangeSize(Addr start, Addr size)
void deassertInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
Platform * platform
Platform this GIC belongs to.
uint64_t read(Addr addr, size_t size, bool is_secure_access)
void sendPPInt(uint32_t int_id, uint32_t cpu) override
Interface call for private peripheral interrupts.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void deassertAll(uint32_t cpu)
std::vector< Gicv3Redistributor * > redistributors
friend class Gicv3Redistributor
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void postInt(uint32_t cpu, ArmISA::InterruptTypes int_type)
static void callClearStandByWfi(ThreadContext *tc)
Make a call to notify the power controller of STANDBYWFI deassertion.
void write(Addr addr, uint64_t data, size_t size, bool is_secure_access)
Addr start() const
Get the start address of the range.
bool haveAsserted(uint32_t cpu) const
uint32_t processorNumber() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void setGIC(BaseGic *gic)
Sets the pointer to the GIC.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
std::ostream CheckpointOut
ArmSystem * getSystem() const
bool supportsVersion(GicVersion version) override
Check if version supported.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void write(Addr addr, uint64_t data, size_t size, bool is_secure_access)
void sendInt(uint32_t int_id)
std::string csprintf(const char *format, const Args &...args)
friend class Gicv3CPUInterface
static const uint32_t ADDR_RANGE_SIZE
void sendInt(uint32_t int_id) override
Post an interrupt from a device that is connected to the GIC.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17