49#include "params/ArmFsWorkload.hh"
50#include "params/ArmSystem.hh"
84 for (
const auto &bl :
p.boot_loader) {
85 std::unique_ptr<loader::ObjectFile> bl_obj;
86 bl_obj.reset(loader::createObjectFile(bl));
88 fatal_if(!bl_obj,
"Could not read bootloader: %s", bl);
89 bootLoaders.emplace_back(std::move(bl_obj));
95 "Can't find a matching boot loader / kernel combination!");
110 for (
auto *tc:
system->threads) {
122 inform(
"Using bootloader at address %#x",
bootldr->entryPoint());
128 "cpu_release_addr must be set with bootloader");
130 fatal_if(!arm_sys->params().gic_cpu_addr && is_gic_v2,
131 "gic_cpu_addr must be set with bootloader");
133 for (
auto *tc: arm_sys->threads) {
136 tc->setReg(
int_reg::R4, arm_sys->params().gic_cpu_addr);
143 if (!arm_sys->highestELIs64())
144 arm_sys->threads[0]->pcState(
kernelObj->entryPoint());
160 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.
void setSystem(System *sys) override
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
static BaseRemoteGDB * build(ListenSocketConfig listen_config, Args... args)
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
virtual void setSystem(System *sys)
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.