曲径通幽论坛

 找回密码
 立即注册
搜索
查看: 10772|回复: 3
打印 上一主题 下一主题

Bochs 仿真软件

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
跳转到指定楼层
楼主
发表于 2009-4-1 12:43:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
一般所用的虚拟机软件有 3 种:
VMWare、Virtual PC、Bochs
这 3 种软件都虚拟或仿真了 Intel x86 的硬件环境。

但这 3 种仿真软件有一定区别。

Virtual PC 仿真了 x86 的大部分指令,而其他部分则采用虚拟技术来实现。
VMware 仅仿真了一些 I/O 功能,而所有其他的部分则在 x86 硬件上直接执行。也就是说,当客户操作系统在要求执行一条指令时,VMWare 不是用仿真的方法来模拟这条指令,而是把这条指令“传递”给实际系统的硬件来完成。
所以,从应用方面来看,如果仿真环境主要用于应用程序开发,那么 VMWare 和 Virtual PC 可能是比较好的选择。

但是如果需要开发一些低层系统软件(比如进行操作系统开发和调试、编译系统开发等),那么 Bochs 就是一个很好的选择。使用 Bochs,你可以知道执行程序在仿真硬件环境中的具体状态和精确时序,而非实际硬件的系统执行的结果。这也是为什么很多操作系统开发者更倾向于使用 Bochs 的原因。

Bochs 的官方网站:http://bochs.sourceforge.net/

官方介绍
Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms.  It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently, Bochs can be compiled to emulate a 386, 486, Pentium/PentiumII/PentiumIII/Pentium4 or x86-64 CPU including optional MMX, SSEx and 3DNow! instructions.
Bochs is capable of running most Operating Systems inside the emulation including Linux, DOS, Windows® 95/98 and Windows® NT/2000/XP or Windows Vista. Bochs was written by Kevin Lawton  and is currently maintained by this project.
    Bochs can be compiled and used in a variety of modes, some which are still in development. The 'typical' use of bochs is to provide complete x86 PC emulation, including the x86 processor, hardware devices, and memory. This allows you to run OS's and software within the emulator on your workstation, much like you have a machine inside of a machine. For instance, let's say your workstation is a Unix/X11 workstation, but you want to run Win'95 applications. Bochs will allow you to run Win 95 and associated software on your Unix/X11 workstation, displaying a window on your workstation, simulating a monitor on a PC.
Bochs 是一个用 C++ 编写的具有高移植性的开源 IA-32( x-86 )的 PC 仿真器,它可以运行在多个流行的操作系统平台。它包含有 Intel x86 CPU,普通 I/O 设备以及一个可定制的 BIOS。现在,Bochs 已经可以编译仿真 386,486,Pentium/PentiumII/PentiumIII/Pentium4 或 x86-64 CPU,还包含有可选的 MMX,SSEx 和 3DNow! 指令集。

Bochs 可以在多种操作系统中运行,如Linux, DOS, Windows® 95/98 and Windows® NT/2000/XP 或者是 Windows Vista。Bochs 的作者是 Kevin Lawton,他至今仍然维护着这个项目。

Bochs 经过编译后,有多种工作模式供选择,一些仍然在开发改进中。Bochs 典型的应用是提供完整的 x86 PC 仿真,包括 x86 处理器,硬件设备,以及内存。这就允许你在你的工作站上运行另外一套操作系统和软件,这就很像你在一台主机中还拥有另一台主机。例如,比如说你的工作站是 Unix/X11 ,但你希望运行 Win'95 上的应用程序。Bochs 允许你就在你的工作站上实现这些功能,以及在其中仿真出一个监视器并显示出相应的窗口。


Bochs 这种完全仿真的方法使得我们能在 Bochs 下不加修改地运行大量的软件系统。不管你所在的主机是何种硬件平台,Bochs 仍然仿真 x86 软件。为了在被模拟的机器上执行任何活动,Bochs 需要与主机操作系统进行交互。挡在 Bochs 显示窗口中按下一键时,一个击键事件就会发送到键盘的设备处理模块中。当被模拟的机器需要从模拟的键盘上执行读取操作时,Bochs 就会从主机上的硬盘映像文件中执行读操作。

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
沙发
 楼主| 发表于 2009-4-1 18:00:00 | 只看该作者

Bochs 配置文件

要在 Bochs 中运行一个操作系统,最少需要一下一些资源或信息:
      bochs 执行文件
      bios 映像文件( 例如, "VGABIOS-lgpl-latest" )
      至少一个引导启动磁盘映像文件( 软盘、硬盘或 CDROM 的映像文件 )

但我们在使用过程中往往需要为运行系统预先设置一些参数。这些参数可以在命令行上传递给 Bochs 执行程序,但通常我们都使用一个配置文件(文件名为 .bxrc,例如 sample.bxrc )。
为专门的一个应用来设置运行参数。

配置文件 * .bxrc

Bochs 使用配置文件中的信息来寻找所使用的磁盘映像文件、运行环境外围设备的配置以及其他一些模拟机器的设置信息。--每个被仿真的系统都需要设置一个相应的配置文件--。
若安装的 Bochs 系统是 2.1 或以后版本,那么 Bochs 系统会自动识别后缀是 ".bxrc" 的配置文件,并且在双击该文件图标时就会自动启动 Bochs 系统运行。

在 Bochs 安装的主目录下有一个名称为 bochsrc-sample.txt 的样板配置文件,其中列出了所有可用的参数设置,并带有详细的说明。

----------------------------------------------------------------bochsrc-sample.txt ----------------------------------------------------------------
#=======================================================================
#CONFIG_INTERFACE(接口配置
#
#配置接口是一系列的菜单和对话框,在这里你可以改变所有可控制 Bochs 特性的设定
#配置接口有两个选项:
#文本模式( textconfig) 和 图形模式( wx )。
#文本模式使用 stdin/stdout ,在在任何时候都是被编译进来的
#图形模式仅当在配置命令中使用 “--with-wx" 时才会生效
#如果你没写 config_interface 这行,那 Bochs 将选择默认的模式(文本模式)
#注意:如果使用 "wx" 配置接口,就必须也要使用 "wx" 显示库
#=======================================================================
#config_interface: textconfig
#config_interface: wx

#=======================================================================
# 显示库(DISPLAY_LIBRARY)
#
#显示库用来显示 Bochs VGA 屏幕。Bochs 有 10 种不同的显示库实现可供在不同的系统平台
#进行选择。如果运行配置时用 --with-* 选项,则 display_library 命令让我们可以选择我们
#需要用到的其中一个显示库。如果不写这一行,那么 Bochs 将作默认选择。
#
# 选择:
#   x              使用 X windows,交叉平台
#   win32          使用本地的 win32 库
#   carbon         使用 Carbon 库 (for MacOS X)
#   beos           使用本地 BeOS 库
#   macintosh      使用 MacOS pre-10
#   amigaos        使用本地  AmigaOS 库
#   sdl            使用 SDL library, 交叉平台
#   svga           使用 SVGALIB 库 for Linux, 允许没有 X11 的图形界面
#   term           仅文本,使用 curses/ncurses库, 交叉平台
#   rfb            为 AT&T's VNC viewer 提供一个接口, 交叉平台
#   wx             使用 wxWidgets 库, 交叉平台
#   nogui         什么都不显示
#
#注意:如果使用 "wx" 配置接口,就必须也要使用 "wx" 显示库
#=======================================================================
#display_library: amigaos
#display_library: beos
#display_library: carbon
#display_library: macintosh
#display_library: nogui
#display_library: rfb, options="timeout=60" # time to wait for client
#display_library: sdl, options="fullscreen" # startup in fullscreen mode
#display_library: term
#display_library: win32, options="legacyF12" # use F12 to toggle mouse
#display_library: win32, options="windebug" # use experimental debugger gui
#display_library: wx
#display_library: x, options="hideIPS" # disable IPS output in status bar

#=======================================================================
# ROMIMAGE:
#ROM BIOS 控制当开机时 PC 要干些什么。
#通常,你可以在源码里使用预编译的 BIOS 或者是成为 “BIOS-bochs-latest" 的二进制分发版
#ROM-BIOS 通常从地址 0xf0000 处开始,它精确为 64K 大小。
#另外一个选项是 128K 的 BIOS 会在地址 0xe0000 处加载。
#也可以用环境变量 $BXSHARE 指定 BIOS 的加载位置。
#在内存顶端使用扩展的大 BIOS 镜像( 高达 512K )现在已经被支持,但仍然建议使用 Bochs 发布的版本。
#开始地址可选,因为它可以由镜像文件的大小计算得到。
#=======================================================================
romimage: file=$BXSHARE/BIOS-bochs-latest
#romimage: file=mybios.bin, address=0xfff80000 # 512k at memory top

