process.hh (10299:bec0c5ffc323) process.hh (10496:0a5a8ecd0ec6)
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

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

45#include "sim/syscallreturn.hh"
46
47class PageTable;
48struct ProcessParams;
49struct LiveProcessParams;
50class SyscallDesc;
51class System;
52class ThreadContext;
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

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

45#include "sim/syscallreturn.hh"
46
47class PageTable;
48struct ProcessParams;
49struct LiveProcessParams;
50class SyscallDesc;
51class System;
52class ThreadContext;
53class EmulatedDriver;
53
54template<class IntType>
55struct AuxVector
56{
57 IntType a_type;
58 IntType a_val;
59
60 AuxVector()

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

134 public:
135 int fd;
136 std::string filename;
137 int mode;
138 int flags;
139 bool isPipe;
140 int readPipeSource;
141 uint64_t fileOffset;
54
55template<class IntType>
56struct AuxVector
57{
58 IntType a_type;
59 IntType a_val;
60
61 AuxVector()

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

135 public:
136 int fd;
137 std::string filename;
138 int mode;
139 int flags;
140 bool isPipe;
141 int readPipeSource;
142 uint64_t fileOffset;
143 EmulatedDriver *driver;
142
143 FdMap()
144 : fd(-1), filename("NULL"), mode(0), flags(0),
144
145 FdMap()
146 : fd(-1), filename("NULL"), mode(0), flags(0),
145 isPipe(false), readPipeSource(0), fileOffset(0)
147 isPipe(false), readPipeSource(0), fileOffset(0), driver(NULL)
146 { }
147
148 void serialize(std::ostream &os);
149 void unserialize(Checkpoint *cp, const std::string &section);
150 };
151
152 protected:
153 /// Memory proxy for initialization (image loading)

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

251 uint64_t __euid;
252 uint64_t __gid;
253 uint64_t __egid;
254
255 // pid of the process and it's parent
256 uint64_t __pid;
257 uint64_t __ppid;
258
148 { }
149
150 void serialize(std::ostream &os);
151 void unserialize(Checkpoint *cp, const std::string &section);
152 };
153
154 protected:
155 /// Memory proxy for initialization (image loading)

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

253 uint64_t __euid;
254 uint64_t __gid;
255 uint64_t __egid;
256
257 // pid of the process and it's parent
258 uint64_t __pid;
259 uint64_t __ppid;
260
261 // Emulated drivers available to this process
262 std::vector<EmulatedDriver *> drivers;
263
259 public:
260
261 enum AuxiliaryVectorType {
262 M5_AT_NULL = 0,
263 M5_AT_IGNORE = 1,
264 M5_AT_EXECFD = 2,
265 M5_AT_PHDR = 3,
266 M5_AT_PHENT = 4,

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

320 virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);
321 virtual void setSyscallArg(ThreadContext *tc,
322 int i, TheISA::IntReg val) = 0;
323 virtual void setSyscallReturn(ThreadContext *tc,
324 SyscallReturn return_value) = 0;
325
326 virtual SyscallDesc *getDesc(int callnum) = 0;
327
264 public:
265
266 enum AuxiliaryVectorType {
267 M5_AT_NULL = 0,
268 M5_AT_IGNORE = 1,
269 M5_AT_EXECFD = 2,
270 M5_AT_PHDR = 3,
271 M5_AT_PHENT = 4,

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

325 virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);
326 virtual void setSyscallArg(ThreadContext *tc,
327 int i, TheISA::IntReg val) = 0;
328 virtual void setSyscallReturn(ThreadContext *tc,
329 SyscallReturn return_value) = 0;
330
331 virtual SyscallDesc *getDesc(int callnum) = 0;
332
333 /**
334 * Find an emulated device driver.
335 *
336 * @param filename Name of the device (under /dev)
337 * @return Pointer to driver object if found, else NULL
338 */
339 EmulatedDriver *findDriver(std::string filename);
340
328 // this function is used to create the LiveProcess object, since
329 // we can't tell which subclass of LiveProcess to use until we
330 // open and look at the object file.
331 static LiveProcess *create(LiveProcessParams *params);
332};
333
334
335#endif // __PROCESS_HH__
341 // this function is used to create the LiveProcess object, since
342 // we can't tell which subclass of LiveProcess to use until we
343 // open and look at the object file.
344 static LiveProcess *create(LiveProcessParams *params);
345};
346
347
348#endif // __PROCESS_HH__