missing realemu manpage
This commit is contained in:
parent
cef6cf06eb
commit
f9c1d16835
2 changed files with 108 additions and 3 deletions
104
sys/man/8/realemu
Normal file
104
sys/man/8/realemu
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
.TH realemu 8
|
||||||
|
.SH NAME
|
||||||
|
realemu \- software emulation of /dev/realmode
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B aux/realemu
|
||||||
|
[
|
||||||
|
.B -Dpt
|
||||||
|
] [
|
||||||
|
.B -s
|
||||||
|
.I srvname
|
||||||
|
] [
|
||||||
|
.B -m
|
||||||
|
.I mountpoint
|
||||||
|
]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
Originally, kernel provided
|
||||||
|
.B /dev/realmode
|
||||||
|
files with the
|
||||||
|
.IR arch (3)
|
||||||
|
device to access and call the
|
||||||
|
.SM BIOS.
|
||||||
|
.PP
|
||||||
|
Interrupts had to be disabled and the processor was switched in the
|
||||||
|
legacy 16-bit
|
||||||
|
.SM realmode
|
||||||
|
with memory protection disabled to execute
|
||||||
|
.SM BIOS
|
||||||
|
code.
|
||||||
|
.PP
|
||||||
|
This is problematic in case the
|
||||||
|
.SM BIOS
|
||||||
|
reprograms hardware currently
|
||||||
|
used by the operating system or when it reenables interrupts or just
|
||||||
|
crashes. This will freeze or reboot the machine with no way to
|
||||||
|
recover or diagnose the problem.
|
||||||
|
.PP
|
||||||
|
To avoid this,
|
||||||
|
.I realemu
|
||||||
|
is used to emulate the execution of the
|
||||||
|
.SM BIOS
|
||||||
|
routines by interpreting the machine instructions and intercepting
|
||||||
|
dangerous actions that would compromise the systems stability.
|
||||||
|
.PP
|
||||||
|
Running
|
||||||
|
.I realemu
|
||||||
|
with no arguments, it mounts itself before
|
||||||
|
.B /dev
|
||||||
|
and
|
||||||
|
replaces the original
|
||||||
|
.B /dev/realmode
|
||||||
|
file in the current namespace.
|
||||||
|
.PP
|
||||||
|
Then programs like
|
||||||
|
.IR vga (8)
|
||||||
|
can use it to make ther
|
||||||
|
.SM BIOS
|
||||||
|
calls.
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.B D
|
||||||
|
flag will enable debug messages for 9P. The
|
||||||
|
.B p
|
||||||
|
and
|
||||||
|
.B t
|
||||||
|
flags
|
||||||
|
control tracing of i/o port access and cpu instructions to
|
||||||
|
stderr (fd 2).
|
||||||
|
.PP
|
||||||
|
When a
|
||||||
|
.I srvname
|
||||||
|
is given with the
|
||||||
|
.B s
|
||||||
|
argument, the default
|
||||||
|
.I mountpoint
|
||||||
|
is ignored and a
|
||||||
|
.SM 9P
|
||||||
|
channel is created in
|
||||||
|
.B /srv
|
||||||
|
that can be used to mount
|
||||||
|
the filesystem from another namespace. If a
|
||||||
|
.I mountpoint
|
||||||
|
is given before
|
||||||
|
the
|
||||||
|
.I srvname
|
||||||
|
argument then it is ignored, otherwise it will be used.
|
||||||
|
.SH EXAMPLES
|
||||||
|
The
|
||||||
|
.I realemu
|
||||||
|
process is only needed when accessing
|
||||||
|
.B /dev/realmode.
|
||||||
|
To invoke a subshell so that
|
||||||
|
.I realemu
|
||||||
|
exits normally after
|
||||||
|
.B aux/vga
|
||||||
|
completes:
|
||||||
|
.IP
|
||||||
|
.EX
|
||||||
|
% @{rfork n; aux/realemu; aux/vga -m vesa -l $vgasize}
|
||||||
|
.SH SOURCE
|
||||||
|
.B /sys/src/cmd/aux/realemu
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.IR vga (8),
|
||||||
|
.IR arch (3)
|
|
@ -54,17 +54,18 @@ $BIN/%: %
|
||||||
test.iso: 9bootiso
|
test.iso: 9bootiso
|
||||||
rm -fr tmp $target
|
rm -fr tmp $target
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cp 9bootiso tmp
|
|
||||||
touch tmp/foo
|
touch tmp/foo
|
||||||
touch tmp/bar
|
touch tmp/bar
|
||||||
touch tmp/baz
|
touch tmp/baz
|
||||||
touch tmp/386aaa
|
touch tmp/386aaa
|
||||||
mkdir tmp/386
|
mkdir tmp/386
|
||||||
|
cp /386/9bootiso tmp/386
|
||||||
cp /386/9pc tmp/386
|
cp /386/9pc tmp/386
|
||||||
cp /386/9pcload tmp/386
|
cp /386/9pcload tmp/386
|
||||||
cp /386/9pcf tmp/386
|
cp /386/9pcf tmp/386
|
||||||
#echo 'bootfile=/386/9pc' >tmp/plan9.ini
|
mkdir tmp/cfg
|
||||||
disk/mk9660 -B 9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target
|
echo 'bootfile=/386/9pc' >tmp/cfg/plan9.ini
|
||||||
|
disk/mk9660 -B 386/9bootiso -p /sys/lib/sysconfig/proto/allproto -s tmp $target
|
||||||
rm -fr tmp
|
rm -fr tmp
|
||||||
|
|
||||||
test.dsk: 9bootfat mbr pbs
|
test.dsk: 9bootfat mbr pbs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue