298 std::shared_ptr<FDArray>
fds;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
virtual Process * load(const ProcessParams ¶ms, loader::ObjectFile *obj_file)=0
Each subclass needs to implement this method.
Loader(const Loader &)=delete
void operator=(const Loader &)=delete
loader::MemoryImage image
virtual bool mmapGrowsDown() const
Does mmap region grow upward or downward from mmapEnd?
void allocateMem(Addr vaddr, int64_t size, bool clobber=false)
void replicatePage(Addr vaddr, Addr new_paddr, ThreadContext *old_tc, ThreadContext *new_tc, bool alloc_page)
std::string absolutePath(const std::string &path, bool host_fs)
Return an absolute path given a relative path paired with the current working directory of the proces...
std::unique_ptr< SETranslatingPortProxy > initVirtMem
virtual void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *new_p, RegVal flags)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
std::shared_ptr< MemState > memState
bool fixupFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page on the stack.
void deallocateMem(Addr vaddr, int64_t size)
Unmap the given virtual address range and deallocate any physical pages that it mapped to.
std::vector< std::string > argv
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
std::shared_ptr< FDArray > fds
const char * progName() const
void assignThreadContext(ContextID context_id)
bool map(Addr vaddr, Addr paddr, int64_t size, bool cacheable=true)
Maps a contiguous range of virtual addresses in this process's address space to a contiguous range of...
loader::ObjectFile * getInterpreter()
loader::MemoryImage interpImage
virtual void syscall(ThreadContext *tc)
bool zeroPages
Whether to ensure that all newly allocated pages are zero-filled.
std::vector< ContextID > vforkContexts
std::vector< ContextID > contextIds
std::string checkPathRedirect(const std::string &filename)
Redirect file path if it matches any keys initialized by system object.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::vector< std::string > envp
std::string tgtCwd
The cwd members are used to track changes to the current working directory for the purpose of executi...
EmulatedDriver * findDriver(std::string filename)
Find an emulated device driver.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Process(const ProcessParams ¶ms, EmulationPageTable *pTable, loader::ObjectFile *obj_file)
void revokeThreadContext(int context_id)
After delegating a thread context to a child process no longer should relate to the ThreadContext.
loader::ObjectFile * objFile
statistics::Scalar numSyscalls
static Process * tryLoaders(const ProcessParams ¶ms, loader::ObjectFile *obj_file)
std::vector< EmulatedDriver * > drivers
EmulationPageTable * pTable
uint64_t childClearTID
Calls a futex wakeup at the address specified by this pointer when this process exits.
static std::stack< std::string > path
This class provides the wrapper interface for the system call implementations which are defined in th...
This class represents the return value from an emulated system call, including any errno setting.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
This is a simple scalar statistic, like a counter.
DrainState
Object drain/handover states.
const Params & params() const
SimObject(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int ContextID
Globally unique thread context ID.
Declaration of Statistics objects.