#=======================================================================
# CPU:
#这里定义了在 Bochs 中的和 CPU 相关的参数
# This defines cpu-related parameters inside Bochs:
#
#  COUNT:
#设置处理器的个数:每个处理器的核心数:每一个核心的线程数
#Bochs 当前支持高达 8 线程仿真
#如果 Bochs 以不支持 SMP 方式编译,则只能接受 1 这个值
#
# 配额( QUANTUM ):
#在返回控制另外一个 CPU 前所允许的最大执行指令数目
#这个选项仅在 Bochs 编译时选择 SMP 支持时才有效
#
#  RESET_ON_TRIPLE_FAULT:
#当发生三键失效(ctrl+alt+del)时重置CPU ( 强烈建议 ),而不是 PANIC。
#记得,如果你试图在三键失效后继续做些什么,则仿真的东西将完全是”假的“。
#注:在人们开发出来的各种复位方法中,最普遍的一种就是触发键盘控制器,提供由 Ctrl-Alt-Delete 键所发出的外部信号。
#       于是引发所谓的三键失效(triple fault,即三键热启动),这是 CPU 先天无法处理的一种 "失效" 。
#
IPS:
# 每一秒仿真的指令数。这是 Bochs 在主机系统中运行的 IPS 数值。
#你可以用 --enable-show-ips 选项来重新编译 Bochs 以使能这项功能,这样就可以看到所用主机的性能。
#计算所得的 IPS 值将记录在你自己的 log 文件中或者在状态栏上( 如果支持 gui 的话 )
#
#在 Bochs 仿真中,IPS 用来校准许多与时间相关的事件。例如,
# 改变 IPS 值会影响到 VGA 更新的速率,会影响到响应一个按键开始自动重复( 按键按着不动 ) 所需要的时间等等一些模拟系统的评估值。
#
#  Examples:
#
#  Bochs Machine/Compiler                                 Mips
# ____________________________________________________________________
#  2.3.7 3.2Ghz Intel Core 2 Q9770 with WinXP/g++ 3.4    50 to 55 Mips
#  2.3.7 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4      38 to 43 Mips
#  2.2.6 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4      21 to 25 Mips
#  2.2.6 2.1Ghz Athlon XP with Linux 2.6/g++ 3.4         12 to 15 Mips
#  2.0.1 1.6Ghz Intel P4 with Win2000/g++ 3.3             5 to  7 Mips
#=======================================================================
cpu: count=1, ips=10000000, reset_on_triple_fault=1

#=======================================================================
# MEGS
#设置在仿真时你所希望用到的物理内存数( 单位 MB)
#默认值是 32MB,许多 OS 并不需要多于这个数。
#最大的内存设置数为 2G,即 2048MB
#=======================================================================
#megs: 256
#megs: 128
#megs: 64
megs: 32
#megs: 16
#megs: 8

#=======================================================================
# OPTROMIMAGE[1-4]:
#现在,可以装载高达 4 个可选的 ROM 镜像文件。要确保使用一个只读区域,典型的空间在:
# C8000 和 EFFFF 之间。这些可选的 ROM 镜像不可以覆盖 rombios( 在 C0000-C7FFF 之间)
#和 videobios ( 在 C0000-C7FFF 之间)。
#如果 ROM images 有正确的标识符( 0x55AA ) 和有效的 checksum ,那么 ROM images
#将会被初始化。
#在仿真里,这对于上传一些可以被 boot loader 取回的植入性代码或数据是一种很方便的方法。
# You may now load up to 4 optional ROM images. Be sure to use a
# read-only area, typically between C8000 and EFFFF. These optional
# ROM images should not overwrite the rombios (located at
# F0000-FFFFF) and the videobios (located at C0000-C7FFF).
# Those ROM images will be initialized by the bios if they contain
# the right signature (0x55AA) and a valid checksum.
# It can also be a convenient way to upload some arbitrary code/data
# in the simulation, that can be retrieved by the boot loader
#=======================================================================
#optromimage1: file=optionalrom.bin, address=0xd0000
#optromimage2: file=optionalrom.bin, address=0xd1000
#optromimage3: file=optionalrom.bin, address=0xd2000
#optromimage4: file=optionalrom.bin, address=0xd3000

#optramimage1: file=/path/file1.img, address=0x0010000
#optramimage2: file=/path/file2.img, address=0x0020000
#optramimage3: file=/path/file3.img, address=0x0030000
#optramimage4: file=/path/file4.img, address=0x0040000

#=======================================================================
# VGAROMIMAGE
#把 VGA ROM BIOS 加载到 C0000 地址处
#=======================================================================
#vgaromimage: file=bios/VGABIOS-elpin-2.40
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
#vgaromimage: file=bios/VGABIOS-lgpl-latest-cirrus

#=======================================================================
# VGA:
#这里可以指定指定显示的扩展属性。值 “none” ,为使用标准 VGA 模式,没有扩展功能。
#其它的支持值有两个:"vbe" 和 “currus",前者为 Bochs VBE 支持;后者为 Cirrus SVGA  支持
#=======================================================================
#vga: extension=cirrus
vga: extension=vbe

#=======================================================================
# FLOPPYA:
#这里要之处 foppy 镜像文件或设备的路径名
#如果你从 'a' ( 或 'floopy' )启动,则 floppy 镜像或设备应该是可引导启动的。
#
#你可以设置媒介的初始状态为 ”弹出“ 或 ”插入“ :
#   floppya: 2_88=path, status=ejected             (2.88M 3.5" floppy)
#   floppya: 1_44=path, status=inserted            (1.44M 3.5" floppy)
#   floppya: 1_2=path, status=ejected              (1.2M  5.25" floppy)
#   floppya: 720k=path, status=inserted            (720K  3.5" floppy)
#   floppya: 360k=path, status=inserted            (360K  5.25" floppy)
#   floppya: 320k=path, status=inserted            (320K  5.25" floppy)
#   floppya: 180k=path, status=inserted            (180K  5.25" floppy)
#   floppya: 160k=path, status=inserted            (160K  5.25" floppy)
#   floppya: image=path, status=inserted           (guess type from image size)
#
# 路径应该是磁盘映像文件的名字。在 Unix 上,你可以使用原始设备(raw device) 名
#如同 Linux 上的  /dev/fd0 一样。在 Win32 平台,使用驱动器字母,如 a: 或 b: 作为路径
# 参数 ”image" 只对 镜像文件而言。既然如此,那么其规格就必须要匹配其中一种支持的类型。
#=======================================================================
floppya: 1_44=/dev/fd0, status=inserted
#floppya: image=../1.44, status=inserted
#floppya: 1_44=/dev/fd0H1440, status=inserted
#floppya: 1_2=../1_2, status=inserted
#floppya: 1_44=a:, status=inserted
#floppya: 1_44=a.img, status=inserted
#floppya: 1_44=/dev/rfd0a, status=inserted

#=======================================================================
# FLOPPYB:
# 见上面的 FLOPPYA
#=======================================================================
#floppyb: 1_44=b:, status=inserted
#floppyb: 1_44=b.img, status=inserted

#=======================================================================
# ATA0, ATA1, ATA2, ATA3
# 磁盘驱动器和光驱的 ATA 控制器
#
# ata[0-3]: enabled=[0|1], ioaddr1=addr, ioaddr2=addr, irq=number
#
#这些选项使能高达 4 个 ATA 频道。对于每一个频道,必须指定 2 个基本的 IO 地址和 IRQ 。
#
#ATA0 和 ATA1 默认下是被开启的,其值如下所示:
# 举例:
#   ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#   ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
#   ata2: enabled=1, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
#   ata3: enabled=1, ioaddr1=0x168, ioaddr2=0x360, irq=9
#=======================================================================
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9

#=======================================================================
# ATA[0-3]-MASTER, ATA[0-3]-SLAVE
#
#这里定义了所有挂载 ATA 设备的类型和特性:
#   type=       挂载的设备类型
#   mode=    此选项仅对磁盘有效 [flat|concat|external|dll|sparse|vmware3]
#   mode=    此选项仅对磁盘有效 [undoable|growing|volatile]
#   path=       映像文件路径
#   cylinders=  仅对磁盘有效
#   heads=      仅对磁盘有效
#   spt=            仅对磁盘有效
#   status=      仅对 cdroms 有效 [inserted|ejected]
#   biosdetect= biosdetection 类型 [none|auto], 仅对在 ATA0 上的磁盘有效 [cmos]
#   translation= BIOS 传输类型, 仅对磁盘有效 [none|lba|large|rechs|auto]
#   model=      由识别设备命令返回的字符串( 主机控制器驱动程序通过识别设备(Identify Device功能检测硬盘是否支持SATA Ⅱ )
#   journal=    对不可用及易失性磁盘日志的可选文件名(optional filename of the redolog for undoable and volatile disks)
#  
# 在一个硬盘映像文件,CDROM ISO 文件,或物理 CDROM 设备上指出这些属性。为了创建一个硬盘映像文件,
# 尝试运行 bximage 命令,它可以帮助你选择一个合适的尺寸。
#
#在 UNIX 里,它可能会使用一个原始设备作为 Bochs 硬盘,但我们并不建议这么做!而在Windows里并没有什么方便的方法。
#
#在 Windows 里,磁盘驱动器符号 + 冒号 可以用来表示 CDROM。根据 Windows 以及驱动的的版本,你可能仅能访问系统里第一个驱动器。
#在 MacOSX 里,使用 path="drive" 来访问物理驱动器。
#
#路径总是强制需求的。磁盘几何参数( Disk geometry )自动探测功能对由 bximage 命令创建的映像同样有效。
# 如果 CHS 设为 0/0/0( 柱面使用 heads=16,sht=63 来计算得出 )。对于其它的硬盘映像和模式,柱面,磁头,每扇区磁道数( 线密度 spt )都是强制的。
#
#默认的值为:
#   mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"
#
# biosdetect 选项现在已经不会影响到 BIOS
#
# 举例:
#   ata0-master: type=disk, mode=flat, path=10M.sample, cylinders=306, heads=4, spt=17
#   ata0-slave:  type=disk, mode=flat, path=20M.sample, cylinders=615, heads=4, spt=17
#   ata1-master: type=disk, mode=flat, path=30M.sample, cylinders=615, heads=6, spt=17
#   ata1-slave:  type=disk, mode=flat, path=46M.sample, cylinders=940, heads=6, spt=17
#   ata2-master: type=disk, mode=flat, path=62M.sample, cylinders=940, heads=8, spt=17
#   ata2-slave:  type=disk, mode=flat, path=112M.sample, cylinders=900, heads=15, spt=17
#   ata3-master: type=disk, mode=flat, path=483M.sample, cylinders=1024, heads=15, spt=63
#   ata3-slave:  type=cdrom, path=iso.sample, status=inserted
#=======================================================================
ata0-master: type=disk, mode=flat, path="30M.sample"
#ata0-master: type=disk, mode=flat, path="30M.sample", cylinders=615, heads=6, spt=17
#ata0-master: type=disk, mode=flat, path="c.img", cylinders=0 # autodetect
#ata0-slave: type=cdrom, path=D:, status=inserted
#ata0-slave: type=cdrom, path=/dev/cdrom, status=inserted
#ata0-slave: type=cdrom, path="drive", status=inserted
#ata0-slave: type=cdrom, path=/dev/rcd0d, status=inserted

