]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/5e
merge
[plan9front.git] / sys / man / 1 / 5e
1 .TH 5E 1
2 .SH NAME
3 5e \- user-mode ARM emulation
4 .SH SYNOPSIS
5 .B 5e
6 [
7 .B -npbF
8 ]
9 .I text
10 [
11 .I arguments
12 ]
13 .SH DESCRIPTION
14 .I 5e
15 simulates the execution of an ARM binary in a Plan 9 environment.
16 Unlike its predecessor
17 .IR vi (1)
18 it supports, among others, the syscalls
19 rfork (see
20 .IR fork (2))
21 and
22 .IR exec (2),
23 which allows for the execution of threaded programs (e.g.,
24 .IR rio (1)
25 or catclock (see
26 .IR games (1)).
27 .PP
28 .I 5e
29 executes the specified binary
30 .IR text ,
31 which is prepended by
32 .B /bin
33 if it does not begin with a slash, dot or hash sign.
34 Unless
35 .B -n
36 is specified,
37 .B /bin
38 is replaced by the union of
39 .B /arm/bin
40 and
41 .BR /rc/bin .
42 .PP
43 Unlike
44 .IR vi (1),
45 .IR 5e (1)
46 does not provide built-in debugging facilities.
47 It
48 .I does
49 provide emulation of the
50 .B /proc
51 directory, if the
52 .B -p
53 flag is specified, to attach a proper debugger like
54 .IR acid (1).
55 There is no equivalent of the profiling facilities, no caches or TLBs are simulated, either.
56 .PP
57 .IR 5e (1)
58 currently has three options.
59 .TP
60 .B -n
61 By default,
62 .IR 5e (1)
63 replaces
64 .B /bin
65 as mentioned above and also sets the variables
66 .B cputype
67 and
68 .B objtype
69 to
70 .BR arm.
71 Supplying the
72 .B -n
73 option suppresses this behaviour.
74 .TP
75 .B -p
76 The
77 .B -p
78 option activates emulation of a 
79 .B /proc
80 file system, which is mounted at
81 .B /proc
82 and also posted as
83 .BR /srv/armproc ,
84 cf.
85 .IR srv (3).
86 .TP
87 .B -b
88 Supplying
89 .B -b
90 causes failing processes to call
91 .IR abort (2)
92 instead of
93 .I sysfatal.
94 See below.
95 .TP
96 .B -F
97 Disable emulation of VFP floating point instructions.
98 .SH SOURCE
99 .B /sys/src/cmd/5e
100 .SH SEE ALSO
101 .IR vi (1)
102 .SH BUGS
103 The host is required to be little endian and is assumed to have a floating point implementation conforming to IEEE 754.
104
105 Broken processes are simulated in a rather unsatisfactory manner.
106 The
107 .B -b
108 option leaks memory.
109 The emulator does not post
110 .B sys:
111 notes.
112
113 Obscure opcodes, in particular uncommon operations on R15, are not implemented.
114
115 Accesses spanning segment boundaries will be treated as page faults.
116 Many syscalls such as pread (see
117 .IR read (2))
118 will shuffle data around (in most cases unnecessarily) if invoked on potentially shared segments of variable length, in particular the bss segment.
119
120 FPA emulation leaves much to be desired, rounding modes are ignored, all calculations are performed at extended precision.
121 Floating point exceptions crash the emulator.
122
123 Several syscalls, most notably the
124 .IR segattach (2)
125 family, are not implemented (this should not be hard to fix).
126 The emulator notes the value of
127 .IR errstr (2)
128 only under obvious circumstances; with most syscalls only if the return value is negative.
129
130 .B /proc
131 emulation is more than unsatisfactory.
132
133 The
134 .I text
135 argument should behave more like it would if it had been entered as an argument to
136 .IR rc (1).
137 .SH HISTORY
138 .I 5e
139 first appeared in 9front (June, 2011).