]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/realemu
truetypefs(4): document truetypefs
[plan9front.git] / sys / man / 8 / realemu
1 .TH REALEMU 8
2 .SH NAME
3 realemu \- software emulation of /dev/realmode
4 .SH SYNOPSIS
5 .B aux/realemu
6 [
7 .B -Dpt
8 ] [
9 .B -s
10 .I srvname
11 ] [
12 .B -m
13 .I mountpoint
14 ]
15 .SH DESCRIPTION
16 .PP
17 Originally, kernel provided 
18 .B /dev/realmode
19 files with the
20 .IR arch (3)
21 device to access and call the
22 .SM BIOS.
23 .PP
24 Interrupts had to be disabled and the processor was switched in the
25 legacy 16-bit
26 .SM realmode
27 with memory protection disabled to execute
28 .SM BIOS
29 code.
30 .PP
31 This is problematic in case the
32 .SM BIOS
33 reprograms hardware currently
34 used by the operating system or when it reenables interrupts or just
35 crashes. This will freeze or reboot the machine with no way to
36 recover or diagnose the problem.
37 .PP
38 To avoid this,
39 .I realemu
40 is used to emulate the execution of the
41 .SM BIOS
42 routines by interpreting the machine instructions and intercepting
43 dangerous actions that would compromise the systems stability.
44 .PP
45 Running
46 .I realemu
47 with no arguments, it mounts itself before
48 .B /dev
49 and
50 replaces the original
51 .B /dev/realmode
52 file in the current namespace.
53 .PP
54 Then programs like
55 .IR vga (8)
56 can use it to make their
57 .SM BIOS
58 calls.
59 .PP
60 The
61 .B D
62 flag will enable debug messages for 9P.  The
63 .B p
64 and
65 .B t
66 flags
67 control tracing of i/o port access and cpu instructions to
68 stderr (fd 2).
69 .PP
70 When a
71 .I srvname
72 is given with the
73 .B s
74 argument, the default
75 .I mountpoint
76 is ignored and a
77 .SM 9P
78 channel is created in
79 .B /srv
80 that can be used to mount
81 the filesystem from another namespace. If a
82 .I mountpoint
83 is given before
84 the
85 .I srvname
86 argument then it is ignored, otherwise it will be used.
87 .SH EXAMPLES
88 The
89 .I realemu
90 process is only needed when accessing
91 .B /dev/realmode.
92 To invoke a subshell so that
93 .I realemu
94 exits normally after
95 .B aux/vga
96 completes:
97 .IP
98 .EX
99 % @{rfork n; aux/realemu; aux/vga -m vesa -l $vgasize}
100 .EE
101 .SH SOURCE
102 .B /sys/src/cmd/aux/realemu
103 .SH "SEE ALSO"
104 .IR vga (8),
105 .IR arch (3)
106 .SH HISTORY
107 .I Realemu
108 first appeared in 9front (April, 2011).