#=======================================================================
# BOOT:
#这个选项定义启动的顺序。现在,你可以指定高达 3 个启动驱动器。这里,可以指定 "floppy"
#和 "disk" 或 "cdrom" 还可以是 "network(boot ROM)".
# 旧式的 'a' 和 'c' 也被支持:
# 例子:
#   boot: floppy
#   boot: cdrom, disk
#   boot: network, disk
#   boot: cdrom, floppy, disk
#=======================================================================
#boot: floppy
boot: disk

#=======================================================================
# CLOCK:
#此选项定义了 Bochs 中的时钟参数:
#
SYNC:
#  TO BE COMPLETED (see Greg explanation in feature request #536329)
#
TIME0
# 指定虚拟机的启动( boot )时间。
# 使用一个时间值作为由系统调用 time 的返回值。
# 如果没有设置 time0 值 或 time0 值为 1( 特殊情况 ),或者如果 time0 为 "local",那么仿真在以当前主机的时间作为启动时间。
# 如果 time0 等于 2( 特殊情况 ) 或者 time0 为 'utc',则仿真就以当前的 UTC 时间作为启动时间
#
# 语法
#  clock: sync=[none|slowdown|realtime|both], time0=[timeValue|local|utc]
#
# 例子:
#   clock: sync=none,     time0=local       # Now (localtime)
#   clock: sync=slowdown, time0=315529200   # Tue Jan  1 00:00:00 1980
#   clock: sync=none,     time0=631148400   # Mon Jan  1 00:00:00 1990
#   clock: sync=realtime, time0=938581955   # Wed Sep 29 07:12:35 1999
#   clock: sync=realtime, time0=946681200   # Sat Jan  1 00:00:00 2000
#   clock: sync=none,     time0=1           # Now (localtime)
#   clock: sync=none,     time0=utc         # Now (utc/gmt)
#
#默认值为 sync=none, time0=local
#=======================================================================
#clock: sync=none, time0=local

#=======================================================================
# FLOPPY_BOOTSIG_CHECK: disabled=[0|1]
# 使能或禁止在引导 floppy 上检查 0xaa55 标识符
# 默认为 disabled=0
# 例子:
#   floppy_bootsig_check: disabled=0
#   floppy_bootsig_check: disabled=1
#=======================================================================
floppy_bootsig_check: disabled=0

#=======================================================================
# LOG
# 给出 Bochs 调试信息日志文件和其它杂项信息的记录文件的路径。
#如果不适用此选项或者设置文件名为 '-',则输出就写往控制台。
#如果确实不想看到这些信息,就直接把它们丢掉,如果是在 Unix
#平台,就设置 /dev/null ,如是在 Win32平台,就设为 nul 。
#
# 例子:
#   log: ./bochs.out
#   log: /dev/tty
#=======================================================================
#log: /dev/null
log: bochsout.txt

#=======================================================================
# LOGPREFIX:
# 此选项处理附加在每一个日志记录行前面字符串的格式
# 可以使用以下特殊的标记:
#   %t : 11 十进制数字时间计数( decimal digits timer tick)
#   %i : 8 十六进制数字表示 CPU 当前的 EIP ( 在 SMP 配置里忽略 )[hexadecimal digits of cpu current eip (ignored in SMP configuration)]
#   %e : 1 字符事件类型( i 表示 info;d 表示 debug;p 表示 panic;e 表示 error ) [character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)]
#   %d : 5 设备字符串,用括号括起来( characters string of the device, between brackets )
#
# Default : %t%e%d
# 例子:
#   logprefix: %t-%e-@%i-%d
#   logprefix: %i%e%d
#=======================================================================
#logprefix: %t%e%d

#=======================================================================
# LOG CONTROLS
#
#  Bochs 现在对事件日志划分了 4 个严重级别。
#  panic: 无法继续。如果你在一个 panic 后选择继续,假如返回一些古怪的数据或崩溃请不要奇怪。
#
#   error: 虽然有些错误发生,但还可能安全的继续仿真
#
#   info: 感兴趣或有用的信息

#   debug: 仅在调试代码时产生的有用信息,可能在每秒产生几千条。
#   ( messages useful only when debugging the code.  This may spit out thousands per second.)         
#
# 对于每个等级上的事件,你可以选择让其崩溃,或报告,或忽略掉。
#
# TODO: 允许基于设备的选择,比如从除了 cdrom 外的其它事情带来的 panics 引起的崩溃,对此仅做出相应的报告(report)
#
#如果你正在遇到许多 panics,对于 panic 所采取的动作为“report" 会比 "fatal" 会更有用。
#尽管意识到在一个 panic 后执行任何的东西都将是一件未知的事情并且也会引起 bochs 的不稳定。
#panic 是一个”优雅的退出“,所以,如果你禁止它你也许会遭到一个巨大的 ”不幸“。
#=======================================================================
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
#pass: action=fatal

#=======================================================================
# DEBUGGER_LOG:
# 给出 Bochs 对调试器输出日志的路径。
#如果你确实不需要这个功能,那么设置它为 /dev/null (linux) 或 ‘-' 。
#
# 例子:
#   debugger_log: ./debugger.out
#=======================================================================
#debugger_log: /dev/null
#debugger_log: debugger.out
debugger_log: -

#=======================================================================
# COM1, COM2, COM3, COM4:
#这个选项定义了串行口( UART 类型 16550 )。这里,你可以指定一个设备被用作 com1 口。
#这是一个真实的串行线或 pty 。使用 pty ( X/Unix ),需要创建两个窗口( xterms,usually )。
#其中的一个将运行 Bochs,另外一个便为 com1 。
#com1 窗口里使用 'tty' 命令并以 'dev' 作为参数,可以找出实际的 tty 。
# 然后在 com1 窗口里 "sleep 1000000",这为了防止一些可能紊乱的事情发生。接着在另外一个窗口里运行 Bochs。
# COM1 上的串行 I/O ( port 0x3f8 ) 完全在不同于 Bochs 的另外一个窗口里运行。
# 在 socket* 和 pipe* (win32 only) 模式里,Bochs 既可以是 套接字(socket) 还可以是命名管道( named pipe ) 的客户端或服务端。
# 在客户端模式里,它连接一个已在运行的服务器( 如果连接失败,Bochs 就会认为 com 口没有连接 )。
# 在服务器模式里,它打开 套接字/命名管道 并且等待直到有客户应用程序对其连接才会开始仿真。
#这个模式对远程调试很有用(例如,用 gdb 的 "target remote host:port“ 命令 或者 windbg 的命令行选项 -k com:pipe,port=\\\\.\\pipe\\pipename )。
#注意:'socket' 是一个 ’socket-client'  的简写形式,而 'pipe' 是 'pipe-client' 的简写形式。
# socket 模式使用简单的 TCP 协议进行通讯,pipe 模式使用双字节模式管道。
# 其它的串行模式为 ‘null' ( 没有 输入/输出 ),'file' (输出到一个指定为 'dev' 参数的文件中),'raw'(使用真正的串行口--在 win32的架构下),
#'mouse'(标准串行鼠标--需要鼠标选项设置为 'type=serial', 'type=serial_wheel' 或者 'type=serial_msys')。
#
# 例子:
#   com1: enabled=1, mode=null
#   com1: enabled=1, mode=mouse
#   com2: enabled=1, mode=file, dev=serial.out
#   com3: enabled=1, mode=raw, dev=com1
#   com3: enabled=1, mode=socket-client, dev=localhost:8888
#   com3: enabled=1, mode=socket-server, dev=localhost:8888
#   com4: enabled=1, mode=pipe-client, dev=\\\\.\\pipe\\mypipe
#   com4: enabled=1, mode=pipe-server, dev=\\\\.\\pipe\\mypipe
#=======================================================================
#com1: enabled=1, mode=term, dev=/dev/ttyp9

