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