49#include "params/ArmFsWorkload.hh"
83 for (
const auto &bl :
p.boot_loader) {
84 std::unique_ptr<loader::ObjectFile> bl_obj;
85 bl_obj.reset(loader::createObjectFile(bl));
87 fatal_if(!bl_obj,
"Could not read bootloader: %s", bl);
88 bootLoaders.emplace_back(std::move(bl_obj));
94 "Can't find a matching boot loader / kernel combination!");
109 for (
auto *tc:
system->threads) {
121 inform(
"Using bootloader at address %#x",
bootldr->entryPoint());
127 "cpu_release_addr must be set with bootloader");
129 fatal_if(!arm_sys->params().gic_cpu_addr && is_gic_v2,
130 "gic_cpu_addr must be set with bootloader");
132 for (
auto *tc: arm_sys->threads) {
135 tc->setReg(
int_reg::R4, arm_sys->params().gic_cpu_addr);
142 if (!arm_sys->highestELIs64())
143 arm_sys->threads[0]->pcState(
kernelObj->entryPoint());
152 if (bl->getArch() == obj->
getArch())
loader::ObjectFile * getBootLoader(loader::ObjectFile *const obj)
Get a boot loader that matches the kernel.
loader::ObjectFile * bootldr
Pointer to the bootloader object.
loader::Arch getArch() const override
std::vector< std::unique_ptr< loader::ObjectFile > > bootLoaders
Bootloaders.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Addr kernelEntry
This differs from entry since it takes into account where the kernel is loaded in memory (with loadAd...
FsWorkload(const Params &p)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
void returnFromFuncIn(ThreadContext *tc) override
void set(Addr val) override
Force this PC to reflect a particular value, resetting all its other fields around it.
Addr loadAddrMask() const
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
loader::ObjectFile * kernelObj
Addr loadAddrOffset() const
KernelWorkload(const Params &p)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void pcStateNoRecord(const PCStateBase &val)=0
virtual RegVal getReg(const RegId ®) const
virtual CheckerCPU * getCheckerCpuPtr()=0
virtual const PCStateBase & pcState() const =0
Implementation of a GICv2.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
const Params & params() const
constexpr auto & ReturnAddressReg
bool inAArch64(ThreadContext *tc)
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Copyright (c) 2024 Arm Limited All rights reserved.