1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: Nathan Binkert 29 * Steve Reinhardt 30 */ 31 32#ifndef __PROCESS_HH__ 33#define __PROCESS_HH__ 34 |
35#include <string> 36#include <vector> 37 38#include "arch/registers.hh" 39#include "base/statistics.hh" 40#include "base/types.hh" 41#include "config/the_isa.hh" 42#include "sim/sim_object.hh" 43#include "sim/syscallreturn.hh" 44 45class PageTable; |
46class ProcessParams; 47class LiveProcessParams; |
48class SyscallDesc; 49class System; 50class ThreadContext; |
51class TranslatingPort; |
52 53template<class IntType> 54struct AuxVector 55{ 56 IntType a_type; 57 IntType a_val; 58 59 AuxVector() --- 58 unchanged lines hidden (view full) --- 118 protected: 119 // constructor 120 Process(ProcessParams *params); 121 122 virtual void initState(); 123 124 protected: 125 /// Memory object for initialization (image loading) |
126 TranslatingPort *initVirtMem; |
127 128 public: 129 PageTable *pTable; 130 131 //This id is assigned by m5 and is used to keep process' tlb entries 132 //separated. 133 uint64_t M5_pid; 134 --- 63 unchanged lines hidden (view full) --- 198 // find all offsets for currently open files and save them 199 void find_file_offsets(); 200 201 // set the source of this read pipe for a checkpoint resume 202 void setReadPipeSource(int read_pipe_fd, int source_fd); 203 204 virtual void syscall(int64_t callnum, ThreadContext *tc) = 0; 205 |
206 /// Attempt to fix up a fault at vaddr by allocating a page on the stack. 207 /// @return Whether the fault has been fixed. 208 bool fixupStackFault(Addr vaddr); 209 210 void serialize(std::ostream &os); 211 void unserialize(Checkpoint *cp, const std::string §ion); 212}; 213 --- 89 unchanged lines hidden (view full) --- 303 304 // this function is used to create the LiveProcess object, since 305 // we can't tell which subclass of LiveProcess to use until we 306 // open and look at the object file. 307 static LiveProcess *create(LiveProcessParams *params); 308}; 309 310 |
311#endif // __PROCESS_HH__ |