Go to the documentation of this file.
45 #include "debug/FVPBasePwrCtrl.hh"
47 #include "params/FVPBasePwrCtrl.hh"
56 "Base Power Controller does not support multi-threaded systems\n");
77 "asserted for core %d\n", tc->
contextId());
79 if (pwrs->l0 && (pwrs->pp || pwrs->pc))
90 "deasserted for core %d\n", tc->
contextId());
101 "asserted for core %d\n", tc->
contextId());
103 if (!pwrs->l0 && pwrs->wen) {
118 "WakeRequest deasserted for core %d\n", tc->
contextId());
126 const size_t size = pkt->
getSize();
127 panic_if(size != 4,
"FVPBasePwrCtrl::read: Invalid size %i\n", size);
147 warn(
"FVPBasePwrCtrl::read: Unexpected address (0x%x:%i), "
148 "assuming RAZ\n",
addr, size);
154 pkt->
setUintX(resp, ByteOrder::little);
163 const size_t size = pkt->
getSize();
164 panic_if(size != 4,
"FVPBasePwrCtrl::write: Invalid size %i\n", size);
176 }
else if (pwrs->l0) {
201 }
else if (pwrs->l0) {
204 if (tc->
socketId() == tco->socketId()) {
208 if (npwrs->l0 && npwrs->pwfi)
223 if (!pwrs->l0 && pwrs->wen && pwrs->pwk) {
238 warn(
"FVPBasePwrCtrl::write: Unexpected address (0x%x:%i), "
239 "assuming WI\n",
addr, size);
249 FVPBasePwrCtrl::PwrStatus *
278 if (tc->
socketId() == tco->socketId()) {
283 tc->
getCpuPtr()->powerState->set(Enums::PwrState::ON);
305 "from the power controller\n", tc->
contextId());
315 FVPBasePwrCtrlParams::create()
void powerCoreOn(ThreadContext *const tc, PwrStatus *const pwrs)
Powers on a core.
ArmSystem & system
Reference to the arm system.
Addr pioAddr
Address that the device listens to.
RegVal getAffinity(ArmSystem *arm_sys, ThreadContext *tc)
Retrieves MPIDR_EL1.
virtual void activate()=0
Set the status to Active.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void clearWakeRequest(ThreadContext *const tc)
Triggered by the GIC when GICR_WAKER.ProcessorSleep becomes 0.
uint64_t Tick
Tick count type.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
void setPowerController(FVPBasePwrCtrl *pwr_ctrl)
Sets the pointer to the Power Controller.
void clearStandByWfi(ThreadContext *const tc)
Triggered when an interrupt is posted to the core.
void setStandByWfi(ThreadContext *const tc)
Triggered by the ISA when a WFI instruction is executed and (1) there are no pending interrupts and (...
static constexpr uint32_t MPID_MSK
Mask for extracting the MPID from a 32-bit value.
void powerCoreOff(ThreadContext *const tc, PwrStatus *const pwrs)
Powers off a core.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
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 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 ...
virtual ContextID contextId() const =0
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
bool setWakeRequest(ThreadContext *const tc)
Triggered by the GIC when GICR_WAKER.ProcessorSleep is 1 and there are pending interrupts for the cor...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
#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...
std::unordered_map< uint32_t, size_t > poweredCoresPerCluster
Number of powered cores per cluster.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
PwrStatus * getCorePwrStatus(ThreadContext *const tc)
Retrieves the power status of a certain core and resizes the entries if needed.
Tick pioDelay
Delay that the device experinces on an access.
ThreadContext * getThreadContextByMPID(uint32_t mpid) const
Retrieves the thread context reference for a CPU core by MPID.
FVPBasePwrCtrl(FVPBasePwrCtrlParams *const params)
virtual uint32_t socketId() const =0
std::vector< PwrStatus > corePwrStatus
Per-core power status.
virtual BaseCPU * getCpuPtr()=0
EndBitUnion(PwrStatus) enum Offset struct FVPBasePwrCtrl::Registers regs
void startCoreUp(ThreadContext *const tc)
Starts a core up.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17