gem5  v21.1.0.2
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 
66  VPtr<UserDesc32> userDesc);
67 
68 } // namespace X86ISA
69 } // namespace gem5
70 
71 #endif // __ARCH_X86_LINUX_SYSCALLS_HH__
gem5::X86ISA::useable
Bitfield< 6 > useable
Definition: syscalls.hh:54
gem5::SyscallReturn
This class represents the return value from an emulated system call, including any errno setting.
Definition: syscall_return.hh:55
gem5::X86ISA::archPrctlFunc
SyscallReturn archPrctlFunc(SyscallDesc *desc, ThreadContext *tc, int code, uint64_t addr)
Definition: syscalls.cc:62
gem5::X86ISA::unameFunc
SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Definition: syscalls.cc:48
gem5::X86ISA::read_exec_only
Bitfield< 3 > read_exec_only
Definition: syscalls.hh:51
gem5::X86ISA::limit
BitfieldType< SegDescriptorLimit > limit
Definition: misc.hh:930
gem5::X86ISA::limit_in_pages
Bitfield< 4 > limit_in_pages
Definition: syscalls.hh:52
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:93
gem5::X86ISA::seg_not_present
Bitfield< 5 > seg_not_present
Definition: syscalls.hh:53
bitunion.hh
gem5::ProxyPtr
Definition: proxy_ptr.hh:238
gem5::X86ISA::contents
Bitfield< 2, 1 > contents
Definition: syscalls.hh:50
name
const std::string & name()
Definition: trace.cc:49
gem5::X86ISA::setThreadArea32Func
SyscallReturn setThreadArea32Func(SyscallDesc *desc, ThreadContext *tc, VPtr< UserDesc32 > userDesc)
Definition: syscalls.cc:99
gem5::X86ISA::BitUnion32
BitUnion32(TriggerIntMessage) Bitfield< 7
syscall_emul.hh
linux.hh
gem5::SyscallDesc
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition: syscall_desc.hh:69
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::X86ISA::EndBitUnion
EndBitUnion(TriggerIntMessage) GEM5_DEPRECATED_NAMESPACE(DeliveryMode
se_workload.hh
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Tue Sep 21 2021 12:24:52 for gem5 by doxygen 1.8.17