32#include "debug/LupioIPI.hh"
34#include "params/LupioIPI.hh"
42 intType(params.int_type),
43 nThread(params.num_threads)
54 for (
int cpu = 0; cpu <
nThread; cpu++) {
58 tc->getCpuPtr()->postInterrupt(tc->threadId(),
intType, 0);
60 tc->getCpuPtr()->clearInterrupt(tc->threadId(),
intType, 0);
84 panic(
"Unexpected read to LupioIPI device at address %#llx!",
113 panic(
"Unexpected write to LupioIPI device at address %#llx!",
125 "Read request - addr: %#x, size: %#x\n", ipi_addr, pkt->
getSize());
Addr pioAddr
Address that the device listens to.
Tick pioDelay
Delay that the device experinces on an access.
LupioIPI: An inter-processor interrupt virtual device.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
std::vector< uint32_t > pending
Tick read(PacketPtr pkt) override
Implement BasicPioDevice virtual functions.
std::vector< uint32_t > mask
Set of registers corresponding to each CPU for sending inter-processor interrupts.
void lupioIPIWrite(const uint8_t addr, uint64_t val64, int size)
Function to write to the word register of the corresponding CPU and raise the IRQ.
LupioIPI(const Params ¶ms)
void lupioIPIUpdateIRQ()
Function to post and clear interrupts.
const ByteOrder byteOrder
uint64_t lupioIPIRead(const uint8_t addr, int size)
Function to return the value in the word register of the corresponding CPU and lower the IRQ.
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.
#define panic(...)
This implements a cprintf based panic() function.
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.