gem5
[DEVELOP-FOR-23.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
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
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
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
y
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
a
b
c
d
g
h
i
l
m
r
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
mem
shared_memory_server.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2022 Google, Inc.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are
6
* met: redistributions of source code must retain the above copyright
7
* notice, this list of conditions and the following disclaimer;
8
* redistributions in binary form must reproduce the above copyright
9
* notice, this list of conditions and the following disclaimer in the
10
* documentation and/or other materials provided with the distribution;
11
* neither the name of the copyright holders nor the names of its
12
* contributors may be used to endorse or promote products derived from
13
* this software without specific prior written permission.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef __MEM_SHARED_MEMORY_SERVER_HH__
29
#define __MEM_SHARED_MEMORY_SERVER_HH__
30
31
#include <memory>
32
#include <string>
33
#include <unordered_map>
34
35
#include "
base/pollevent.hh
"
36
#include "
base/socket.hh
"
37
#include "params/SharedMemoryServer.hh"
38
#include "
sim/sim_object.hh
"
39
#include "
sim/system.hh
"
40
41
namespace
gem5
42
{
43
namespace
memory
44
{
45
46
class
SharedMemoryServer
:
public
SimObject
47
{
48
public
:
49
enum class
RequestType
: int
50
{
51
kGetPhysRange
= 0,
52
};
53
54
explicit
SharedMemoryServer
(
const
SharedMemoryServerParams&
params
);
55
~SharedMemoryServer
();
56
57
private
:
58
class
BaseShmPollEvent
:
public
PollEvent
59
{
60
public
:
61
BaseShmPollEvent
(
int
fd
,
SharedMemoryServer
* shm_server);
62
63
const
std::string&
name
()
const
;
64
65
protected
:
66
bool
tryReadAll
(
void
* buffer,
size_t
size);
67
68
SharedMemoryServer
*
shmServer
;
69
std::string
eventName
;
70
};
71
72
class
ListenSocketEvent
:
public
BaseShmPollEvent
73
{
74
public
:
75
using
BaseShmPollEvent::BaseShmPollEvent
;
76
void
process
(
int
revent)
override
;
77
};
78
79
class
ClientSocketEvent
:
public
BaseShmPollEvent
80
{
81
public
:
82
using
BaseShmPollEvent::BaseShmPollEvent
;
83
void
process
(
int
revent)
override
;
84
};
85
86
System
*
system
;
87
88
ListenSocketPtr
listener
;
89
90
std::unique_ptr<ListenSocketEvent>
listenSocketEvent
;
91
std::unordered_map<int, std::unique_ptr<ClientSocketEvent>>
92
clientSocketEvents
;
93
};
94
95
}
// namespace memory
96
}
// namespace gem5
97
98
#endif // __MEM_SHARED_MEMORY_SERVER_HH__
gem5::memory::SharedMemoryServer::RequestType
RequestType
Definition:
shared_memory_server.hh:49
socket.hh
gem5::memory::SharedMemoryServer::clientSocketEvents
std::unordered_map< int, std::unique_ptr< ClientSocketEvent > > clientSocketEvents
Definition:
shared_memory_server.hh:92
system.hh
gem5::ArmISA::fd
Bitfield< 14, 12 > fd
Definition:
types.hh:150
gem5::memory::SharedMemoryServer::RequestType::kGetPhysRange
@ kGetPhysRange
memory
Definition:
mem.h:38
gem5::memory::SharedMemoryServer::system
System * system
Definition:
shared_memory_server.hh:86
gem5::memory::SharedMemoryServer::ClientSocketEvent
Definition:
shared_memory_server.hh:79
gem5::PollEvent
Definition:
pollevent.hh:43
gem5::memory::SharedMemoryServer::listener
ListenSocketPtr listener
Definition:
shared_memory_server.hh:88
gem5::memory::SharedMemoryServer::BaseShmPollEvent::tryReadAll
bool tryReadAll(void *buffer, size_t size)
Definition:
shared_memory_server.cc:114
gem5::memory::SharedMemoryServer::BaseShmPollEvent::eventName
std::string eventName
Definition:
shared_memory_server.hh:69
gem5::System
Definition:
system.hh:74
gem5::memory::SharedMemoryServer::~SharedMemoryServer
~SharedMemoryServer()
Definition:
shared_memory_server.cc:98
gem5::SimObject::params
const Params & params() const
Definition:
sim_object.hh:176
sim_object.hh
pollevent.hh
gem5::memory::SharedMemoryServer::BaseShmPollEvent
Definition:
shared_memory_server.hh:58
gem5::memory::SharedMemoryServer::SharedMemoryServer
SharedMemoryServer(const SharedMemoryServerParams ¶ms)
Definition:
shared_memory_server.cc:85
gem5::memory::SharedMemoryServer::ListenSocketEvent::process
void process(int revent) override
Definition:
shared_memory_server.cc:130
gem5::SimObject
Abstract superclass for simulation objects.
Definition:
sim_object.hh:146
gem5::memory::SharedMemoryServer::BaseShmPollEvent::shmServer
SharedMemoryServer * shmServer
Definition:
shared_memory_server.hh:68
gem5::memory::SharedMemoryServer::ClientSocketEvent::process
void process(int revent) override
Definition:
shared_memory_server.cc:140
gem5::memory::SharedMemoryServer::BaseShmPollEvent::BaseShmPollEvent
BaseShmPollEvent(int fd, SharedMemoryServer *shm_server)
Definition:
shared_memory_server.cc:100
gem5::memory::SharedMemoryServer::ListenSocketEvent
Definition:
shared_memory_server.hh:72
gem5::memory::SharedMemoryServer::listenSocketEvent
std::unique_ptr< ListenSocketEvent > listenSocketEvent
Definition:
shared_memory_server.hh:90
gem5::memory::SharedMemoryServer
Definition:
shared_memory_server.hh:46
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
gpu_translation_state.hh:37
gem5::memory::SharedMemoryServer::BaseShmPollEvent::name
const std::string & name() const
Definition:
shared_memory_server.cc:108
gem5::ListenSocketPtr
std::unique_ptr< ListenSocket > ListenSocketPtr
Definition:
socket.hh:112
Generated on Sun Jul 30 2023 01:56:59 for gem5 by
doxygen
1.8.17