40 #ifndef __DEV_ARM_NOMALI_GPU_HH__
41 #define __DEV_ARM_NOMALI_GPU_HH__
46 #include "libnomali/nomali.h"
48 class NoMaliGpuParams;
49 class CustomNoMaliGpuParams;
81 void writeReg(nomali_addr_t reg, uint32_t value);
86 void writeRegRaw(nomali_addr_t reg, uint32_t value);
104 static void gpuPanic(nomali_error_t err,
const char *msg) M5_ATTR_NORETURN;
111 static void panicOnErr(nomali_error_t err,
const char *msg) {
112 if (err != NOMALI_E_OK)
130 virtual void onInterrupt(nomali_int_t intno,
bool set);
144 void setCallback(
const nomali_callback_t &callback);
158 nomali_int_t intno,
int set);
169 static void _reset(nomali_handle_t h,
void *
usr);
201 std::map<nomali_addr_t, uint32_t>
idRegs;
204 #endif // __DEV_ARM_NOMALI_GPU_HH__
RealView *const platform
Platform, used to discover GIC.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
bool intState(nomali_int_t intno)
Wrapper around nomali_int_state()
nomali_handle_t nomali
Handle of a NoMali library instance.
void serialize(CheckpointOut &cp) const override
Serialize an object.
static void _interrupt(nomali_handle_t h, void *usr, nomali_int_t intno, int set)
Interrupt callback from the NoMali library.
virtual void onInterrupt(nomali_int_t intno, bool set)
Interrupt callback from the NoMali library.
virtual ~CustomNoMaliGpu()
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
nomali_info_t nomaliInfo
Cached information struct from the NoMali library.
NoMaliGpu(const NoMaliGpuParams *p)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
static void _reset(nomali_handle_t h, void *usr)
Reset callback from the NoMali library.
CustomNoMaliGpu(const CustomNoMaliGpuParams *p)
std::map< nomali_addr_t, uint32_t > idRegs
Map between GPU registers and their custom reset values.
static void panicOnErr(nomali_error_t err, const char *msg)
Panic if the NoMali returned an error, do nothing otherwise.
void writeReg(nomali_addr_t reg, uint32_t value)
Wrapper around nomali_reg_write().
uint64_t Tick
Tick count type.
void setCallback(const nomali_callback_t &callback)
Wrapper around nomali_set_callback()
const Addr pioAddr
Device base address.
const std::map< nomali_int_t, uint32_t > interruptMap
Map between NoMali interrupt types and actual GIC interrupts.
This device is the base class which all devices senstive to an address range inherit from...
void onReset() override
Reset callback from the NoMali library.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void writeRegRaw(nomali_addr_t reg, uint32_t value)
Wrapper around nomali_reg_write_raw().
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void reset()
Wrapper around nomali_reset().
uint32_t readReg(nomali_addr_t reg)
Wrapper around nomali_reg_read().
virtual void onReset()
Reset callback from the NoMali library.
std::ostream CheckpointOut
uint32_t readRegRaw(nomali_addr_t reg) const
Wrapper around nomali_reg_read_raw().
static void gpuPanic(nomali_error_t err, const char *msg) M5_ATTR_NORETURN
Format a NoMali error into an error message and panic.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.