Deleted Added
sdiff udiff text old ( 10929:b2bbfec74eca ) new ( 10930:ddc3d96d6313 )
full compact
1/*
2 * Copyright (c) 2014 Advanced Micro Devices, Inc.
3 * Copyright (c) 2001-2005 The Regents of The University of Michigan
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

28 *
29 * Authors: Nathan Binkert
30 * Steve Reinhardt
31 */
32
33#ifndef __PROCESS_HH__
34#define __PROCESS_HH__
35
36#include <array>
37#include <string>
38#include <vector>
39
40#include "arch/registers.hh"
41#include "base/statistics.hh"
42#include "base/types.hh"
43#include "config/the_isa.hh"
44#include "mem/se_translating_port_proxy.hh"
45#include "sim/fd_entry.hh"
46#include "sim/sim_object.hh"
47#include "sim/syscallreturn.hh"
48
49class PageTable;
50struct ProcessParams;
51struct LiveProcessParams;
52class SyscallDesc;
53class System;

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

132
133 // flag for using architecture specific page table
134 bool useArchPT;
135 // running KvmCPU in SE mode requires special initialization
136 bool kvmInSE;
137
138 PageTableBase* pTable;
139
140 protected:
141 /// Memory proxy for initialization (image loading)
142 SETranslatingPortProxy initVirtMem;
143
144 private:
145 static const int NUM_FDS = 1024;
146
147 // File descriptor remapping support.
148 std::shared_ptr<std::array<FDEntry, NUM_FDS>> fd_array;
149
150 // Standard file descriptor options for initialization and checkpoints.
151 std::map<std::string, int> imap;
152 std::map<std::string, int> oemap;
153
154 public:
155 // inherit file descriptor map from another process (necessary for clone)
156 void inheritFdArray(Process *p);
157
158 // override of virtual SimObject method: register statistics
159 virtual void regStats();
160
161 // After getting registered with system object, tell process which
162 // system-wide context id it is assigned.
163 void assignThreadContext(int context_id)
164 {

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

171 // provide program name for debug messages
172 virtual const char *progName() const { return "<unknown>"; }
173
174 // generate new target fd for sim_fd
175 int alloc_fd(int sim_fd, const std::string& filename, int flags, int mode,
176 bool pipe);
177
178 // disassociate target fd with simulator fd and cleanup subsidiary fields
179 void reset_fd_entry(int tgt_fd);
180
181 // look up simulator fd for given target fd
182 int sim_fd(int tgt_fd);
183
184 // look up fd entry for a given target fd
185 FDEntry *get_fd_entry(int tgt_fd);
186
187 // look up target fd for given host fd
188 // Assumes a 1:1 mapping between target file descriptor and host file
189 // descriptor. Given the current API, this must be true given that it's
190 // not possible to map multiple target file descriptors to the same host
191 // file descriptor
192 int tgt_fd(int sim_fd);
193

--- 148 unchanged lines hidden ---