41#ifndef __ARCH_ARM_SYSTEM_HH__
42#define __ARCH_ARM_SYSTEM_HH__
46#include <unordered_map>
52#include "params/ArmSystem.hh"
56#include "enums/ArmExtension.hh"
67struct ArmReleaseParams;
193 if (
has(ArmExtension::SECURITY))
195 if (
has(ArmExtension::VIRTUALIZATION))
224 if (
has(ArmExtension::LPAE))
bool has(ArmExtension ext) const
ArmRelease(const Params &p)
std::unordered_map< ArmExtension, bool > _extensions
List of implemented extensions.
Semihosting for AArch32 and AArch64.
const bool _haveLargeAsid64
True if ASID is 16 bits in AArch64 (ARMv8)
static constexpr Addr PageShift
void setGenericTimer(GenericTimer *generic_timer)
Sets the pointer to the Generic Timer.
FVPBasePwrCtrl * _pwrCtrl
Pointer to the Power Controller (if any)
uint8_t physAddrRange64() const
Returns the supported physical address range in bits if the highest implemented exception level is 64...
GenericTimer * getGenericTimer() const
Get a pointer to the system's generic timer model.
static ArmSystem * getArmSystem(ThreadContext *tc)
Returns a valid ArmSystem pointer if using ARM ISA, it fails otherwise.
Addr physAddrMask() const
Returns the physical address mask.
bool highestELIs64() const
Returns true if the register width of the highest implemented exception level is 64 bits (ARMv8)
static constexpr Addr PageBytes
ArmISA::ExceptionLevel highestEL() const
Returns the highest implemented exception level.
const unsigned _smeVL
SME vector length at reset, in quadwords.
unsigned smeVL() const
Returns the SME vector length at reset, in quadwords.
static bool callSemihosting32(ThreadContext *tc, bool gem5_ops=false)
Make a Semihosting call from aarch32.
bool haveSemihosting() const
Is Arm Semihosting support enabled?
const uint8_t _physAddrRange64
Supported physical address range in bits if the highest implemented exception level is 64 bits (ARMv8...
FVPBasePwrCtrl * getPowerController() const
Get a pointer to the system's power controller.
static void callClearStandByWfi(ThreadContext *tc)
Make a call to notify the power controller of STANDBYWFI deassertion.
static void callSetStandByWfi(ThreadContext *tc)
Make a call to notify the power controller of STANDBYWFI assertion.
ArmSemihosting *const semihosting
True if the Semihosting interface is enabled.
Addr _resetAddr
Reset address (ARMv8)
BaseGic * getGIC() const
Get a pointer to the system's GIC.
static bool callSemihosting(ThreadContext *tc, bool gem5_ops=false)
Make a Semihosting call from either aarch64 or aarch32.
uint8_t physAddrRange() const
Returns the supported physical address range in bits.
static bool callSetWakeRequest(ThreadContext *tc)
Notify the power controller of WAKEREQUEST assertion.
void setResetAddr(Addr addr)
void setPowerController(FVPBasePwrCtrl *pwr_ctrl)
Sets the pointer to the Power Controller.
bool has(ArmExtension ext) const
bool haveLargeAsid64() const
Returns true if ASID is 16 bits in AArch64 (ARMv8)
Addr resetAddr() const
Returns the reset address if the highest implemented exception level is 64 bits (ARMv8)
static bool haveEL(ThreadContext *tc, ArmISA::ExceptionLevel el)
Return true if the system implements a specific exception level.
const unsigned _sveVL
SVE vector length at reset, in quadwords.
void setGIC(BaseGic *gic)
Sets the pointer to the GIC.
static void callClearWakeRequest(ThreadContext *tc)
Notify the power controller of WAKEREQUEST deassertion.
bool multiProc
true if this a multiprocessor system
const ArmRelease * releaseFS() const
GenericTimer * _genericTimer
Pointer to the Generic Timer wrapper.
unsigned sveVL() const
Returns the SVE vector length at reset, in quadwords.
ArmSystem(const Params &p)
bool _highestELIs64
True if the register width of the highest implemented exception level is 64 bits (ARMv8)
static bool callSemihosting64(ThreadContext *tc, bool gem5_ops=false)
Make a Semihosting call from aarch64.
const ArmRelease * release
Arm Release object: contains a list of implemented features.
Abstract superclass for simulation objects.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual System * getSystemPtr()=0
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.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.