#=======================================================================
# PARPORT1, PARPORT2:
# 这个选项定义并行口(打印机) 。当打开并并口并且有有一个输出文件被定义时,那么仿真打印口就会发送由客户操作系统所打印的字符到这个输出文件中。
#在一些平台上,一个设备的文件名可以用来发送数据到真实的并行口( 例如 Linux 上的 "/dev/lp0",win32 平台上的 "lpt1" )
# This defines a parallel (printer) port. When turned on and an output file is
# defined the emulated printer port sends characters printed by the guest OS
# into the output file. On some platforms a device filename can be used to
# send the data to the real parallel port (e.g. "/dev/lp0" on Linux, "lpt1" on
# win32 platforms).
#
# 例子:
#   parport1: enabled=1, file="parport.out"
#   parport2: enabled=1, file="/dev/lp0"
#   parport1: enabled=0
#=======================================================================
parport1: enabled=1, file="parport.out"

#=======================================================================
# SB16:
# 这个选项定义了 SB16 声效的仿真。它有以下几种属性。
#所有属性都为 sb16 格式:property=value
#
# midi: 文件名即作为 midi 数据要发送的目的地 。如果你想记录 midi 数据,那么这可以是一个设备或仅是一个文件。
#
#midimode:
#      0=无数据
#      1=输出到设备( 与系统相关。midi 只是设备驱动)
#      2=SMF 文件输出,包含 headers
#      3= 输出 midi 数据流到文件( 没有 midi headers 也没有增量时间( delta time ),仅是命令和数据的字节 )
#
# wave: 这是个设备或是个文件,wave 输出就存储于此
# wavemode:
#      0=没有数据
#      1=输出到设备( 系统相关,wave 指示设备驱动 )
#      2=VOC 文件输出, incl. headers
#      3=输出原始 wave 流到文件
# log:  日志文件,记录 sb16 仿真器消息
# loglevel:
#      0=没有日志
#      1=更换资源,midi 程序和resource changes, midi program and bank changes
#      2=严重的错误
#      3=所有的错误
#      4=所有错误并附加所有端口的访问
#      5=所有错误和端口访问并附加许多额外的信息
# dmatimer:
#      在一个DMA 周期中,每一秒中的微秒数.  为了适合非连续声效(non-continous sound )可配置其更小些
#
# 见以下设定例子:
#=======================================================================

#sb16: midimode=1, midi=/dev/midi00, wavemode=1, wave=/dev/dsp, loglevel=2, log=sb16.log, dmatimer=600000

#=======================================================================
# VGA_UPDATE_INTERVAL:
#再每隔一定的虚拟秒数后扫描显存以更新屏幕。
# 默认值是 40000,约为 25HZ。 记得你必须调整 'cpu: ips=N' 指令,使其接近于你所在工作站上每秒所能仿真的指令数,这样才结果才会准确
#
#例子:
#   vga_update_interval: 250000
#=======================================================================
vga_update_interval: 300000

# using for Winstone '98 tests
#vga_update_interval:  100000

#=======================================================================
# KEYBOARD_SERIAL_DELAY:
# 在串行路径(serial path)上从键盘传递一个字符到控制器所需要的大概时间,时间单位以
# 例子:
#   keyboard_serial_delay: 200
#=======================================================================
keyboard_serial_delay: 250

#=======================================================================
# KEYBOARD_PASTE_DELAY:
#把字符送往键盘控制器的大约时间间隔,时间单位用微秒表示。
#设置这个时间是为了让客户操作系统处理字符流。理想的设置值要依据你的操作系统对字符的处理情况。
#默认值为 100000 微秒(10ms 防抖动),因为这个值在 Windows 里一贯被使用。
#如果你的操作系统在两次击键间会遗漏掉字符处理,那就应该适当的增加这个延迟,直到正常工作为止。
#
# 例子:
#   keyboard_paste_delay: 100000
#=======================================================================
keyboard_paste_delay: 100000
#=======================================================================
# MOUSE:
# 如果不使能鼠标操作的话,这个选项会组织 Bochs 创建鼠标事件(events)。
#但硬件自身的仿真不能用这个选项来禁止。通过设置此选项为 1来使能,或设置为 0 来禁止鼠标功能。
#除非有特别的原因要在默认情况下使能鼠标,否则建议保留其为关闭状态。
#你可以在运行时使用鼠标(在 X11, SDL, wxWidgets 和 Win32 上 使用 Ctrl + 鼠标上的中键)。
#使用鼠标类型选项你可以选择要仿真的鼠标类型。默认值为 'ps2'。其他的选择为:
# 'imps2(在 PS/2 上的滚轮鼠标); ‘serial' ’serial_msys'(需要在一个 com 口上设置 ‘mode=mouse' )。
#若是 USB 鼠标,那么请看 'usb1' 选项的设置情况( 需要 PCI 和 USB 的支持).
#
# 例子:
#   mouse: enabled=1
#   mouse: enabled=1, type=imps2
#   mouse: enabled=1, type=serial
#   mouse: enabled=0
#=======================================================================
mouse: enabled=0

#=======================================================================
# private_colormap:
# 需要 GUI 创建并使用它自己的非共享色图。此色图在 Bochs 窗口里会用到。若没有使能这项功能,那么可能会用一个共享的色图方案。
# 这并不是在所有的 GUI 上都得到实现。
#
# 例子:
#   private_colormap: enabled=1
#   private_colormap: enabled=0
#=======================================================================
private_colormap: enabled=0

#=======================================================================
# fullscreen: 仅在 AMIGA(早起电脑) 上实现
# 需要 Bochs 占据整个屏幕而不是窗口
#
# 例子:
#   fullscreen: enabled=0
#   fullscreen: enabled=1
#=======================================================================
#fullscreen: enabled=0
#screenmode: name="sample"

#=======================================================================
# ne2k:( NE2000 兼容以太网适配器 )
#
#例子:
# ne2k: ioaddr=IOADDR, irq=IRQ, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT
#
# ioaddr, irq:除非有 IRQ 冲突,否则无需改变 ioaddr 和 irq
#
# mac: MAC 地址不允许匹配网络上任何一台主机的地址。而且,第一个字节必须是偶数( 位 0 意味着是一个多重广播地址),
# 你也不能使用 ff.ff.ff.ff.ff.ff ,因为这是个广播地址。对于 ethertap 模式,一定要用 fe:fd:00:00:01。这里可能还有其它的限制,为了安全起见,使用 b0:c4...地址
#
# ethdev: ethdev 值是你主机平台上的网络接口值。在 UNIX 主机上,你可以通过运行 'ifconfig' 命令得到此名称。
# 在 Windows 主机上,你必须运行 niclit 命令得到 ethdev 的名字。
# Niclist 源代码在 misc/niclist.c 里,它包含在 Windows 发布的二进制码中。
#
# script: 脚本值选项是在 Bochs 初始化网络接口后所执行的脚本名字。你可以使用这个脚本来配置网络接口,或者使能伪装技术。
# 这对于仅在 Bochs 执行期间的 tun/tap 设备会很有用。设备接口名名称是脚本的第一个参数。
#
# 如果你不希望建立一个连接到物理网络。你可以使用一下的 'ethmod' 来仿真一个虚拟网络。
#
#   null:所有数据包都被丢弃,但会记录到一个新建文件中。
#   arpback: 仿真 ARP。默认情况下被禁止。
#   vde:  虚拟分布式以太网
#   vnet: 仿真 ARP, ICMP-echo(ping), DHCP 和 read/write TFTP
#         虚拟主机使用 IP  192.168.10.1.
#         DHCP 分配 192.168.10.2 到客户机
#         TFTP 对于 root 目录,使用 ethdev 值,不会覆盖文件
#
#=======================================================================
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=fbsd, ethdev=en0 #macosx
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=fbsd, ethdev=xl0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tap, ethdev=tap0
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun0, script=./tunconfig
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=null, ethdev=eth0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vde, ethdev="/tmp/vde.ctl"
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vnet, ethdev="c:/temp"

#=======================================================================
# KEYBOARD_MAPPING:
# 此选项可以对一个物理的本地键盘重映射到一个虚拟 US 键盘。
# 如果使能,则必须指定按键映射文件( keymap file )
#
# 例子:
#   keyboard_mapping: enabled=1, map=gui/keymaps/x11-pc-de.map
#=======================================================================
keyboard_mapping: enabled=0, map=

#=======================================================================
# KEYBOARD_TYPE:
# 由一个 "identify keyboard" 命令对键盘控制器请求返回键盘类型。键盘类型必须为 "xt", "at" 或 "mf" 中的一个。
# 默认情况下为 "mf",这对于绝大多数人来说都是适用的。一个已知的意外是法语版的 MAC 苹果机,它用的是类 "at" 这样的键盘。
# Type of keyboard return by a "identify keyboard" command to the
# keyboard controler. It must be one of "xt", "at" or "mf".
# Defaults to "mf". It should be ok for almost everybody. A known
# exception is french macs, that do have a "at"-like keyboard.
#
# 例子:
#   keyboard_type: mf
#=======================================================================
#keyboard_type: mf

