gem5
v21.0.1.0
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
o
p
r
s
t
v
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
_
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
arch
x86
process.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 The Hewlett-Packard Development Company
3
* All rights reserved.
4
*
5
* The license below extends only to copyright in the software and shall
6
* not be construed as granting a license to any other intellectual
7
* property including but not limited to intellectual property relating
8
* to a hardware implementation of the functionality of the software
9
* licensed hereunder. You may use the software subject to the license
10
* terms below provided that you ensure that this notice is replicated
11
* unmodified and in its entirety in all distributions of the software,
12
* modified or unmodified, in source code or in binary form.
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions are
16
* met: redistributions of source code must retain the above copyright
17
* notice, this list of conditions and the following disclaimer;
18
* redistributions in binary form must reproduce the above copyright
19
* notice, this list of conditions and the following disclaimer in the
20
* documentation and/or other materials provided with the distribution;
21
* neither the name of the copyright holders nor the names of its
22
* contributors may be used to endorse or promote products derived from
23
* this software without specific prior written permission.
24
*
25
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
*/
37
38
#ifndef __ARCH_X86_PROCESS_HH__
39
#define __ARCH_X86_PROCESS_HH__
40
41
#include <string>
42
#include <vector>
43
44
#include "
arch/x86/pagetable.hh
"
45
#include "
mem/multi_level_page_table.hh
"
46
#include "
sim/aux_vector.hh
"
47
#include "
sim/process.hh
"
48
49
class
SyscallDesc
;
50
51
namespace
X86ISA
52
{
53
enum
X86AuxiliaryVectorTypes
{
54
M5_AT_SYSINFO
= 32,
55
M5_AT_SYSINFO_EHDR
= 33
56
};
57
58
class
X86Process
:
public
Process
59
{
60
protected
:
61
Addr
_gdtStart
;
62
Addr
_gdtSize
;
63
64
X86Process
(
const
ProcessParams &
params
, ::
Loader::ObjectFile
*
objFile
);
65
66
template
<
class
IntType>
67
void
argsInit
(
int
pageSize,
68
std::vector
<
AuxVector<IntType>
> extraAuxvs);
69
70
public
:
71
Addr
gdtStart
()
const
{
return
_gdtStart
; }
72
Addr
gdtSize
()
const
{
return
_gdtSize
; }
73
74
void
clone
(
ThreadContext
*old_tc,
ThreadContext
*new_tc,
75
Process
*process,
RegVal
flags)
override
;
76
77
X86Process
&
78
operator=
(
const
X86Process
&in)
79
{
80
if
(
this
== &in)
81
return
*
this
;
82
83
_gdtStart
= in.
_gdtStart
;
84
_gdtSize
= in.
_gdtSize
;
85
86
return
*
this
;
87
}
88
};
89
90
class
X86_64Process
:
public
X86Process
91
{
92
protected
:
93
class
VSyscallPage
94
{
95
public
:
96
Addr
base
;
97
Addr
size
;
98
Addr
vtimeOffset
;
99
Addr
vgettimeofdayOffset
;
100
101
VSyscallPage
&
102
operator=
(
const
VSyscallPage
&in)
103
{
104
if
(
this
== &in)
105
return
*
this
;
106
107
base
= in.
base
;
108
size
= in.
size
;
109
vtimeOffset
= in.
vtimeOffset
;
110
vgettimeofdayOffset
= in.
vgettimeofdayOffset
;
111
112
return
*
this
;
113
}
114
};
115
VSyscallPage
vsyscallPage
;
116
117
public
:
118
X86_64Process
(
const
ProcessParams &
params
,
119
::
Loader::ObjectFile
*
objFile
);
120
121
void
argsInit
(
int
pageSize);
122
void
initState
()
override
;
123
124
void
clone
(
ThreadContext
*old_tc,
ThreadContext
*new_tc,
125
Process
*process,
RegVal
flags)
override
;
126
};
127
128
class
I386Process
:
public
X86Process
129
{
130
protected
:
131
class
VSyscallPage
132
{
133
public
:
134
Addr
base
;
135
Addr
size
;
136
Addr
vsyscallOffset
;
137
Addr
vsysexitOffset
;
138
139
VSyscallPage
&
140
operator=
(
const
VSyscallPage
&in)
141
{
142
if
(
this
== &in)
143
return
*
this
;
144
145
base
= in.
base
;
146
size
= in.
size
;
147
vsyscallOffset
= in.
vsyscallOffset
;
148
vsysexitOffset
= in.
vsysexitOffset
;
149
150
return
*
this
;
151
}
152
};
153
VSyscallPage
vsyscallPage
;
154
155
public
:
156
I386Process
(
const
ProcessParams &
params
,
157
::
Loader::ObjectFile
*
objFile
);
158
159
const
VSyscallPage
&
getVSyscallPage
()
const
{
return
vsyscallPage
; }
160
161
void
argsInit
(
int
pageSize);
162
void
initState
()
override
;
163
164
void
clone
(
ThreadContext
*old_tc,
ThreadContext
*new_tc,
165
Process
*process,
RegVal
flags)
override
;
166
};
167
168
}
169
170
#endif // __ARCH_X86_PROCESS_HH__
pagetable.hh
X86ISA::M5_AT_SYSINFO_EHDR
@ M5_AT_SYSINFO_EHDR
Definition:
process.hh:55
X86ISA::X86Process
Definition:
process.hh:58
X86ISA::I386Process::I386Process
I386Process(const ProcessParams ¶ms, ::Loader::ObjectFile *objFile)
Definition:
process.cc:120
X86ISA::I386Process::initState
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Definition:
process.cc:589
Process
Definition:
process.hh:65
X86ISA::X86Process::gdtSize
Addr gdtSize() const
Definition:
process.hh:72
X86ISA::I386Process::VSyscallPage::vsyscallOffset
Addr vsyscallOffset
Definition:
process.hh:136
X86ISA::X86Process::operator=
X86Process & operator=(const X86Process &in)
Definition:
process.hh:78
X86ISA::X86Process::clone
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process, RegVal flags) override
Definition:
process.cc:91
std::vector
STL vector class.
Definition:
stl.hh:37
X86ISA::M5_AT_SYSINFO
@ M5_AT_SYSINFO
Definition:
process.hh:54
X86ISA::I386Process::VSyscallPage::vsysexitOffset
Addr vsysexitOffset
Definition:
process.hh:137
X86ISA::X86_64Process::VSyscallPage
Definition:
process.hh:93
X86ISA::I386Process::VSyscallPage::size
Addr size
Definition:
process.hh:135
X86ISA::X86_64Process::VSyscallPage::size
Addr size
Definition:
process.hh:97
Loader::ObjectFile
Definition:
object_file.hh:74
X86ISA::X86_64Process
Definition:
process.hh:90
AuxVector
Definition:
aux_vector.hh:38
X86ISA::X86_64Process::vsyscallPage
VSyscallPage vsyscallPage
Definition:
process.hh:115
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition:
thread_context.hh:88
X86ISA::I386Process
Definition:
process.hh:128
multi_level_page_table.hh
X86ISA::I386Process::argsInit
void argsInit(int pageSize)
Definition:
process.cc:1000
X86ISA::X86Process::_gdtStart
Addr _gdtStart
Definition:
process.hh:61
process.hh
X86ISA::X86_64Process::argsInit
void argsInit(int pageSize)
Definition:
process.cc:992
X86ISA::X86AuxiliaryVectorTypes
X86AuxiliaryVectorTypes
Definition:
process.hh:53
X86ISA
This is exposed globally, independent of the ISA.
Definition:
acpi.hh:55
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition:
types.hh:148
Process::objFile
::Loader::ObjectFile * objFile
Definition:
process.hh:208
X86ISA::X86_64Process::clone
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process, RegVal flags) override
Definition:
process.cc:1011
X86ISA::I386Process::VSyscallPage
Definition:
process.hh:131
X86ISA::X86_64Process::VSyscallPage::operator=
VSyscallPage & operator=(const VSyscallPage &in)
Definition:
process.hh:102
X86ISA::X86_64Process::VSyscallPage::vgettimeofdayOffset
Addr vgettimeofdayOffset
Definition:
process.hh:99
aux_vector.hh
X86ISA::X86Process::_gdtSize
Addr _gdtSize
Definition:
process.hh:62
X86ISA::X86_64Process::X86_64Process
X86_64Process(const ProcessParams ¶ms, ::Loader::ObjectFile *objFile)
Definition:
process.cc:99
X86ISA::X86_64Process::VSyscallPage::vtimeOffset
Addr vtimeOffset
Definition:
process.hh:98
X86ISA::I386Process::clone
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process, RegVal flags) override
Definition:
process.cc:1019
X86ISA::I386Process::vsyscallPage
VSyscallPage vsyscallPage
Definition:
process.hh:153
X86ISA::I386Process::VSyscallPage::base
Addr base
Definition:
process.hh:134
X86ISA::X86Process::argsInit
void argsInit(int pageSize, std::vector< AuxVector< IntType > > extraAuxvs)
Definition:
process.cc:709
X86ISA::X86_64Process::initState
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Definition:
process.cc:147
X86ISA::I386Process::getVSyscallPage
const VSyscallPage & getVSyscallPage() const
Definition:
process.hh:159
X86ISA::I386Process::VSyscallPage::operator=
VSyscallPage & operator=(const VSyscallPage &in)
Definition:
process.hh:140
SimObject::params
const Params & params() const
Definition:
sim_object.hh:168
X86ISA::X86Process::X86Process
X86Process(const ProcessParams ¶ms, ::Loader::ObjectFile *objFile)
Definition:
process.cc:79
X86ISA::X86Process::gdtStart
Addr gdtStart() const
Definition:
process.hh:71
RegVal
uint64_t RegVal
Definition:
types.hh:174
X86ISA::X86_64Process::VSyscallPage::base
Addr base
Definition:
process.hh:96
SyscallDesc
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition:
syscall_desc.hh:66
Generated on Tue Jun 22 2021 15:28:21 for gem5 by
doxygen
1.8.17