gem5
v24.1.0.1
Loading...
Searching...
No Matches
arch
x86
linux
syscalls.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2020 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 __ARCH_X86_LINUX_SYSCALLS_HH__
29
#define __ARCH_X86_LINUX_SYSCALLS_HH__
30
31
#include "
arch/x86/linux/linux.hh
"
32
#include "
base/bitunion.hh
"
33
#include "
sim/se_workload.hh
"
34
#include "
sim/syscall_emul.hh
"
35
36
namespace
gem5
37
{
38
39
namespace
X86ISA
40
{
41
42
SyscallReturn
unameFunc
(SyscallDesc *desc, ThreadContext *tc,
43
VPtr<Linux::utsname>
name
);
44
45
SyscallReturn
archPrctlFunc
(SyscallDesc *desc, ThreadContext *tc,
46
int
code, uint64_t
addr
);
47
48
BitUnion32
(UserDescFlags)
49
Bitfield<0> seg_32bit;
50
Bitfield<2, 1>
contents
;
51
Bitfield<3>
read_exec_only
;
52
Bitfield<4>
limit_in_pages
;
53
Bitfield<5>
seg_not_present
;
54
Bitfield<6>
useable
;
55
EndBitUnion
(UserDescFlags)
56
57
struct
UserDesc32
58
{
59
uint32_t entry_number;
60
uint32_t base_addr;
61
uint32_t
limit
;
62
uint32_t
flags
;
63
};
64
65
SyscallReturn
setThreadArea32Func
(
SyscallDesc
*desc,
ThreadContext
*tc,
66
VPtr<UserDesc32>
userDesc);
67
68
}
// namespace X86ISA
69
}
// namespace gem5
70
71
#endif
// __ARCH_X86_LINUX_SYSCALLS_HH__
linux.hh
bitunion.hh
BitUnion32
#define BitUnion32(name)
Definition
bitunion.hh:495
gem5::ProxyPtr
Definition
proxy_ptr.hh:239
gem5::SyscallDesc
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition
syscall_desc.hh:70
gem5::SyscallReturn
This class represents the return value from an emulated system call, including any errno setting.
Definition
syscall_return.hh:56
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition
thread_context.hh:89
EndBitUnion
#define EndBitUnion(name)
This closes off the class and union started by the above macro.
Definition
bitunion.hh:428
flags
uint8_t flags
Definition
helpers.cc:87
gem5::X86ISA::limit_in_pages
Bitfield< 4 > limit_in_pages
Definition
syscalls.hh:52
gem5::X86ISA::read_exec_only
Bitfield< 3 > read_exec_only
Definition
syscalls.hh:51
gem5::X86ISA::unameFunc
SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Definition
syscalls.cc:49
gem5::X86ISA::contents
Bitfield< 2, 1 > contents
Definition
syscalls.hh:50
gem5::X86ISA::limit
BitfieldType< SegDescriptorLimit > limit
Definition
misc.hh:959
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition
types.hh:84
gem5::X86ISA::archPrctlFunc
SyscallReturn archPrctlFunc(SyscallDesc *desc, ThreadContext *tc, int code, uint64_t addr)
Definition
syscalls.cc:63
gem5::X86ISA::useable
Bitfield< 6 > useable
Definition
syscalls.hh:54
gem5::X86ISA::setThreadArea32Func
SyscallReturn setThreadArea32Func(SyscallDesc *desc, ThreadContext *tc, VPtr< UserDesc32 > userDesc)
Definition
syscalls.cc:100
gem5::X86ISA::seg_not_present
Bitfield< 5 > seg_not_present
Definition
syscalls.hh:53
gem5
Copyright (c) 2024 Arm Limited All rights reserved.
Definition
binary32.hh:36
se_workload.hh
syscall_emul.hh
This file defines objects used to emulate syscalls from the target application on the host machine.
name
const std::string & name()
Definition
trace.cc:48
Generated on Mon Jan 13 2025 04:28:28 for gem5 by
doxygen
1.9.8