#=======================================================================
# USER_SHORTCUT:
# 此选项定义了在 headerbar 里,当按下 "user" 按键时所要发送的键盘快捷方式。
# 快捷方式(一个精简字符串) 是以 '-' 分开的最多只能用到 3 个按键的组合。如下所示:
#
# 可用的键名:
# "alt", "bksl", "bksp", "ctrl", "del", "down", "end", "enter", "esc",
# "f1", ... "f12", "home", "ins", "left", "menu", "minus", "pgdwn", "pgup",
# "plus", "right", "shift", "space", "tab", "up", "win", "print" and "power".
#
# 例子:
#   user_shortcut: keys=ctrl-alt-del
#=======================================================================
#user_shortcut: keys=ctrl-alt-del

#=======================================================================
# I440FXSUPPORT:
# 此选项控制是否使用 i440FX PCI 芯片。你可以指定一个设备连接到 PCI 槽。现在已经支持到高达 5 个可用槽。
# 这些设备目前已经支持:ne2k,pcivga,pcidev 和 pcipnic 。
# 如果 Bochs 以 Cirrus SVGA 支持来编译,你就会有一个额外的 ’cirrus‘ 的选项可用。
#
# 例子:
#   i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
#=======================================================================
i440fxsupport: enabled=1

#=======================================================================
# USB1:
# 此选项控制 USB 根集线器(作为 i440FX PCI 芯片的一部分)是否要使用。
# 使用 portX 选项,你可以把设备连接到 hub 上( 当前支持: 'mouse', 'tablet', 'keypad', 和 'disk')。
# 如果你鼠标或者笔记本到这些口中的一个,Bochs 把鼠标移动数据转发到 USB 设备,而不是转发已选择的鼠标类型。
# 当把 keypad ( 小键盘 ) 连接到这些口中的一个,Bochs 转发数字小键盘上的输入到 USB 设备,而不是转发 PS/2 键盘上的。
# 连接一个平坦模式映像文件作为 USB 硬盘时,可以使用 'disk' 设备,此设备带有以冒号分隔符的路径,如下所示:
#=======================================================================
#usb1: enabled=1
#usb1: enabled=1, port1=mouse, port2=disk:usbdisk.img

#=======================================================================
# CMOSIMAGE:
# 此选项定义启动时可以装载到 COMS RAM 中的映像文件。
# rtc_init 参数控制是否要初始化存储在映像文件中的 RTC 值。
# 默认情况下,作为时钟选项的 time0 参数会被使用到。
# 'rtc_init=image' 中的 image 作为初始化时间的源。
#
# 例子:
#   cmosimage: file=cmos.img, rtc_init=image
#=======================================================================
#cmosimage: file=cmos.img, rtc_init=time0

#=======================================================================
# MAGIC_BREAK:
# 当使用调试器时,此选项使能 “magic breakpoint" 特性。
# 无效的 CPU 指令 XCHG BX, BX 将引起 Bochs进入调试器模式。这对于软件开发也许会很有用。
# This enables the "magic breakpoint" feature when using the debugger.
# The useless cpu instruction XCHG BX, BX causes Bochs to enter the
# debugger mode. This might be useful for software development.
#
# Example:
#   magic_break: enabled=1
#=======================================================================
#magic_break: enabled=1

#=======================================================================
# DEBUG_SYMBOLS:
# 从指定文件装在符号,这用在 Bochs 的内部调试器中。符号被装在进全局环境中。这相当于在启动时就可使用 ldsym 调试器
#
# 例子:
#   debug_symbols: file="kernel.sym"
#   debug_symbols: file="kernel.sym", offset=0x80000000
#=======================================================================
#debug_symbols: file="kernel.sym"

#
=======================================================================
# other stuff
#=======================================================================
#load32bitOSImage: os=nullkernel, path=../kernel.img, iolog=../vga_io.log
#load32bitOSImage: os=linux, path=../linux.img, iolog=../vga_io.log, initrd=../initrd.img
#text_snapshot_check: enabled=1
#print_timestamps: enabled=1

#-------------------------
# PCI host device mapping
#-------------------------
#pcidev: vendor=0x1234, device=0x5678

#=======================================================================
# GDBSTUB:
# 使能 GDB stub 。详细内容可查看用户手册
# 默认值为 enabled=0.
#=======================================================================
#gdbstub: enabled=0, port=1234, text_base=0, data_base=0, bss_base=0

#=======================================================================
# 对于 Macintosh(苹果电脑), 使用一下的路径名表示风格:
# 例子.
#
# vgaromimage: :bios:VGABIOS-elpin-2.40
# romimage: file=:bios:BIOS-bochs-latest, address=0xf0000
# floppya: 1_44=[fd:], status=inserted
#=======================================================================

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
板凳
 楼主| 发表于 2009-4-5 18:29:09 | 只看该作者

原文件

# You may now use double quotes around pathnames, in case
# your pathname includes spaces.

#=======================================================================
# CONFIG_INTERFACE
#
# The configuration interface is a series of menus or dialog boxes that
# allows you to change all the settings that control Bochs's behavior.
# There are two choices of configuration interface: a text mode version
# called "textconfig" and a graphical version called "wx".  The text
# mode version uses stdin/stdout and is always compiled in.  The graphical
# version is only available when you use "--with-wx" on the configure
# command.  If you do not write a config_interface line, Bochs will
# choose a default for you.
#
# NOTE: if you use the "wx" configuration interface, you must also use
# the "wx" display library.
#=======================================================================
#config_interface: textconfig
#config_interface: wx

#=======================================================================
# DISPLAY_LIBRARY
#
# The display library is the code that displays the Bochs VGA screen.  Bochs
# has a selection of about 10 different display library implementations for
# different platforms.  If you run configure with multiple --with-* options,
# the display_library command lets you choose which one you want to run with.
# If you do not write a display_library line, Bochs will choose a default for
# you.
#
# The choices are:
#   x              use X windows interface, cross platform
#   win32          use native win32 libraries
#   carbon         use Carbon library (for MacOS X)
#   beos           use native BeOS libraries
#   macintosh      use MacOS pre-10
#   amigaos        use native AmigaOS libraries
#   sdl            use SDL library, cross platform
#   svga           use SVGALIB library for Linux, allows graphics without X11
#   term           text only, uses curses/ncurses library, cross platform
#   rfb            provides an interface to AT&T's VNC viewer, cross platform
#   wx             use wxWidgets library, cross platform
#   nogui          no display at all
#
# NOTE: if you use the "wx" configuration interface, you must also use
# the "wx" display library.
#
# Specific options:
# Some display libraries now support specific option to control their
# behaviour. See the examples below for currently supported options.
#=======================================================================
#display_library: amigaos
#display_library: beos
#display_library: carbon
#display_library: macintosh
#display_library: nogui
#display_library: rfb, options="timeout=60" # time to wait for client
#display_library: sdl, options="fullscreen" # startup in fullscreen mode
#display_library: term
#display_library: win32, options="legacyF12" # use F12 to toggle mouse
#display_library: win32, options="windebug" # use experimental debugger gui
#display_library: wx
#display_library: x, options="hideIPS" # disable IPS output in status bar

#=======================================================================
# ROMIMAGE:
# The ROM BIOS controls what the PC does when it first powers on.
# Normally, you can use a precompiled BIOS in the source or binary
# distribution called BIOS-bochs-latest. The ROM BIOS is usually loaded
# starting at address 0xf0000, and it is exactly 64k long. Another option
# is 128k BIOS which is loaded at address 0xe0000.
# You can also use the environment variable $BXSHARE to specify the
# location of the BIOS.
# The usage of external large BIOS images (up to 512k) at memory top is
# now supported, but we still recommend to use the BIOS distributed with
# Bochs. The start address optional, since it can be calculated from image size.
#=======================================================================
romimage: file=$BXSHARE/BIOS-bochs-latest
#romimage: file=mybios.bin, address=0xfff80000 # 512k at memory top

#=======================================================================
# CPU:
# This defines cpu-related parameters inside Bochs:
#
#  COUNT:
#  Set the number of processors:cores per processor:threads per core
#  when Bochs is compiled for SMP emulation.
#  Bochs currently supports up to 8 threads running simultaniosly.
#  If Bochs is compiled without SMP support, it won't accept values
#  different from 1.
#
#  QUANTUM:
#  Maximum amount of instructions allowed to execute by processor before
#  returning control to another cpu. This option exists only in Bochs
#  binary compiled with SMP support.
#
#  RESET_ON_TRIPLE_FAULT:
#  Reset the CPU when triple fault occur (highly recommended) rather than
#  PANIC. Remember that if you trying to continue after triple fault the
#  simulation will be completely bogus !
#
#  IPS:
#  Emulated Instructions Per Second.  This is the number of IPS that bochs
#  is capable of running on your machine. You can recompile Bochs with
#  --enable-show-ips option enabled, to find your workstation's capability.
#  Measured IPS value will then be logged into your log file or status bar
#  (if supported by the gui).
#
#  IPS is used to calibrate many time-dependent events within the bochs
#  simulation.  For example, changing IPS affects the frequency of VGA
#  updates, the duration of time before a key starts to autorepeat, and
#  the measurement of BogoMips and other benchmarks.
#
#  Examples:
#
#  Bochs Machine/Compiler                                 Mips
# ____________________________________________________________________
#  2.3.7 3.2Ghz Intel Core 2 Q9770 with WinXP/g++ 3.4    50 to 55 Mips
#  2.3.7 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4      38 to 43 Mips
#  2.2.6 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4      21 to 25 Mips
#  2.2.6 2.1Ghz Athlon XP with Linux 2.6/g++ 3.4         12 to 15 Mips
#  2.0.1 1.6Ghz Intel P4 with Win2000/g++ 3.3             5 to  7 Mips
#=======================================================================
cpu: count=1, ips=10000000, reset_on_triple_fault=1

