40#include "debug/MHU.hh"
44#include "params/Ap2ScpDoorbell.hh"
45#include "params/MHU.hh"
46#include "params/Scp2ApDoorbell.hh"
61 scpLow(
p.lowp_scp2ap),
62 scpHigh(
p.highp_scp2ap),
65 apHigh(
p.highp_ap2scp),
67 pid{ 0x98, 0xb0, 0x1b, 0x0, 0x4 },
68 compid{ 0x0d, 0xf0, 0x05, 0xb1 },
92 pkt->
setUintX(value, ByteOrder::little);
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) {
Base class for ARM GIC implementations.
void clearInterrupt() override
void raiseInterrupt() override
Ap2ScpDoorbell(const Ap2ScpDoorbellParams &p)
virtual void clear()=0
Clear a signalled interrupt.
virtual void raise()=0
Signal an interrupt.
Addr pioAddr
Address that the device listens to.
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
@ CPU_INTR_L_STAT
From Application Processor to SCP.
@ SCP_INTR_L_STAT
From SCP to Application Processor.
uint32_t read32(const Addr addr, bool secure_access)
AddrRangeList getAddrRanges() const override
Determine the address ranges that this device responds to.
virtual void raiseInterrupt()=0
void update(uint32_t new_val)
virtual void clearInterrupt()=0
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 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
virtual void raiseInterrupt(const Doorbell *doorbell)=0
virtual void clearInterrupt(const Doorbell *doorbell)=0
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 - 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.