40#include "debug/MHU.hh"
44#include "params/Ap2ScpDoorbell.hh"
45#include "params/MHU.hh"
46#include "params/Scp2ApDoorbell.hh"
67 pid{ 0x98, 0xb0, 0x1b, 0x0, 0x4 },
68 compid{ 0x0d, 0xf0, 0x05, 0xb1 },
92 pkt->
setUintX(value, ByteOrder::little);
106 return apLow->channel;
119 return apSec->channel;
146 panic(
"Invalid register read at address: %#x\n",
addr);
155 assert(pkt->
getSize() ==
sizeof(uint32_t));
156 const uint32_t value = pkt->
getLE<uint32_t>();
201 panic(
"Invalid register write at address: %#x\n",
addr);
211 const bool int_old =
channel != 0;
212 const bool int_new = new_val != 0;
215 if (int_old && !int_new) {
217 }
else if (!int_old && int_new) {
237 scp->raiseInterrupt(
this);
243 scp->clearInterrupt(
this);
Base class for ARM GIC implementations.
void clearInterrupt() override
void raiseInterrupt() override
Ap2ScpDoorbell(const Ap2ScpDoorbellParams &p)
Addr pioAddr
Address that the device listens to.
BasicPioDevice(const Params &p, Addr size)
Tick pioDelay
Delay that the device experinces on an access.
Addr pioSize
Size that the device's address range.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
static const uint32_t SVI_INT
uint32_t read32(const Addr addr, bool secure_access)
@ CPU_INTR_L_STAT
From Application Processor to SCP.
@ SCP_INTR_L_STAT
From SCP to Application Processor.
AddrRangeList getAddrRanges() const override
Determine the address ranges that this device responds to.
MhuDoorbell(const DoorbellParams &p)
virtual void raiseInterrupt()=0
void update(uint32_t new_val)
virtual void clearInterrupt()=0
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 makeAtomicResponse()
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
void raiseInterrupt() override
Scp2ApDoorbell(const Scp2ApDoorbellParams &p)
ArmInterruptPin * interrupt
void clearInterrupt() override
AddrRange RangeSize(Addr start, Addr size)
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 Arm Limited 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.