#=======================================================================
# MEGS
# Set the number of Megabytes of physical memory you want to emulate.
# The default is 32MB, most OS's won't need more than that.
# The maximum amount of memory supported is 2048Mb.
#=======================================================================
#megs: 256
#megs: 128
#megs: 64
megs: 32
#megs: 16
#megs: 8

#=======================================================================
# OPTROMIMAGE[1-4]:
# You may now load up to 4 optional ROM images. Be sure to use a
# read-only area, typically between C8000 and EFFFF. These optional
# ROM images should not overwrite the rombios (located at
# F0000-FFFFF) and the videobios (located at C0000-C7FFF).
# Those ROM images will be initialized by the bios if they contain
# the right signature (0x55AA) and a valid checksum.
# It can also be a convenient way to upload some arbitrary code/data
# in the simulation, that can be retrieved by the boot loader
#=======================================================================
#optromimage1: file=optionalrom.bin, address=0xd0000
#optromimage2: file=optionalrom.bin, address=0xd1000
#optromimage3: file=optionalrom.bin, address=0xd2000
#optromimage4: file=optionalrom.bin, address=0xd3000

#optramimage1: file=/path/file1.img, address=0x0010000
#optramimage2: file=/path/file2.img, address=0x0020000
#optramimage3: file=/path/file3.img, address=0x0030000
#optramimage4: file=/path/file4.img, address=0x0040000

#=======================================================================
# VGAROMIMAGE
# You now need to load a VGA ROM BIOS into C0000.
#=======================================================================
#vgaromimage: file=bios/VGABIOS-elpin-2.40
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
#vgaromimage: file=bios/VGABIOS-lgpl-latest-cirrus

#=======================================================================
# VGA:
# Here you can specify the display extension to be used. With the value
# 'none' you can use standard VGA with no extension. Other supported
# values are 'vbe' for Bochs VBE and 'cirrus' for Cirrus SVGA support.
#=======================================================================
#vga: extension=cirrus
vga: extension=vbe

#=======================================================================
# FLOPPYA:
# Point this to pathname of floppy image file or device
# This should be of a bootable floppy(image/device) if you're
# booting from 'a' (or 'floppy').
#
# You can set the initial status of the media to 'ejected' or 'inserted'.
#   floppya: 2_88=path, status=ejected             (2.88M 3.5" floppy)
#   floppya: 1_44=path, status=inserted            (1.44M 3.5" floppy)
#   floppya: 1_2=path, status=ejected              (1.2M  5.25" floppy)
#   floppya: 720k=path, status=inserted            (720K  3.5" floppy)
#   floppya: 360k=path, status=inserted            (360K  5.25" floppy)
#   floppya: 320k=path, status=inserted            (320K  5.25" floppy)
#   floppya: 180k=path, status=inserted            (180K  5.25" floppy)
#   floppya: 160k=path, status=inserted            (160K  5.25" floppy)
#   floppya: image=path, status=inserted           (guess type from image size)
#
# The path should be the name of a disk image file.  On Unix, you can use a raw
# device name such as /dev/fd0 on Linux.  On win32 platforms, use drive letters
# such as a: or b: as the path.  The parameter 'image' works with image files
# only. In that case the size must match one of the supported types.
#=======================================================================
floppya: 1_44=/dev/fd0, status=inserted
#floppya: image=../1.44, status=inserted
#floppya: 1_44=/dev/fd0H1440, status=inserted
#floppya: 1_2=../1_2, status=inserted
#floppya: 1_44=a:, status=inserted
#floppya: 1_44=a.img, status=inserted
#floppya: 1_44=/dev/rfd0a, status=inserted

#=======================================================================
# FLOPPYB:
# See FLOPPYA above for syntax
#=======================================================================
#floppyb: 1_44=b:, status=inserted
#floppyb: 1_44=b.img, status=inserted

#=======================================================================
# ATA0, ATA1, ATA2, ATA3
# ATA controller for hard disks and cdroms
#
# ata[0-3]: enabled=[0|1], ioaddr1=addr, ioaddr2=addr, irq=number
#
# These options enables up to 4 ata channels. For each channel
# the two base io addresses and the irq must be specified.
#
# ata0 and ata1 are enabled by default with the values shown below
#
# Examples:
#   ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#   ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
#   ata2: enabled=1, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
#   ata3: enabled=1, ioaddr1=0x168, ioaddr2=0x360, irq=9
#=======================================================================
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9

#=======================================================================
# ATA[0-3]-MASTER, ATA[0-3]-SLAVE
#
# This defines the type and characteristics of all attached ata devices:
#   type=       type of attached device [disk|cdrom]
#   mode=       only valid for disks [flat|concat|external|dll|sparse|vmware3]
#   mode=       only valid for disks [undoable|growing|volatile]
#   path=       path of the image
#   cylinders=  only valid for disks
#   heads=      only valid for disks
#   spt=        only valid for disks
#   status=     only valid for cdroms [inserted|ejected]
#   biosdetect= type of biosdetection [none|auto], only for disks on ata0 [cmos]
#   translation=type of translation of the bios, only for disks [none|lba|large|rechs|auto]
#   model=      string returned by identify device command
#   journal=    optional filename of the redolog for undoable and volatile disks
#   
# Point this at a hard disk image file, cdrom iso file, or physical cdrom
# device.  To create a hard disk image, try running bximage.  It will help you
# choose the size and then suggest a line that works with it.
#
# In UNIX it may be possible to use a raw device as a Bochs hard disk,
# but WE DON'T RECOMMEND IT.  In Windows there is no easy way.
#
# In windows, the drive letter + colon notation should be used for cdroms.
# Depending on versions of windows and drivers, you may only be able to
# access the "first" cdrom in the system.  On MacOSX, use path="drive"
# to access the physical drive.
#
# The path is always mandatory. Disk geometry autodetection works with images
# created by bximage if CHS is set to 0/0/0 (cylinders are calculated using
# heads=16 and spt=63). For other hard disk images and modes the cylinders,
# heads, and spt are mandatory.
#
# Default values are:
#   mode=flat, biosdetect=auto, translation=auto, model="Generic 1234"
#
# The biosdetect option has currently no effect on the bios
#
# Examples:
#   ata0-master: type=disk, mode=flat, path=10M.sample, cylinders=306, heads=4, spt=17
#   ata0-slave:  type=disk, mode=flat, path=20M.sample, cylinders=615, heads=4, spt=17
#   ata1-master: type=disk, mode=flat, path=30M.sample, cylinders=615, heads=6, spt=17
#   ata1-slave:  type=disk, mode=flat, path=46M.sample, cylinders=940, heads=6, spt=17
#   ata2-master: type=disk, mode=flat, path=62M.sample, cylinders=940, heads=8, spt=17
#   ata2-slave:  type=disk, mode=flat, path=112M.sample, cylinders=900, heads=15, spt=17
#   ata3-master: type=disk, mode=flat, path=483M.sample, cylinders=1024, heads=15, spt=63
#   ata3-slave:  type=cdrom, path=iso.sample, status=inserted
#=======================================================================
ata0-master: type=disk, mode=flat, path="30M.sample"
#ata0-master: type=disk, mode=flat, path="30M.sample", cylinders=615, heads=6, spt=17
#ata0-master: type=disk, mode=flat, path="c.img", cylinders=0 # autodetect
#ata0-slave: type=cdrom, path=D:, status=inserted
#ata0-slave: type=cdrom, path=/dev/cdrom, status=inserted
#ata0-slave: type=cdrom, path="drive", status=inserted
#ata0-slave: type=cdrom, path=/dev/rcd0d, status=inserted

#=======================================================================
# BOOT:
# This defines the boot sequence. Now you can specify up to 3 boot drives,
# which can be 'floppy', 'disk', 'cdrom' or 'network' (boot ROM).
# Legacy 'a' and 'c' are also supported.
# Examples:
#   boot: floppy
#   boot: cdrom, disk
#   boot: network, disk
#   boot: cdrom, floppy, disk
#=======================================================================
#boot: floppy
boot: disk

