Go to the documentation of this file.
45 #include "debug/FVPBasePwrCtrl.hh"
47 #include "params/FVPBasePwrCtrl.hh"
59 "Base Power Controller does not support multi-threaded systems\n");
80 "asserted for core %d\n", tc->
contextId());
82 if (pwrs->l0 && (pwrs->pp || pwrs->pc))
93 "deasserted for core %d\n", tc->
contextId());
104 "asserted for core %d\n", tc->
contextId());
106 if (!pwrs->l0 && pwrs->wen) {
121 "WakeRequest deasserted for core %d\n", tc->
contextId());
129 const size_t size = pkt->
getSize();
130 panic_if(size != 4,
"FVPBasePwrCtrl::read: Invalid size %i\n", size);
150 warn(
"FVPBasePwrCtrl::read: Unexpected address (0x%x:%i), "
151 "assuming RAZ\n",
addr, size);
157 pkt->
setUintX(resp, ByteOrder::little);
166 const size_t size = pkt->
getSize();
167 panic_if(size != 4,
"FVPBasePwrCtrl::write: Invalid size %i\n", size);
179 }
else if (pwrs->l0) {
204 }
else if (pwrs->l0) {
207 if (tc->
socketId() == tco->socketId()) {
211 if (npwrs->l0 && npwrs->pwfi)
226 if (!pwrs->l0 && pwrs->wen && pwrs->pwk) {
241 warn(
"FVPBasePwrCtrl::write: Unexpected address (0x%x:%i), "
242 "assuming WI\n",
addr, size);
252 FVPBasePwrCtrl::PwrStatus *
281 if (tc->
socketId() == tco->socketId()) {
308 "from the power controller\n", tc->
contextId());
Addr pioAddr
Address that the device listens to.
Affinity getAffinity(ArmSystem *arm_sys, ThreadContext *tc)
Retrieves MPIDR_EL1.
void powerCoreOn(ThreadContext *const tc, PwrStatus *const pwrs)
Powers on a core.
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
void clearWakeRequest(ThreadContext *const tc)
Triggered by the GIC when GICR_WAKER.ProcessorSleep becomes 0.
ArmSystem & system
Reference to the arm system.
void startup() override
startup() is the final initialization call before simulation.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
virtual ContextID contextId() const =0
virtual void activate()=0
Set the status to Active.
std::vector< PwrStatus > corePwrStatus
Per-core power status.
void setStandByWfi(ThreadContext *const tc)
Triggered by the ISA when a WFI instruction is executed and (1) there are no pending interrupts and (...
void powerCoreOff(ThreadContext *const tc, PwrStatus *const pwrs)
Powers off a core.
bool setWakeRequest(ThreadContext *const tc)
Triggered by the GIC when GICR_WAKER.ProcessorSleep is 1 and there are pending interrupts for the cor...
PwrStatus * getCorePwrStatus(ThreadContext *const tc)
Retrieves the power status of a certain core and resizes the entries if needed.
virtual uint32_t socketId() const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
EndBitUnion(PwrStatus) enum Offset struct gem5::FVPBasePwrCtrl::Registers regs
uint64_t Tick
Tick count type.
Tick pioDelay
Delay that the device experinces on an access.
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
FVPBasePwrCtrl(const FVPBasePwrCtrlParams ¶ms)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void setPowerController(FVPBasePwrCtrl *pwr_ctrl)
Sets the pointer to the Power Controller.
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
static constexpr uint32_t MPID_MSK
Mask for extracting the MPID from a 32-bit value.
virtual void startup()
startup() is the final initialization call before simulation.
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
ThreadContext * getThreadContextByMPID(uint32_t mpid) const
Retrieves the thread context reference for a CPU core by MPID.
void startCoreUp(ThreadContext *const tc)
Starts a core up.
void clearStandByWfi(ThreadContext *const tc)
Triggered when an interrupt is posted to the core.
virtual BaseCPU * getCpuPtr()=0
std::unordered_map< uint32_t, size_t > poweredCoresPerCluster
Number of powered cores per cluster.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void set(enums::PwrState p)
Change the power state of this object to the power state p.
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 ...
Generated on Sun Jul 30 2023 01:56:54 for gem5 by doxygen 1.8.17