Deleted Added
sdiff udiff text old ( 8737:770ccf3af571 ) new ( 8766:b0773af78423 )
full compact
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//
36// The purpose of this code is to fake the loader & syscall mechanism
37// when there's no OS: thus there's no reason to use it in FULL_SYSTEM
38// mode when we do have an OS.
39//
40#include "config/full_system.hh"
41
42#if !FULL_SYSTEM
43
44#include <string>
45#include <vector>
46
47#include "arch/registers.hh"
48#include "base/statistics.hh"
49#include "base/types.hh"
50#include "config/the_isa.hh"
51#include "sim/sim_object.hh"
52#include "sim/syscallreturn.hh"
53
54class PageTable;
55struct ProcessParams;
56struct LiveProcessParams;
57class SyscallDesc;
58class System;
59class ThreadContext;
60class SETranslatingPortProxy;
61
62template<class IntType>
63struct AuxVector
64{
65 IntType a_type;
66 IntType a_val;
67
68 AuxVector()

--- 58 unchanged lines hidden (view full) ---

127 protected:
128 // constructor
129 Process(ProcessParams *params);
130
131 virtual void initState();
132
133 protected:
134 /// Memory object for initialization (image loading)
135 SETranslatingPortProxy *initVirtMem;
136
137 public:
138 PageTable *pTable;
139
140 //This id is assigned by m5 and is used to keep process' tlb entries
141 //separated.
142 uint64_t M5_pid;
143

--- 63 unchanged lines hidden (view full) ---

207 // find all offsets for currently open files and save them
208 void find_file_offsets();
209
210 // set the source of this read pipe for a checkpoint resume
211 void setReadPipeSource(int read_pipe_fd, int source_fd);
212
213 virtual void syscall(int64_t callnum, ThreadContext *tc) = 0;
214
215 void allocateMem(Addr vaddr, int64_t size, bool clobber = false);
216
217 /// Attempt to fix up a fault at vaddr by allocating a page on the stack.
218 /// @return Whether the fault has been fixed.
219 bool fixupStackFault(Addr vaddr);
220
221 void serialize(std::ostream &os);
222 void unserialize(Checkpoint *cp, const std::string &section);
223};
224

--- 89 unchanged lines hidden (view full) ---

314
315 // this function is used to create the LiveProcess object, since
316 // we can't tell which subclass of LiveProcess to use until we
317 // open and look at the object file.
318 static LiveProcess *create(LiveProcessParams *params);
319};
320
321
322#endif // !FULL_SYSTEM
323
324#endif // __PROCESS_HH__