#=======================================================================
# CLOCK:
# This defines the parameters of the clock inside Bochs:
#
#  SYNC:
#  TO BE COMPLETED (see Greg explanation in feature request #536329)
#
#  TIME0:
#  Specifies the start (boot) time of the virtual machine. Use a time
#  value as returned by the time(2) system call. If no time0 value is
#  set or if time0 equal to 1 (special case) or if time0 equal 'local',
#  the simulation will be started at the current local host time.
#  If time0 equal to 2 (special case) or if time0 equal 'utc',
#  the simulation will be started at the current utc time.
#
# Syntax:
#  clock: sync=[none|slowdown|realtime|both], time0=[timeValue|local|utc]
#
# Example:
#   clock: sync=none,     time0=local       # Now (localtime)
#   clock: sync=slowdown, time0=315529200   # Tue Jan  1 00:00:00 1980
#   clock: sync=none,     time0=631148400   # Mon Jan  1 00:00:00 1990
#   clock: sync=realtime, time0=938581955   # Wed Sep 29 07:12:35 1999
#   clock: sync=realtime, time0=946681200   # Sat Jan  1 00:00:00 2000
#   clock: sync=none,     time0=1           # Now (localtime)
#   clock: sync=none,     time0=utc         # Now (utc/gmt)
#
# Default value are sync=none, time0=local
#=======================================================================
#clock: sync=none, time0=local


#=======================================================================
# FLOPPY_BOOTSIG_CHECK: disabled=[0|1]
# Enables or disables the 0xaa55 signature check on boot floppies
# Defaults to disabled=0
# Examples:
#   floppy_bootsig_check: disabled=0
#   floppy_bootsig_check: disabled=1
#=======================================================================
floppy_bootsig_check: disabled=0

#=======================================================================
# LOG:
# Give the path of the log file you'd like Bochs debug and misc. verbiage
# to be written to. If you don't use this option or set the filename to
# '-' the output is written to the console. If you really don't want it,
# make it "/dev/null" (Unix) or "nul" (win32). :^(
#
# Examples:
#   log: ./bochs.out
#   log: /dev/tty
#=======================================================================
#log: /dev/null
log: bochsout.txt

#=======================================================================
# LOGPREFIX:
# This handles the format of the string prepended to each log line.
# You may use those special tokens :
#   %t : 11 decimal digits timer tick
#   %i : 8 hexadecimal digits of cpu current eip (ignored in SMP configuration)
#   %e : 1 character event type ('i'nfo, 'd'ebug, 'p'anic, 'e'rror)
#   %d : 5 characters string of the device, between brackets
#
# Default : %t%e%d
# Examples:
#   logprefix: %t-%e-@%i-%d
#   logprefix: %i%e%d
#=======================================================================
#logprefix: %t%e%d

#=======================================================================
# LOG CONTROLS
#
# Bochs now has four severity levels for event logging.
#   panic: cannot proceed.  If you choose to continue after a panic,
#          don't be surprised if you get strange behavior or crashes.
#   error: something went wrong, but it is probably safe to continue the
#          simulation.
#   info: interesting or useful messages.
#   debug: messages useful only when debugging the code.  This may
#          spit out thousands per second.
#
# For events of each level, you can choose to crash, report, or ignore.
# TODO: allow choice based on the facility: e.g. crash on panics from
#       everything except the cdrom, and only report those.
#
# If you are experiencing many panics, it can be helpful to change
# the panic action to report instead of fatal.  However, be aware
# that anything executed after a panic is uncharted territory and can
# cause bochs to become unstable.  The panic is a "graceful exit," so
# if you disable it you may get a spectacular disaster instead.
#=======================================================================
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
#pass: action=fatal

#=======================================================================
# DEBUGGER_LOG:
# Give the path of the log file you'd like Bochs to log debugger output.
# If you really don't want it, make it /dev/null or '-'. :^(
#
# Examples:
#   debugger_log: ./debugger.out
#=======================================================================
#debugger_log: /dev/null
#debugger_log: debugger.out
debugger_log: -

#=======================================================================
# COM1, COM2, COM3, COM4:
# This defines a serial port (UART type 16550A). In the 'term' you can specify
# a device to use as com1. This can be a real serial line, or a pty.  To use
# a pty (under X/Unix), create two windows (xterms, usually).  One of them will
# run bochs, and the other will act as com1. Find out the tty the com1
# window using the `tty' command, and use that as the `dev' parameter.
# Then do `sleep 1000000' in the com1 window to keep the shell from
# messing with things, and run bochs in the other window.  Serial I/O to
# com1 (port 0x3f8) will all go to the other window.
# In socket* and pipe* (win32 only) modes Bochs becomes either socket/named pipe
# client or server. In client mode it connects to an already running server (if
# connection fails Bochs treats com port as not connected). In server mode it
# opens socket/named pipe and waits until a client application connects to it
# before starting simulation. This mode is useful for remote debugging (e.g.
# with gdb's "target remote host:port" command or windbg's command line option
# -k com:pipe,port=\\\\.\\pipe\\pipename). Note: 'socket' is a shorthand for
# 'socket-client' and 'pipe' for 'pipe-client'. Socket modes use simple TCP
# communication, pipe modes use duplex byte mode pipes.
# Other serial modes are 'null' (no input/output), 'file' (output to a file
# specified as the 'dev' parameter), 'raw' (use the real serial port - under
# construction for win32), 'mouse' (standard serial mouse - requires
# mouse option setting 'type=serial', 'type=serial_wheel' or 'type=serial_msys').
#
# Examples:
#   com1: enabled=1, mode=null
#   com1: enabled=1, mode=mouse
#   com2: enabled=1, mode=file, dev=serial.out
#   com3: enabled=1, mode=raw, dev=com1
#   com3: enabled=1, mode=socket-client, dev=localhost:8888
#   com3: enabled=1, mode=socket-server, dev=localhost:8888
#   com4: enabled=1, mode=pipe-client, dev=\\\\.\\pipe\\mypipe
#   com4: enabled=1, mode=pipe-server, dev=\\\\.\\pipe\\mypipe
#=======================================================================
#com1: enabled=1, mode=term, dev=/dev/ttyp9


#=======================================================================
# PARPORT1, PARPORT2:
# This defines a parallel (printer) port. When turned on and an output file is
# defined the emulated printer port sends characters printed by the guest OS
# into the output file. On some platforms a device filename can be used to
# send the data to the real parallel port (e.g. "/dev/lp0" on Linux, "lpt1" on
# win32 platforms).
#
# Examples:
#   parport1: enabled=1, file="parport.out"
#   parport2: enabled=1, file="/dev/lp0"
#   parport1: enabled=0
#=======================================================================
parport1: enabled=1, file="parport.out"

#=======================================================================
# SB16:
# This defines the SB16 sound emulation. It can have several of the
# following properties.
# All properties are in the format sb16: property=value
# midi: The filename is where the midi data is sent. This can be a
#       device or just a file if you want to record the midi data.
# midimode:
#      0=no data
#      1=output to device (system dependent. midi denotes the device driver)
#      2=SMF file output, including headers
#      3=output the midi data stream to the file (no midi headers and no
#        delta times, just command and data bytes)
# wave: This is the device/file where wave output is stored
# wavemode:
#      0=no data
#      1=output to device (system dependent. wave denotes the device driver)
#      2=VOC file output, incl. headers
#      3=output the raw wave stream to the file
# log:  The file to write the sb16 emulator messages to.
# loglevel:
#      0=no log
#      1=resource changes, midi program and bank changes
#      2=severe errors
#      3=all errors
#      4=all errors plus all port accesses
#      5=all errors and port accesses plus a lot of extra info
# dmatimer:
#      microseconds per second for a DMA cycle.  Make it smaller to fix
#      non-continuous sound.  750000 is usually a good value.  This needs a
#      reasonably correct setting for the IPS parameter of the CPU option.
#
# For an example look at the next line:
#=======================================================================

#sb16: midimode=1, midi=/dev/midi00, wavemode=1, wave=/dev/dsp, loglevel=2, log=sb16.log, dmatimer=600000

#=======================================================================
# VGA_UPDATE_INTERVAL:
# Video memory is scanned for updates and screen updated every so many
# virtual seconds.  The default is 40000, about 25Hz. Keep in mind that
# you must tweak the 'cpu: ips=N' directive to be as close to the number
# of emulated instructions-per-second your workstation can do, for this
# to be accurate.
#
# Examples:
#   vga_update_interval: 250000
#=======================================================================
vga_update_interval: 300000

# using for Winstone '98 tests
#vga_update_interval:  100000

#=======================================================================
# KEYBOARD_SERIAL_DELAY:
# Approximate time in microseconds that it takes one character to
# be transfered from the keyboard to controller over the serial path.
# Examples:
#   keyboard_serial_delay: 200
#=======================================================================
keyboard_serial_delay: 250

#=======================================================================
# KEYBOARD_PASTE_DELAY:
# Approximate time in microseconds between attempts to paste
# characters to the keyboard controller. This leaves time for the
# guest os to deal with the flow of characters.  The ideal setting
# depends on how your operating system processes characters.  The
# default of 100000 usec (.1 seconds) was chosen because it works
# consistently in Windows.
#
# If your OS is losing characters during a paste, increase the paste
# delay until it stops losing characters.
#
# Examples:
#   keyboard_paste_delay: 100000
#=======================================================================
keyboard_paste_delay: 100000

