gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Static Public Member Functions | Static Public Attributes | List of all members
MipsLinux Class Reference

#include <linux.hh>

Inheritance diagram for MipsLinux:
Linux OperatingSystem

Classes

struct  tgt_sysinfo
 

Static Public Member Functions

static bool isTtyReq (unsigned req)
 
- Static Public Member Functions inherited from Linux
static bool isTtyReq (unsigned req)
 Return true for the ioctl codes for which we return ENOTTY without printing a warning, since we know that ENOTTY is the correct thing to return (and not just a sign that we don't recognize the ioctl code. More...
 
static int openSpecialFile (std::string path, Process *process, ThreadContext *tc)
 
static std::string procMeminfo (Process *process, ThreadContext *tc)
 
static std::string etcPasswd (Process *process, ThreadContext *tc)
 
- Static Public Member Functions inherited from OperatingSystem
static int openSpecialFile (std::string path, Process *process, ThreadContext *tc)
 

Static Public Attributes

static const int TGT_SIGHUP = 0x000001
 
static const int TGT_SIGINT = 0x000002
 
static const int TGT_SIGQUIT = 0x000003
 
static const int TGT_SIGILL = 0x000004
 
static const int TGT_SIGTRAP = 0x000005
 
static const int TGT_SIGIOT = 0x000006
 
static const int TGT_SIGABRT = 0x000006
 
static const int TGT_SIGEMT = 0x000007
 
static const int TGT_SIGFPE = 0x000008
 
static const int TGT_SIGKILL = 0x000009
 
static const int TGT_SIGBUS = 0x00000a
 
static const int TGT_SIGSEGV = 0x00000b
 
static const int TGT_SIGSYS = 0x00000c
 
static const int TGT_SIGPIPE = 0x00000d
 
static const int TGT_SIGALRM = 0x00000e
 
static const int TGT_SIGTERM = 0x00000f
 
static const int TGT_SIGUSR1 = 0x000010
 
static const int TGT_SIGUSR2 = 0x000011
 
static const int TGT_SIGCHLD = 0x000012
 
static const int TGT_SIGCLD = 0x000012
 
static const int TGT_SIGPWR = 0x000013
 
static const int TGT_SIGWINCH = 0x000014
 
static const int TGT_SIGURG = 0x000015
 
static const int TGT_SIGIO = 0x000016
 
static const int TGT_SIGPOLL = 0x000016
 
static const int TGT_SIGSTOP = 0x000017
 
static const int TGT_SIGTSTP = 0x000018
 
static const int TGT_SIGCONT = 0x000019
 
static const int TGT_SIGTTIN = 0x00001a
 
static const int TGT_SIGTTOU = 0x00001b
 
static const int TGT_SIGVTALRM = 0x00001c
 
static const int TGT_SIGPROF = 0x00001d
 
static const int TGT_SIGXCPU = 0x00001e
 
static const int TGT_SIGXFSZ = 0x00001f
 
static SyscallFlagTransTable openFlagTable []
 This table maps the target open() flags to the corresponding host open() flags. More...
 
static const int NUM_OPEN_FLAGS
 Number of entries in openFlagTable[]. More...
 
static const unsigned TGT_MAP_SHARED = 0x00001
 
static const unsigned TGT_MAP_PRIVATE = 0x00002
 
static const unsigned TGT_MAP_ANON = 0x00800
 
static const unsigned TGT_MAP_DENYWRITE = 0x02000
 
static const unsigned TGT_MAP_EXECUTABLE = 0x04000
 
static const unsigned TGT_MAP_FILE = 0x00000
 
static const unsigned TGT_MAP_GROWSDOWN = 0x01000
 
static const unsigned TGT_MAP_HUGETLB = 0x80000
 
static const unsigned TGT_MAP_LOCKED = 0x08000
 
static const unsigned TGT_MAP_NONBLOCK = 0x20000
 
static const unsigned TGT_MAP_NORESERVE = 0x00400
 
static const unsigned TGT_MAP_POPULATE = 0x10000
 
static const unsigned TGT_MAP_STACK = 0x40000
 
static const unsigned TGT_MAP_ANONYMOUS = 0x00800
 
static const unsigned TGT_MAP_FIXED = 0x00010
 
static const unsigned NUM_MMAP_FLAGS
 
static const int TBL_SYSINFO = 12
 For table(). More...
 
static const unsigned TGT_RLIMIT_NPROC = 8
 Resource constants for getrlimit() (overide some generics). More...
 
static const unsigned TGT_RLIMIT_AS = 6
 
static const unsigned TGT_RLIMIT_RSS = 7
 
static const unsigned TGT_RLIMIT_NOFILE = 5
 
static const unsigned TGT_RLIMIT_MEMLOCK = 9
 
static const int NUM_ROOT_PROCS = 2
 Offset used to make sure that processes don't assign themselves to process IDs reserved for the root users. More...
 
static const int TGT_O_RDONLY = 0x00000000
 open(2) flag values. More...
 
static const int TGT_O_WRONLY = 0x00000001
 O_WRONLY. More...
 
static const int TGT_O_RDWR = 0x00000002
 O_RDWR. More...
 
static const int TGT_O_CREAT = 0x00000100
 O_CREAT. More...
 
static const int TGT_O_EXCL = 0x00000400
 O_EXCL. More...
 
static const int TGT_O_NOCTTY = 0x00000800
 O_NOCTTY. More...
 
static const int TGT_O_TRUNC = 0x00000200
 O_TRUNC. More...
 
static const int TGT_O_APPEND = 0x00000008
 O_APPEND. More...
 
static const int TGT_O_NONBLOCK = 0x00000080
 O_NONBLOCK. More...
 
static const int TGT_O_DSYNC = 0x00000010
 O_DSYNC. More...
 
static const int TGT_FASYNC = 0x00001000
 O_FASYNC. More...
 
static const int TGT_O_DIRECT = 0x00008000
 O_DIRECT. More...
 
static const int TGT_O_LARGEFILE = 0x00002000
 O_LARGEFILE. More...
 
static const int TGT_O_DIRECTORY = 0x00010000
 O_DIRECTORY. More...
 
static const int TGT_O_NOFOLLOW = 0x00020000
 O_NOFOLLOW. More...
 
static const int TGT_O_NOATIME = 0x00040000
 O_NOATIME. More...
 
static const int TGT_O_CLOEXEC = 0x00080000
 O_CLOEXEC. More...
 
static const int TGT_O_SYNC = 0x00004010
 O_SYNC. More...
 
static const int TGT_O_PATH = 0x00200000
 O_PATH. More...
 
static const unsigned GSI_PLATFORM_NAME = 103
 For getsysinfo(). More...
 
static const unsigned GSI_CPU_INFO = 59
 CPU information. More...
 
static const unsigned GSI_PROC_TYPE = 60
 get proc_type More...
 
static const unsigned GSI_MAX_CPU = 30
 max # cpu's on this machine More...
 
static const unsigned GSI_CPUS_IN_BOX = 55
 number of CPUs in system More...
 
static const unsigned GSI_PHYSMEM = 19
 Physical memory in KB. More...
 
static const unsigned GSI_CLK_TCK = 42
 clock freq in Hz More...
 
static const unsigned SSI_IEEE_FP_CONTROL = 14
 For setsysinfo(). More...
 
static const unsigned TGT_TCGETA = 0x5401
 ioctl() command codes. More...
 
static const unsigned TGT_TCSETAW = 0x5403
 
static const unsigned TGT_TCGETS = 0x540d
 
static const unsigned TGT_FIONREAD = 0x467f
 
static const unsigned TGT_TIOCGETP = 0x7408
 
static const unsigned TGT_TIOCSETP = 0x7409
 
static const unsigned TGT_TIOCSETN = 0x740a
 
- Static Public Attributes inherited from Linux
static const int _SYS_NMLN = 65
 Length of strings in struct utsname (plus 1 for null char). More...
 
static const int M5_SC_CLK_TCK = 100
 Clock ticks per second, for times(). More...
 
static const unsigned TGT_RLIMIT_CPU = 0
 Resource constants for getrlimit(). More...
 
static const unsigned TGT_RLIMIT_FSIZE = 1
 
static const unsigned TGT_RLIMIT_DATA = 2
 
static const unsigned TGT_RLIMIT_STACK = 3
 
static const unsigned TGT_RLIMIT_CORE = 4
 
static const unsigned TGT_RLIMIT_RSS = 5
 
static const unsigned TGT_RLIMIT_NPROC = 6
 
static const unsigned TGT_RLIMIT_NOFILE = 7
 
static const unsigned TGT_RLIMIT_MEMLOCK = 8
 
static const unsigned TGT_RLIMIT_AS = 9
 
static const unsigned TGT_RLIMIT_LOCKS = 10
 
static const unsigned TGT_RLIMIT_SIGPENDING = 11
 
static const unsigned TGT_RLIMIT_MSGQUEUE = 12
 
static const unsigned TGT_RLIMIT_NICE = 13
 
static const unsigned TGT_RLIMIT_RTPRIO = 14
 
static const unsigned TGT_RLIMIT_RTTIME = 15
 
static const unsigned TGT_RLIM_NLIMITS = 16
 
static const int TGT_RUSAGE_SELF = 0
 For getrusage(). More...
 
static const int TGT_RUSAGE_CHILDREN = -1
 
static const int TGT_RUSAGE_BOTH = -2
 
static const unsigned TGT_FUTEX_WAIT = 0
 
static const unsigned TGT_FUTEX_WAKE = 1
 
static const unsigned TGT_EAGAIN = 11
 
static const unsigned TGT_EWOULDBLOCK = TGT_EAGAIN
 
static const unsigned TGT_FUTEX_PRIVATE_FLAG = 128
 
static const int TGT_AT_FDCWD = -100
 
static const unsigned TGT_MREMAP_MAYMOVE = 0x1
 
static const unsigned TGT_MREMAP_FIXED = 0x2
 
static const unsigned TGT_CLONE_VM = 0x00000100
 
static const unsigned TGT_CLONE_FS = 0x00000200
 
static const unsigned TGT_CLONE_FILES = 0x00000400
 
static const unsigned TGT_CLONE_SIGHAND = 0x00000800
 
static const unsigned TGT_CLONE_PTRACE = 0x00002000
 
static const unsigned TGT_CLONE_VFORK = 0x00004000
 
static const unsigned TGT_CLONE_PARENT = 0x00008000
 
static const unsigned TGT_CLONE_THREAD = 0x00010000
 
static const unsigned TGT_CLONE_NEWNS = 0x00020000
 
static const unsigned TGT_CLONE_SYSVSEM = 0x00040000
 
static const unsigned TGT_CLONE_SETTLS = 0x00080000
 
static const unsigned TGT_CLONE_PARENT_SETTID = 0x00100000
 
static const unsigned TGT_CLONE_CHILD_CLEARTID = 0x00200000
 
static const unsigned TGT_CLONE_DETACHED = 0x00400000
 
static const unsigned TGT_CLONE_UNTRACED = 0x00800000
 
static const unsigned TGT_CLONE_CHILD_SETTID = 0x01000000
 
static const unsigned TGT_CLONE_NEWUTS = 0x04000000
 
static const unsigned TGT_CLONE_NEWIPC = 0x08000000
 
static const unsigned TGT_CLONE_NEWUSER = 0x10000000
 
static const unsigned TGT_CLONE_NEWPID = 0x20000000
 
static const unsigned TGT_CLONE_NEWNET = 0x40000000
 
static const unsigned TGT_CLONE_IO = 0x80000000
 
static const unsigned TGT_TCGETS = 0x5401
 ioctl() command codes. More...
 
static const unsigned TGT_TCGETA = 0x5405
 
static const unsigned TGT_TCSETAW = 0x5407
 
static const unsigned TGT_FIONREAD = 0x541B
 
- Static Public Attributes inherited from OperatingSystem
static const int _SYS_NMLN = 65
 Length of strings in struct utsname (plus 1 for null char). More...
 

Additional Inherited Members

- Public Types inherited from Linux
typedef uint64_t size_t
 Basic Linux types. More...
 
typedef uint64_t off_t
 
typedef int64_t time_t
 
typedef int64_t clock_t
 
typedef uint32_t uid_t
 
typedef uint32_t gid_t
 
- Public Types inherited from OperatingSystem
typedef void tgt_stat
 Stat buffer. More...
 
typedef void tgt_stat64
 

Detailed Description

Definition at line 36 of file linux.hh.

Member Function Documentation

static bool MipsLinux::isTtyReq ( unsigned  req)
inlinestatic

Definition at line 151 of file linux.hh.

References TGT_FIONREAD, TGT_TCGETA, TGT_TCGETS, TGT_TCSETAW, TGT_TIOCGETP, TGT_TIOCSETN, and TGT_TIOCSETP.

Member Data Documentation

const unsigned MipsLinux::GSI_CLK_TCK = 42
static

clock freq in Hz

Definition at line 131 of file linux.hh.

const unsigned MipsLinux::GSI_CPU_INFO = 59
static

CPU information.

Definition at line 126 of file linux.hh.

const unsigned MipsLinux::GSI_CPUS_IN_BOX = 55
static

number of CPUs in system

Definition at line 129 of file linux.hh.

const unsigned MipsLinux::GSI_MAX_CPU = 30
static

max # cpu's on this machine

Definition at line 128 of file linux.hh.

const unsigned MipsLinux::GSI_PHYSMEM = 19
static

Physical memory in KB.

Definition at line 130 of file linux.hh.

const unsigned MipsLinux::GSI_PLATFORM_NAME = 103
static

For getsysinfo().

platform name as string

Definition at line 125 of file linux.hh.

const unsigned MipsLinux::GSI_PROC_TYPE = 60
static

get proc_type

Definition at line 127 of file linux.hh.

const unsigned MipsLinux::NUM_MMAP_FLAGS
static

Definition at line 121 of file linux.hh.

const int MipsLinux::NUM_OPEN_FLAGS
static

Number of entries in openFlagTable[].

Definition at line 80 of file linux.hh.

const int MipsLinux::NUM_ROOT_PROCS = 2
static

Offset used to make sure that processes don't assign themselves to process IDs reserved for the root users.

Definition at line 180 of file linux.hh.

SyscallFlagTransTable MipsLinux::openFlagTable[]
static

This table maps the target open() flags to the corresponding host open() flags.

Definition at line 77 of file linux.hh.

const unsigned MipsLinux::SSI_IEEE_FP_CONTROL = 14
static

For setsysinfo().

ieee_set_fp_control()

Definition at line 136 of file linux.hh.

const int MipsLinux::TBL_SYSINFO = 12
static

For table().

Definition at line 168 of file linux.hh.

const int MipsLinux::TGT_FASYNC = 0x00001000
static

O_FASYNC.

Definition at line 94 of file linux.hh.

const unsigned MipsLinux::TGT_FIONREAD = 0x467f
static

Definition at line 144 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_MAP_ANON = 0x00800
static

Definition at line 107 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_ANONYMOUS = 0x00800
static

Definition at line 118 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_DENYWRITE = 0x02000
static

Definition at line 108 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_EXECUTABLE = 0x04000
static

Definition at line 109 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_FILE = 0x00000
static

Definition at line 110 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_FIXED = 0x00010
static

Definition at line 119 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_GROWSDOWN = 0x01000
static

Definition at line 111 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_HUGETLB = 0x80000
static

Definition at line 112 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_LOCKED = 0x08000
static

Definition at line 113 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_NONBLOCK = 0x20000
static

Definition at line 114 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_NORESERVE = 0x00400
static

Definition at line 115 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_POPULATE = 0x10000
static

Definition at line 116 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_PRIVATE = 0x00002
static

Definition at line 106 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_SHARED = 0x00001
static

Definition at line 105 of file linux.hh.

const unsigned MipsLinux::TGT_MAP_STACK = 0x40000
static

Definition at line 117 of file linux.hh.

const int MipsLinux::TGT_O_APPEND = 0x00000008
static

O_APPEND.

Definition at line 91 of file linux.hh.

const int MipsLinux::TGT_O_CLOEXEC = 0x00080000
static

O_CLOEXEC.

Definition at line 100 of file linux.hh.

const int MipsLinux::TGT_O_CREAT = 0x00000100
static

O_CREAT.

Definition at line 87 of file linux.hh.

const int MipsLinux::TGT_O_DIRECT = 0x00008000
static

O_DIRECT.

Definition at line 95 of file linux.hh.

const int MipsLinux::TGT_O_DIRECTORY = 0x00010000
static

O_DIRECTORY.

Definition at line 97 of file linux.hh.

const int MipsLinux::TGT_O_DSYNC = 0x00000010
static

O_DSYNC.

Definition at line 93 of file linux.hh.

const int MipsLinux::TGT_O_EXCL = 0x00000400
static

O_EXCL.

Definition at line 88 of file linux.hh.

const int MipsLinux::TGT_O_LARGEFILE = 0x00002000
static

O_LARGEFILE.

Definition at line 96 of file linux.hh.

const int MipsLinux::TGT_O_NOATIME = 0x00040000
static

O_NOATIME.

Definition at line 99 of file linux.hh.

const int MipsLinux::TGT_O_NOCTTY = 0x00000800
static

O_NOCTTY.

Definition at line 89 of file linux.hh.

const int MipsLinux::TGT_O_NOFOLLOW = 0x00020000
static

O_NOFOLLOW.

Definition at line 98 of file linux.hh.

const int MipsLinux::TGT_O_NONBLOCK = 0x00000080
static

O_NONBLOCK.

Definition at line 92 of file linux.hh.

const int MipsLinux::TGT_O_PATH = 0x00200000
static

O_PATH.

Definition at line 102 of file linux.hh.

const int MipsLinux::TGT_O_RDONLY = 0x00000000
static

open(2) flag values.

O_RDONLY

Definition at line 84 of file linux.hh.

const int MipsLinux::TGT_O_RDWR = 0x00000002
static

O_RDWR.

Definition at line 86 of file linux.hh.

const int MipsLinux::TGT_O_SYNC = 0x00004010
static

O_SYNC.

Definition at line 101 of file linux.hh.

const int MipsLinux::TGT_O_TRUNC = 0x00000200
static

O_TRUNC.

Definition at line 90 of file linux.hh.

const int MipsLinux::TGT_O_WRONLY = 0x00000001
static

O_WRONLY.

Definition at line 85 of file linux.hh.

const unsigned MipsLinux::TGT_RLIMIT_AS = 6
static

Definition at line 172 of file linux.hh.

const unsigned MipsLinux::TGT_RLIMIT_MEMLOCK = 9
static

Definition at line 175 of file linux.hh.

const unsigned MipsLinux::TGT_RLIMIT_NOFILE = 5
static

Definition at line 174 of file linux.hh.

const unsigned MipsLinux::TGT_RLIMIT_NPROC = 8
static

Resource constants for getrlimit() (overide some generics).

Definition at line 171 of file linux.hh.

const unsigned MipsLinux::TGT_RLIMIT_RSS = 7
static

Definition at line 173 of file linux.hh.

const int MipsLinux::TGT_SIGABRT = 0x000006
static

Definition at line 46 of file linux.hh.

const int MipsLinux::TGT_SIGALRM = 0x00000e
static

Definition at line 54 of file linux.hh.

const int MipsLinux::TGT_SIGBUS = 0x00000a
static

Definition at line 50 of file linux.hh.

const int MipsLinux::TGT_SIGCHLD = 0x000012
static

Definition at line 58 of file linux.hh.

const int MipsLinux::TGT_SIGCLD = 0x000012
static

Definition at line 59 of file linux.hh.

const int MipsLinux::TGT_SIGCONT = 0x000019
static

Definition at line 67 of file linux.hh.

const int MipsLinux::TGT_SIGEMT = 0x000007
static

Definition at line 47 of file linux.hh.

const int MipsLinux::TGT_SIGFPE = 0x000008
static

Definition at line 48 of file linux.hh.

const int MipsLinux::TGT_SIGHUP = 0x000001
static

Definition at line 40 of file linux.hh.

const int MipsLinux::TGT_SIGILL = 0x000004
static

Definition at line 43 of file linux.hh.

const int MipsLinux::TGT_SIGINT = 0x000002
static

Definition at line 41 of file linux.hh.

const int MipsLinux::TGT_SIGIO = 0x000016
static

Definition at line 63 of file linux.hh.

const int MipsLinux::TGT_SIGIOT = 0x000006
static

Definition at line 45 of file linux.hh.

const int MipsLinux::TGT_SIGKILL = 0x000009
static

Definition at line 49 of file linux.hh.

const int MipsLinux::TGT_SIGPIPE = 0x00000d
static

Definition at line 53 of file linux.hh.

const int MipsLinux::TGT_SIGPOLL = 0x000016
static

Definition at line 64 of file linux.hh.

const int MipsLinux::TGT_SIGPROF = 0x00001d
static

Definition at line 71 of file linux.hh.

const int MipsLinux::TGT_SIGPWR = 0x000013
static

Definition at line 60 of file linux.hh.

const int MipsLinux::TGT_SIGQUIT = 0x000003
static

Definition at line 42 of file linux.hh.

const int MipsLinux::TGT_SIGSEGV = 0x00000b
static

Definition at line 51 of file linux.hh.

const int MipsLinux::TGT_SIGSTOP = 0x000017
static

Definition at line 65 of file linux.hh.

const int MipsLinux::TGT_SIGSYS = 0x00000c
static

Definition at line 52 of file linux.hh.

const int MipsLinux::TGT_SIGTERM = 0x00000f
static

Definition at line 55 of file linux.hh.

const int MipsLinux::TGT_SIGTRAP = 0x000005
static

Definition at line 44 of file linux.hh.

const int MipsLinux::TGT_SIGTSTP = 0x000018
static

Definition at line 66 of file linux.hh.

const int MipsLinux::TGT_SIGTTIN = 0x00001a
static

Definition at line 68 of file linux.hh.

const int MipsLinux::TGT_SIGTTOU = 0x00001b
static

Definition at line 69 of file linux.hh.

const int MipsLinux::TGT_SIGURG = 0x000015
static

Definition at line 62 of file linux.hh.

const int MipsLinux::TGT_SIGUSR1 = 0x000010
static

Definition at line 56 of file linux.hh.

const int MipsLinux::TGT_SIGUSR2 = 0x000011
static

Definition at line 57 of file linux.hh.

const int MipsLinux::TGT_SIGVTALRM = 0x00001c
static

Definition at line 70 of file linux.hh.

const int MipsLinux::TGT_SIGWINCH = 0x000014
static

Definition at line 61 of file linux.hh.

const int MipsLinux::TGT_SIGXCPU = 0x00001e
static

Definition at line 72 of file linux.hh.

const int MipsLinux::TGT_SIGXFSZ = 0x00001f
static

Definition at line 73 of file linux.hh.

const unsigned MipsLinux::TGT_TCGETA = 0x5401
static

ioctl() command codes.

Definition at line 141 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_TCGETS = 0x540d
static

Definition at line 143 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_TCSETAW = 0x5403
static

Definition at line 142 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_TIOCGETP = 0x7408
static

Definition at line 145 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_TIOCSETN = 0x740a
static

Definition at line 147 of file linux.hh.

Referenced by isTtyReq().

const unsigned MipsLinux::TGT_TIOCSETP = 0x7409
static

Definition at line 146 of file linux.hh.

Referenced by isTtyReq().


The documentation for this class was generated from the following file:

Generated on Fri Jun 9 2017 13:04:15 for gem5 by doxygen 1.8.6