60class EmulationPageTable;
286 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.
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
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? Most platforms grow downward,...
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.
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)
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
Abstract superclass for simulation objects.
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
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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.