#=======================================================================
# MOUSE:
# This option prevents Bochs from creating mouse "events" unless a mouse
# is  enabled. The hardware emulation itself is not disabled by this.
# You can turn the mouse on by setting enabled to 1, or turn it off by
# setting enabled to 0. Unless you have a particular reason for enabling
# the mouse by default, it is recommended that you leave it off.
# You can also toggle the mouse usage at runtime (control key + middle
# mouse button on X11, SDL, wxWidgets and Win32).
# With the mouse type option you can select the type of mouse to emulate.
# The default value is 'ps2'. The other choices are 'imps2' (wheel mouse
# on PS/2), 'serial', 'serial_wheel' and 'serial_msys' (one com port requires
# setting 'mode=mouse'). To connect a mouse to an USB port, see the 'usb1'
# option (requires PCI and USB support).
#
# Examples:
#   mouse: enabled=1
#   mouse: enabled=1, type=imps2
#   mouse: enabled=1, type=serial
#   mouse: enabled=0
#=======================================================================
mouse: enabled=0

#=======================================================================
# private_colormap: Request that the GUI create and use it's own
#                   non-shared colormap.  This colormap will be used
#                   when in the bochs window.  If not enabled, a
#                   shared colormap scheme may be used.  Not implemented
#                   on all GUI's.
#
# Examples:
#   private_colormap: enabled=1
#   private_colormap: enabled=0
#=======================================================================
private_colormap: enabled=0

#=======================================================================
# fullscreen: ONLY IMPLEMENTED ON AMIGA
#             Request that Bochs occupy the entire screen instead of a
#             window.
#
# Examples:
#   fullscreen: enabled=0
#   fullscreen: enabled=1
#=======================================================================
#fullscreen: enabled=0
#screenmode: name="sample"

#=======================================================================
# ne2k: NE2000 compatible ethernet adapter
#
# Examples:
# ne2k: ioaddr=IOADDR, irq=IRQ, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT
#
# ioaddr, irq: You probably won't need to change ioaddr and irq, unless there
# are IRQ conflicts.
#
# mac: The MAC address MUST NOT match the address of any machine on the net.
# Also, the first byte must be an even number (bit 0 set means a multicast
# address), and you cannot use ff:ff:ff:ff:ff:ff because that's the broadcast
# address.  For the ethertap module, you must use fe:fd:00:00:00:01.  There may
# be other restrictions too.  To be safe, just use the b0:c4... address.
#
# ethdev: The ethdev value is the name of the network interface on your host
# platform.  On UNIX machines, you can get the name by running ifconfig.  On
# Windows machines, you must run niclist to get the name of the ethdev.
# Niclist source code is in misc/niclist.c and it is included in Windows
# binary releases.
#
# script: The script value is optional, and is the name of a script that
# is executed after bochs initialize the network interface. You can use
# this script to configure this network interface, or enable masquerading.
# This is mainly useful for the tun/tap devices that only exist during
# Bochs execution. The network interface name is supplied to the script
# as first parameter
#
# If you don't want to make connections to any physical networks,
# you can use the following 'ethmod's to simulate a virtual network.
#   null: All packets are discarded, but logged to a few files.
#   arpback: ARP is simulated. Disabled by default.
#   vde:  Virtual Distributed Ethernet
#   vnet: ARP, ICMP-echo(ping), DHCP and read/write TFTP are simulated.
#         The virtual host uses 192.168.10.1.
#         DHCP assigns 192.168.10.2 to the guest.
#         TFTP uses the ethdev value for the root directory and doesn't
#         overwrite files.
#
#=======================================================================
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=fbsd, ethdev=en0 #macosx
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=fbsd, ethdev=xl0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=win32, ethdev=MYCARD
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tap, ethdev=tap0
# ne2k: ioaddr=0x300, irq=9, mac=fe:fd:00:00:00:01, ethmod=tuntap, ethdev=/dev/net/tun0, script=./tunconfig
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=null, ethdev=eth0
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vde, ethdev="/tmp/vde.ctl"
# ne2k: ioaddr=0x300, irq=9, mac=b0:c4:20:00:00:01, ethmod=vnet, ethdev="c:/temp"

#=======================================================================
# KEYBOARD_MAPPING:
# This enables a remap of a physical localized keyboard to a
# virtualized us keyboard, as the PC architecture expects.
# If enabled, the keymap file must be specified.
#
# Examples:
#   keyboard_mapping: enabled=1, map=gui/keymaps/x11-pc-de.map
#=======================================================================
keyboard_mapping: enabled=0, map=

#=======================================================================
# KEYBOARD_TYPE:
# Type of keyboard return by a "identify keyboard" command to the
# keyboard controler. It must be one of "xt", "at" or "mf".
# Defaults to "mf". It should be ok for almost everybody. A known
# exception is french macs, that do have a "at"-like keyboard.
#
# Examples:
#   keyboard_type: mf
#=======================================================================
#keyboard_type: mf

#=======================================================================
# USER_SHORTCUT:
# This defines the keyboard shortcut to be sent when you press the "user"
# button in the headerbar. The shortcut string is a combination of maximum
# 3 key names (listed below) separated with a '-' character.
# Valid key names:
# "alt", "bksl", "bksp", "ctrl", "del", "down", "end", "enter", "esc",
# "f1", ... "f12", "home", "ins", "left", "menu", "minus", "pgdwn", "pgup",
# "plus", "right", "shift", "space", "tab", "up", "win", "print" and "power".
#
# Example:
#   user_shortcut: keys=ctrl-alt-del
#=======================================================================
#user_shortcut: keys=ctrl-alt-del

#=======================================================================
# I440FXSUPPORT:
# This option controls the presence of the i440FX PCI chipset. You can
# also specify the devices connected to PCI slots. Up to 5 slots are
# available now. These devices are currently supported: ne2k, pcivga,
# pcidev and pcipnic. If Bochs is compiled with Cirrus SVGA support
# you'll have the additional choice 'cirrus'.
#
# Example:
#   i440fxsupport: enabled=1, slot1=pcivga, slot2=ne2k
#=======================================================================
i440fxsupport: enabled=1

#=======================================================================
# USB1:
# This option controls the presence of the USB root hub which is a part
# of the i440FX PCI chipset. With the portX option you can connect devices
# to the hub (currently supported: 'mouse', 'tablet', 'keypad' and 'disk').
# If you connect the mouse or tablet to one of the ports, Bochs forwards the
# mouse movement data to the USB device instead of the selected mouse type.
# When connecting the keypad to one of the ports, Bochs forwards the input of
# the numeric keypad to the USB device instead of the PS/2 keyboard.
# To connect a flat image as an USB hardisk you can use the 'disk' device with
# the path to the image separated with a colon (see below).
#=======================================================================
#usb1: enabled=1
#usb1: enabled=1, port1=mouse, port2=disk:usbdisk.img

#=======================================================================
# CMOSIMAGE:
# This defines image file that can be loaded into the CMOS RAM at startup.
# The rtc_init parameter controls whether initialize the RTC with values stored
# in the image. By default the time0 argument given to the clock option is used.
# With 'rtc_init=image' the image is the source for the initial time.
#
# Example:
#   cmosimage: file=cmos.img, rtc_init=image
#=======================================================================
#cmosimage: file=cmos.img, rtc_init=time0

#=======================================================================
# MAGIC_BREAK:
# This enables the "magic breakpoint" feature when using the debugger.
# The useless cpu instruction XCHG BX, BX causes Bochs to enter the
# debugger mode. This might be useful for software development.
#
# Example:
#   magic_break: enabled=1
#=======================================================================
#magic_break: enabled=1

#=======================================================================
# DEBUG_SYMBOLS:
# This loads symbols from the specified file for use in Bochs' internal
# debugger. Symbols are loaded into global context. This is equivalent to
# issuing ldsym debugger command at start up.
#
# Example:
#   debug_symbols: file="kernel.sym"
#   debug_symbols: file="kernel.sym", offset=0x80000000
#=======================================================================
#debug_symbols: file="kernel.sym"

#=======================================================================
# other stuff
#=======================================================================
#load32bitOSImage: os=nullkernel, path=../kernel.img, iolog=../vga_io.log
#load32bitOSImage: os=linux, path=../linux.img, iolog=../vga_io.log, initrd=../initrd.img
#text_snapshot_check: enabled=1
#print_timestamps: enabled=1

#-------------------------
# PCI host device mapping
#-------------------------
#pcidev: vendor=0x1234, device=0x5678

#=======================================================================
# GDBSTUB:
# Enable GDB stub. See user documentation for details.
# Default value is enabled=0.
#=======================================================================
#gdbstub: enabled=0, port=1234, text_base=0, data_base=0, bss_base=0

#=======================================================================
# for Macintosh, use the style of pathnames in the following
# examples.
#
# vgaromimage: :bios:VGABIOS-elpin-2.40
# romimage: file=:bios:BIOS-bochs-latest, address=0xf0000
# floppya: 1_44=[fd:], status=inserted
#=======================================================================

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
地板
 楼主| 发表于 2010-12-22 21:40:43 | 只看该作者

bochs 支持的磁盘镜像格式

Bochs 可以独立的处理 ata 接口的磁盘镜像格式。磁盘类型在配置文件中用 mode 来指定,如下:
ata0-master: type=disk, mode=flat, path=10M.sample, cylinders=306, heads=4, spt=17
如果不指定 mode,那么默认就是 flat 模式。

下面是两个常用的支持格式:
类型名称
描述
特性
flat单文件,平坦式
可以用mtools和winimage这样的工具来访问
concat多个文件,可联结式
如hd0,hda1两个文件可以看做是单个磁盘的两个分区
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2024-5-19 07:36 , Processed in 0.075575 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表