32#include "debug/LupioPIC.hh"
34#include "params/LupioPIC.hh"
44 nThread(params.num_threads),
45 intType(params.int_type),
57 for (
int cpu = 0; cpu <
nThread; cpu++) {
61 tc->getCpuPtr()->postInterrupt(tc->threadId(),
intType, 0);
63 tc->getCpuPtr()->clearInterrupt(tc->threadId(),
intType, 0);
73 uint32_t irq_mask = 1UL << src_id;
83 uint32_t irq_mask = 1UL << src_id;
115 panic(
"Unexpected read to the LupioPIC device at address %#llx!",
125 uint32_t
val = val64;
143 panic(
"Unexpected write to the LupioPIC device at address %#llx!",
155 "Read request - addr: %#x, size: %#x\n", pic_addr, pkt->
getSize());
Addr pioAddr
Address that the device listens to.
Tick pioDelay
Delay that the device experinces on an access.
LupioPIC: A programmable interrupt controller virtual device that can manage input IRQs coming from u...
void lupioPicWrite(const uint8_t addr, uint64_t val64)
Function to update interrupt requests.
const ByteOrder byteOrder
uint32_t mask[LUPIO_PIC_NSRC]
uint32_t enable[LUPIO_PIC_NSRC]
LupioPIC(const Params ¶ms)
void lupioPicUpdateIRQ()
Function to post and clear interrupts.
Tick read(PacketPtr pkt) override
Implement BasicPioDevice virtual functions.
uint64_t lupioPicRead(const uint8_t addr)
Function to return information about interrupt requests to the LupIO-PIC.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
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 ...
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
constexpr int ctz32(uint32_t value)
Count trailing zeros in a 32-bit value.
#define panic(...)
This implements a cprintf based panic() function.
#define gem5_assert(cond,...)
The assert macro will function like a normal assert, but will use panic instead of straight abort().
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.
uint64_t Tick
Tick count type.