55 using namespace Linux;
59 bootLoaders(), bootldr(nullptr),
60 _haveSecurity(p->have_security),
61 _haveLPAE(p->have_lpae),
62 _haveVirtualization(p->have_virtualization),
63 _genericTimer(nullptr),
64 _highestELIs64(p->highest_el_is_64),
65 _resetAddr64(p->reset_addr_64),
66 _physAddrRange64(p->phys_addr_range_64),
67 _haveLargeAsid64(p->have_large_asid_64),
68 _m5opRange(p->m5ops_base ?
71 multiProc(p->multi_proc)
82 for (
const auto &bl : p->boot_loader) {
83 std::unique_ptr<ObjectFile> obj;
86 fatal_if(!obj,
"Could not read bootloader: %s\n", bl);
98 fatal(
"Can't find a matching boot loader / kernel combination!");
103 warn(
"Highest ARM exception-level set to AArch32 but bootloader "
104 "is for AArch64. Assuming you wanted these to match.\n");
107 warn(
"Highest ARM exception-level set to AArch64 but bootloader "
108 "is for AArch32. Assuming you wanted these to match.\n");
130 uint8_t jump_to_bl_32[] =
132 0x07, 0xf0, 0xa0, 0xe1
135 uint8_t jump_to_bl_64[] =
137 0xe0, 0x00, 0x1f, 0xd6
151 if (!p->gic_cpu_addr || !p->flags_addr)
152 fatal(
"gic_cpu_addr && flags_addr must be set with bootloader\n");
162 inform(
"Using kernel entry physical address at %#x\n",
194 if (bl->getArch() == obj->
getArch())
264 ArmSystemParams::create()
280 GenericArmSystemParams::create()
ObjectFile * getBootLoader(ObjectFile *const obj)
Get a boot loader that matches the kernel.
AddrRange RangeSize(Addr start, Addr size)
virtual System * getSystemPtr()=0
const uint8_t _physAddrRange64
Supported physical address range in bits if the highest implemented exception level is 64 bits (ARMv8...
virtual void initState()
Initialise the system.
virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=maxAddr)=0
ExceptionLevel highestEL() const
Returns the highest implemented exception level.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
uint8_t physAddrRange() const
Returns the supported physical address range in bits.
Addr physAddrMask() const
Returns the physical address mask.
const Params * params() const
ThreadContext is the external interface to all thread state for anything outside of the CPU...
ObjectFile * bootldr
Pointer to the bootloader object.
PortProxy physProxy
Port to physical memory used for writing object files into ram at boot.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
std::vector< std::unique_ptr< ObjectFile > > bootLoaders
Bootloaders.
bool haveLPAE() const
Returns true if this system implements the Large Physical Address Extension.
bool _highestELIs64
True if the register width of the highest implemented exception level is 64 bits (ARMv8) ...
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Addr loadAddrMask
Mask that should be anded for binary/symbol loading.
std::vector< ThreadContext * > threadContexts
Addr kernelEntry
Entry point in the kernel to start at.
bool highestELIs64() const
Returns true if the register width of the highest implemented exception level is 64 bits (ARMv8) ...
Linux::DebugPrintkEvent * debugPrintkEvent
PC based event to skip the dprink() call and emulate its functionality.
bool haveSecurity() const
Returns true if this system implements the Security Extensions.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual bool loadSections(PortProxy &mem_proxy, Addr mask=maxAddr, Addr offset=0)
ObjectFile * kernel
Object pointer for the kernel code.
bool haveVirtualization() const
Returns true if this system implements the virtualization Extensions.
ObjectFile * createObjectFile(const string &fname, bool raw)
virtual void writeBlob(Addr addr, const uint8_t *p, int size) const
Write size bytes from p to address.
virtual void initState()
Initialise the system.
TranslatingPortProxy Object Declaration for FS.
Addr loadAddrOffset
Offset that should be used for binary/symbol loading.
fatal_if(p->js_features.size() > 16,"Too many job slot feature registers specified (%i)\n", p->js_features.size())
bool haveLargeAsid64() const
Returns true if ASID is 16 bits in AArch64 (ARMv8)
Addr resetAddr64() const
Returns the reset address if the highest implemented exception level is 64 bits (ARMv8) ...