gem5  v21.1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
process.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
3  * Copyright (c) 2012 ARM Limited
4  * All rights reserved
5  *
6  * The license below extends only to copyright in the software and shall
7  * not be construed as granting a license to any other intellectual
8  * property including but not limited to intellectual property relating
9  * to a hardware implementation of the functionality of the software
10  * licensed hereunder. You may use the software subject to the license
11  * terms below provided that you ensure that this notice is replicated
12  * unmodified and in its entirety in all distributions of the software,
13  * modified or unmodified, in source code or in binary form.
14  *
15  * Copyright (c) 2001-2005 The Regents of The University of Michigan
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
42 #include "sim/process.hh"
43 
44 #include <fcntl.h>
45 #include <unistd.h>
46 
47 #include <array>
48 #include <climits>
49 #include <csignal>
50 #include <map>
51 #include <string>
52 #include <vector>
53 
54 #include "base/intmath.hh"
56 #include "base/loader/symtab.hh"
57 #include "base/statistics.hh"
58 #include "cpu/thread_context.hh"
59 #include "mem/page_table.hh"
61 #include "params/Process.hh"
62 #include "sim/emul_driver.hh"
63 #include "sim/fd_array.hh"
64 #include "sim/fd_entry.hh"
65 #include "sim/redirect_path.hh"
66 #include "sim/syscall_desc.hh"
67 #include "sim/system.hh"
68 
69 namespace gem5
70 {
71 
72 namespace
73 {
74 
75 typedef std::vector<Process::Loader *> LoaderList;
76 
77 LoaderList &
78 process_loaders()
79 {
80  static LoaderList loaders;
81  return loaders;
82 }
83 
84 } // anonymous namespace
85 
87 {
88  process_loaders().emplace_back(this);
89 }
90 
91 Process *
92 Process::tryLoaders(const ProcessParams &params,
93  loader::ObjectFile *obj_file)
94 {
95  for (auto &loader_it : process_loaders()) {
96  Process *p = loader_it->load(params, obj_file);
97  if (p)
98  return p;
99  }
100 
101  return nullptr;
102 }
103 
104 static std::string
105 normalize(const std::string& directory)
106 {
107  if (directory.back() != '/')
108  return directory + '/';
109  return directory;
110 }
111 
113  loader::ObjectFile *obj_file)
117  useForClone(false),
118  pTable(pTable),
119  objFile(obj_file),
120  argv(params.cmd), envp(params.env),
122  tgtCwd(normalize(params.cwd)),
129  fds(std::make_shared<FDArray>(
130  params.input, params.output, params.errout)),
131  childClearTID(0),
132  ADD_STAT(numSyscalls, statistics::units::Count::get(),
133  "Number of system calls")
134 {
135  if (_pid >= System::maxPID)
136  fatal("_pid is too large: %d", _pid);
137 
138  auto ret_pair = system->PIDs.emplace(_pid);
139  if (!ret_pair.second)
140  fatal("_pid %d is already used", _pid);
141 
154  _tgid = params.pid;
155 
156  exitGroup = new bool();
157  sigchld = new bool();
158 
159  image = objFile->buildImage();
160 
161  if (loader::debugSymbolTable.empty())
163 }
164 
165 void
167  Process *np, RegVal flags)
168 {
169 #ifndef CLONE_VM
170 #define CLONE_VM 0
171 #endif
172 #ifndef CLONE_FILES
173 #define CLONE_FILES 0
174 #endif
175 #ifndef CLONE_THREAD
176 #define CLONE_THREAD 0
177 #endif
178  if (CLONE_VM & flags) {
184  delete np->pTable;
185  np->pTable = pTable;
186 
187  np->memState = memState;
188  } else {
193  typedef std::vector<std::pair<Addr,Addr>> MapVec;
194  MapVec mappings;
195  pTable->getMappings(&mappings);
196 
197  for (auto map : mappings) {
198  Addr paddr, vaddr = map.first;
199  bool alloc_page = !(np->pTable->translate(vaddr, paddr));
200  np->replicatePage(vaddr, paddr, otc, ntc, alloc_page);
201  }
202 
203  *np->memState = *memState;
204  }
205 
206  if (CLONE_FILES & flags) {
212  np->fds = fds;
213  } else {
221  std::shared_ptr<FDArray> nfds = np->fds;
222  for (int tgt_fd = 0; tgt_fd < fds->getSize(); tgt_fd++) {
223  std::shared_ptr<FDEntry> this_fde = (*fds)[tgt_fd];
224  if (!this_fde) {
225  nfds->setFDEntry(tgt_fd, nullptr);
226  continue;
227  }
228  nfds->setFDEntry(tgt_fd, this_fde->clone());
229 
230  auto this_hbfd = std::dynamic_pointer_cast<HBFDEntry>(this_fde);
231  if (!this_hbfd)
232  continue;
233 
234  int this_sim_fd = this_hbfd->getSimFD();
235  if (this_sim_fd <= 2)
236  continue;
237 
238  int np_sim_fd = dup(this_sim_fd);
239  assert(np_sim_fd != -1);
240 
241  auto nhbfd = std::dynamic_pointer_cast<HBFDEntry>((*nfds)[tgt_fd]);
242  nhbfd->setSimFD(np_sim_fd);
243  }
244  }
245 
246  if (CLONE_THREAD & flags) {
247  np->_tgid = _tgid;
248  delete np->exitGroup;
249  np->exitGroup = exitGroup;
250  }
251 
252  np->argv.insert(np->argv.end(), argv.begin(), argv.end());
253  np->envp.insert(np->envp.end(), envp.begin(), envp.end());
254 }
255 
256 void
258 {
260  for (it = contextIds.begin(); it != contextIds.end(); it++) {
261  if (*it == context_id) {
262  contextIds.erase(it);
263  return;
264  }
265  }
266  warn("Unable to find thread context to revoke");
267 }
268 
269 void
271 {
272  // Patch the ld_bias for dynamic executables.
273  updateBias();
274 
275  if (objFile->getInterpreter())
277 }
278 
279 void
281 {
282  if (contextIds.empty())
283  fatal("Process %s is not associated with any HW contexts!\n", name());
284 
285  // first thread context for this process... initialize & enable
287 
288  // mark this context as active so it will start ticking.
289  tc->activate();
290 
291  pTable->initState();
292 
295 
296  // load object file into target memory
299 }
300 
303 {
304  fds->updateFileOffsets();
305  return DrainState::Drained;
306 }
307 
308 void
309 Process::allocateMem(Addr vaddr, int64_t size, bool clobber)
310 {
311  // Check if the page has been mapped by other cores if not to clobber.
312  // When running multithreaded programs in SE-mode with DerivO3CPU model,
313  // there are cases where two or more cores have page faults on the same
314  // page in nearby ticks. When the cores try to handle the faults at the
315  // commit stage (also in nearby ticks/cycles), the first core will ask for
316  // a physical page frame to map with the virtual page. Other cores can
317  // return if the page has been mapped and `!clobber`.
318  if (!clobber) {
320  if (pte) {
321  warn("Process::allocateMem: addr %#x already mapped\n", vaddr);
322  return;
323  }
324  }
325 
326  int npages = divCeil(size, pTable->pageSize());
327  Addr paddr = system->allocPhysPages(npages);
328  pTable->map(vaddr, paddr, size,
329  clobber ? EmulationPageTable::Clobber :
331 }
332 
333 void
335  ThreadContext *new_tc, bool allocate_page)
336 {
337  if (allocate_page)
338  new_paddr = system->allocPhysPages(1);
339 
340  // Read from old physical page.
341  uint8_t buf_p[pTable->pageSize()];
342  old_tc->getVirtProxy().readBlob(vaddr, buf_p, sizeof(buf_p));
343 
344  // Create new mapping in process address space by clobbering existing
345  // mapping (if any existed) and then write to the new physical page.
346  bool clobber = true;
347  pTable->map(vaddr, new_paddr, sizeof(buf_p), clobber);
348  new_tc->getVirtProxy().writeBlob(vaddr, buf_p, sizeof(buf_p));
349 }
350 
351 bool
353 {
354  return memState->fixupFault(vaddr);
355 }
356 
357 void
359 {
360  memState->serialize(cp);
361  pTable->serialize(cp);
362  fds->serialize(cp);
363 
369  warn("Checkpoints for pipes, device drivers and sockets do not work.");
370 }
371 
372 void
374 {
375  memState->unserialize(cp);
376  pTable->unserialize(cp);
377  fds->unserialize(cp);
382  warn("Checkpoints for pipes, device drivers and sockets do not work.");
383  // The above returns a bool so that you could do something if you don't
384  // find the param in the checkpoint if you wanted to, like set a default
385  // but in this case we'll just stick with the instantiated value if not
386  // found.
387 }
388 
389 bool
390 Process::map(Addr vaddr, Addr paddr, int size, bool cacheable)
391 {
392  pTable->map(vaddr, paddr, size,
393  cacheable ? EmulationPageTable::MappingFlags(0) :
395  return true;
396 }
397 
399 Process::findDriver(std::string filename)
400 {
401  for (EmulatedDriver *d : drivers) {
402  if (d->match(filename))
403  return d;
404  }
405 
406  return nullptr;
407 }
408 
409 std::string
410 Process::checkPathRedirect(const std::string &filename)
411 {
412  // If the input parameter contains a relative path, convert it.
413  // The target version of the current working directory is fine since
414  // we immediately convert it using redirect paths into a host version.
415  auto abs_path = absolutePath(filename, false);
416 
417  for (auto path : system->redirectPaths) {
418  // Search through the redirect paths to see if a starting substring of
419  // our path falls into any buckets which need to redirected.
420  if (startswith(abs_path, path->appPath())) {
421  std::string tail = abs_path.substr(path->appPath().size());
422 
423  // If this path needs to be redirected, search through a list
424  // of targets to see if we can match a valid file (or directory).
425  for (auto host_path : path->hostPaths()) {
426  if (access((host_path + tail).c_str(), R_OK) == 0) {
427  // Return the valid match.
428  return host_path + tail;
429  }
430  }
431  // The path needs to be redirected, but the file or directory
432  // does not exist on the host filesystem. Return the first
433  // host path as a default.
434  return path->hostPaths()[0] + tail;
435  }
436  }
437 
438  // The path does not need to be redirected.
439  return abs_path;
440 }
441 
442 void
444 {
445  auto *interp = objFile->getInterpreter();
446 
447  if (!interp || !interp->relocatable())
448  return;
449 
450  // Determine how large the interpreters footprint will be in the process
451  // address space.
452  Addr interp_mapsize = roundUp(interp->mapSize(), pTable->pageSize());
453 
454  // We are allocating the memory area; set the bias to the lowest address
455  // in the allocated memory region.
456  Addr mmap_end = memState->getMmapEnd();
457  Addr ld_bias = mmapGrowsDown() ? mmap_end - interp_mapsize : mmap_end;
458 
459  // Adjust the process mmap area to give the interpreter room; the real
460  // execve system call would just invoke the kernel's internal mmap
461  // functions to make these adjustments.
462  mmap_end = mmapGrowsDown() ? ld_bias : mmap_end + interp_mapsize;
463  memState->setMmapEnd(mmap_end);
464 
465  interp->updateBias(ld_bias);
466 }
467 
470 {
471  return objFile->getInterpreter();
472 }
473 
474 Addr
476 {
477  auto *interp = getInterpreter();
478 
479  return interp ? interp->bias() : objFile->bias();
480 }
481 
482 Addr
484 {
485  auto *interp = getInterpreter();
486 
487  return interp ? interp->entryPoint() : objFile->entryPoint();
488 }
489 
490 std::string
491 Process::absolutePath(const std::string &filename, bool host_filesystem)
492 {
493  if (filename.empty() || startswith(filename, "/"))
494  return filename;
495 
496  // Construct the absolute path given the current working directory for
497  // either the host filesystem or target filesystem. The distinction only
498  // matters if filesystem redirection is utilized in the simulation.
499  auto path_base = std::string();
500  if (host_filesystem) {
501  path_base = hostCwd;
502  assert(!hostCwd.empty());
503  } else {
504  path_base = tgtCwd;
505  assert(!tgtCwd.empty());
506  }
507 
508  // Add a trailing '/' if the current working directory did not have one.
509  normalize(path_base);
510 
511  // Append the filename onto the current working path.
512  auto absolute_path = path_base + filename;
513 
514  return absolute_path;
515 }
516 
517 Process *
518 ProcessParams::create() const
519 {
520  // If not specified, set the executable parameter equal to the
521  // simulated system's zeroth command line parameter
522  const std::string &exec = (executable == "") ? cmd[0] : executable;
523 
524  auto *obj_file = loader::createObjectFile(exec);
525  fatal_if(!obj_file, "Cannot load object file %s.", exec);
526 
527  Process *process = Process::tryLoaders(*this, obj_file);
528  fatal_if(!process, "Unknown error creating process object.");
529 
530  return process;
531 }
532 
533 } // namespace gem5
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:189
gem5::normalize
static std::string normalize(const std::string &directory)
Definition: process.cc:105
gem5::Process::euid
uint64_t euid()
Definition: process.hh:83
gem5::Process::drivers
std::vector< EmulatedDriver * > drivers
Definition: process.hh:271
gem5::SETranslatingPortProxy
Definition: se_translating_port_proxy.hh:49
gem5::EmulationPageTable::pageSize
Addr pageSize()
Definition: page_table.hh:114
gem5::EmulationPageTable
Definition: page_table.hh:52
gem5::System::PIDs
std::set< int > PIDs
Process set to track which PIDs have already been allocated.
Definition: system.hh:631
warn
#define warn(...)
Definition: logging.hh:245
gem5::loader::ObjectFile
Definition: object_file.hh:85
gem5::PortProxy::writeBlob
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
Definition: port_proxy.hh:192
gem5::RegVal
uint64_t RegVal
Definition: types.hh:173
system.hh
gem5::Process::interpImage
loader::MemoryImage interpImage
Definition: process.hh:212
gem5::Process::clone
virtual void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *new_p, RegVal flags)
Definition: process.cc:166
gem5::Process::useArchPT
bool useArchPT
Definition: process.hh:165
fd_entry.hh
gem5::Process::findDriver
EmulatedDriver * findDriver(std::string filename)
Find an emulated device driver.
Definition: process.cc:399
gem5::EmulationPageTable::Uncacheable
@ Uncacheable
Definition: page_table.hh:98
gem5::Process::getStartPC
Addr getStartPC()
Definition: process.cc:483
gem5::Process::initVirtMem
std::unique_ptr< SETranslatingPortProxy > initVirtMem
Definition: process.hh:174
gem5::loader::ObjectFile::entryPoint
Addr entryPoint() const
Definition: object_file.hh:125
gem5::Process::tgtCwd
std::string tgtCwd
The cwd members are used to track changes to the current working directory for the purpose of executi...
Definition: process.hh:252
gem5::Process::numSyscalls
statistics::Scalar numSyscalls
Definition: process.hh:288
CLONE_VM
#define CLONE_VM
gem5::Process::getBias
Addr getBias()
Definition: process.cc:475
gem5::output
static void output(const char *filename)
Definition: debug.cc:66
gem5::Serializable::path
static std::stack< std::string > path
Definition: serialize.hh:315
gem5::EmulationPageTable::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: page_table.cc:172
gem5::Process::_pgid
uint64_t _pgid
Definition: process.hh:267
gem5::Process::release
std::string release
Definition: process.hh:256
gem5::loader::ObjectFile::getInterpreter
virtual ObjectFile * getInterpreter() const
Definition: object_file.hh:99
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::EmulationPageTable::initState
virtual void initState()
Definition: page_table.hh:105
gem5::Process::updateBias
void updateBias()
Definition: process.cc:443
gem5::Process::initState
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Definition: process.cc:280
redirect_path.hh
gem5::startswith
bool startswith(const char *s, const char *prefix)
Return true if 's' starts with the prefix string 'prefix'.
Definition: str.hh:242
gem5::EmulationPageTable::translate
bool translate(Addr vaddr, Addr &paddr)
Translate function.
Definition: page_table.cc:143
gem5::Process::_pid
uint64_t _pid
Definition: process.hh:265
gem5::ThreadContext::activate
virtual void activate()=0
Set the status to Active.
gem5::Process::egid
uint64_t egid()
Definition: process.hh:85
std::vector
STL vector class.
Definition: stl.hh:37
gem5::Process::pid
uint64_t pid()
Definition: process.hh:86
gem5::EmulationPageTable::getMappings
void getMappings(std::vector< std::pair< Addr, Addr >> *addr_mappings)
Definition: page_table.cc:97
gem5::EmulationPageTable::lookup
const Entry * lookup(Addr vaddr)
Lookup function.
Definition: page_table.cc:133
gem5::Process::_euid
uint64_t _euid
Definition: process.hh:260
fd_array.hh
gem5::Process::fds
std::shared_ptr< FDArray > fds
Definition: process.hh:273
gem5::loader::ObjectFile::symtab
const SymbolTable & symtab() const
Definition: object_file.hh:119
gem5::Process::gid
uint64_t gid()
Definition: process.hh:84
gem5::Process::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: process.cc:358
gem5::Process::useForClone
bool useForClone
Definition: process.hh:169
gem5::Process::memState
std::shared_ptr< MemState > memState
Definition: process.hh:276
gem5::Process::allocateMem
void allocateMem(Addr vaddr, int64_t size, bool clobber=false)
Definition: process.cc:309
gem5::Process::fixupFault
bool fixupFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page on the stack.
Definition: process.cc:352
gem5::Process::childClearTID
uint64_t childClearTID
Calls a futex wakeup at the address specified by this pointer when this process exits.
Definition: process.hh:282
gem5::Process::Loader::Loader
Loader()
Definition: process.cc:86
gem5::System::redirectPaths
std::vector< RedirectPath * > redirectPaths
Definition: system.hh:640
gem5::Process::uid
uint64_t uid()
Definition: process.hh:82
gem5::Process::_tgid
uint64_t _tgid
Definition: process.hh:268
gem5::DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:74
gem5::Process::ppid
uint64_t ppid()
Definition: process.hh:87
gem5::Process::tryLoaders
static Process * tryLoaders(const ProcessParams &params, loader::ObjectFile *obj_file)
Definition: process.cc:92
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:93
gem5::Process::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: process.cc:373
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
gem5::ThreadContext::getVirtProxy
virtual PortProxy & getVirtProxy()=0
gem5::SimObject::params
const Params & params() const
Definition: sim_object.hh:176
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75
gem5::ArmISA::d
Bitfield< 9 > d
Definition: misc_types.hh:63
gem5::Process::pTable
EmulationPageTable * pTable
Definition: process.hh:171
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
statistics.hh
gem5::Process::exitGroup
bool * exitGroup
Definition: process.hh:275
process.hh
gem5::Process::argv
std::vector< std::string > argv
Definition: process.hh:213
gem5::Process::absolutePath
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...
Definition: process.cc:491
gem5::loader::ObjectFile::bias
virtual Addr bias() const
Definition: object_file.hh:111
gem5::Process::executable
std::string executable
Definition: process.hh:215
gem5::Process::Process
Process(const ProcessParams &params, EmulationPageTable *pTable, loader::ObjectFile *obj_file)
Definition: process.cc:112
gem5::Process::checkPathRedirect
std::string checkPathRedirect(const std::string &filename)
Redirect file path if it matches any keys initialized by system object.
Definition: process.cc:410
gem5::PortProxy::readBlob
void readBlob(Addr addr, void *p, int size) const
Higher level interfaces based on the above.
Definition: port_proxy.hh:182
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::DrainState::Drained
@ Drained
Buffers drained, ready for serialization/handover.
gem5::Process::replicatePage
void replicatePage(Addr vaddr, Addr new_paddr, ThreadContext *old_tc, ThreadContext *new_tc, bool alloc_page)
Definition: process.cc:334
gem5::Process::_egid
uint64_t _egid
Definition: process.hh:262
gem5::System::allocPhysPages
Addr allocPhysPages(int npages, int poolID=0)
Allocate npages contiguous unused physical pages.
Definition: system.cc:355
gem5::Process::getInterpreter
loader::ObjectFile * getInterpreter()
Definition: process.cc:469
gem5::SETranslatingPortProxy::Always
@ Always
Definition: se_translating_port_proxy.hh:55
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::Process::envp
std::vector< std::string > envp
Definition: process.hh:214
gem5::System::maxPID
static const int maxPID
Definition: system.hh:628
CLONE_FILES
#define CLONE_FILES
gem5::loader::createObjectFile
ObjectFile * createObjectFile(const std::string &fname, bool raw)
Definition: object_file.cc:123
gem5::divCeil
static constexpr T divCeil(const T &a, const U &b)
Definition: intmath.hh:110
gem5::Process
Definition: process.hh:67
gem5::EmulatedDriver
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
Definition: emul_driver.hh:55
gem5::EmulationPageTable::map
virtual void map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags=0)
Maps a virtual memory region to a physical memory region.
Definition: page_table.cc:48
gem5::Process::map
bool map(Addr vaddr, Addr paddr, int size, bool cacheable=true)
Maps a contiguous range of virtual addresses in this process's address space to a contiguous range of...
Definition: process.cc:390
gem5::System::threads
Threads threads
Definition: system.hh:316
std
Overload hash function for BasicBlockRange type.
Definition: types.hh:111
gem5::FDArray
Definition: fd_array.hh:48
gem5::Process::sigchld
bool * sigchld
Definition: process.hh:285
gem5::Process::_gid
uint64_t _gid
Definition: process.hh:261
CLONE_THREAD
#define CLONE_THREAD
gem5::Process::_ppid
uint64_t _ppid
Definition: process.hh:266
gem5::roundUp
static constexpr T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
Definition: intmath.hh:260
gem5::Process::system
System * system
Definition: process.hh:162
emul_driver.hh
gem5::Process::mmapGrowsDown
virtual bool mmapGrowsDown() const
Does mmap region grow upward or downward from mmapEnd? Most platforms grow downward,...
Definition: process.hh:135
gem5::loader::MemoryImage::write
bool write(const PortProxy &proxy) const
Definition: memory_image.cc:54
gem5::Process::pgid
uint64_t pgid()
Definition: process.hh:88
gem5::Process::revokeThreadContext
void revokeThreadContext(int context_id)
After delegating a thread context to a child process no longer should relate to the ThreadContext.
Definition: process.cc:257
gem5::Process::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: process.cc:270
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::Process::_uid
uint64_t _uid
Definition: process.hh:259
gem5::Process::contextIds
std::vector< ContextID > contextIds
Definition: process.hh:159
se_translating_port_proxy.hh
gem5::loader::ImageFile::buildImage
virtual MemoryImage buildImage() const =0
gem5::Process::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: process.cc:302
symtab.hh
gem5::MipsISA::vaddr
vaddr
Definition: pra_constants.hh:278
gem5::loader::debugSymbolTable
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Definition: symtab.cc:44
gem5::Process::hostCwd
std::string hostCwd
Definition: process.hh:253
intmath.hh
fatal_if
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:225
page_table.hh
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::Process::kvmInSE
bool kvmInSE
Definition: process.hh:167
gem5::EmulationPageTable::Entry
Definition: page_table.hh:55
object_file.hh
gem5::EmulationPageTable::Clobber
@ Clobber
Definition: page_table.hh:97
gem5::Process::image
loader::MemoryImage image
Definition: process.hh:211
thread_context.hh
gem5::Process::objFile
loader::ObjectFile * objFile
Definition: process.hh:210
syscall_desc.hh
gem5::EmulationPageTable::MappingFlags
MappingFlags
Definition: page_table.hh:95
gem5::EmulationPageTable::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: page_table.cc:189

Generated on Wed Jul 28 2021 12:10:21 for gem5 by doxygen 1.8.17