another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s. As "*" isn't a desirable part of directory names, just name the whole thing "fail/", the core parts being stored in "fail/core/". Additionally fixing two build system dependency issues: - missing jobserver -> protomessages dependency - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain file dependencies ... cmake for the win) git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
*.o
|
||||
*.a
|
||||
*.d
|
||||
*.acc
|
||||
*.pb.h
|
||||
*.pb.cc
|
||||
*.gcda
|
||||
*~
|
||||
Makefile
|
||||
build
|
||||
|
||||
bochs/autom4te.cache/
|
||||
bochs/bochs
|
||||
bochs/build/linux/bochs-dlx
|
||||
bochs/build/macosx/Info.plist
|
||||
bochs/build/win32/nsis/bochs.nsi
|
||||
bochs/bxcommit
|
||||
bochs/bximage
|
||||
bochs/bxversion.h
|
||||
bochs/bxversion.rc
|
||||
bochs/config.h
|
||||
bochs/config.log
|
||||
bochs/config.status
|
||||
bochs/libtool
|
||||
bochs/ltdlconf.h
|
||||
|
||||
!bochs/plex86/kernel/freebsd/Makefile
|
||||
68
CMakeLists.txt
Normal file
68
CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
PROJECT(Fail*)
|
||||
|
||||
set(PROJECT_VERSION "0.0.1" CACHE STRING "Fail* version number")
|
||||
|
||||
#### Put all resulting library files in <your_build_dir>/lib ####
|
||||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
#### Put all resulting executables in <your_build_dir>/bin ####
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
# At the moment this is the campaign controller executable.
|
||||
## (The autoconf'd Bochs instance is placed in the auto-configured path,
|
||||
## as we still just call Bochs' Makefile's make install)
|
||||
|
||||
|
||||
#### Setup search path for custom cmake scipts ####
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
#### Compiler configuration, see cmake/compilerconfig.cmake
|
||||
include(compilerconfig)
|
||||
|
||||
#### #OPTION to configure Bochs/OVP ####
|
||||
OPTION( BUILD_OVP "Build OVP Variant?" OFF) # Defaults to BOCHS ON
|
||||
OPTION( BUILD_BOCHS "Build Bochs Variant?" ON)
|
||||
|
||||
#### Configuration file emitting BUILD_OVP/BOCHS defines ####
|
||||
configure_file(${CMAKE_SOURCE_DIR}/core/variant_config.h.cmake ${CMAKE_SOURCE_DIR}/core/variant_config.h)
|
||||
|
||||
if(BUILD_OVP)
|
||||
message(STATUS "[${PROJECT_NAME}] Building OVP variant...")
|
||||
SET(VARIANT ovp)
|
||||
else(BUILD_OVP)
|
||||
message(STATUS "[${PROJECT_NAME}] Building Bochs variant...")
|
||||
## add necessary additional header search paths.
|
||||
add_definitions(-I${CMAKE_SOURCE_DIR}/bochs/instrument/stubs/ -I${CMAKE_SOURCE_DIR}/bochs/)
|
||||
SET(VARIANT bochs)
|
||||
endif(BUILD_OVP)
|
||||
|
||||
## Additional Compiler flags ##
|
||||
set(CMAKE_C_FLAGS "-g -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
|
||||
## Tell the linker where to find the libfail.a
|
||||
link_directories("${LIBRARY_OUTPUT_PATH}")
|
||||
|
||||
## Add CMakeLists from subdirectories (at the moment only core)
|
||||
add_subdirectory(core)
|
||||
|
||||
if(BUILD_OVP)
|
||||
add_subdirectory(ovp)
|
||||
else(BUILD_OVP)
|
||||
endif(BUILD_OVP)
|
||||
|
||||
## Just for testing:
|
||||
## Invoking bochs build via external project
|
||||
# Setup configure call for bochs (-> make ebochs)
|
||||
# Prefix dir for make install etc
|
||||
#set(BOCHS_PREFIX_DIR "${CMAKE_BINARY_DIR}/bochs")
|
||||
#configure_file(${CMAKE_SOURCE_DIR}/cmake/config_failbochs.sh.in ${CMAKE_BINARY_DIR}/config_bochs.sh)
|
||||
#
|
||||
#include(ExternalProject)
|
||||
#externalproject_add(
|
||||
# ebochs
|
||||
# SOURCE_DIR ${CMAKE_SOURCE_DIR}/bochs
|
||||
# CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/config_bochs.sh
|
||||
# BUILD_IN_SOURCE 1
|
||||
# PREFIX ${BOCHS_PREFIX_DIR}
|
||||
#)
|
||||
989
bochs/.bochsrc
Normal file
989
bochs/.bochsrc
Normal file
@ -0,0 +1,989 @@
|
||||
# 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.
|
||||
# Depending on the platform there are up to 3 choices of configuration
|
||||
# interface: a text mode version called "textconfig" and two graphical versions
|
||||
# called "win32config" and "wx". The text mode version uses stdin/stdout and
|
||||
# is always compiled in, unless Bochs is compiled for wx only. The choice
|
||||
# "win32config" is only available on win32 and it is the default there.
|
||||
# The choice "wx" 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: win32config
|
||||
#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="gui_debug" # use Win32 debugger gui
|
||||
#display_library: wx
|
||||
#display_library: x, options="hideIPS" # disable IPS output in status bar
|
||||
#display_library: x, options="gui_debug" # use GTK debugger gui
|
||||
|
||||
#=======================================================================
|
||||
# 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=bios/seabios-0.5.1.bin
|
||||
#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 !
|
||||
#
|
||||
# MSRS:
|
||||
# Define path to user CPU Model Specific Registers (MSRs) specification.
|
||||
# See example in msrs.def.
|
||||
#
|
||||
# IGNORE_BAD_MSRS:
|
||||
# Ignore MSR references that Bochs does not understand; print a warning
|
||||
# message instead of generating #GP exception. This option is enabled
|
||||
# by default but will not be avaiable if configurable MSRs are enabled.
|
||||
#
|
||||
# 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 host's capability.
|
||||
# Measured IPS value will then be logged into your log file or shown
|
||||
# in the 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=50000000, reset_on_triple_fault=1, ignore_bad_msrs=1, msrs="msrs.def"
|
||||
|
||||
#=======================================================================
|
||||
# CPUID:
|
||||
#
|
||||
# This defines features and functionality supported by Bochs emulated CPU:
|
||||
#
|
||||
# MMX:
|
||||
# Select MMX instruction set support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 5.
|
||||
#
|
||||
# SEP:
|
||||
# Select SYSENTER/SYSEXIT instruction set support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# SSE:
|
||||
# Select SSE instruction set support.
|
||||
# Any of NONE/SSE/SSE2/SSE3/SSSE3/SSE4_1/SSE4_2 could be selected.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# XAPIC:
|
||||
# Select XAPIC extensions support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# AES:
|
||||
# Select AES instruction set support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# MOVBE:
|
||||
# Select MOVBE Intel(R) Atom instruction support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# XSAVE:
|
||||
# Select XSAVE extensions support.
|
||||
# This option exists only if Bochs compiled with BX_CPU_LEVEL >= 6.
|
||||
#
|
||||
# 1G_PAGES:
|
||||
# Enable 1G page size support in long mode.
|
||||
# This option exists only if Bochs compiled with x86-64 support.
|
||||
#
|
||||
# PCID:
|
||||
# Enable Process-Context Identifiers (PCID) support in long mode.
|
||||
# This option exists only if Bochs compiled with x86-64 support.
|
||||
#
|
||||
# FSGSBASE:
|
||||
# Enable GS/GS BASE access instructions support in long mode.
|
||||
# This option exists only if Bochs compiled with x86-64 support.
|
||||
#
|
||||
# MWAIT:
|
||||
# Select MONITOR/MWAIT instructions support.
|
||||
# This option exists only if Bochs compiled with --enable-monitor-mwait.
|
||||
#
|
||||
# MWAIT_IS_NOP:
|
||||
# When this option is enabled MWAIT will not put the CPU into a sleep state.
|
||||
# This option exists only if Bochs compiled with --enable-monitor-mwait.
|
||||
#
|
||||
# VENDOR_STRING:
|
||||
# Set the CPUID vendor string returned by CPUID(0x0). This should be a
|
||||
# twelve-character ASCII string.
|
||||
#
|
||||
# BRAND_STRING:
|
||||
# Set the CPUID vendor string returned by CPUID(0x80000002 .. 0x80000004).
|
||||
# This should be at most a forty-eight-character ASCII string.
|
||||
#
|
||||
# STEPPING:
|
||||
# Set stepping information returned by CPUID. Default stepping value is 3.
|
||||
#
|
||||
# CPUID_LIMIT_WINNT:
|
||||
# Determine whether to limit maximum CPUID function to 3. This mode is
|
||||
# required to workaround WinNT installation and boot issues.
|
||||
#=======================================================================
|
||||
cpuid: mmx=1, sep=1, sse=sse4_2, xapic=1, aes=1, movbe=1, xsave=1
|
||||
cpuid: stepping=5
|
||||
cpuid: cpuid_limit_winnt=0
|
||||
|
||||
#=======================================================================
|
||||
# MEMORY
|
||||
# Set the amount of physical memory you want to emulate.
|
||||
#
|
||||
# GUEST:
|
||||
# Set amount of guest physical memory to emulate. The default is 32MB,
|
||||
# the maximum amount limited only by physical address space limitations.
|
||||
#
|
||||
# HOST:
|
||||
# Set amount of host memory you want to allocate for guest RAM emulation.
|
||||
# It is possible to allocate less memory than you want to emulate in guest
|
||||
# system. This will fake guest to see the non-existing memory. Once guest
|
||||
# system touches new memory block it will be dynamically taken from the
|
||||
# memory pool. You will be warned (by FATAL PANIC) in case guest already
|
||||
# used all allocated host memory and wants more.
|
||||
#
|
||||
#=======================================================================
|
||||
memory: guest=512, host=256
|
||||
|
||||
#=======================================================================
|
||||
# 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" media)
|
||||
# floppya: 1_44=path, status=inserted (1.44M 3.5" media)
|
||||
# floppya: 1_2=path, status=ejected (1.2M 5.25" media)
|
||||
# floppya: 720k=path, status=inserted (720K 3.5" media)
|
||||
# floppya: 360k=path, status=inserted (360K 5.25" media)
|
||||
# floppya: 320k=path, status=inserted (320K 5.25" media)
|
||||
# floppya: 180k=path, status=inserted (180K 5.25" media)
|
||||
# floppya: 160k=path, status=inserted (160K 5.25" media)
|
||||
# floppya: image=path, status=inserted (guess media type from image size)
|
||||
# floppya: 1_44=vvfat:path, status=inserted (use directory as VFAT media)
|
||||
# floppya: type=1_44 (1.44M 3.5" floppy drive, no media)
|
||||
#
|
||||
# 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.
|
||||
# The parameter 'type' can be used to enable the floppy drive without media
|
||||
# and status specified. Usually the drive type is set up based on the media type.
|
||||
# The optional parameter 'write_protected' can be used to control the media
|
||||
# write protect switch. By default it is turned off.
|
||||
#=======================================================================
|
||||
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, write_protected=1
|
||||
#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|vvfat]
|
||||
# path= path of the image / directory
|
||||
# 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, volatile and vvfat 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 mandatory for hard disks. 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. In all cases the disk size reported
|
||||
# from the image must be exactly C*H*S*512.
|
||||
#
|
||||
# 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=disk, mode=vvfat, path=/bochs/images/vvfat, journal=vvfat.redolog
|
||||
#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:
|
||||
# This defines the method how to synchronize the Bochs internal time
|
||||
# with realtime. With the value 'none' the Bochs time relies on the IPS
|
||||
# value and no host time synchronization is used. The 'slowdown' method
|
||||
# sacrifices performance to preserve reproducibility while allowing host
|
||||
# time correlation. The 'realtime' method sacrifices reproducibility to
|
||||
# preserve performance and host-time correlation.
|
||||
# It is possible to enable both synchronization methods.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Examples for output devices:
|
||||
# sb16: midimode=1, midi="", wavemode=1, wave="" # win32
|
||||
# sb16: midimode=1, midi=alsa:128:0, wavemode=1, wave=alsa # Linux with ALSA
|
||||
#=======================================================================
|
||||
#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 50000, about 20Hz. 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 defines parameters for the emulated mouse type, the initial status
|
||||
# of the mouse capture and the runtime method to toggle it.
|
||||
#
|
||||
# TYPE:
|
||||
# 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 'usb_uhci'
|
||||
# or 'usb_ohci' option (requires PCI and USB support).
|
||||
#
|
||||
# ENABLED:
|
||||
# The Bochs gui creates mouse "events" unless the 'enabled' option is
|
||||
# set to 0. The hardware emulation itself is not disabled by this.
|
||||
# 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 (RFB, SDL, Win32, wxWidgets and X11 - see below).
|
||||
#
|
||||
# TOGGLE:
|
||||
# The default method to toggle the mouse capture at runtime is to press the
|
||||
# CTRL key and the middle mouse button ('ctrl+mbutton'). This option allows
|
||||
# to change the method to 'ctrl+f10' (like DOSBox), 'ctrl+alt' (like QEMU)
|
||||
# or 'f12' (replaces win32 'legacyF12' option).
|
||||
#
|
||||
# Examples:
|
||||
# mouse: enabled=1
|
||||
# mouse: type=imps2, enabled=1
|
||||
# mouse: type=serial, enabled=1
|
||||
# mouse: enabled=0, toggle=ctrl+f10
|
||||
#=======================================================================
|
||||
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. These arguments are ignored when assign the ne2k to a
|
||||
# PCI slot.
|
||||
#
|
||||
# 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"
|
||||
|
||||
#=======================================================================
|
||||
# pnic: Bochs/Etherboot pseudo-NIC
|
||||
#
|
||||
# Example:
|
||||
# pnic: enabled=1, mac=MACADDR, ethmod=MODULE, ethdev=DEVICE, script=SCRIPT
|
||||
#
|
||||
# The pseudo-NIC accepts the same syntax (for mac, ethmod, ethdev, script) and
|
||||
# supports the same networking modules as the NE2000 adapter. In addition to
|
||||
# this, it must be assigned to a PCI slot.
|
||||
#=======================================================================
|
||||
#pnic: enabled=1, mac=b0:c4:20:00:00:00, ethmod=vnet
|
||||
|
||||
#=======================================================================
|
||||
# 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, pcipnic and usb_ohci. 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
|
||||
|
||||
#=======================================================================
|
||||
# USB_UHCI:
|
||||
# This option controls the presence of the USB root hub which is a part
|
||||
# of the i440FX PCI chipset. With the portX parameter you can connect devices
|
||||
# to the hub (currently supported: 'mouse', 'tablet', 'keypad', 'disk', 'cdrom'
|
||||
# 'hub' and 'printer').
|
||||
#
|
||||
# The optionsX parameter can be used to assign specific options to the device
|
||||
# connected to the corresponding USB port. Currently this feature is only used
|
||||
# to set the speed reported by device and by the 'disk' device to specify
|
||||
# an alternative redolog file of some image modes.
|
||||
#
|
||||
# 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' mode image as an USB hardisk you can use the 'disk' device
|
||||
# with the path to the image separated with a colon. To use other disk image modes
|
||||
# similar to ATA disks the syntax 'disk:mode:filename' must be used (see below).
|
||||
#
|
||||
# To emulate an USB cdrom you can use the 'cdrom' device name and the path to
|
||||
# an ISO image or raw device name also separated with a colon. An option to
|
||||
# insert/eject media is available in the runtime configuration.
|
||||
#
|
||||
# The device name 'hub' connects an external hub with max. 8 ports (default: 4)
|
||||
# to the root hub. To specify the number of ports you have to add the value
|
||||
# separated with a colon. Connecting devices to the external hub ports is only
|
||||
# available in the runtime configuration.
|
||||
#
|
||||
# The device 'printer' emulates the HP Deskjet 920C printer. The PCL data is
|
||||
# sent to a file specified in bochsrc.txt. The current code appends the PCL
|
||||
# code to the file if the file already existed. It would probably be nice to
|
||||
# overwrite the file instead, asking user first.
|
||||
#=======================================================================
|
||||
#usb_uhci: enabled=1
|
||||
#usb_uhci: enabled=1, port1=mouse, port2=disk:usbstick.img
|
||||
#usb_uhci: enabled=1, port1=hub:7, port2=disk:growing:usbdisk.img
|
||||
#usb_uhci: enabled=1, port2=disk:undoable:usbdisk.img, options1=journal:redo.log
|
||||
#usb_uhci: enabled=1, port1=printer:printdata.bin, port2=cdrom:image.iso
|
||||
|
||||
#=======================================================================
|
||||
# USB_OHCI:
|
||||
# This option controls the presence of the USB OHCI host controller with a
|
||||
# 2-port hub. The portX option accepts the same device types with the same
|
||||
# syntax as the UHCI controller (see above). The OHCI HC must be assigned to
|
||||
# a PCI slot.
|
||||
#=======================================================================
|
||||
#usb_ohci: enabled=1
|
||||
#usb_ohci: enabled=1, port1=printer:usbprinter.bin
|
||||
|
||||
#=======================================================================
|
||||
# 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
|
||||
|
||||
#=======================================================================
|
||||
# PORT_E9_HACK:
|
||||
# The 0xE9 port doesn't exists in normal ISA architecture. However, we
|
||||
# define a convention here, to display on the console of the system running
|
||||
# Bochs anything that is written to it. The idea is to provide debug output
|
||||
# very early when writing BIOS or OS code for example, without having to
|
||||
# bother with setting up a serial port or etc. Reading from port 0xE9 will
|
||||
# will return 0xe9 to let you know if the feature is available.
|
||||
# Leave this 0 unless you have a reason to use it.
|
||||
#
|
||||
# Example:
|
||||
# port_e9_hack: enabled=1
|
||||
#=======================================================================
|
||||
#port_e9_hack: 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
|
||||
|
||||
#=======================================================================
|
||||
# PLUGIN_CTRL:
|
||||
# Controls the presence of optional plugins without a separate option.
|
||||
# By default all existing plugins are enabled. These plugins are currently
|
||||
# supported: 'acpi', 'biosdev', 'extfpuirq', 'gameport', 'iodebug',
|
||||
# 'pci_ide', 'speaker' and 'unmapped'.
|
||||
#=======================================================================
|
||||
#plugin_ctrl: biosdev=0, speaker=0
|
||||
|
||||
#=======================================================================
|
||||
# USER_PLUGIN:
|
||||
# Load user-defined plugin. This option is available only if Bochs is
|
||||
# compiled with plugin support. Maximum 8 different plugins are supported.
|
||||
# See the example in the Bochs sources how to write a plugin device.
|
||||
#=======================================================================
|
||||
#user_plugin: name=testdev
|
||||
|
||||
#=======================================================================
|
||||
# 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
|
||||
#=======================================================================
|
||||
|
||||
#=======================================================================
|
||||
# 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.
|
||||
# The 'MEGS' option is deprecated. Use 'MEMORY' option instead.
|
||||
#=======================================================================
|
||||
#megs: 256
|
||||
#megs: 128
|
||||
#megs: 64
|
||||
#megs: 32
|
||||
#megs: 16
|
||||
#megs: 8
|
||||
6
bochs/.conf.amigaos
Executable file
6
bochs/.conf.amigaos
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# These options should work on Amiga/MorphOS
|
||||
#
|
||||
|
||||
./configure --with-amigaos --disable-shared ${CONFIGURE_ARGS}
|
||||
21
bochs/.conf.beos
Executable file
21
bochs/.conf.beos
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# These options are suggested by Bernd Korz, who maintains the BeOS
|
||||
# port. He says that SDL works better than the native BeOS gui.
|
||||
#
|
||||
|
||||
CC=gcc
|
||||
CXX=$CC
|
||||
CFLAGS="-Wall -O9 -mpentium -fomit-frame-pointer -pipe"
|
||||
CXXFLAGS=$CFLAGS
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
./configure --with-sdl \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-pci
|
||||
36
bochs/.conf.everything
Normal file
36
bochs/.conf.everything
Normal file
@ -0,0 +1,36 @@
|
||||
# This script tries to turn on nearly every configure option.
|
||||
# It is useful for finding compile problems, but it may turn on
|
||||
# more things than you actually want.
|
||||
|
||||
./configure \
|
||||
--enable-smp \
|
||||
--enable-x2apic \
|
||||
--enable-x86-64 \
|
||||
--enable-all-optimizations \
|
||||
--enable-long-phy-address \
|
||||
--enable-configurable-msrs \
|
||||
--enable-debugger \
|
||||
--enable-disasm \
|
||||
--enable-debugger-gui \
|
||||
--enable-fpu \
|
||||
--enable-misaligned-sse \
|
||||
--enable-alignment-check \
|
||||
--enable-3dnow \
|
||||
--enable-monitor-mwait \
|
||||
--enable-vmx \
|
||||
--enable-x86-debugger \
|
||||
--enable-a20-pin \
|
||||
--enable-instrumentation=instrument/example1 \
|
||||
--enable-vbe \
|
||||
--enable-ne2000 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-usb-ohci \
|
||||
--enable-cdrom \
|
||||
--enable-sb16 \
|
||||
--enable-iodebug \
|
||||
--enable-gdb-stub \
|
||||
--enable-show-ips \
|
||||
--with-all-libs
|
||||
64
bochs/.conf.linux
Executable file
64
bochs/.conf.linux
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# .conf.linux
|
||||
#
|
||||
|
||||
#which_config=normal
|
||||
which_config=plugins
|
||||
|
||||
CC="gcc"
|
||||
CXX="c++"
|
||||
CFLAGS="-Wall -O3 -fomit-frame-pointer -pipe" # for speed
|
||||
#CFLAGS="-Wall -g -pipe" # for development
|
||||
CXXFLAGS="$CFLAGS"
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
|
||||
case $which_config in
|
||||
|
||||
normal)
|
||||
|
||||
#######################################################################
|
||||
# configuration 1 for release binary RPMs
|
||||
# Include a few standard options, speed optimizations, X11 only.
|
||||
#######################################################################
|
||||
./configure --enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-usb-ohci \
|
||||
--enable-show-ips \
|
||||
${CONFIGURE_ARGS}
|
||||
;;
|
||||
|
||||
plugins)
|
||||
#######################################################################
|
||||
# configuration 2 for release binary RPMs
|
||||
# Include plugins, every possible gui.
|
||||
#######################################################################
|
||||
./configure --enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-usb-ohci \
|
||||
--enable-plugins \
|
||||
--enable-show-ips \
|
||||
--with-all-libs \
|
||||
${CONFIGURE_ARGS}
|
||||
;;
|
||||
|
||||
esac
|
||||
34
bochs/.conf.macos
Executable file
34
bochs/.conf.macos
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script will run configure for a Macintosh/CodeWarrior Pro
|
||||
# environment. I actually run this on my Linux machine, but
|
||||
# the generated files are for a Mac.
|
||||
|
||||
set echo
|
||||
|
||||
# These really just make ./configure happy on your Unix machine.
|
||||
# They are not the options used on your Mac.
|
||||
CC="gcc"
|
||||
CFLAGS=""
|
||||
CXX="$CC"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
./configure --target=ppc-macos \
|
||||
--enable-sb16 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-plugins \
|
||||
--with-macos \
|
||||
${CONFIGURE_ARGS}
|
||||
|
||||
unset echo
|
||||
33
bochs/.conf.macosx
Normal file
33
bochs/.conf.macosx
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this sets up the compile for MacOS X
|
||||
#
|
||||
# To support plugins on macosx, you must have "dlcompat" installed. You can
|
||||
# get dlcompat by installing the fink package "dlcompat-devel". On the SF
|
||||
# compile farm, dlcompat is in /sw/include and /sw/lib, so we have added
|
||||
# those paths to the environment variables.
|
||||
|
||||
set echo
|
||||
CFLAGS="-pipe -O3 -I/sw/include -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
|
||||
CPATH="/sw/include"
|
||||
CPPFLAGS=""
|
||||
CXXFLAGS="$CFLAGS"
|
||||
LDFLAGS="-L/sw/lib"
|
||||
|
||||
export CFLAGS
|
||||
export CPATH
|
||||
export CPPFLAGS
|
||||
export CXXFLAGS
|
||||
export LDFLAGS
|
||||
|
||||
./configure --enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-plugins \
|
||||
${CONFIGURE_ARGS}
|
||||
18
bochs/.conf.nothing
Executable file
18
bochs/.conf.nothing
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# These are the steps I typically use to configure and compile Bochs
|
||||
# on a Win32 system with cygwin (v.20.1)
|
||||
#
|
||||
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
CFLAGS="-O3 -Wall -Wno-format"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
./configure --enable-cpu-level=3 \
|
||||
--disable-fpu
|
||||
31
bochs/.conf.sparc
Executable file
31
bochs/.conf.sparc
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# These are the steps I typically use to configure and compile Bochs.
|
||||
#
|
||||
|
||||
# superSPARC w/ Solaris 2.x
|
||||
set echo
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
#CFLAGS="-Wall -O2 -mv8 -msupersparc -mno-epilogue"
|
||||
CFLAGS="-Wall -O2 -mv8 -msupersparc"
|
||||
#CFLAGS="-Wall -O2 -g"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
./configure --enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb
|
||||
|
||||
unset echo
|
||||
28
bochs/.conf.win32-cygwin
Executable file
28
bochs/.conf.win32-cygwin
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# These are the steps I typically use to configure and compile Bochs
|
||||
# on a Win32 system with cygwin (v.20.1)
|
||||
#
|
||||
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
CFLAGS="-O3 -Wall -Wno-format"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
|
||||
export CC
|
||||
export CXX
|
||||
export CFLAGS
|
||||
export CXXFLAGS
|
||||
|
||||
./configure --enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-usb-ohci \
|
||||
--enable-show-ips \
|
||||
--with-win32 --with-rfb --with-nogui
|
||||
29
bochs/.conf.win32-vcpp
Executable file
29
bochs/.conf.win32-vcpp
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
set echo
|
||||
|
||||
./configure --target=pentium-windows \
|
||||
--enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-pci \
|
||||
--enable-acpi \
|
||||
--enable-clgd54xx \
|
||||
--enable-usb \
|
||||
--enable-usb-ohci \
|
||||
--enable-show-ips \
|
||||
--disable-readline \
|
||||
--without-x \
|
||||
--with-win32 --with-rfb --with-nogui
|
||||
|
||||
unset echo
|
||||
|
||||
# Fix up all makefiles so that nmake can handle them.
|
||||
for i in `find . -name Makefile`; do
|
||||
echo Removing curly brackets in $i for NMAKE.
|
||||
mv $i $i.tmp
|
||||
sed -e 's/{/(/g' -e 's/}/)/g' < $i.tmp > $i
|
||||
rm -f $i.tmp
|
||||
done
|
||||
3374
bochs/CHANGES
Normal file
3374
bochs/CHANGES
Normal file
File diff suppressed because it is too large
Load Diff
504
bochs/COPYING
Normal file
504
bochs/COPYING
Normal file
@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
726
bochs/Makefile.in
Normal file
726
bochs/Makefile.in
Normal file
@ -0,0 +1,726 @@
|
||||
# Copyright (C) 2001 The Bochs Project
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
####################################################
|
||||
# NOTE: To be compatibile with nmake (microsoft vc++) please follow
|
||||
# the following rules:
|
||||
# use $(VAR) not ${VAR}
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
plugdir = @libdir@/bochs/plugins
|
||||
datarootdir = @datarootdir@
|
||||
mandir = @mandir@
|
||||
man1dir = $(mandir)/man1
|
||||
man5dir = $(mandir)/man5
|
||||
docdir = $(datarootdir)/doc/bochs
|
||||
sharedir = $(datarootdir)/bochs
|
||||
top_builddir = .
|
||||
top_srcdir = $(srcdir)
|
||||
|
||||
DESTDIR =
|
||||
|
||||
VERSION=@VERSION@
|
||||
VER_STRING=@VER_STRING@
|
||||
REL_STRING=@REL_STRING@
|
||||
MAN_PAGE_1_LIST=bochs bximage bxcommit bochs-dlx
|
||||
MAN_PAGE_5_LIST=bochsrc
|
||||
INSTALL_LIST_SHARE=bios/BIOS-bochs-* bios/VGABIOS* @INSTALL_LIST_FOR_PLATFORM@
|
||||
INSTALL_LIST_DOC=CHANGES COPYING README TODO
|
||||
INSTALL_LIST_BIN=bochs@EXE@ bximage@EXE@ bxcommit@EXE@
|
||||
INSTALL_LIST_BIN_OPTIONAL=bochsdbg@EXE@
|
||||
INSTALL_LIST_WIN32=$(INSTALL_LIST_SHARE) $(INSTALL_LIST_DOC) $(INSTALL_LIST_BIN) $(INSTALL_LIST_BIN_OPTIONAL) niclist@EXE@
|
||||
INSTALL_LIST_MACOSX=$(INSTALL_LIST_SHARE) $(INSTALL_LIST_DOC) bochs.scpt
|
||||
# for win32 and macosx, these files get renamed to *.txt in install process
|
||||
TEXT_FILE_LIST=README CHANGES COPYING TODO VGABIOS-elpin-LICENSE VGABIOS-lgpl-README
|
||||
CP=cp
|
||||
CAT=cat
|
||||
RM=rm
|
||||
MV=mv
|
||||
LN_S=ln -sf
|
||||
DLXLINUX_TAR=dlxlinux4.tar.gz
|
||||
DLXLINUX_TAR_URL=http://bochs.sourceforge.net/guestos/$(DLXLINUX_TAR)
|
||||
DLXLINUX_ROMFILE=BIOS-bochs-latest
|
||||
GUNZIP=gunzip
|
||||
WGET=@WGET@
|
||||
SED=sed
|
||||
MKDIR=mkdir
|
||||
RMDIR=rmdir
|
||||
TAR=tar
|
||||
CHMOD=chmod
|
||||
# the GZIP variable is reserved by gzip program
|
||||
GZIP_BIN=gzip -9
|
||||
GUNZIP=gunzip
|
||||
ZIP=zip
|
||||
UNIX2DOS=unix2dos
|
||||
LIBTOOL=@LIBTOOL@
|
||||
DLLTOOL=dlltool
|
||||
RC_CMD=@RC_CMD@
|
||||
|
||||
@SUFFIX_LINE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CFLAGS = @CFLAGS@ @GUI_CFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS) @DEFINE_PLUGIN_PATH@ -DBX_SHARE_PATH='"$(sharedir)"'
|
||||
CXXFLAGS = @CXXFLAGS@ @GUI_CXXFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS) @DEFINE_PLUGIN_PATH@ -DBX_SHARE_PATH='"$(sharedir)"'
|
||||
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
# To compile with readline:
|
||||
# linux needs just -lreadline
|
||||
# solaris needs -lreadline -lcurses
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
XPM_LIB = @XPM_LIB@
|
||||
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(XPM_LIB) -lXrandr
|
||||
GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
|
||||
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
|
||||
GUI_LINK_OPTS_BEOS = -lbe
|
||||
GUI_LINK_OPTS_RFB = @RFB_LIBS@
|
||||
GUI_LINK_OPTS_AMIGAOS =
|
||||
GUI_LINK_OPTS_WIN32 = -luser32 -lgdi32 -lcomdlg32 -lcomctl32 -lwsock32 -lshell32
|
||||
GUI_LINK_OPTS_WIN32_VCPP = user32.lib gdi32.lib winmm.lib \
|
||||
comdlg32.lib comctl32.lib wsock32.lib advapi32.lib shell32.lib
|
||||
GUI_LINK_OPTS_MACOS =
|
||||
GUI_LINK_OPTS_CARBON = -framework Carbon
|
||||
GUI_LINK_OPTS_NOGUI =
|
||||
GUI_LINK_OPTS_TERM = @GUI_LINK_OPTS_TERM@
|
||||
GUI_LINK_OPTS_WX = @GUI_LINK_OPTS_WX@
|
||||
GUI_LINK_OPTS = @GUI_LINK_OPTS@ @DEVICE_LINK_OPTS@
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
CFLAGS_CONSOLE = @CFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
|
||||
CXXFLAGS_CONSOLE = @CXXFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
|
||||
BXIMAGE_LINK_OPTS = @BXIMAGE_LINK_OPTS@
|
||||
|
||||
BX_INCDIRS = -I. -I$(srcdir)/. -I@INSTRUMENT_DIR@ -I$(srcdir)/@INSTRUMENT_DIR@
|
||||
|
||||
#SUBDIRS = iodev bx_debug
|
||||
|
||||
#all install uninstall: config.h#
|
||||
# for subdir in $(SUBDIRS); do #
|
||||
# echo making $@ in $$subdir; #
|
||||
# ($(MAKE) -C $$subdir $(MDEFINES) $@) || exit 1; #
|
||||
# done#
|
||||
|
||||
|
||||
|
||||
# gnu flags for clean up
|
||||
#CFLAGS = -ansi -O -g -Wunused -Wuninitialized
|
||||
|
||||
|
||||
NONINLINE_OBJS = \
|
||||
logio.o \
|
||||
main.o \
|
||||
config.o \
|
||||
load32bitOShack.o \
|
||||
pc_system.o \
|
||||
osdep.o \
|
||||
plugin.o \
|
||||
crc.o \
|
||||
@EXTRA_BX_OBJS@
|
||||
|
||||
EXTERN_ENVIRONMENT_OBJS = \
|
||||
main.o \
|
||||
config.o \
|
||||
load32bitOShack.o \
|
||||
pc_system.o
|
||||
|
||||
DEBUGGER_LIB = bx_debug/libdebug.a
|
||||
DISASM_LIB = disasm/libdisasm.a
|
||||
INSTRUMENT_LIB = @INSTRUMENT_DIR@/libinstrument.a
|
||||
FPU_LIB = fpu/libfpu.a
|
||||
READLINE_LIB = @READLINE_LIB@
|
||||
EXTRA_LINK_OPTS = @EXTRA_LINK_OPTS@
|
||||
|
||||
GDBSTUB_OBJS = gdbstub.o
|
||||
|
||||
BX_OBJS = @NONINLINE_VAR@
|
||||
|
||||
BX_INCLUDES = bochs.h config.h osdep.h
|
||||
|
||||
|
||||
.@CPP_SUFFIX@.o:
|
||||
$(CXX) @DASH@c $(BX_INCDIRS) $(CXXFLAGS) @CXXFP@$< @OFP@$@
|
||||
.c.o:
|
||||
$(CC) @DASH@c $(BX_INCDIRS) $(CFLAGS) $(FPU_FLAGS) $< @OFP@$@
|
||||
|
||||
|
||||
all: @PRIMARY_TARGET@ @PLUGIN_TARGET@ bximage@EXE@ bxcommit@EXE@ @BUILD_DOCBOOK_VAR@
|
||||
|
||||
@EXTERNAL_DEPENDENCY@
|
||||
|
||||
bochs@EXE@: @IODEV_LIB_VAR@ @DEBUGGER_VAR@ \
|
||||
cpu/libcpu.a memory/libmemory.a ../core/libfail.a gui/libgui.a \
|
||||
@DISASM_VAR@ @INSTRUMENT_VAR@ $(BX_OBJS) \
|
||||
$(SIMX86_OBJS) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
|
||||
@LINK@ @EXPORT_DYNAMIC@ $(BX_OBJS) $(SIMX86_OBJS) \
|
||||
@IODEV_LIB_VAR@ @DEBUGGER_VAR@ cpu/libcpu.a memory/libmemory.a ../core/libfail.a gui/libgui.a \
|
||||
@DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
|
||||
@GDBSTUB_VAR@ @FPU_VAR@ \
|
||||
@NONPLUGIN_GUI_LINK_OPTS@ \
|
||||
$(MCH_LINK_FLAGS) \
|
||||
$(SIMX86_LINK_FLAGS) \
|
||||
$(READLINE_LIB) \
|
||||
$(EXTRA_LINK_OPTS) \
|
||||
$(LIBS)
|
||||
|
||||
# Special make target for cygwin/mingw using dlltool instead of
|
||||
# libtool. This creates a .DEF file, and exports file, an import library,
|
||||
# and then links bochs.exe with the exports file.
|
||||
.win32_dll_plugin_target: @IODEV_LIB_VAR@ @DEBUGGER_VAR@ \
|
||||
cpu/libcpu.a memory/libmemory.a ../core/libfail.a gui/libgui.a \
|
||||
@DISASM_VAR@ @INSTRUMENT_VAR@ $(BX_OBJS) \
|
||||
$(SIMX86_OBJS) @FPU_VAR@ @GDBSTUB_VAR@ @PLUGIN_VAR@
|
||||
$(DLLTOOL) --export-all-symbols --output-def bochs.def \
|
||||
$(BX_OBJS) $(SIMX86_OBJS) \
|
||||
@IODEV_LIB_VAR@ cpu/libcpu.a memory/libmemory.a ../core/libfail.a gui/libgui.a \
|
||||
@DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
|
||||
@GDBSTUB_VAR@ @FPU_VAR@
|
||||
$(DLLTOOL) --dllname bochs.exe --def bochs.def --output-lib dllexports.a
|
||||
$(DLLTOOL) --dllname bochs.exe --output-exp bochs.exp --def bochs.def
|
||||
$(CXX) -o bochs.exe $(CXXFLAGS) $(LDFLAGS) -export-dynamic \
|
||||
$(BX_OBJS) bochs.exp $(SIMX86_OBJS) \
|
||||
@IODEV_LIB_VAR@ cpu/libcpu.a memory/libmemory.a ../core/libfail.a gui/libgui.a \
|
||||
@DEBUGGER_VAR@ @DISASM_VAR@ @INSTRUMENT_VAR@ @PLUGIN_VAR@ \
|
||||
@GDBSTUB_VAR@ @FPU_VAR@ \
|
||||
$(GUI_LINK_OPTS) \
|
||||
$(MCH_LINK_FLAGS) \
|
||||
$(SIMX86_LINK_FLAGS) \
|
||||
$(READLINE_LIB) \
|
||||
$(EXTRA_LINK_OPTS) \
|
||||
$(LIBS)
|
||||
touch .win32_dll_plugin_target
|
||||
|
||||
bochs_plugins:
|
||||
cd gui @COMMAND_SEPARATOR@
|
||||
$(MAKE) plugins
|
||||
@CD_UP_ONE@
|
||||
cd iodev @COMMAND_SEPARATOR@
|
||||
$(MAKE) plugins
|
||||
@CD_UP_ONE@
|
||||
|
||||
bximage@EXE@: misc/bximage.o
|
||||
@LINK_CONSOLE@ $(BXIMAGE_LINK_OPTS) misc/bximage.o
|
||||
|
||||
bxcommit@EXE@: misc/bxcommit.o
|
||||
@LINK_CONSOLE@ misc/bxcommit.o
|
||||
|
||||
niclist@EXE@: misc/niclist.o
|
||||
@LINK_CONSOLE@ misc/niclist.o
|
||||
|
||||
# compile with console CXXFLAGS, not gui CXXFLAGS
|
||||
misc/bximage.o: $(srcdir)/misc/bximage.c $(srcdir)/iodev/hdimage.h
|
||||
$(CC) @DASH@c $(BX_INCDIRS) $(CFLAGS_CONSOLE) $(srcdir)/misc/bximage.c @OFP@$@
|
||||
|
||||
misc/bxcommit.o: $(srcdir)/misc/bxcommit.c $(srcdir)/iodev/hdimage.h
|
||||
$(CC) @DASH@c $(BX_INCDIRS) $(CFLAGS_CONSOLE) $(srcdir)/misc/bxcommit.c @OFP@$@
|
||||
|
||||
misc/niclist.o: $(srcdir)/misc/niclist.c
|
||||
$(CC) @DASH@c $(BX_INCDIRS) $(CFLAGS_CONSOLE) $(srcdir)/misc/niclist.c @OFP@$@
|
||||
|
||||
$(BX_OBJS): $(BX_INCLUDES)
|
||||
|
||||
# cannot use -C option to be compatible with Microsoft nmake
|
||||
iodev/libiodev.a::
|
||||
cd iodev @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libiodev.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
bx_debug/libdebug.a::
|
||||
cd bx_debug @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libdebug.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
cpu/libcpu.a::
|
||||
cd cpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libcpu.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
memory/libmemory.a::
|
||||
cd memory @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libmemory.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
gui/libgui.a::
|
||||
cd gui @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libgui.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
disasm/libdisasm.a::
|
||||
cd disasm @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libdisasm.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
@INSTRUMENT_DIR@/libinstrument.a::
|
||||
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libinstrument.a
|
||||
@CD_UP_TWO@
|
||||
|
||||
fpu/libfpu.a::
|
||||
cd fpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) $(MDEFINES) libfpu.a
|
||||
@CD_UP_ONE@
|
||||
|
||||
libbochs.a:
|
||||
-rm -f libbochs.a
|
||||
ar rv libbochs.a $(EXTERN_ENVIRONMENT_OBJS)
|
||||
$(RANLIB) libbochs.a
|
||||
|
||||
libbochs_cpu.a: @DEBUGGER_VAR@ $(BX_OBJS)
|
||||
-rm -f libbochs_cpu.a
|
||||
ar rv libbochs_cpu.a $(BX_OBJS)
|
||||
$(RANLIB) libbochs_cpu.a
|
||||
|
||||
# for wxWidgets port, on win32 platform
|
||||
wxbochs_resources.o: wxbochs.rc
|
||||
windres $(srcdir)/wxbochs.rc -o $@ --include-dir=`@WX_CONFIG@ --prefix`/include
|
||||
|
||||
# for win32 gui
|
||||
win32res.o: win32res.rc bxversion.rc
|
||||
$(RC_CMD)$@ $(srcdir)/win32res.rc
|
||||
|
||||
#####################################################################
|
||||
# Install target for all platforms.
|
||||
#####################################################################
|
||||
|
||||
install: all @INSTALL_TARGET@
|
||||
|
||||
#####################################################################
|
||||
# Install target for win32
|
||||
#
|
||||
# This is intended to be run in cygwin, since it has better scripting
|
||||
# tools.
|
||||
#####################################################################
|
||||
|
||||
install_win32: download_dlx @INSTALL_DOCBOOK_VAR@
|
||||
-mkdir -p $(prefix)
|
||||
cp obj-release/*.exe .
|
||||
for i in $(INSTALL_LIST_WIN32); do if test -f $$i; then cp $$i $(prefix); else cp $(srcdir)/$$i $(prefix); fi; done
|
||||
cp $(srcdir)/misc/sb16/sb16ctrl.example $(prefix)/sb16ctrl.txt
|
||||
cp $(srcdir)/misc/sb16/sb16ctrl.exe $(prefix)
|
||||
#cat $(srcdir)/build/win32/DOC-win32.htm | $(SED) -e 's/@VERSION@/$(VERSION)/g' > $(prefix)/DOC-win32.htm
|
||||
cp $(srcdir)/.bochsrc $(prefix)/bochsrc-sample.txt
|
||||
-mkdir $(prefix)/keymaps
|
||||
cp $(srcdir)/gui/keymaps/*.map $(prefix)/keymaps
|
||||
cat $(DLXLINUX_TAR) | (cd $(prefix) && tar xzvf -)
|
||||
echo '..\bochs' > $(prefix)/dlxlinux/start.bat
|
||||
dlxrc=$(prefix)/dlxlinux/bochsrc.txt; mv $$dlxrc $$dlxrc.orig && sed < $$dlxrc.orig 's/\/usr\/local\/bochs\/latest/../' > $$dlxrc && rm -f $$dlxrc.orig
|
||||
mv $(prefix)/README $(prefix)/README.orig
|
||||
cat $(srcdir)/build/win32/README.win32-binary $(prefix)/README.orig > $(prefix)/README
|
||||
rm -f $(prefix)/README.orig
|
||||
for i in $(TEXT_FILE_LIST); do mv $(prefix)/$$i $(prefix)/$$i.txt; done
|
||||
cd $(prefix); $(UNIX2DOS) *.txt */*.txt
|
||||
cd $(prefix); NAME=`pwd|$(SED) 's/.*\///'`; (cd ..; $(ZIP) $$NAME.zip -r $$NAME); ls -l ../$$NAME.zip
|
||||
|
||||
#####################################################################
|
||||
# install target for unix
|
||||
#####################################################################
|
||||
|
||||
install_unix: install_bin @INSTALL_PLUGINS_VAR@ install_man install_share install_doc @INSTALL_DOCBOOK_VAR@
|
||||
|
||||
install_bin::
|
||||
for i in $(DESTDIR)$(bindir); do mkdir -p $$i && test -d $$i && test -w $$i; done
|
||||
for i in $(INSTALL_LIST_BIN); do if test -f $$i; then install $$i $(DESTDIR)$(bindir); else install $(srcdir)/$$i $(DESTDIR)$(bindir); fi; done
|
||||
-for i in $(INSTALL_LIST_BIN_OPTIONAL); do if test -f $$i; then install $$i $(DESTDIR)$(bindir); else install $(srcdir)/$$i $(DESTDIR)$(bindir); fi; done
|
||||
|
||||
install_libtool_plugins::
|
||||
for i in $(DESTDIR)$(plugdir); do mkdir -p $$i && test -d $$i && test -w $$i; done
|
||||
list=`cd gui && echo *.la`; for i in $$list; do $(LIBTOOL) --mode=install install gui/$$i $(DESTDIR)$(plugdir); done
|
||||
list=`cd iodev && echo *.la`; for i in $$list; do $(LIBTOOL) --mode=install install iodev/$$i $(DESTDIR)$(plugdir); done
|
||||
$(LIBTOOL) --finish $(DESTDIR)$(plugdir)
|
||||
|
||||
install_dll_plugins::
|
||||
for i in $(DESTDIR)$(plugdir); do mkdir -p $$i && test -d $$i && test -w $$i; done
|
||||
list=`cd gui && echo *.dll`; for i in $$list; do cp gui/$$i $(DESTDIR)$(plugdir); done
|
||||
list=`cd iodev && echo *.dll`; for i in $$list; do cp iodev/$$i $(DESTDIR)$(plugdir); done
|
||||
|
||||
install_share::
|
||||
for i in $(DESTDIR)$(sharedir); do mkdir -p $$i && test -d $$i && test -w $$i; done
|
||||
for i in $(INSTALL_LIST_SHARE); do if test -f $$i; then install -m 644 $$i $(DESTDIR)$(sharedir); else install -m 644 $(srcdir)/$$i $(DESTDIR)$(sharedir); fi; done
|
||||
-mkdir $(DESTDIR)$(sharedir)/keymaps
|
||||
for i in $(srcdir)/gui/keymaps/*.map; do install -m 644 $$i $(DESTDIR)$(sharedir)/keymaps/; done
|
||||
|
||||
install_doc::
|
||||
for i in $(DESTDIR)$(docdir); do mkdir -p $$i && test -d $$i && test -w $$i; done
|
||||
for i in $(INSTALL_LIST_DOC); do if test -f $$i; then install -m 644 $$i $(DESTDIR)$(docdir); else install -m 644 $(srcdir)/$$i $(DESTDIR)$(docdir); fi; done
|
||||
$(RM) -f $(DESTDIR)$(docdir)/README
|
||||
$(CAT) $(srcdir)/build/linux/README.linux-binary $(srcdir)/README > $(DESTDIR)$(docdir)/README
|
||||
install -m 644 $(srcdir)/.bochsrc $(DESTDIR)$(docdir)/bochsrc-sample.txt
|
||||
|
||||
|
||||
build_docbook::
|
||||
cd doc/docbook; make
|
||||
|
||||
dl_docbook::
|
||||
cd doc/docbook; make dl_docs
|
||||
|
||||
install_docbook: build_docbook
|
||||
cd doc/docbook; make install
|
||||
|
||||
install_man::
|
||||
-mkdir -p $(DESTDIR)$(man1dir)
|
||||
-mkdir -p $(DESTDIR)$(man5dir)
|
||||
for i in $(MAN_PAGE_1_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@version@/$(VERSION)/g' | $(GZIP_BIN) -c > $(DESTDIR)$(man1dir)/$$i.1.gz; chmod 644 $(DESTDIR)$(man1dir)/$$i.1.gz; done
|
||||
for i in $(MAN_PAGE_5_LIST); do cat $(srcdir)/doc/man/$$i.5 | $(GZIP_BIN) -c > $(DESTDIR)$(man5dir)/$$i.5.gz; chmod 644 $(DESTDIR)$(man5dir)/$$i.5.gz; done
|
||||
|
||||
download_dlx: $(DLXLINUX_TAR)
|
||||
|
||||
$(DLXLINUX_TAR):
|
||||
$(RM) -f $(DLXLINUX_TAR)
|
||||
$(WGET) $(DLXLINUX_TAR_URL)
|
||||
test -f $(DLXLINUX_TAR)
|
||||
|
||||
unpack_dlx: $(DLXLINUX_TAR)
|
||||
rm -rf dlxlinux
|
||||
$(GUNZIP) -c $(DLXLINUX_TAR) | $(TAR) -xvf -
|
||||
test -d dlxlinux
|
||||
(cd dlxlinux; $(MV) bochsrc.txt bochsrc.txt.orig; $(SED) -e "s/1\.1\.2/$(VERSION)/g" -e 's,/usr/local/bochs/latest,$(prefix)/share/bochs,g' < bochsrc.txt.orig > bochsrc.txt; rm -f bochsrc.txt.orig)
|
||||
|
||||
install_dlx:
|
||||
$(RM) -rf $(DESTDIR)$(sharedir)/dlxlinux
|
||||
cp -r dlxlinux $(DESTDIR)$(sharedir)/dlxlinux
|
||||
$(CHMOD) 755 $(DESTDIR)$(sharedir)/dlxlinux
|
||||
$(GZIP_BIN) $(DESTDIR)$(sharedir)/dlxlinux/hd10meg.img
|
||||
$(CHMOD) 644 $(DESTDIR)$(sharedir)/dlxlinux/*
|
||||
for i in bochs-dlx; do cp $(srcdir)/build/linux/$$i $(DESTDIR)$(bindir)/$$i; $(CHMOD) 755 $(DESTDIR)$(bindir)/$$i; done
|
||||
|
||||
uninstall::
|
||||
$(RM) -rf $(DESTDIR)$(sharedir)
|
||||
$(RM) -rf $(DESTDIR)$(docdir)
|
||||
$(RM) -rf $(DESTDIR)$(libdir)/bochs
|
||||
for i in bochs bximage bxcommit bochs-dlx; do rm -f $(DESTDIR)$(bindir)/$$i; done
|
||||
for i in $(MAN_PAGE_1_LIST); do $(RM) -f $(man1dir)/$$i.1.gz; done
|
||||
for i in $(MAN_PAGE_5_LIST); do $(RM) -f $(man5dir)/$$i.5.gz; done
|
||||
|
||||
VS2008_WORKSPACE_ZIP=build/win32/vs2008ex-workspace.zip
|
||||
VS2008_WORKSPACE_FILES=vs2008/bochs.sln vs2008/*.vcproj
|
||||
|
||||
vs2008workspace:
|
||||
zip $(VS2008_WORKSPACE_ZIP) $(VS2008_WORKSPACE_FILES)
|
||||
|
||||
########
|
||||
# the win32_snap target is used to create a ZIP of bochs sources configured
|
||||
# for VC++. This ZIP is stuck on the website every once in a while to make
|
||||
# it easier for VC++ users to compile bochs. First, you should
|
||||
# run "sh .conf.win32-vcpp" to configure the source code, then do
|
||||
# "make win32_snap" to unzip the workspace files and create the ZIP.
|
||||
########
|
||||
win32_snap:
|
||||
unzip $(VS2008_WORKSPACE_ZIP)
|
||||
$(MAKE) zip
|
||||
|
||||
tar:
|
||||
NAME=`pwd|$(SED) 's/.*\///'`; (cd ..; $(RM) -f $$NAME.zip; tar cf - $$NAME | $(GZIP_BIN) > $$NAME.tar.gz); ls -l ../$$NAME.tar.gz
|
||||
|
||||
zip:
|
||||
NAME=`pwd|$(SED) 's/.*\///'`; (cd ..; $(RM) -f $$NAME-msvc-src.zip; $(ZIP) $$NAME-msvc-src.zip -r $$NAME -x \*CVS\* -x \*.cvsignore ); ls -l ../$$NAME-msvc-src.zip
|
||||
|
||||
clean:
|
||||
@RMCOMMAND@ *.o
|
||||
@RMCOMMAND@ *.a
|
||||
@RMCOMMAND@ bochs
|
||||
@RMCOMMAND@ bochs.exe
|
||||
@RMCOMMAND@ bximage
|
||||
@RMCOMMAND@ bximage.exe
|
||||
@RMCOMMAND@ bxcommit
|
||||
@RMCOMMAND@ bxcommit.exe
|
||||
@RMCOMMAND@ niclist
|
||||
@RMCOMMAND@ niclist.exe
|
||||
@RMCOMMAND@ bochs.out
|
||||
@RMCOMMAND@ bochsout.txt
|
||||
@RMCOMMAND@ bochs.exp
|
||||
@RMCOMMAND@ bochs.def
|
||||
@RMCOMMAND@ bochs.scpt
|
||||
@RMCOMMAND@ -rf bochs.app
|
||||
@RMCOMMAND@ -rf .libs
|
||||
@RMCOMMAND@ .win32_dll_plugin_target
|
||||
|
||||
local-dist-clean: clean
|
||||
@RMCOMMAND@ config.h config.status config.log config.cache
|
||||
@RMCOMMAND@ .dummy `find . -name '*.dsp' -o -name '*.dsw' -o -name '*.opt' -o -name '.DS_Store'`
|
||||
@RMCOMMAND@ bxversion.h build/linux/bochs-dlx _rpm_top *.rpm
|
||||
@RMCOMMAND@ build/win32/nsis/Makefile build/win32/nsis/bochs.nsi
|
||||
@RMCOMMAND@ build/macosx/Info.plist build/macosx/script_compiled.rsrc
|
||||
@RMCOMMAND@ libtool
|
||||
@RMCOMMAND@ ltdlconf.h
|
||||
|
||||
all-clean: clean
|
||||
cd iodev @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd bx_debug @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd cpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd memory @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd gui @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd disasm @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_TWO@
|
||||
cd misc @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd fpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_ONE@
|
||||
cd doc/docbook @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_TWO@
|
||||
cd host/linux/pcidev @COMMAND_SEPARATOR@
|
||||
$(MAKE) clean
|
||||
@CD_UP_THREE@
|
||||
|
||||
dist-clean: local-dist-clean
|
||||
cd iodev @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd bx_debug @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd bios @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd cpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd memory @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd gui @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd disasm @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd @INSTRUMENT_DIR@ @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_TWO@
|
||||
cd misc @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd fpu @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_ONE@
|
||||
cd doc/docbook @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_TWO@
|
||||
cd host/linux/pcidev @COMMAND_SEPARATOR@
|
||||
$(MAKE) dist-clean
|
||||
@CD_UP_THREE@
|
||||
@RMCOMMAND@ Makefile
|
||||
|
||||
###########################################
|
||||
# Build app on MacOS X
|
||||
###########################################
|
||||
MACOSX_STUFF=build/macosx
|
||||
MACOSX_STUFF_SRCDIR=$(srcdir)/$(MACOSX_STUFF)
|
||||
APP=bochs.app
|
||||
APP_PLATFORM=MacOS
|
||||
SCRIPT_EXEC=bochs.scpt
|
||||
SCRIPT_DATA=$(MACOSX_STUFF_SRCDIR)/script.data
|
||||
SCRIPT_R=$(MACOSX_STUFF_SRCDIR)/script.r
|
||||
SCRIPT_APPLESCRIPT=$(MACOSX_STUFF_SRCDIR)/bochs.applescript
|
||||
SCRIPT_COMPILED_RSRC=$(MACOSX_STUFF)/script_compiled.rsrc
|
||||
REZ=/Developer/Tools/Rez
|
||||
CPMAC=/Developer/Tools/CpMac
|
||||
RINCLUDES=/System/Library/Frameworks/Carbon.framework/Libraries/RIncludes
|
||||
REZ_ARGS=-append -i $RINCLUDES -d SystemSevenOrLater=1 -useDF
|
||||
STANDALONE_LIBDIR=`pwd`/$(APP)/Contents/$(APP_PLATFORM)/lib
|
||||
OSACOMPILE=/usr/bin/osacompile
|
||||
SETFILE=/Developer/Tools/SetFile
|
||||
|
||||
# On a MacOS X machine, you run rez, osacompile, and setfile to
|
||||
# produce the script executable, which has both a data fork and a
|
||||
# resource fork. Ideally, we would just recompile the whole
|
||||
# executable at build time, but unfortunately this cannot be done on
|
||||
# the SF compile farm through an ssh connection because osacompile
|
||||
# needs to be run locally for some reason. Solution: If the script
|
||||
# sources are changed, rebuild the executable on a MacOSX machine,
|
||||
# split it into its data and resource forks and check them into CVS
|
||||
# as separate files. Then at release time, all that's left to do is
|
||||
# put the data and resource forks back together to make a working script.
|
||||
# (This can be done through ssh.)
|
||||
#
|
||||
# Sources:
|
||||
# 1. script.r: resources for the script
|
||||
# 2. script.data: binary data for the script
|
||||
# 3. bochs.applescript: the source of the script
|
||||
#
|
||||
# NOTE: All of this will fail if you aren't building on an HFS+
|
||||
# filesystem! On the SF compile farm building in your user directory
|
||||
# will fail, while doing the build in /tmp will work ok.
|
||||
|
||||
# check if this filesystem supports resource forks at all
|
||||
test_hfsplus:
|
||||
$(RM) -rf test_hfsplus
|
||||
echo data > test_hfsplus
|
||||
# if you get "Not a directory", then this filesystem doesn't support resources
|
||||
echo resource > test_hfsplus/rsrc
|
||||
# test succeeded
|
||||
$(RM) -rf test_hfsplus
|
||||
|
||||
# Step 1 (must be done locally on MacOSX, only when sources change)
|
||||
# Compile and pull out just the resource fork. The resource fork is
|
||||
# checked into CVS as script_compiled.rsrc. Note that we don't need
|
||||
# to check in the data fork of tmpscript because it is identical to the
|
||||
# script.data input file.
|
||||
$(SCRIPT_COMPILED_RSRC): $(SCRIPT_R) $(SCRIPT_APPLESCRIPT)
|
||||
$(RM) -f tmpscript
|
||||
$(CP) -f $(SCRIPT_DATA) tmpscript
|
||||
$(REZ) -append $(SCRIPT_R) -o tmpscript
|
||||
$(OSACOMPILE) -o tmpscript $(SCRIPT_APPLESCRIPT)
|
||||
$(CP) tmpscript/rsrc $(SCRIPT_COMPILED_RSRC)
|
||||
$(RM) -f tmpscript
|
||||
|
||||
# Step 2 (can be done locally or remotely on MacOSX)
|
||||
# Combine the data fork and resource fork, and set attributes.
|
||||
$(SCRIPT_EXEC): $(SCRIPT_DATA) $(SCRIPT_COMPILED_RSRC)
|
||||
rm -f $(SCRIPT_EXEC)
|
||||
$(CP) $(SCRIPT_DATA) $(SCRIPT_EXEC)
|
||||
if test ! -f $(SCRIPT_COMPILED_RSRC); then $(CP) $(srcdir)/$(SCRIPT_COMPILED_RSRC) $(SCRIPT_COMPILED_RSRC); fi
|
||||
$(CP) $(SCRIPT_COMPILED_RSRC) $(SCRIPT_EXEC)/rsrc
|
||||
$(SETFILE) -t "APPL" -c "aplt" $(SCRIPT_EXEC)
|
||||
|
||||
$(APP)/.build: bochs test_hfsplus $(SCRIPT_EXEC)
|
||||
rm -f $(APP)/.build
|
||||
$(MKDIR) -p $(APP)
|
||||
$(MKDIR) -p $(APP)/Contents
|
||||
$(CP) -f $(MACOSX_STUFF)/Info.plist $(APP)/Contents
|
||||
$(CP) -f $(MACOSX_STUFF_SRCDIR)/pbdevelopment.plist $(APP)/Contents
|
||||
echo -n "APPL????" > $(APP)/Contents/PkgInfo
|
||||
$(MKDIR) -p $(APP)/Contents/$(APP_PLATFORM)
|
||||
$(CP) bochs $(APP)/Contents/$(APP_PLATFORM)
|
||||
$(MKDIR) -p $(APP)/Contents/Resources
|
||||
$(REZ) $(REZ_ARGS) $(MACOSX_STUFF_SRCDIR)/bochs.r -o $(APP)/Contents/Resources/bochs.rsrc
|
||||
$(CP) -f $(MACOSX_STUFF_SRCDIR)/bochs-icn.icns $(APP)/Contents/Resources
|
||||
ls -ld $(APP) $(SCRIPT_EXEC) $(SCRIPT_EXEC)/rsrc
|
||||
touch $(APP)/.build
|
||||
|
||||
$(APP)/.build_plugins: $(APP)/.build bochs_plugins
|
||||
rm -f $(APP)/.build_plugins
|
||||
$(MKDIR) -p $(STANDALONE_LIBDIR);
|
||||
list=`cd gui && echo *.la`; for i in $$list; do $(LIBTOOL) cp gui/$$i $(STANDALONE_LIBDIR); done;
|
||||
list=`cd iodev && echo *.la`; for i in $$list; do $(LIBTOOL) cp iodev/$$i $(STANDALONE_LIBDIR); done;
|
||||
$(LIBTOOL) --finish $(STANDALONE_LIBDIR);
|
||||
touch $(APP)/.build_plugins
|
||||
|
||||
install_macosx: all download_dlx install_man @INSTALL_DOCBOOK_VAR@
|
||||
-mkdir -p $(DESTDIR)$(sharedir)
|
||||
for i in $(INSTALL_LIST_MACOSX); do if test -e $$i; then $(CPMAC) -r $$i $(DESTDIR)$(sharedir); else $(CPMAC) -r $(srcdir)/$$i $(DESTDIR)$(sharedir); fi; done
|
||||
$(CPMAC) $(srcdir)/.bochsrc $(DESTDIR)$(sharedir)/bochsrc-sample.txt
|
||||
-mkdir $(DESTDIR)$(sharedir)/keymaps
|
||||
$(CPMAC) $(srcdir)/gui/keymaps/*.map $(DESTDIR)$(sharedir)/keymaps
|
||||
cat $(DLXLINUX_TAR) | (cd $(DESTDIR)$(sharedir) && tar xzvf -)
|
||||
dlxrc=$(DESTDIR)$(sharedir)/dlxlinux/bochsrc.txt; mv "$$dlxrc" "$$dlxrc.orig" && sed < "$$dlxrc.orig" 's/\/usr\/local\/bochs\/latest/../' > "$$dlxrc" && rm -f "$$dlxrc.orig"
|
||||
mv $(srcdir)/README $(srcdir)/README.orig
|
||||
cat $(srcdir)/build/macosx/README.macosx-binary $(srcdir)/README.orig > $(DESTDIR)$(sharedir)/README
|
||||
rm -f $(DESTDIR)$(sharedir)/README.orig
|
||||
$(CPMAC) $(SCRIPT_EXEC) $(DESTDIR)$(sharedir)/dlxlinux
|
||||
# for i in $(TEXT_FILE_LIST); do mv $(srcdir)/$$i $(DESTDIR)$(sharedir)/$$i.txt; done
|
||||
|
||||
###########################################
|
||||
# BeOS make target.
|
||||
# Build the binary normally, then copy the resource attributes.
|
||||
###########################################
|
||||
.bochs_beos_target: bochs@EXE@
|
||||
unzip $(srcdir)/build/beos/resource.zip
|
||||
copyattr -t ICON BeBochs.rsrc bochs
|
||||
copyattr -t MICN BeBochs.rsrc bochs
|
||||
|
||||
###########################################
|
||||
# dependencies generated by
|
||||
# gcc -MM -I. -Iinstrument/stubs *.cc | sed -e 's/\.cc/.@CPP_SUFFIX@/g' -e 's,cpu/,cpu/,g'
|
||||
###########################################
|
||||
config.o: config.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h iodev/iodev.h bochs.h param_names.h \
|
||||
param_names.h
|
||||
crc.o: crc.@CPP_SUFFIX@ config.h
|
||||
gdbstub.o: gdbstub.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h param_names.h cpu/cpu.h \
|
||||
cpu/model_specific.h cpu/crregs.h cpu/descriptor.h cpu/instr.h \
|
||||
cpu/ia_opcodes.h cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h \
|
||||
fpu/softfloat.h fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h \
|
||||
cpu/stack.h iodev/iodev.h bochs.h param_names.h
|
||||
load32bitOShack.o: load32bitOShack.@CPP_SUFFIX@ bochs.h config.h osdep.h \
|
||||
bx_debug/debug.h config.h osdep.h bxversion.h gui/siminterface.h \
|
||||
gui/paramtree.h memory/memory.h pc_system.h plugin.h extplugin.h ltdl.h \
|
||||
gui/gui.h instrument/stubs/instrument.h param_names.h cpu/cpu.h \
|
||||
cpu/model_specific.h cpu/crregs.h cpu/descriptor.h cpu/instr.h \
|
||||
cpu/ia_opcodes.h cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h \
|
||||
fpu/softfloat.h fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h \
|
||||
iodev/iodev.h bochs.h param_names.h
|
||||
logio.o: logio.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h cpu/cpu.h cpu/model_specific.h \
|
||||
cpu/crregs.h cpu/descriptor.h cpu/instr.h cpu/ia_opcodes.h \
|
||||
cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h fpu/softfloat.h \
|
||||
fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h iodev/iodev.h \
|
||||
bochs.h param_names.h
|
||||
main.o: main.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h param_names.h gui/textconfig.h cpu/cpu.h \
|
||||
cpu/model_specific.h cpu/crregs.h cpu/descriptor.h cpu/instr.h \
|
||||
cpu/ia_opcodes.h cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h \
|
||||
fpu/softfloat.h fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h \
|
||||
iodev/iodev.h bochs.h param_names.h
|
||||
osdep.o: osdep.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h
|
||||
pc_system.o: pc_system.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h \
|
||||
config.h osdep.h bxversion.h gui/siminterface.h gui/paramtree.h \
|
||||
memory/memory.h pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h cpu/cpu.h cpu/model_specific.h \
|
||||
cpu/crregs.h cpu/descriptor.h cpu/instr.h cpu/ia_opcodes.h \
|
||||
cpu/lazy_flags.h cpu/icache.h cpu/apic.h cpu/i387.h fpu/softfloat.h \
|
||||
fpu/tag_w.h fpu/status_w.h fpu/control_w.h cpu/xmm.h iodev/iodev.h \
|
||||
bochs.h param_names.h
|
||||
plex86-interface.o: plex86-interface.@CPP_SUFFIX@ bochs.h config.h osdep.h \
|
||||
bx_debug/debug.h config.h osdep.h bxversion.h gui/siminterface.h \
|
||||
gui/paramtree.h memory/memory.h pc_system.h plugin.h extplugin.h ltdl.h \
|
||||
gui/gui.h instrument/stubs/instrument.h plex86-interface.h \
|
||||
plex86/plex86.h plex86/descriptor.h
|
||||
plugin.o: plugin.@CPP_SUFFIX@ bochs.h config.h osdep.h bx_debug/debug.h config.h \
|
||||
osdep.h bxversion.h gui/siminterface.h gui/paramtree.h memory/memory.h \
|
||||
pc_system.h plugin.h extplugin.h ltdl.h gui/gui.h \
|
||||
instrument/stubs/instrument.h iodev/iodev.h bochs.h param_names.h
|
||||
267
bochs/PARAM_TREE.txt
Normal file
267
bochs/PARAM_TREE.txt
Normal file
@ -0,0 +1,267 @@
|
||||
$Id$
|
||||
|
||||
Starting from Bochs 2.3 the parameters are organized in a tree structure
|
||||
instead of a huge flat list. The parameter tree was required for implementing
|
||||
the save/restore feature, and it gives access to the device state from within
|
||||
the debugger.
|
||||
-Volker
|
||||
|
||||
Current organization of parameters in the tree
|
||||
|
||||
general
|
||||
config_interface
|
||||
start_mode
|
||||
benchmark
|
||||
restore
|
||||
restore_path
|
||||
debug_running
|
||||
|
||||
cpu
|
||||
n_processors
|
||||
n_cores
|
||||
n_threads
|
||||
ips
|
||||
quantum
|
||||
reset_on_triple_fault
|
||||
msrs
|
||||
|
||||
cpuid
|
||||
cpuid_limit_winnt
|
||||
stepping
|
||||
vendor_string
|
||||
brand_string
|
||||
mmx
|
||||
sep
|
||||
sse
|
||||
aes
|
||||
movbe
|
||||
xsave
|
||||
xapic
|
||||
1g_pages
|
||||
pcid
|
||||
fsgsbase
|
||||
mwait
|
||||
mwait_is_nop
|
||||
|
||||
memory
|
||||
standard
|
||||
ram
|
||||
size
|
||||
rom
|
||||
path
|
||||
address
|
||||
vgarom
|
||||
path
|
||||
optrom
|
||||
0
|
||||
path
|
||||
addr
|
||||
1
|
||||
path
|
||||
addr
|
||||
2
|
||||
path
|
||||
addr
|
||||
3
|
||||
path
|
||||
addr
|
||||
optram
|
||||
0
|
||||
path
|
||||
addr
|
||||
1
|
||||
path
|
||||
addr
|
||||
2
|
||||
path
|
||||
addr
|
||||
3
|
||||
path
|
||||
addr
|
||||
|
||||
clock_cmos
|
||||
clock_sync
|
||||
time0
|
||||
cmosimage
|
||||
enabled
|
||||
path
|
||||
rtc_init
|
||||
|
||||
pci
|
||||
i440fx_support
|
||||
slot
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
pcidev
|
||||
vendor
|
||||
device
|
||||
|
||||
display
|
||||
display_library
|
||||
displaylib_options
|
||||
private_colormap
|
||||
fullscreen
|
||||
screenmode
|
||||
vga_extension
|
||||
vga_update_interval
|
||||
|
||||
keyboard_mouse
|
||||
keyboard
|
||||
type
|
||||
serial_delay
|
||||
paste_delay
|
||||
use_mapping
|
||||
keymap
|
||||
user_shortcut
|
||||
mouse
|
||||
type
|
||||
enabled
|
||||
|
||||
boot_params
|
||||
boot_drive1
|
||||
boot_drive2
|
||||
boot_drive3
|
||||
floppy_sig_check
|
||||
load32bitos
|
||||
which
|
||||
path
|
||||
iolog
|
||||
initrd
|
||||
|
||||
floppy
|
||||
0
|
||||
devtype
|
||||
path
|
||||
type
|
||||
readonly
|
||||
status
|
||||
1
|
||||
devtype
|
||||
path
|
||||
type
|
||||
readonly
|
||||
status
|
||||
|
||||
ata
|
||||
0
|
||||
resources
|
||||
enabled
|
||||
ioaddr1
|
||||
ioaddr2
|
||||
irq
|
||||
master
|
||||
present
|
||||
type
|
||||
path
|
||||
mode
|
||||
journal
|
||||
cylinders
|
||||
heads
|
||||
spt
|
||||
status
|
||||
model
|
||||
biosdetect
|
||||
translation
|
||||
slave
|
||||
(same options as master)
|
||||
1
|
||||
(same options as ata.0)
|
||||
2
|
||||
(same options as ata.0)
|
||||
3
|
||||
(same options as ata.0)
|
||||
|
||||
ports
|
||||
serial
|
||||
1
|
||||
enabled
|
||||
mode
|
||||
dev
|
||||
2
|
||||
(same options as ports.serial.1)
|
||||
3
|
||||
(same options as ports.serial.1)
|
||||
4
|
||||
(same options as ports.serial.1)
|
||||
parallel
|
||||
1
|
||||
enabled
|
||||
outfile
|
||||
2
|
||||
(same options as ports.parallel.1)
|
||||
usb
|
||||
uhci
|
||||
enabled
|
||||
port1
|
||||
device
|
||||
options
|
||||
port2
|
||||
device
|
||||
options
|
||||
ohci
|
||||
(same options as ports.usb.uhci)
|
||||
|
||||
network
|
||||
ne2k
|
||||
enabled
|
||||
ioaddr
|
||||
irq
|
||||
macaddr
|
||||
ethmod
|
||||
ethdev
|
||||
script
|
||||
pnic
|
||||
enabled
|
||||
macaddr
|
||||
ethmod
|
||||
ethdev
|
||||
script
|
||||
|
||||
sound
|
||||
sb16
|
||||
enabled
|
||||
midifile
|
||||
wavefile
|
||||
logfile
|
||||
midimode
|
||||
wavemode
|
||||
loglevel
|
||||
dmatimer
|
||||
|
||||
misc
|
||||
text_snapshot_check
|
||||
gdbstub
|
||||
port
|
||||
text_base
|
||||
data_base
|
||||
bss_base
|
||||
user_plugin
|
||||
1 ... 8
|
||||
|
||||
log
|
||||
filename
|
||||
prefix
|
||||
debugger_filename
|
||||
|
||||
menu
|
||||
disk
|
||||
disk_win32
|
||||
memory
|
||||
runtime
|
||||
cdrom
|
||||
usb
|
||||
misc
|
||||
|
||||
bochs
|
||||
(subtree containing Bochs state)
|
||||
|
||||
wxdebug
|
||||
(special subtree for wxBochs debugger)
|
||||
|
||||
user
|
||||
(subtree for user-defined options)
|
||||
|
||||
(updated Jan 16, 2011 by vruppert)
|
||||
84
bochs/README
Normal file
84
bochs/README
Normal file
@ -0,0 +1,84 @@
|
||||
Bochs - The cross platform IA-32 (x86) emulator
|
||||
Updated: Tue Feb 22 18:07:00 CET 2011
|
||||
Version: 2.4.6
|
||||
|
||||
WHAT IS BOCHS?
|
||||
|
||||
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, for example Linux, DOS,
|
||||
Windows 95/98/NT/2000/XP or Windows Vista.
|
||||
Bochs was written by Kevin Lawton and is currently maintained by
|
||||
the Bochs project at "http://bochs.sourceforge.net".
|
||||
|
||||
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. Bochs will allow you to run Windows
|
||||
applications on a Solaris machine with X11, for example.
|
||||
|
||||
Bochs is distributed under the GNU LGPL. See COPYING for details.
|
||||
|
||||
GETTING CURRENT SOURCE CODE
|
||||
|
||||
Source code for Bochs is available from the Bochs home page at
|
||||
http://bochs.sourceforge.net. You can download the most recent
|
||||
release, use CVS to get the latest sources, or grab a CVS
|
||||
snapshot which is updated nightly. The releases contain the most
|
||||
stable code, but if you want the very newest features try the
|
||||
CVS version instead.
|
||||
|
||||
WHERE ARE THE DOCS?
|
||||
|
||||
The Bochs documentation is written in Docbook. Docbook is a text
|
||||
format that can be rendered to many popular browser formats such
|
||||
as HTML, PDF, and Postscript. Each binary release contains the
|
||||
HTML rendering of the documentation. Also, you can view the
|
||||
latest documentation on the web at
|
||||
http://bochs.sf.net/doc/docbook/index.html
|
||||
|
||||
Some information has not yet been transferred from the older
|
||||
HTML docs. These can be found at http://bochs.sf.net/docs-html
|
||||
|
||||
WHERE CAN I GET MORE INFORMATION? HOW DO I REPORT PROBLEMS?
|
||||
|
||||
Both the documentation and the Bochs website have instructions on how
|
||||
to join the bochs-developers mailing list, which is the primary
|
||||
forum for discussion of Bochs. The main page of the website also
|
||||
has links to bug reports and feature requests. You can browse and
|
||||
add to the content in these areas even if you do not have a (free)
|
||||
SourceForge account. We need your feedback so that we know what
|
||||
parts of Bochs to improve.
|
||||
|
||||
There is a patches section on the web site too, if you have made
|
||||
some changes to Bochs that you want to share.
|
||||
|
||||
HOW CAN I HELP?
|
||||
|
||||
If you would like contribute to the Bochs project, a good first step
|
||||
is to join the bochs-developers mailing list, and read the archive
|
||||
of recent messages to see what's going on.
|
||||
|
||||
If you are a technical person (can follow hardware specs, can write
|
||||
C/C++) take a look at the list of open bug reports and feature
|
||||
requests to see if you are interested in working on any of the
|
||||
problems that are mentioned in them. If you check out the CVS
|
||||
sources, make some changes, and create a patch, one of the
|
||||
developers will be very happy to apply it for you. Developers who
|
||||
frequently submit patches, or who embark on major changes in the
|
||||
source can get write access to CVS. Be sure to communicate with the
|
||||
bochs-developers list to avoid several people working on the same
|
||||
thing without realizing it.
|
||||
|
||||
If you are a Bochs user, not a hardware/C++ guru, there are still
|
||||
many ways you could help out. For example:
|
||||
- write instructions on how to install a particular operating system
|
||||
- writing/cleaning up documentation
|
||||
- testing out Bochs on every imaginable operating system and
|
||||
reporting how it goes.
|
||||
357
bochs/README-plugins
Normal file
357
bochs/README-plugins
Normal file
@ -0,0 +1,357 @@
|
||||
README-plugins
|
||||
|
||||
This is the README file that came from the CVS branch called BRANCH_PLUGINS.
|
||||
It's not intended to be user documentation for plugins. It's more like a
|
||||
bunch of to-do lists that the developers used to coordinate their efforts
|
||||
while working on plugins. At the bottom are some miscellaneous notes by the
|
||||
plugin developers and some references to useful usenet articles.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
BRANCH_PLUGINS
|
||||
|
||||
The branch is called BRANCH_PLUGINS. There is a normal tag called
|
||||
BRANCH_PLUGINS_BASE that marks the point where the branch began. The
|
||||
base marker will help at merge time.
|
||||
|
||||
This branch is a place to experiment with Bochs plugins. Bryce created
|
||||
the branch on October 4, 2002, and he and Christophe began working on
|
||||
Bochs plugins.
|
||||
|
||||
We started from Bryce's patch.plugins3, which was a patch from December 2001
|
||||
that copied in some of the plugin architecture from plex86. Here are the
|
||||
comments from that patch:
|
||||
|
||||
> Patch name: patch.plugins3
|
||||
> Author: Bryce Denney
|
||||
> Date: Wed Dec 12 17:56:11 EST 2001
|
||||
>
|
||||
> This patch replaces the Bochs keyboard with a slightly modified version
|
||||
> of the plex86 keyboard device, which is implemented as a plugin. This
|
||||
> is sort of a proof of concept, rather than anything that I'm about to
|
||||
> check in. It uses GNU libtool to compile the plex86 keyboard code into
|
||||
> a shared library, and installs that shared library in
|
||||
> /tmp/bochslib/libplex-keyboard.so. Then the new code in plugin.cc (which
|
||||
> is adapted from the plex86 plugin code) loads the libplex-keyboard library
|
||||
> during initialization and installs the plex86 keyboard instead of the
|
||||
> bochs keyboard.
|
||||
>
|
||||
> I chose the keyboard because it takes about 2 seconds to test that it's
|
||||
> basically working, and because the bochs and plex86 implementations hadn't
|
||||
> changed very much since they split.
|
||||
>
|
||||
> If you look at plex-keyboard.cc and plex-keyboard.h, it is fundamentally the
|
||||
> same as the current plex86 code. I have changed lots of names from bx_* to
|
||||
> plex_* just to reduce confusion and mayhem when I was compiling with both
|
||||
> kbd implementations. I didn't change anything except to get it to compile.
|
||||
|
||||
Christophe had made a plugins5 patch, so he checked it in, with these
|
||||
changes:
|
||||
- plex86 keyboard device was marged with Bochs keyboard, as a plugin
|
||||
- plugin.cc was cleaned up
|
||||
- a device registration mechanism was set up
|
||||
- the biosdev and unmapped devices were plugin-ized
|
||||
|
||||
TO DO:
|
||||
- (LATER) some plugins, such as the GUI, PIT, SB, and NE2000, have several different
|
||||
possible implementations. In this case, all implementations should be
|
||||
children of a single stub class. The stub's methods produce errors or
|
||||
panics if they are called, depending on the importance of the device.
|
||||
There is always one instance of the stub class lying around, which will be
|
||||
used if none of the implementation plugins is loaded. Either an optional
|
||||
plugin or a user plugin can fill in these slots.
|
||||
|
||||
- platform specific issues
|
||||
- (LATER) make sure LTDL works on VC++. It doesn't and won't without
|
||||
significant work. Maybe it's easier to support VC++ with ifdefs in
|
||||
plugin.cc rather than using ltdl at all. This will have to wait.
|
||||
- (DONE) nmake build: we must use lib.exe, not $(LIBTOOL) $(CXX) stuff
|
||||
|
||||
- configure script work
|
||||
- LTDL has a feature called dlpreload which sort of emulates dlopen
|
||||
by linking all the modules statically and then emulating dlopen calls.
|
||||
I don't see any value in this for plugins. If the platform cannot
|
||||
support dlopen or some equivalent, let the configure script crash and
|
||||
tell the user to configure without plugins instead.
|
||||
- (DONE) to support plugins on MacOSX, the user must install dlcompat.
|
||||
Otherwise libtool's configure script will discover that no dlopen() or
|
||||
equivalent function is found, and it will not be able to build/load
|
||||
plugins. The configure script should bomb in this case, with an error
|
||||
that says where to find dlcompat. dlcompat IS installed on SF compile
|
||||
farm in /sw/include and /sw/lib.
|
||||
|
||||
- Understand/resolve simulation differences between CVS head and
|
||||
BRANCH_PLUGINS. Simulation is slightly different.
|
||||
- compare four versions
|
||||
- BRANCH_PLUGINS with --enable-plugins
|
||||
- BRANCH_PLUGINS without --enable-plugins
|
||||
- BRANCH_PLUGINS_BASE
|
||||
- CVS head
|
||||
- these differences seem to be explained by a few things:
|
||||
1. devices are initialized in a different order, so they are assigned
|
||||
different timer id. For any events that occur at the same tick, the
|
||||
timer handlers would get called in a different order. I believe I
|
||||
have fixed the order of timer registration so that it matches, and
|
||||
that cleaned up some simulation differences.
|
||||
2. bx_gui->handle_events is now called from iodev/devices.cc instead of
|
||||
from iodev/keyboard.cc.
|
||||
3. bx_keyb_c::periodic() used to be called directly from devices.cc
|
||||
but now the keyboard registers its own timer
|
||||
- I have never seen any problems caused by the sim differences, but they
|
||||
make me nervous. -Bryce
|
||||
|
||||
- (LATER) convert remaining devices
|
||||
|
||||
- (LATER) maybe the implementation class for each plugin device should go into
|
||||
the .cc file instead of the header file. If all their methods are called
|
||||
through the stub class virtual functions, and no external file has access to
|
||||
the real non-stub class, then maybe there is no point in letting anybody
|
||||
else see the real class at all? (If you do use the class you will get
|
||||
undefined symbols when you compile for plugins anyway.) For the hard drive,
|
||||
we could put bx_hard_drive_stub_c in harddrv.h, and any constants or types
|
||||
that external files might need, and then put the real class, bx_hard_drive_c,
|
||||
at the top of harddrv.cc.
|
||||
|
||||
|
||||
- (LATER) eventually we need to clarify the connection between plugins and
|
||||
devices. At the moment, each plugin creates exactly one device, but it does
|
||||
not have to work that way.
|
||||
- it would be more correct to mark the devices as core, optional, etc. than
|
||||
to use a type field in the plugin struct. The reason that the type
|
||||
(core,optional,user) is currently passed into the PLUG_load_plugin macro
|
||||
and placed in the plugin struct instead of letting the device code decide
|
||||
is: devices.cc is responsible for initting and resetting devices, so I
|
||||
wanted devices.cc to decide whether the device would be managed by the
|
||||
plugin infrastructure (init_all, reset_all) or not. This is not that
|
||||
important yet, but when Volker wants to write a plugin with multiple
|
||||
devices, we will need to sort it out.
|
||||
|
||||
- (LATER) make a way for users to replace a core plugin with one of their
|
||||
choice.
|
||||
|
||||
- (LATER) implement user plugins. These are plugins that Bochs does not know
|
||||
anything about at compile time. The user asks Bochs to load a plugin using
|
||||
just its filename. It loads the plugin and registers any bx_params that
|
||||
the user can configure, and either the text config interface or the
|
||||
wxWindows interface can display this param list as a menu or dialog.
|
||||
Then at simulation start time, we call init() on the user device and
|
||||
it can be used like any other device.
|
||||
|
||||
- (LATER) make plugin CPU???
|
||||
|
||||
DONE:
|
||||
- applied patch.plugins5
|
||||
- updated makefile dependencies now that plugin.h is in there
|
||||
- all guis converted to plugins
|
||||
- 8 I/O devices are converted to plugins
|
||||
- make the Makefile use libtool to build dynamic libraries
|
||||
- use libtool's ltdl library to open and read dynamic libraries, since it
|
||||
has cross platform support
|
||||
- the Boolean/bx_bool thing will be resolved in the main branch. I have
|
||||
made patch.replace-Boolean.gz which I will apply later, after the
|
||||
plugins branch has been merged. This become more urgent because it
|
||||
caused bug #623152 MacOSX: Triple Exception Booting win95
|
||||
- take a look at the code generated by calls to virtual functions, to
|
||||
check if there's huge overhead that I don't know about.
|
||||
Answer: I don't believe there is that much extra overhead. If you call
|
||||
a nonvirtual function, it must push all the args onto the stack, then
|
||||
push the THIS pointer, then call the method using a known constant address.
|
||||
With a virtual function, you push all the args onto the stack, then push
|
||||
the THIS pointer, then do one extra memory reference to THIS+constant to read
|
||||
the pointer to the virtual method, and call it. This is just what I
|
||||
expected to find--no strange and magicial code was inserted by the
|
||||
compiler in this case.
|
||||
- wxWindows configuration interface and display works fine as a plugin now
|
||||
- selection of config interface is controlled by the bochsrc line
|
||||
"config_interface: NAME" and the parameter bx_options.Osel_config.
|
||||
- selection of display library is controlled by the bochsrc line
|
||||
"display_library: NAME" and the parameter bx_options.Osel_displaylib.
|
||||
- renamed vga_library to display_library (Christophe's suggestion)
|
||||
- add --with-all-libs option, which attempts to detect all the display
|
||||
libraries that Bochs can compile with. You can use this with or without
|
||||
plugins, compile with multiple guis in the same binary, and select between
|
||||
them at runtime. If the detection fails, you can always write a bunch
|
||||
of --with-PACKAGE options yourself.
|
||||
- load plugins as they are needed, in main.cc and iodev/devices.cc.
|
||||
- plugins are loaded using a macro PLUG_load_plugin(plugin_name, plugin_type).
|
||||
When plugins are enabled, this macro calls bx_load_plugin() in plugin.cc,
|
||||
which loads the plugin with lt_dlopen and calls its plugin_init method.
|
||||
When plugins are disabled, the code is already linked into the binary so
|
||||
the macro calls the plugin_init method directly.
|
||||
- The plugin_init method for plugin ABC is called libABC_LTX_plugin_init()
|
||||
and the same prefix is added before the plugin_fini method. This "name
|
||||
mangling" makes the symbols unique so that they can all be linked
|
||||
statically into the binary when plugins are turned off. This turned out
|
||||
to be a very useful thing!
|
||||
- The choice of lib*_LTX_* is not random... The libtool LTDL library
|
||||
automatically searches for symbols of the form lib<module>_LTX_<symbol>
|
||||
before looking for <symbol>. Libtool recommends making global symbols in
|
||||
every plugin unique in some way, and in fact on MacOSX the dynamic linker
|
||||
will not allow two libs to be linked in that both have plugin_init symbols,
|
||||
so this sort of mangling is required.
|
||||
- how do we know what plugins should be available when we start Bochs?
|
||||
- we have core plugins, optional plugins, and user plugins.
|
||||
- (V2.0) core plugin: These are so fundamental that Bochs won't even
|
||||
initialize without them, for example the CMOS. The user can substitute
|
||||
his own equivalent plugin to replace the CMOS, but he cannot say "Don't
|
||||
load the CMOS at all." Core plugin devices are initialized and reset
|
||||
explictly by code in iodev/devices.cc, since the initialization order for
|
||||
some of them is critical. They are currently NOT added to the device
|
||||
list in pluginRegisterDevice and pluginRegisterDeviceDevmodel, so that
|
||||
the plugin system does not call init() and reset(). If a core plugin
|
||||
cannot be found, Bochs will panic.
|
||||
In the bochsrc we can provide a way for the user to REPLACE a core plugin
|
||||
with a different plugin that implements the same C++ interface, but there
|
||||
is no way to ask bochs to NOT load a core plugin. I'm not sure how to
|
||||
configure the replacement plugin--this may have to be added later.
|
||||
Bochsrc line:
|
||||
replace_core_plugin: old=pic, new=mypic
|
||||
- (V2.0) optional plugin: These can be loaded or not without affecting
|
||||
Bochs's ability to start up and simulate. Initialization and reset for
|
||||
all optional plugins are handled by bx_init_plugins() and
|
||||
bx_reset_plugins(), which are now called from bx_devices_c::init() and
|
||||
bx_devices_c::reset(). Bochs knows how to configure optional plugins at
|
||||
compile time, and they are loaded only if the configuration settings
|
||||
enables the device. Examples: serial, parallel, ne2k. See the call to
|
||||
is_serial_enabled() in iodev/devices.cc. There are some plugins that you
|
||||
wouldn't ever want to leave out, like vga. Maybe the term "optional" is
|
||||
not clear and I need to think of a better name. Bochs will panic if an
|
||||
optional plugin cannot be found. If the plugin was compiled, then
|
||||
it should be available at runtime too!
|
||||
- (NOT DONE) user plugin: These are plugins that Bochs does not know
|
||||
anything about at compile time. The user asks Bochs to load a plugin
|
||||
using just its filename. It loads the plugin and (somehow) gets
|
||||
information about what settings the user can configure. The settings are
|
||||
adjusted by either bochsrc lines or the user interface, and then the
|
||||
device can be used. I'm missing some details here because I haven't
|
||||
thought through it all the way. User plugins may not be supported until
|
||||
after v2.0.
|
||||
- list of plugins sorted into categories
|
||||
- core plugins: unmapped, biosdev, cmos, dma, pic, vga
|
||||
- optional: floppy, harddrv, keyboard, serial, parallel
|
||||
- user: none yet
|
||||
- clarify relationship of plugin and device
|
||||
- a plugin is a shared object that you load that has a plugin_init() and
|
||||
plugin_fini() function inside. The plugin_init() can create any number of
|
||||
"devices" and register them. Devices are added to a global list so that we
|
||||
can do operations on every registered device.
|
||||
- There is (now) a pointer from each device to the plugin that created it.
|
||||
- Devices created by core plugins are called core devices. These will not be
|
||||
added to the device list because they are managed by existing code in
|
||||
devices.cc and elsewhere. Instead of referring to them by their device_t
|
||||
structure, we will use a global pointer to them, similar to the
|
||||
bx_devices.pluginKeyboard pointer. (Alternative: maybe we should add
|
||||
them to device list anyway, but exclude them in init_all and reset_all
|
||||
functions.)
|
||||
- MACOSX PLUGINS WORK! to support plugins on MacOSX, we must ensure that no
|
||||
plugins have any global symbol names in common, including plugin_init! An
|
||||
easy solution to this is to say that all plugin functions which can be
|
||||
looked up with dlsym must follow a pattern like "%s_BXPLUG_%s", where the
|
||||
first %s is the module name and the second is the plain symbol name, e.g.
|
||||
pic_BXPLUG_plugin_init. Symbols that are used internally can be declared
|
||||
static (file scope only).
|
||||
- SOLARIS PLUGINS WORK! to support plugins on Solaris, we must not rely on
|
||||
the use of global object constructors. In fact every global variable in a
|
||||
module MUST BE set to a compile-time constant. We must declare object
|
||||
pointers as globals, not actual objects.
|
||||
- WIN32 PLUGINS WORK! to support plugins on win32, I added the
|
||||
BOCHSAPI macro which expands to __declspec(dllexport) in the nonplugin
|
||||
code and __declspec(dllimport) in the plugin code. Some makefile hacks
|
||||
were required too. A few differences between win32 and other platforms:
|
||||
- use semicolon to separate path names in LTDL_LIBRARY_PATH
|
||||
- every path name in LTDL_LIBRARY_PATH should start with a drive letter,
|
||||
for example: c:/cygwin/home/bryce/plugins.
|
||||
- how do we locate plugins on the disk?
|
||||
- make install copies the plugins into ${prefix}/lib
|
||||
- if people install into a standard location, no action may be needed (?)
|
||||
- we can tell people to set the LTDL_LIBRARY_PATH variable.
|
||||
- if necessary we can implement a bochsrc command like
|
||||
plugin_search_directory: /path/to/libs
|
||||
which would call lt_dlsetsearchpath() to add the path to LTDL's list of
|
||||
directories it will search.
|
||||
- change log for BRANCH_PLUGINS is in patches/patch.plugins. It is
|
||||
pretty complete now.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------------------------------
|
||||
random notes:
|
||||
|
||||
class heirarchy:
|
||||
logfunctions
|
||||
- bx_devmodel_c
|
||||
- bx_keyb_stub_c
|
||||
- bx_keyb_c
|
||||
|
||||
bx_devmodel_c is an abstract class that defines standard functions that all
|
||||
devices should define, like init and reset. Each method is defined as empty
|
||||
in bx_devmodel_c so that child classes can choose to implement them or not.
|
||||
|
||||
bx_keyb_stub_c declares the methods that code outside the keyboard would need
|
||||
to call, such as mouse_motion, gen_scancode, etc. It declares these methods
|
||||
virtual, and provides a minimal definition for each that just does a panic. A
|
||||
global variable pluginKeyboard initially points to an instance of
|
||||
bx_keyb_stub_c so that if you forget/fail to load the load the keyboard plugin,
|
||||
you will see these panics when the methods are called.
|
||||
|
||||
bx_keyb_c is the real keyboard code. In its constructor, it changes
|
||||
pluginKeyboard to point to "this". This is equivalent to installing all
|
||||
the plugin callbacks associated with the keyboard. It also works in
|
||||
nonplugin code, which is a plus.
|
||||
|
||||
|
||||
hard drive read_handler. Right now the read_handler
|
||||
is a static method so it must get its object pointer from somewhere.
|
||||
1) It can get it from global variable bx_hard_drive
|
||||
2) The hard drive object can be passed in to it
|
||||
We've always used #2, so every device has methods that look like this:
|
||||
|
||||
static Bit32u read_handler(void *this_ptr, Bit32u address, unsigned io_len);
|
||||
static void write_handler(void *this_ptr, Bit32u address, Bit32u value, unsi
|
||||
|
||||
If/when we switch over to using virtual methods, there will no longer be
|
||||
any problem finding the this pointer. If we go that route, the this_ptr
|
||||
can be eliminated. For now, we must use the this_ptr. Otherwise we could
|
||||
never support more than one device of a given type.
|
||||
|
||||
|
||||
|
||||
------------------------------------------
|
||||
References
|
||||
|
||||
From: Tero Pulkkinen (p150650@zori.cs.tut.fi)
|
||||
Subject: Re: undefined reference to `pm virtual table'
|
||||
Newsgroups: gnu.g++.help
|
||||
Date: 1996/11/15
|
||||
|
||||
|
||||
> The compile goes off OK, but I get this error at link time:
|
||||
> pm.o(.text+0xa8): undefined reference to `pm virtual table'
|
||||
|
||||
This error comes from that the compiler didnt make virtual function
|
||||
table for object even though there's implemented functions that use
|
||||
objects of that type(constructor for example). Probably your pm-class
|
||||
has all implemented member functions *inline* and you still have
|
||||
(pure) virtual functions inside the class.
|
||||
|
||||
The creation point of virtual function table usually (dunno if g++ does that)
|
||||
is at position of first seen noninline function body of that class.
|
||||
Now if every of your function is inline, there's no place where compiler
|
||||
could make virtual function table.
|
||||
|
||||
Fix is to move body of for example constructor(any member is fine) to the .cc
|
||||
file instead of keeping it in .h-file and linking that .o file to your
|
||||
executable.
|
||||
|
||||
Other sollution is to remove *all* implementations of functions from header
|
||||
file. If all functions of a class are pure virtual, there's no need for
|
||||
virtual function table. (Constructor must set pointer to virtual function
|
||||
table to the object, so, if you have constructor, you'll need virtual
|
||||
function table too, even in abstract classes...)
|
||||
|
||||
> Can someone help me? Thanks in advance.
|
||||
|
||||
Hope this helps....
|
||||
|
||||
337
bochs/README-wxWindows
Normal file
337
bochs/README-wxWindows
Normal file
@ -0,0 +1,337 @@
|
||||
Readme for wxWindows Interface
|
||||
updated Sat Dec 21 11:09:34 EST 2002
|
||||
|
||||
Contributors to wxWindows port:
|
||||
Don Becker (Psyon)
|
||||
Bryce Denney
|
||||
Dave Poirier
|
||||
Volker Ruppert
|
||||
|
||||
wxWindows Configuration Interface
|
||||
|
||||
The wxWindows port began in June 2001 around the time of Bochs 1.2.1. Dave
|
||||
Poirier and Bryce Denney started adding a wxWindows configuration interface.
|
||||
We made some progress, but stopped after a while. Then in March/April 2002
|
||||
Bryce and Psyon revived the wxWindows branch and turned it into a usable
|
||||
interface. Psyon did most of the work to get text and graphics working, and
|
||||
Bryce worked on event passing between threads, and keyboard mapping.
|
||||
Starting in August 2002, Bryce added lots of dialog boxes to allow you
|
||||
to set all the bochsrc parameters. At the time of release 2.0, there
|
||||
are still some bugs but it is pretty stable and usable.
|
||||
|
||||
Bochs should be build with wxWindows 2.3.3 or later. It will probably
|
||||
not compile with 2.2.x without some work. wxWindows 2.3.3 includes
|
||||
a patch by Bryce Denney to allow us to get raw keycode data for several
|
||||
OSes.
|
||||
|
||||
On any UNIX platform with wxWindows installed, configure with
|
||||
--with-wx to enable the wxWindows display library.
|
||||
|
||||
To build in MS VC++:
|
||||
- edit .conf.win32-vcpp and add "--with-wx" to the configure line.
|
||||
If you want different configure options from what you see, change them
|
||||
too.
|
||||
- in cygwin, do "sh .conf.win32-vcpp" to run configure
|
||||
- unzip build/win32/wxworkspace.zip into the main directory.
|
||||
For cygwin: unzip build/win32/wxworkspace.zip
|
||||
or use winzip or whatever else.
|
||||
- open up bochs.dsw, the workspace file
|
||||
- edit project settings so that VC++ can find the wxWindows include
|
||||
files and libraries on your system. Bryce installed them in
|
||||
d:/wx/wx233/include and d:/wx/wx233/lib. Specifically, edit
|
||||
- Project>Settings>C/C++>Category=Preprocessor: include directories.
|
||||
- Project>Settings>Link>Category=Input: additional library path.
|
||||
- build
|
||||
|
||||
Note that the project is set up for wxWindows 2.3.3. To use on other
|
||||
wxwindows versions, you will have to change some of the names of the libraries
|
||||
to include. Use the samples that came with that version of wxwindows for
|
||||
reference.
|
||||
|
||||
To do:
|
||||
- now that ParamDialog works, I may rewrite some of the other dialogs
|
||||
as subclasses of ParamDialog. This would lead to more compact code,
|
||||
and fewer bugs.
|
||||
- configure time dialog
|
||||
- need to think about dialog layout
|
||||
- setting of IPS (controls how much time the PIT associates with each
|
||||
instruction for purposes of sending timer interrupts). How can we
|
||||
name this? instructions per simulated second.
|
||||
- enable realtime pit, realtime pit settings (?)
|
||||
- enable/disable X windows idle hack
|
||||
- report instructions per wall clock second in real time
|
||||
- decide which settings can be adjusted at runtime, and figure out how
|
||||
to disable the others. Do we need a set_enable() on the parameters
|
||||
themselves?
|
||||
- the power button has always "turned off" the power. Make it also
|
||||
turn ON the power. I think a few little green LEDs are in order.
|
||||
- floppy config screen: on win32, both not present and ejected are selected
|
||||
at first.
|
||||
- log events
|
||||
- Later: allow viewing of current log messages. Maybe this is a dialog that
|
||||
we append to, or maybe it should periodically display the last 1K of the
|
||||
log file (might be faster in high volume situations).
|
||||
- Later: should we allow multiple log files with different settings? for
|
||||
example dump cpu events to cpulog.txt and keyboard events to
|
||||
keyboardlog.txt?
|
||||
- debugger
|
||||
- bug: it's possible to make the GUI stop responding to mouse and keyboard
|
||||
input if you click the continue button in the debugger twice in very
|
||||
close succession. I don't know why yet.
|
||||
- probably the layout will be similar to BFE at first
|
||||
- need to show disassembly of the next instruction to be executed
|
||||
- clean up the biggest memory leaks and init/cleanup code. The gui allows you
|
||||
to kill the simulator and restart, but it doesn't do well after the first
|
||||
time. Valgrind should help with memory leak debugging, though until
|
||||
recently it couldn't run multithreaded programes.
|
||||
- disk change dialogs for floppy and cdrom need work.
|
||||
http://sourceforge.net/tracker/index.php?func=detail&aid=545414&group_id=12580&atid=112580
|
||||
-------------
|
||||
|
||||
------------------------------------------------------
|
||||
|
||||
Random notes follow
|
||||
|
||||
Added some sketches. I'm thinking that the control
|
||||
panel will be able to basically show one of these screens at a time. When
|
||||
you first start you would see ChooseConfigScreen which chooses between the
|
||||
configurations that you have loaded recently (which it would remember
|
||||
by the pathname of their bochsrc). Whether you choose an existing
|
||||
configuration to be loaded or a new one, when you click Ok you go to
|
||||
the first configuration screen, ConfigDiskScreen.
|
||||
|
||||
Each of the configuration screens takes up the whole control panel window.
|
||||
We could use tabs on the top and/or "<-Prev" and "Next->" buttons to make
|
||||
it quick to navigate the configuration screens. Each screen should
|
||||
probably have a Prev, Next, Revert to Saved, and Accept button.
|
||||
The menu choices like Disk..., VGA..., etc. just switch directly to
|
||||
that tab.
|
||||
|
||||
|
||||
------------------------------------------------------
|
||||
Notes:
|
||||
|
||||
events from gui to sim:
|
||||
- [async] key pressed or released
|
||||
- [async] mouse motion with button state
|
||||
- [sync] query parameter
|
||||
- [sync] change parameter
|
||||
- [async] start, pause, stop, reset simulation. Can be implemented
|
||||
as changing a parameter.
|
||||
- [async] request notification when some param changes
|
||||
|
||||
events from sim to gui:
|
||||
- [async] log message to be displayed (or not)
|
||||
- [async] ask user how to proceed (like panic: action=ask)
|
||||
- [async] param value changed
|
||||
- make my thread sleep for X microseconds (call wxThread::sleep then return)
|
||||
|
||||
In a synchronous event, the event object will contain space for the entire
|
||||
response. The sender allocates memory for the event and builds it. The
|
||||
receiver fills in blanks in the event structure (or could overwrite parts)
|
||||
and returns the same event pointer as a response. For async events, probably
|
||||
the sender will allocate and the receiver will have to delete it.
|
||||
|
||||
implement the floppyA and floppyB change buttons using new event
|
||||
structure. How should it work?
|
||||
|
||||
vga gui detects a click on floppyA bitmap
|
||||
construct a BxEvent type BX_EVT_ASK_PARAM
|
||||
post the event to the wxwindows gui thread (somehow) and block for response
|
||||
when it arrives in the gui thread, show a modal dialog box
|
||||
get the answer back to the simulator thread
|
||||
|
||||
|
||||
right now, this is working ok within the simulator thread using
|
||||
wxMutexGuiEnter/Leave. Still I'm going to change it so that the
|
||||
siminterface.cc code builds an event structure and the gui code
|
||||
fills in the blank in the structure, instead of the stupid
|
||||
notify_get_int_arg stuff.
|
||||
|
||||
|
||||
Starting and Killing Threads
|
||||
|
||||
When a detachable (default) thread finishes (returns from its Entry()
|
||||
function), wxwindows frees the memory associated with that thread.
|
||||
Unless the thread is never going to end, it is potentially dangerous to have a
|
||||
pointer to it at all. Even if you try to "check if it's alive" first, you may
|
||||
be dereferencing the pointer after it has already been deleted, leading to it
|
||||
claiming to be alive when it's not, or a segfault. To solve this, the approach
|
||||
used in the wxwindows threads example is to have code in the thread's OnExit()
|
||||
method remove the thread's pointer from the list of usable threads. In
|
||||
addition, any references or changes to the list of threads is controlled by a
|
||||
critical section to ensure that it stays correct. This post finally
|
||||
explained what I was seeing.
|
||||
|
||||
+-----------------------
|
||||
| From: Pieter van der Meulen (pgmvdm@yahoo.com)
|
||||
| Subject: Re: Thread Sample program - bug
|
||||
| Newsgroups: comp.soft-sys.wxwindows
|
||||
| Date: 2001-06-28 17:51:35 PST
|
||||
|
|
||||
|
|
||||
| At 06:24 PM 6/28/2001, you wrote:
|
||||
| >Hi,
|
||||
| >I have wxWindows 2.2.7 (wxMSW) installed.
|
||||
| >
|
||||
| >I just found in the thread.cpp sample code this section:
|
||||
| >
|
||||
| ><code>
|
||||
| >void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
|
||||
| >{
|
||||
| > size_t count = wxGetApp().m_threads.Count();
|
||||
| > for ( size_t i = 0; i < count; i++ )
|
||||
| > {
|
||||
| >===> wxGetApp().m_threads[0]->Delete(); <=====
|
||||
| > }
|
||||
| >
|
||||
| > Close(TRUE);
|
||||
| >}
|
||||
| ></code>
|
||||
| >The indecated line should probably rather have a
|
||||
| >m_threads[i] rather than m_threads[0] .
|
||||
|
|
||||
| No, it should not, although it is not immediately obvious. When Delete() is
|
||||
| called, the thread will eventually delete itself, but not before it calls
|
||||
| MyThread::Exit(), which will remove itself from m_threads[] using
|
||||
| wxArray::Remove(this). wxArray::Remove (RemoveAt) will compact the array to
|
||||
| remove the element, it is now size-1. After this wxThread::Delete() returns.
|
||||
|
|
||||
|
|
||||
| >I have have a further question to this:
|
||||
| >Does this mean that a detached thread created with new
|
||||
| >HAS to be deleted manually ? Or is this only in case it might still
|
||||
| >be running?
|
||||
|
|
||||
| Firstly, you must create every detached thread using new since it will
|
||||
| delete itself, literally calling delete this.
|
||||
| Calling wxThread::Delete() is a correct way to terminate a thread, but
|
||||
| manually deleting (using delete) a detached wxThread object is not.
|
||||
| wxThread::Delete() will ask the thread to exit, the thread should check for
|
||||
| this in wxThread::Entry() regularly using wxThread::TestDestroy() and exit
|
||||
| when asked to do so.
|
||||
|
|
||||
| >(In general I have a unsatisfied felling about when delete is
|
||||
| >neccessary and when not -- "I only know, it's not , if the class is
|
||||
| >derived from wxWindows")
|
||||
|
|
||||
| For wxThreads: joinable threads must be deleted (when allocated on the
|
||||
| heap), detached threads may never be deleted. For other classes, consult
|
||||
| the documentation ;)
|
||||
|
|
||||
|
|
||||
| >Thanks for some feedback,
|
||||
| >Sebastian
|
||||
|
|
||||
| Regards,
|
||||
|
|
||||
| Pieter.
|
||||
+-----------------------
|
||||
|
||||
tracking some kind of deadlock bug in Linux.
|
||||
|
||||
seems to be in ReadMailcap, src/unix/mimetypes.cpp in wxwindows sources
|
||||
src/unix/mimetype.cpp:2312
|
||||
|
||||
SOLUTION: compile with -pthread on every compile and link line.
|
||||
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
Suggested solution for putting sizers inside a scrolled window
|
||||
|
||||
From: Thaddaeus Frogley (codemonkey_uk@users.sourceforge.net)
|
||||
Subject: RE: Using sizers inside of a scrolled window
|
||||
Newsgroups: comp.soft-sys.wxwindows
|
||||
Date: 2001-10-02 02:41:04 PST
|
||||
|
||||
I have solved that same problem (scrolled windows / sizers) like so:
|
||||
|
||||
In the constructor for your wxFrame derived class,
|
||||
|
||||
//create a scrolling window
|
||||
myScrolledWindow = new wxScrolledWindow(this, -1);
|
||||
|
||||
//in the scolling window, create a panel
|
||||
myMainPanel = new wxPanel(myScrolledWindow, -1);
|
||||
|
||||
//place controls in the panel, laying them out with sizers
|
||||
|
||||
//...
|
||||
|
||||
myMainPanel->SetAutoLayout( TRUE );
|
||||
myMainPanel->SetSizer( sizer );
|
||||
sizer->Fit( myMainPanel );
|
||||
sizer->SetSizeHints( myMainPanel );
|
||||
|
||||
//set the scroll bars lengths based on the size of the inner panel
|
||||
wxSize size = myMainPanel->GetBestSize();
|
||||
myScrolledWindow->SetScrollbars( 1, 1, size.GetWidth(), size.GetHeight() );
|
||||
|
||||
//calculate the size of the window, and set it appropriately
|
||||
size.Set(size.GetWidth()+16,size.GetHeight()+16);
|
||||
|
||||
//Get the physical size of the display in pixels.
|
||||
int displaySizeX,displaySizeY;
|
||||
wxDisplaySize(&displaySizeX,&displaySizeY);
|
||||
|
||||
//clamp window size to % of screen
|
||||
if (size.GetWidth()>displaySizeX*0.75){
|
||||
size.SetWidth(displaySizeX*0.75);
|
||||
}
|
||||
if (size.GetHeight()>displaySizeY*0.75){
|
||||
size.SetHeight(displaySizeY*0.75);
|
||||
}
|
||||
|
||||
SetClientSize(size);
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
How to make wxChoice as wide as the longest string in the choice box?
|
||||
|
||||
From: Vadim Zeitlin (Vadim.zeitlin@dptmaths.ens-cachan.fr)
|
||||
Subject: Re: wxChoice
|
||||
Newsgroups: comp.soft-sys.wxwindows
|
||||
Date: 2001-09-18 04:41:07 PST
|
||||
|
||||
|
||||
On Sat, 15 Sep 2001 15:39:45 +0200 Merlijn Blaauw <merlijn@student-kmt.hku.nl> wrote:
|
||||
|
||||
MB> Also, I
|
||||
MB> would like the widget's parent window to change size (width) to fit the
|
||||
MB> widget's new content aswell.
|
||||
|
||||
You'll have to do it manually by calculating the length of the string you
|
||||
add to the control (use wxClientDC(combobox) and set correct font before
|
||||
calling GetTextExtent()!) and resizing the control to be slightly larger
|
||||
(yes, I know it's not nice at all but I don't see any other way to do it).
|
||||
|
||||
Regards,
|
||||
VZ
|
||||
|
||||
---------
|
||||
Hold on, this is even better!
|
||||
|
||||
From: Yann Rouillard (Y.Rouillard@exeter.ac.uk)
|
||||
Subject: wxChoice and wxADJUST_MINSIZE
|
||||
Newsgroups: comp.soft-sys.wxwindows
|
||||
Date: 2002-07-18 08:28:31 PST
|
||||
|
||||
I am trying to use a wxChoice widget in a little panel. The text length of
|
||||
the choices in the wxChoice can change so I used the wxADJUST_MINSIZE to
|
||||
have its width correctly set.
|
||||
|
||||
> the manual for wxSizer::Add() says:
|
||||
Finally, you can also specify wxADJUST_MINSIZE flag to make the minimal size of
|
||||
the control dynamically adjust to the value returned by its GetBestSize()
|
||||
method - this allows, for example, for correct relayouting of a static text
|
||||
control even if its text is changed during run-time.
|
||||
|
||||
relayouting? sounds like s/size/layout/g gone wrong.
|
||||
|
||||
Call Add() with wxADJUST_MINSIZE flag!
|
||||
--------------
|
||||
mno-cygwin guide on mingw webpage
|
||||
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mno-cygwin-howto.txt
|
||||
www.mingw.org
|
||||
3
bochs/README.rfb
Normal file
3
bochs/README.rfb
Normal file
@ -0,0 +1,3 @@
|
||||
The RFB server implementation is still lacking as of now, as a consequence
|
||||
you should force 8bit mode on the client to use it correctly, i.e. on Linux,
|
||||
use: "xvncviewer -8bit localhost" or similar.
|
||||
133
bochs/TESTFORM.txt
Normal file
133
bochs/TESTFORM.txt
Normal file
@ -0,0 +1,133 @@
|
||||
-------------------------------------------------------------
|
||||
BOCHS TESTING FORM Version 0.5
|
||||
-------------------------------------------------------------
|
||||
|
||||
Because of the variety of platforms and configurations that Bochs
|
||||
supports, it is difficult for any one person to test it thoroughly.
|
||||
This form is intended to help the Bochs developers keep track of test
|
||||
results from different sources. To avoid confusion, this form should
|
||||
be submitted once for each combination of host OS and guest OS you
|
||||
try. For example: your host OS is Debian Linux and you get both Win95
|
||||
and FreeDOS to start up. You would send one form for
|
||||
Win95-under-Debian and a second form for FreeDOS-under-Debian. In
|
||||
this case it would save time to fill in the host OS part, copy it a
|
||||
few times and fill out the guest OS part for each copy.
|
||||
|
||||
To fill in a blank such as [__], replace the underlines and leave
|
||||
the brackets. Example: [Sun Ultrasparc 10]. To fill in a
|
||||
multiple-choice, just put an X in the brackets. Example: [X]
|
||||
Mail completed forms to bochs-developers@lists.sourceforge.net
|
||||
|
||||
|
||||
What is the date?
|
||||
[__]
|
||||
|
||||
What is your name?
|
||||
[__]
|
||||
|
||||
What is your email address?
|
||||
[__]
|
||||
|
||||
Do you mind if your name and email address are placed on a testing results
|
||||
web page so that people with a similar setup can write to you?
|
||||
[ ] Ok, put it on a web page
|
||||
[ ] No, keep my address private.
|
||||
|
||||
What type of hardware are you using, e.g. 2400 MHz Intel Pentium 4.
|
||||
[__]
|
||||
|
||||
What operating system are you using? Please be specific, e.g.
|
||||
Redhat Linux 6.2 with 2.2.16 kernel.
|
||||
[__]
|
||||
|
||||
What version of bochs are you using?
|
||||
[ ] compiled from version 2.4.2
|
||||
[ ] compiled from version [_____]
|
||||
[ ] I compiled it from the CVS sources from date: [__]
|
||||
[ ] other source distribution from URL: [__]
|
||||
[ ] binary distribution from URL: [__]
|
||||
|
||||
Please fill in the next few questions only if you compiled Bochs
|
||||
yourself, as opposed to downloading a binary.
|
||||
|
||||
Did the configure script run ok, and detect your hardware and
|
||||
operating system?
|
||||
[ ] Yes
|
||||
[ ] No, configure crashed.
|
||||
[ ] No, configure ran ok but produced a bad configuration.
|
||||
[ ] No, I cannot run configure on my platform (win32 and mac).
|
||||
|
||||
If you used configure, what arguments did you give it? If you used a
|
||||
.conf.* script, give the name of the .conf script instead.
|
||||
[__]
|
||||
|
||||
What compiler did you use? (Please include version.)
|
||||
[__]
|
||||
|
||||
Did Bochs compile clean without any hacking?
|
||||
[ ] Yes
|
||||
[ ] No
|
||||
|
||||
If you had to make changes to compile, please summarize the problems you
|
||||
had or include diffs.
|
||||
[__]
|
||||
|
||||
End of compile-specific questions!
|
||||
|
||||
What guest operating system are you using inside bochs?
|
||||
[__]
|
||||
|
||||
Are you booting from a floppy, hard disk or cdrom image ?
|
||||
[ ] floppy image
|
||||
[ ] raw floppy drive
|
||||
[ ] cdrom
|
||||
[ ] cdrom image
|
||||
[ ] hard drive image
|
||||
[ ] raw hard drive (is this even possible?)
|
||||
[ ] other [__]
|
||||
|
||||
Did the guest operating system boot successfully?
|
||||
[ ] Yes
|
||||
[ ] No
|
||||
|
||||
If no, what error messages do you see on the console or in the log file?
|
||||
[__]
|
||||
|
||||
What applications worked under this guest operating system?
|
||||
[__]
|
||||
|
||||
What applications failed under this guest operating system? Did the
|
||||
application function incorrectly, crash Bochs, or what? If you got a
|
||||
panic, paste in the panic message that you received with some
|
||||
description of what was happening at the time.
|
||||
[__]
|
||||
|
||||
The remaining questions are about Bochs features that you may not have
|
||||
used. If you tried out the feature, move the X to the "works" or
|
||||
"fails" column.
|
||||
|
||||
Not Works
|
||||
tested ok Fails Comments?
|
||||
x86-64 [X] [ ] [ ] [__]
|
||||
floating point [X] [ ] [ ] [__]
|
||||
SMP [X] [ ] [ ] [__]
|
||||
VMX [X] [ ] [ ] [__]
|
||||
keyboard [X] [ ] [ ] [__]
|
||||
floppy disk [X] [ ] [ ] [__]
|
||||
raw floppy disk [X] [ ] [ ] [__]
|
||||
hard disk [X] [ ] [ ] [__]
|
||||
mouse [X] [ ] [ ] [__]
|
||||
cdrom [X] [ ] [ ] [__]
|
||||
sb16 [X] [ ] [ ] [__]
|
||||
ne2000 [X] [ ] [ ] [__]
|
||||
i440FX pci [X] [ ] [ ] [__]
|
||||
debugger [X] [ ] [ ] [__]
|
||||
gui debugger [X] [ ] [ ] [__]
|
||||
external loader [X] [ ] [ ] [__]
|
||||
save/restore [X] [ ] [ ] [__]
|
||||
VGA [X] [ ] [ ] [__]
|
||||
Cirrus Logic SVGA [X] [ ] [ ] [__]
|
||||
USB [X] [ ] [ ] [__]
|
||||
|
||||
Thank you for your contribution in the Bochs testing effort! Please
|
||||
mail completed forms to bochs-developers@lists.sourceforge.net
|
||||
237
bochs/TODO
Normal file
237
bochs/TODO
Normal file
@ -0,0 +1,237 @@
|
||||
This is the "roadmap" posted in the mailing list, augmented by
|
||||
comments from the mailing list and the irc chat.
|
||||
Anybody is welcome to work on any of these issues. Some of
|
||||
these items are rather simple and can be implemented by single
|
||||
individuals. Other items are quite complex and development needs
|
||||
to be coordonated. So, if you want to contribute, please drop
|
||||
us a note in the mailing list, so you can get help or exchange
|
||||
ideas.
|
||||
Christophe Bothamy.
|
||||
|
||||
0. Donations
|
||||
Source Forge recently set up a donation system for hosted projects.
|
||||
Should we accept donations ? What could we do with the money ?
|
||||
- give to EFF, FSF or other
|
||||
- fund Kevin to continue the work on plex86 so we can use it
|
||||
- bounties for somebody write optimized win9x/NT/XFree/linux/*BSD
|
||||
drivers for our vga/net/ide cards
|
||||
- other ?
|
||||
Status in Bochs 2.3:
|
||||
No decisions about this yet.
|
||||
|
||||
1. Speed
|
||||
Speed (well lack of) is one of the biggest criticism made by users
|
||||
who'd like to see Bochs run as fast as Virtual PC.
|
||||
Paths we can explore to get more speed :
|
||||
1.1 virtualization : plex86
|
||||
1.2 dynamic translation : qemu
|
||||
Status:
|
||||
Some work has been done for Bochs 2.3.7 but still long way is ahead.
|
||||
|
||||
2 multithreading. Conn Clark wrote :
|
||||
Threading might be nice too, for those of us who have SMP/SMT machines.
|
||||
I have a patch from Mathis (who hangs out on the IRC channel all the
|
||||
time) that puts the video card interface in its own thread. It has
|
||||
troubles though that I have not resolved. It may also be easier to debug
|
||||
a threaded peripheral.
|
||||
I also think that it might be possible to thread a chunk of the CPU
|
||||
emulation to improve performance on a SMP/SMT machine. Specificaly
|
||||
write_virtual_dword, write_virtual_word, write_virtual_byte, etc...
|
||||
might just be able to be threaded. I think the threading overhead might
|
||||
be less than the protection and address translation code. We would have
|
||||
to try it to find out. I'm also sure there can be some nasty hurdles to
|
||||
overcome.
|
||||
Status:
|
||||
Third party group started a para-Bochs project exactly to reach above goals,
|
||||
some beta version is already released.
|
||||
The home page of the project: http://grid.hust.edu.cn/cluster/VirtualMachine/main.html
|
||||
|
||||
3. Plugin architecture
|
||||
3.1 The plugin architecture can be reworked if we want to support
|
||||
multiple similar devices like seral net or vga cards.
|
||||
We currently have two "types" of plugins: "core" and "optional".
|
||||
Maybe we could add "classes" of plugins. The current version of
|
||||
Bochs supports the classes "display_library" and "io_device".
|
||||
New classes can be "config_interface", "net_lowlevel" and
|
||||
"sound_lowlevel"
|
||||
3.2 Stanislav wrote :
|
||||
Plugin architecture should be rewritten like real plugin architecture s.t.
|
||||
Bochs VGA plugin for example will be real plugin. I mean that replacement
|
||||
of plugin dll in already compiled Bochs will replace Bochs VGA card and
|
||||
the new card will be detected automatically.
|
||||
This will allow for example developing of plugins separately from Bochs.
|
||||
3.3 Michael Brown wrote :
|
||||
If the configuration interface is to be reworked, could we also make it so
|
||||
that plugins are self-contained, rather than needing to pollute config.cc
|
||||
with code for defining and parsing plugin-specific options
|
||||
Status:
|
||||
A little bit of the basic work is done now: The config parameter handling has
|
||||
been rewritten to a parameter tree and user-defined bochsrc options are now
|
||||
supported. The main plugin architecture rewrite is not done yet.
|
||||
|
||||
4. PCI host<->guest proxy
|
||||
Being able to use a real pci device from inside Bochs would be a
|
||||
great feature of Bochs. It would ease reverse engineering of non
|
||||
documented cards, or one could even use a real spare vga card.
|
||||
Frank Cornellis has done a great job on this subject, and we began
|
||||
integrating his changes.
|
||||
Status:
|
||||
The pcidev device is present in CVS and it has been updated for the new PCI
|
||||
infrastructure, but the new code is untested yet.
|
||||
|
||||
5. Subdirectories in iodev
|
||||
The iodev directory contains the various implemented iodevice.
|
||||
With the new pci devices, new harddrives and new net access methods,
|
||||
it could be interesting to add new subdirectories like :
|
||||
iodev/video/... --> for standard vga and new card emulation
|
||||
iodev/disks/... --> for the ata/atapi classes, hd/cd classes and host accesses
|
||||
iodev/net/... --> for ne2k and host net access
|
||||
isa and pci devices would be mixed in the directories, but this should
|
||||
be manageable.
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
6. VGA
|
||||
For SVGA emulation we have Bochs VBE and the Cirrus adapter. We should have
|
||||
a look at the voodoo3 (specs http://v3tv.sourceforge.net/docs.php).
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
7. Random thoughts on disk emulation improvements :
|
||||
7.1 lba48 support
|
||||
7.2 autodetection of disk size / geometry
|
||||
7.3 uml cow disk image support
|
||||
7.4 compressed disk image support
|
||||
7.5 extend redolog-disk specification to add coherency check of the flat
|
||||
image file, by storing its fstat-mtime field in the redolog.
|
||||
Status:
|
||||
Autodetection now works for all image types created with bximage and vmware3
|
||||
images. LBA48 and vmware4 disk images support was added in Bochs 2.3.5 release.
|
||||
The other items are not done yet.
|
||||
|
||||
8. net
|
||||
8.1 bootable ethernet rom ?
|
||||
see etherboot, Micheal Brown wrote :
|
||||
This already works; you can build an Etherboot rom image with the pnic
|
||||
driver, specify it as an option ROM in bochsrc and it will boot. I'm
|
||||
using this extensively at the moment in Etherboot development.
|
||||
In the Etherboot project's CVS, in the contrib/bochs directory, you can
|
||||
find a working bochsrc file and an up-to-date README with step-by-step
|
||||
instructions on getting this working.
|
||||
Status:
|
||||
The pnic device is present in CVS, but the status is unknown.
|
||||
|
||||
9. Bios
|
||||
9.1 add "jump table placeholder" and log missing function calls in the bios.
|
||||
Check completness with Ralf Brown interrupt list.
|
||||
Status:
|
||||
Not done yet.
|
||||
9.2 use Coreboot or SeaBios as possible alternatives/extensions to
|
||||
Bochs Bios ROM we have.
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
10. LGPL VGABios
|
||||
11.1 Video parameters table
|
||||
There is a very nice parameter table in 3dfx banshee document
|
||||
http://www2.lm-sensors.nu/~lm78/pdfs/Banshee_2d_spec.PDF
|
||||
see also http://www.xyzzy.claranet.de/dos/vgacrt.c
|
||||
Status:
|
||||
The new version 0.6a of the LGPL'd VGABIOS has minimal support for the video
|
||||
parameter table.
|
||||
|
||||
11. Optimized Guest drivers still needed : VGA, IDE, NET
|
||||
We have a specific VGA driver for winNT/2K, but still
|
||||
lack drivers for other OSes.
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
12. USB support
|
||||
Ben Lunt has been working on USB support. The USB mouse and keypad code
|
||||
is present in Bochs and almost stable. USB flash disk support has been
|
||||
started and the runtime device change support should be completed.
|
||||
Status:
|
||||
Under construction.
|
||||
|
||||
13. Config file and dynamic menu
|
||||
13.1 Benjamen R. Meyer wrote :
|
||||
I think we should rework the .bochsrc file to be more standard across all
|
||||
devices. I like how the USB configuration is done in it, and think we should
|
||||
put something similar together for everything else. In otherwords, create
|
||||
something that can be easily used for everything, and make it easier to
|
||||
configure in the process.
|
||||
From what I can tell right now, most of the configuration lines are randomly
|
||||
thrown together as each gets implemented or added, instead of having
|
||||
something that is based on a standard approach to the configuration.
|
||||
The result should be something that would be able to easily auto-configured
|
||||
by another program (a configuration editor?) with minimal changes necessary
|
||||
when new devices/features are added.
|
||||
13.2 Franck Cornelis wrote : the config system needs some work...
|
||||
e.g. the main menu is static while it could be generated at run-time...
|
||||
the main menu text lives somewhere in a file... while it should be generated
|
||||
at run-time by iterating the main menu objects
|
||||
Status:
|
||||
The config options handling has been rewritten to a parameter tree.
|
||||
|
||||
14. lowlevel serial support for Windows.
|
||||
Volker is currently working on this.
|
||||
Status:
|
||||
Not yet complete (transmit works, receive is losing data).
|
||||
|
||||
15. Parallel port
|
||||
Conn Clark wrote :
|
||||
I would like to see better parallel port support so I can use a dongle.
|
||||
This is something I would find very useful as it would mean I wouldn't
|
||||
have to boot back into windows ever again. I also recognize that this
|
||||
may require a kernel module be written, which is beyond my current
|
||||
skills. I know others will find this useful as I have had to tell a
|
||||
few people that their parallel port driven peripherals that require a
|
||||
bidirectional parallel port won't work.
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
16. Guest-To-Host Communication
|
||||
Try to adapt VirtualBox guest-to-host communication methods into Bochs.
|
||||
Having VirtualBox Shared Folders or VNAT support in Bochs could very
|
||||
simplify its usage.
|
||||
|
||||
17. Patches / Bug reports
|
||||
There are dozens of patches floating around. Some are outdated,
|
||||
don't apply cleanly, are obsolete/unneeded. We could try to do
|
||||
some clean-up, and keep only relevent ones.
|
||||
We should also clean up the SF bug tracker. Some bugreports are
|
||||
very old and we asked for more information with no response.
|
||||
Status:
|
||||
There is some progress, but still a lot of work to do.
|
||||
|
||||
18. Positions
|
||||
If you want to help without coding, here are available positions :
|
||||
19.1 Webmaster : update website (Jan Bruun Andersen offered to help)
|
||||
19.2 patch coordonator : look at incoming patches (sourceforge and
|
||||
mailing list) and upload / update in the cvs patches directory.
|
||||
19.3 platform maintainers for macos / win32
|
||||
19.4 disk image maintainer : create and maintain our collection
|
||||
of disk images. Usually, only the configuration file needs to be
|
||||
updated, and old bios files have to be removed. Some packages
|
||||
still contain very old bios files, they should definitely have
|
||||
to be removed.
|
||||
Status:
|
||||
More active developers are needed to do the things described above.
|
||||
|
||||
19. Bochs demo cd/dvd
|
||||
With version 2.1, it is now technically possible to use disk images
|
||||
on a read-only media, with a journal files on a read/write media.
|
||||
It would be great to create a demo cd/dvd with executables for
|
||||
supported platforms, configuration files and read-only disk
|
||||
images, the journal files would be written in a temporary
|
||||
directory on the harddisk.
|
||||
Status:
|
||||
Not done yet.
|
||||
|
||||
20. Other CPU architectures : arm, ppc
|
||||
This has been asked in the mailing list. I'm not really
|
||||
interested, but other people might be. Should we propose to
|
||||
host the new CPUs code in our source tree, or should we let
|
||||
people fork ?
|
||||
Status:
|
||||
Not done yet.
|
||||
6634
bochs/aclocal.m4
vendored
Normal file
6634
bochs/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bochs/bios/BIOS-bochs-latest
Normal file
BIN
bochs/bios/BIOS-bochs-latest
Normal file
Binary file not shown.
BIN
bochs/bios/BIOS-bochs-legacy
Normal file
BIN
bochs/bios/BIOS-bochs-legacy
Normal file
Binary file not shown.
120
bochs/bios/Makefile.in
Normal file
120
bochs/bios/Makefile.in
Normal file
@ -0,0 +1,120 @@
|
||||
# Copyright (C) 2001 MandrakeSoft S.A.
|
||||
#
|
||||
# MandrakeSoft S.A.
|
||||
# 43, rue d'Aboukir
|
||||
# 75002 Paris - France
|
||||
# http://www.linux-mandrake.com/
|
||||
# http://www.mandrakesoft.com/
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Makefile for the BIOS component of bochs
|
||||
|
||||
|
||||
@SUFFIX_LINE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
CXX = @CXX@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
BCC = bcc
|
||||
GCC = gcc
|
||||
GCC32 = gcc -m32 -fno-stack-protector
|
||||
AS86 = as86
|
||||
|
||||
BX_INCDIRS = -I.. -I$(srcdir)/.. -I../iodev -I$(srcdir)/../iodev
|
||||
LOCAL_CXXFLAGS =
|
||||
|
||||
BUILDDATE = `date '+%m/%d/%y'`
|
||||
BIOS_BUILD_DATE = "-DBIOS_BUILD_DATE=\"$(BUILDDATE)\""
|
||||
#
|
||||
# -------- end configurable options --------------------------
|
||||
#
|
||||
|
||||
|
||||
.@CPP_SUFFIX@.o:
|
||||
$(CXX) -c $(BX_INCDIRS) $(CXXFLAGS) $(LOCAL_CXXFLAGS) @CXXFP@$< @OFP@$@
|
||||
|
||||
|
||||
bios: biossums BIOS-bochs-latest BIOS-bochs-legacy
|
||||
|
||||
clean:
|
||||
@RMCOMMAND@ *.o *.a *.s _rombios*_.c rombios*.txt rombios*.sym
|
||||
@RMCOMMAND@ usage biossums rombios16.bin
|
||||
@RMCOMMAND@ rombios32.bin rombios32.out
|
||||
|
||||
dist-clean: clean
|
||||
@RMCOMMAND@ Makefile
|
||||
|
||||
bios-clean:
|
||||
@RMCOMMAND@ BIOS-bochs-*
|
||||
|
||||
BIOS-bochs-legacy: rombios.c apmbios.S biossums rombios.h
|
||||
$(GCC32) $(BIOS_BUILD_DATE) -DLEGACY -E -P $< > _rombiosl_.c
|
||||
$(BCC) -o rombiosl.s -C-c -D__i86__ -0 -S _rombiosl_.c
|
||||
sed -e 's/^\.text//' -e 's/^\.data//' rombiosl.s > _rombiosl_.s
|
||||
$(AS86) _rombiosl_.s -b tmpl.bin -u- -w- -g -0 -j -O -l rombiosl.txt
|
||||
-perl ${srcdir}/makesym.perl < rombiosl.txt > rombiosl.sym
|
||||
mv tmpl.bin $@
|
||||
./biossums $@
|
||||
@RMCOMMAND@ _rombiosl_.s
|
||||
|
||||
|
||||
rombios16.bin: rombios.c apmbios.S biossums rombios.h
|
||||
$(GCC32) $(BIOS_BUILD_DATE) -E -P $< > _rombios_.c
|
||||
$(BCC) -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
|
||||
sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s
|
||||
$(AS86) _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt
|
||||
-perl ${srcdir}/makesym.perl < rombios.txt > rombios.sym
|
||||
mv tmp.bin rombios16.bin
|
||||
./biossums rombios16.bin
|
||||
@RMCOMMAND@ _rombios_.s
|
||||
|
||||
|
||||
rombios32.bin: rombios32.out rombios.h
|
||||
objcopy -O binary $< $@
|
||||
./biossums -pad $@
|
||||
|
||||
rombios32.out: rombios32start.o rombios32.o rombios32.ld
|
||||
ld -o $@ -T $(srcdir)/rombios32.ld rombios32start.o rombios32.o
|
||||
|
||||
rombios32.o: rombios32.c acpi-dsdt.hex rombios.h
|
||||
$(GCC32) -O2 -Wall -c -o $@ $<
|
||||
|
||||
ifeq ("1", "0")
|
||||
acpi-dsdt.hex: acpi-dsdt.dsl
|
||||
cpp -P $< $<.i
|
||||
iasl -tc -p $@ $<.i
|
||||
rm $<.i
|
||||
sed -i -e's/^unsigned/const unsigned/' $@
|
||||
endif
|
||||
|
||||
rombios32start.o: rombios32start.S
|
||||
$(GCC32) -c -o $@ $<
|
||||
|
||||
BIOS-bochs-latest: rombios16.bin rombios32.bin
|
||||
cat rombios32.bin rombios16.bin > $@
|
||||
|
||||
biossums: biossums.o
|
||||
BIN
bochs/bios/VGABIOS-elpin-2.40
Normal file
BIN
bochs/bios/VGABIOS-elpin-2.40
Normal file
Binary file not shown.
9
bochs/bios/VGABIOS-elpin-LICENSE
Normal file
9
bochs/bios/VGABIOS-elpin-LICENSE
Normal file
@ -0,0 +1,9 @@
|
||||
The VGA BIOS from Elpin Systems, Inc. (http://www.elpin.com/)
|
||||
is now permanently licensed for use with bochs, courtesy
|
||||
of MandrakeSoft, creators of the leading "Linux-Mandrake"
|
||||
distribution (http://www.linux-mandrake.com/). You may
|
||||
freely use/distribute it with bochs, as long as it is used
|
||||
in bochs for the intended use as a VGA BIOS.
|
||||
|
||||
Please check out Elpin Systems. They make cool software games,
|
||||
educational software, and VGA development products.
|
||||
226
bochs/bios/VGABIOS-lgpl-README
Normal file
226
bochs/bios/VGABIOS-lgpl-README
Normal file
@ -0,0 +1,226 @@
|
||||
Plex86/Bochs VGABios
|
||||
--------------------
|
||||
|
||||
The goal of this project is to have a LGPL'd Video Bios in plex86,
|
||||
Bochs and qemu.
|
||||
This VGA Bios is very specific to the emulated VGA card.
|
||||
It is NOT meant to drive a physical vga card.
|
||||
|
||||
|
||||
Cirrus SVGA extension
|
||||
---------------------
|
||||
|
||||
The Cirrus SVGA extension is designed for the Cirrus emulation in Bochs and
|
||||
qemu. The initial patch for the Cirrus extension has been written by Makoto
|
||||
Suzuki (suzu).
|
||||
|
||||
|
||||
Install
|
||||
-------
|
||||
To compile the VGA Bios you will need :
|
||||
- gcc
|
||||
- bcc
|
||||
- as86
|
||||
- ld86
|
||||
|
||||
Untar the archive, and type make. You should get a "VGABIOS-lgpl-latest.bin"
|
||||
file. Alternatively, you can use the binary file "VGABIOS-lgpl-latest.bin",
|
||||
i have compiled for you.
|
||||
|
||||
Edit your plex86/bochs conf file, and modify the load-rom command in the
|
||||
VGA BIOS section, to point to the new vgabios image file.
|
||||
|
||||
|
||||
Debugging
|
||||
---------
|
||||
You can get a very basic debugging system: messages printed by the vgabios.
|
||||
You have to register the "unmapped" device driver in plex86 or bochs, and make
|
||||
sure it grabs port 0xfff0.
|
||||
|
||||
Comment the #undef DEBUG at the beginning of vgabios.c.
|
||||
You can then use the "printf" function in the bios.
|
||||
|
||||
|
||||
Testing
|
||||
-------
|
||||
Look at the "testvga.c" file in the archive. This is a minimal Turbo C 2.0
|
||||
source file that calls a few int10 functions. Feel free to modify it to suit
|
||||
your needs.
|
||||
|
||||
|
||||
Copyright and License
|
||||
---------------------
|
||||
This program has been written by Christophe Bothamy
|
||||
It is protected by the GNU Lesser Public License, which you should
|
||||
have received a copy of along with this package.
|
||||
|
||||
|
||||
Reverse Engineering
|
||||
-------------------
|
||||
The VGA Bios has been written without reverse-engineering any existing Bios.
|
||||
|
||||
|
||||
Acknowledgment
|
||||
--------------
|
||||
The source code contains code ripped from rombios.c of plex86, written
|
||||
by Kevin Lawton <kevin2001@yahoo.com>
|
||||
|
||||
The source code contains fonts from fntcol16.zip (c) by Joseph Gil avalable at :
|
||||
ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
|
||||
These fonts are public domain
|
||||
|
||||
The source code is based on information taken from :
|
||||
- Kevin Lawton's vga card emulation for bochs/plex86
|
||||
- Ralf Brown's interrupts list avalaible at
|
||||
http://www.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html
|
||||
- Finn Thogersons' VGADOC4b available at http://home.worldonline.dk/~finth/
|
||||
- Michael Abrash's Graphics Programming Black Book
|
||||
- Francois Gervais' book "programmation des cartes graphiques cga-ega-vga"
|
||||
edited by sybex
|
||||
- DOSEMU 1.0.1 source code for several tables values and formulas
|
||||
|
||||
|
||||
Feedback
|
||||
--------
|
||||
Please report any bugs, comments, patches for this VGA Bios to info@vruppert.de
|
||||
You can find the latest release at : http://www.nongnu.org/vgabios/
|
||||
For any information on bochs, visit the website http://bochs.sourceforge.net/
|
||||
For any information on qemu, visit the website http://fabrice.bellard.free.fr/qemu/
|
||||
|
||||
|
||||
History
|
||||
-------
|
||||
vgabios-0.6c : Apr 08 2009
|
||||
- Volker
|
||||
. added DPMS support to cirrus vgabios (patch from Gleb Natapov)
|
||||
. use VBE LFB address from PCI base address if present
|
||||
. added support for a lot more non-standard VBE modes (e.g. widescreen modes)
|
||||
. minor bugfixes
|
||||
|
||||
vgabios-0.6b : May 30 2008
|
||||
- Volker
|
||||
. added PCI data structure for the Cirrus VGABIOS images
|
||||
. minor bugfixes in biossums utility, VBE support and makefile
|
||||
|
||||
vgabios-0.6a : Aug 19 2006
|
||||
- Volker
|
||||
. added minimal support for the video parameter table (VPT)
|
||||
. Cirrus SVGA now supports the "no clear" bit in Cirrus and VESA mode
|
||||
. Bochs VBE protected mode interface improved
|
||||
. save/restore video state support for Bochs VBE and standard VGA added
|
||||
. generate vbetables.h dynamicly
|
||||
. VBE video memory increased to 8 MB (VBE dispi ID changed to B0C4)
|
||||
. lots of 4bpp VBE fixes (all 4bpp VBE modes now enabled)
|
||||
. VGA compatible setup for VBE modes added
|
||||
|
||||
vgabios-0.5d : Dec 29 2005
|
||||
- Volker
|
||||
. Bochs VBE protected mode interface added (based on a patch by malc@pulsesoft.com)
|
||||
. biossums utility now supports VGABIOS sizes up to 64 kBytes
|
||||
. VGA mode 0x11: all color planes must be enabled in this 2-color VGA mode
|
||||
|
||||
vgabios-0.5c : Jul 07 2005
|
||||
- Volker
|
||||
. BIOS configuration word usually reports initial mode 80x25 color text
|
||||
. vgabios function 0x0e (write teletype): linefeed (0x0a) only increments the
|
||||
cursor row value
|
||||
|
||||
vgabios-0.5b : May 24 2005
|
||||
- Volker
|
||||
. fixed return value for the default case in the VBE section (non-debug mode)
|
||||
. removed unused stuff
|
||||
|
||||
vgabios-0.5a : Mar 07 2005
|
||||
- Volker
|
||||
. Cirrus SVGA extension (initial patches from Makoto Suzuki, improvements
|
||||
from Fabrice Bellard)
|
||||
. vgabios image size is now exactly 32k with a checksum
|
||||
. a lot of vgabios and vbe functions rewritten in assembler
|
||||
. dynamicly generated VBE mode info list
|
||||
. write character function for CGA and LINEAR8 modes
|
||||
. read/write graphics pixel for some graphics modes
|
||||
. text scroll feature for some graphics modes
|
||||
. VBE 8-bit DAC support
|
||||
|
||||
vgabios-0.4c : Nov 06 2003
|
||||
- Christophe
|
||||
. fix font problem on initial screen of NT4 Loader
|
||||
|
||||
vgabios-0.4b : Nov 04 2003
|
||||
- Volker
|
||||
. fix offset of character tables
|
||||
. optimizations of CRT controller accesses
|
||||
. VBE i/o registers changed to 0x01CE/CF
|
||||
(suggestion from Daniel Gimpelevich)
|
||||
. "noclear" flag stored in BIOS area
|
||||
. fix character height returned by get_font_info function
|
||||
|
||||
vgabios-0.4a : Aug 17 2003
|
||||
- Volker
|
||||
. VBE mode search rewritten (VBE modes with LFB bit removed)
|
||||
. many bugfixes and optimizations
|
||||
. write character function implemented for graphics modes
|
||||
. support for 15bpp, 16bpp, 24bpp and 32bpp VBE modes added
|
||||
. SVGA mode 0x6A added
|
||||
. VBE modes 0x102, 0x117, 0x118 and 0x142 (Bochs specific)
|
||||
|
||||
vgabios-0.3b : Nov 23 2002
|
||||
- Christophe
|
||||
. added lfb-mode numbers (patch from mathis)
|
||||
. updated the Makefile
|
||||
. removed display of copyrights.
|
||||
. changed the Copyright string to "LGPL VGABios developers"
|
||||
- Volker
|
||||
. set the cursor shape depending on the current font height
|
||||
. clear BL before calling int 0x10 function 0x1103 in vgabios_init_func
|
||||
. added some text font functions
|
||||
- Jeroen
|
||||
. Forced to new DISPI (0xb0c1) interface (requires latest bochs vbe code)
|
||||
. Added multibuffering support
|
||||
. Added new DISPI interface for: virt width, height, x offset, y offset
|
||||
. Added LFB modes (to be used with the vbe-lfb patch in bochs)
|
||||
see VBE_HAVE_LFB in vbe.c (currently default enabled)
|
||||
. updated TODO & docs for changes after bochs 1.4
|
||||
|
||||
vgabios-0.3a : Mar 10 2002
|
||||
- Christophe
|
||||
. Fixed bug in function ah=13
|
||||
- Jeroen
|
||||
. updated vbebios implementation to new api
|
||||
. added vbe_display_api documentation
|
||||
. added 640x400x8, 640x480x8, 800x600x8, 1024x768
|
||||
(>640x480 needs a special bochs patch atm)
|
||||
. added 320x200x8 vbe support (uses the standard 320x200x8 vga mode to
|
||||
display, this allows for testing & having something on screen as well,
|
||||
at least until bochs host side display is up & running)
|
||||
. adding lfbprof (vbe) testprogram (+some small fixes to it)
|
||||
. merging with vbebios 0.2
|
||||
|
||||
vgabios-0.2b : Nov 19 2001
|
||||
- Christophe
|
||||
. Fixed bug in function ah=13
|
||||
|
||||
vgabios-0.2a : Nov 09 2001
|
||||
- Christophe
|
||||
. Included bugfix from techt@pikeonline.net about grayscale summing
|
||||
. Added the "IBM" string at org 0x1e as Bart Oldeman suggested
|
||||
. Fixed DS and ES that where inverted in the int10 parameters list!
|
||||
. The following have been implemented :
|
||||
- function ax=1a00, ax=1a01, ah=1b
|
||||
- function ax=1130
|
||||
. Added debug messages for unimplemented/unknown functions
|
||||
Must be compiled with DEBUG defined. The output is trapped
|
||||
by the unknown-ioport driver of plex/bochs (port 0xfff0 is used)
|
||||
|
||||
vgabios-0.1a : May 8 2001
|
||||
- Christophe
|
||||
. First release. The work has been focused only on text mode.
|
||||
. The following have been implemented :
|
||||
- inits
|
||||
- int 10 handler
|
||||
- functions ah=00, ah=01, ah=02, ah=03, ah=05, ah=06, ah=07, ah=08
|
||||
ah=09, ah=0a, ah=0e, ah=0f, ax=1000, ax=1001, ax=1002, ax=1003
|
||||
ax=1007, ax=1008, ax=1009, ax=1010, ax=1012, ax=1013, ax=1015
|
||||
ax=1017, ax=1018, ax=1019, ax=101a, ax=101b, ah=12 bl=10,
|
||||
ah=12 bl=30, ah=12 bl=31, ah=12 bl=32, ah=12 bl=33, ah=12 bl=34
|
||||
ah=13
|
||||
BIN
bochs/bios/VGABIOS-lgpl-latest
Normal file
BIN
bochs/bios/VGABIOS-lgpl-latest
Normal file
Binary file not shown.
BIN
bochs/bios/VGABIOS-lgpl-latest-cirrus
Normal file
BIN
bochs/bios/VGABIOS-lgpl-latest-cirrus
Normal file
Binary file not shown.
BIN
bochs/bios/VGABIOS-lgpl-latest-cirrus-debug
Normal file
BIN
bochs/bios/VGABIOS-lgpl-latest-cirrus-debug
Normal file
Binary file not shown.
BIN
bochs/bios/VGABIOS-lgpl-latest-debug
Normal file
BIN
bochs/bios/VGABIOS-lgpl-latest-debug
Normal file
Binary file not shown.
594
bochs/bios/acpi-dsdt.dsl
Normal file
594
bochs/bios/acpi-dsdt.dsl
Normal file
@ -0,0 +1,594 @@
|
||||
/*
|
||||
* Bochs/QEMU ACPI DSDT ASL definition
|
||||
*
|
||||
* Copyright (c) 2006 Fabrice Bellard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
DefinitionBlock (
|
||||
"acpi-dsdt.aml", // Output Filename
|
||||
"DSDT", // Signature
|
||||
0x01, // DSDT Compliance Revision
|
||||
"BXPC", // OEMID
|
||||
"BXDSDT", // TABLE ID
|
||||
0x1 // OEM Revision
|
||||
)
|
||||
{
|
||||
Scope (\)
|
||||
{
|
||||
/* Debug Output */
|
||||
OperationRegion (DBG, SystemIO, 0xb044, 0x04)
|
||||
Field (DBG, DWordAcc, NoLock, Preserve)
|
||||
{
|
||||
DBGL, 32,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* PCI Bus definition */
|
||||
Scope(\_SB) {
|
||||
Device(PCI0) {
|
||||
Name (_HID, EisaId ("PNP0A03"))
|
||||
Name (_ADR, 0x00)
|
||||
Name (_UID, 1)
|
||||
Name(_PRT, Package() {
|
||||
/* PCI IRQ routing table, example from ACPI 2.0a specification,
|
||||
section 6.2.8.1 */
|
||||
/* Note: we provide the same info as the PCI routing
|
||||
table of the Bochs BIOS */
|
||||
|
||||
// PCI Slot 0
|
||||
Package() {0x0000ffff, 0, LNKD, 0},
|
||||
Package() {0x0000ffff, 1, LNKA, 0},
|
||||
Package() {0x0000ffff, 2, LNKB, 0},
|
||||
Package() {0x0000ffff, 3, LNKC, 0},
|
||||
|
||||
// PCI Slot 1
|
||||
Package() {0x0001ffff, 0, LNKA, 0},
|
||||
Package() {0x0001ffff, 1, LNKB, 0},
|
||||
Package() {0x0001ffff, 2, LNKC, 0},
|
||||
Package() {0x0001ffff, 3, LNKD, 0},
|
||||
|
||||
// PCI Slot 2
|
||||
Package() {0x0002ffff, 0, LNKB, 0},
|
||||
Package() {0x0002ffff, 1, LNKC, 0},
|
||||
Package() {0x0002ffff, 2, LNKD, 0},
|
||||
Package() {0x0002ffff, 3, LNKA, 0},
|
||||
|
||||
// PCI Slot 3
|
||||
Package() {0x0003ffff, 0, LNKC, 0},
|
||||
Package() {0x0003ffff, 1, LNKD, 0},
|
||||
Package() {0x0003ffff, 2, LNKA, 0},
|
||||
Package() {0x0003ffff, 3, LNKB, 0},
|
||||
|
||||
// PCI Slot 4
|
||||
Package() {0x0004ffff, 0, LNKD, 0},
|
||||
Package() {0x0004ffff, 1, LNKA, 0},
|
||||
Package() {0x0004ffff, 2, LNKB, 0},
|
||||
Package() {0x0004ffff, 3, LNKC, 0},
|
||||
|
||||
// PCI Slot 5
|
||||
Package() {0x0005ffff, 0, LNKA, 0},
|
||||
Package() {0x0005ffff, 1, LNKB, 0},
|
||||
Package() {0x0005ffff, 2, LNKC, 0},
|
||||
Package() {0x0005ffff, 3, LNKD, 0},
|
||||
})
|
||||
|
||||
Name (_CRS, ResourceTemplate ()
|
||||
{
|
||||
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
|
||||
0x0000, // Address Space Granularity
|
||||
0x0000, // Address Range Minimum
|
||||
0x00FF, // Address Range Maximum
|
||||
0x0000, // Address Translation Offset
|
||||
0x0100, // Address Length
|
||||
,, )
|
||||
IO (Decode16,
|
||||
0x0CF8, // Address Range Minimum
|
||||
0x0CF8, // Address Range Maximum
|
||||
0x01, // Address Alignment
|
||||
0x08, // Address Length
|
||||
)
|
||||
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
|
||||
0x0000, // Address Space Granularity
|
||||
0x0000, // Address Range Minimum
|
||||
0x0CF7, // Address Range Maximum
|
||||
0x0000, // Address Translation Offset
|
||||
0x0CF8, // Address Length
|
||||
,, , TypeStatic)
|
||||
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
|
||||
0x0000, // Address Space Granularity
|
||||
0x0D00, // Address Range Minimum
|
||||
0xFFFF, // Address Range Maximum
|
||||
0x0000, // Address Translation Offset
|
||||
0xF300, // Address Length
|
||||
,, , TypeStatic)
|
||||
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
|
||||
0x00000000, // Address Space Granularity
|
||||
0x000A0000, // Address Range Minimum
|
||||
0x000BFFFF, // Address Range Maximum
|
||||
0x00000000, // Address Translation Offset
|
||||
0x00020000, // Address Length
|
||||
,, , AddressRangeMemory, TypeStatic)
|
||||
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
|
||||
0x00000000, // Address Space Granularity
|
||||
0xC0000000, // Address Range Minimum
|
||||
0xFEBFFFFF, // Address Range Maximum
|
||||
0x00000000, // Address Translation Offset
|
||||
0x3EC00000, // Address Length
|
||||
,, , AddressRangeMemory, TypeStatic)
|
||||
})
|
||||
}
|
||||
#ifdef BX_QEMU
|
||||
Device(HPET) {
|
||||
Name(_HID, EISAID("PNP0103"))
|
||||
Name(_UID, 0)
|
||||
Method (_STA, 0, NotSerialized) {
|
||||
Return(0x0F)
|
||||
}
|
||||
Name(_CRS, ResourceTemplate() {
|
||||
DWordMemory(
|
||||
ResourceConsumer, PosDecode, MinFixed, MaxFixed,
|
||||
NonCacheable, ReadWrite,
|
||||
0x00000000,
|
||||
0xFED00000,
|
||||
0xFED003FF,
|
||||
0x00000000,
|
||||
0x00000400 /* 1K memory: FED00000 - FED003FF */
|
||||
)
|
||||
})
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Scope(\_SB.PCI0) {
|
||||
Device (VGA) {
|
||||
Name (_ADR, 0x00020000)
|
||||
Method (_S1D, 0, NotSerialized)
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
Method (_S2D, 0, NotSerialized)
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
Method (_S3D, 0, NotSerialized)
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
}
|
||||
|
||||
/* PIIX3 ISA bridge */
|
||||
Device (ISA) {
|
||||
Name (_ADR, 0x00010000)
|
||||
|
||||
/* PIIX PCI to ISA irq remapping */
|
||||
OperationRegion (P40C, PCI_Config, 0x60, 0x04)
|
||||
|
||||
/* Real-time clock */
|
||||
Device (RTC)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0B00"))
|
||||
Name (_CRS, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
|
||||
IRQNoFlags () {8}
|
||||
IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
|
||||
})
|
||||
}
|
||||
|
||||
/* Keyboard seems to be important for WinXP install */
|
||||
Device (KBD)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0303"))
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0f)
|
||||
}
|
||||
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (TMP, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16,
|
||||
0x0060, // Address Range Minimum
|
||||
0x0060, // Address Range Maximum
|
||||
0x01, // Address Alignment
|
||||
0x01, // Address Length
|
||||
)
|
||||
IO (Decode16,
|
||||
0x0064, // Address Range Minimum
|
||||
0x0064, // Address Range Maximum
|
||||
0x01, // Address Alignment
|
||||
0x01, // Address Length
|
||||
)
|
||||
IRQNoFlags ()
|
||||
{1}
|
||||
})
|
||||
Return (TMP)
|
||||
}
|
||||
}
|
||||
|
||||
/* PS/2 mouse */
|
||||
Device (MOU)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0F13"))
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0f)
|
||||
}
|
||||
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (TMP, ResourceTemplate ()
|
||||
{
|
||||
IRQNoFlags () {12}
|
||||
})
|
||||
Return (TMP)
|
||||
}
|
||||
}
|
||||
|
||||
/* PS/2 floppy controller */
|
||||
Device (FDC0)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0700"))
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (BUF0, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
|
||||
IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
|
||||
IRQNoFlags () {6}
|
||||
DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
||||
})
|
||||
Return (BUF0)
|
||||
}
|
||||
}
|
||||
|
||||
/* Parallel port */
|
||||
Device (LPT)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0400"))
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (\_SB.PCI0.PX13.DRSA, Local0)
|
||||
And (Local0, 0x80000000, Local0)
|
||||
If (LEqual (Local0, 0))
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (BUF0, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
|
||||
IRQNoFlags () {7}
|
||||
})
|
||||
Return (BUF0)
|
||||
}
|
||||
}
|
||||
|
||||
/* Serial Ports */
|
||||
Device (COM1)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0501"))
|
||||
Name (_UID, 0x01)
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (\_SB.PCI0.PX13.DRSC, Local0)
|
||||
And (Local0, 0x08000000, Local0)
|
||||
If (LEqual (Local0, 0))
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (BUF0, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
|
||||
IRQNoFlags () {4}
|
||||
})
|
||||
Return (BUF0)
|
||||
}
|
||||
}
|
||||
|
||||
Device (COM2)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0501"))
|
||||
Name (_UID, 0x02)
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (\_SB.PCI0.PX13.DRSC, Local0)
|
||||
And (Local0, 0x80000000, Local0)
|
||||
If (LEqual (Local0, 0))
|
||||
{
|
||||
Return (0x00)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Return (0x0F)
|
||||
}
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (BUF0, ResourceTemplate ()
|
||||
{
|
||||
IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
|
||||
IRQNoFlags () {3}
|
||||
})
|
||||
Return (BUF0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* PIIX4 PM */
|
||||
Device (PX13) {
|
||||
Name (_ADR, 0x00010003)
|
||||
|
||||
OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
|
||||
Field (P13C, DWordAcc, NoLock, Preserve)
|
||||
{
|
||||
DRSA, 32,
|
||||
DRSB, 32,
|
||||
DRSC, 32,
|
||||
DRSE, 32,
|
||||
DRSF, 32,
|
||||
DRSG, 32,
|
||||
DRSH, 32,
|
||||
DRSI, 32,
|
||||
DRSJ, 32
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* PCI IRQs */
|
||||
Scope(\_SB) {
|
||||
Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
PRQ0, 8,
|
||||
PRQ1, 8,
|
||||
PRQ2, 8,
|
||||
PRQ3, 8
|
||||
}
|
||||
|
||||
Device(LNKA){
|
||||
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
|
||||
Name(_UID, 1)
|
||||
Name(_PRS, ResourceTemplate(){
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{3,4,5,6,7,9,10,11,12}
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (0x0B, Local0)
|
||||
If (And (0x80, PRQ0, Local1))
|
||||
{
|
||||
Store (0x09, Local0)
|
||||
}
|
||||
Return (Local0)
|
||||
}
|
||||
Method (_DIS, 0, NotSerialized)
|
||||
{
|
||||
Or (PRQ0, 0x80, PRQ0)
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (PRR0, ResourceTemplate ()
|
||||
{
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{1}
|
||||
})
|
||||
CreateWordField (PRR0, 0x01, TMP)
|
||||
Store (PRQ0, Local0)
|
||||
If (LLess (Local0, 0x80))
|
||||
{
|
||||
ShiftLeft (One, Local0, TMP)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (Zero, TMP)
|
||||
}
|
||||
Return (PRR0)
|
||||
}
|
||||
Method (_SRS, 1, NotSerialized)
|
||||
{
|
||||
CreateWordField (Arg0, 0x01, TMP)
|
||||
FindSetRightBit (TMP, Local0)
|
||||
Decrement (Local0)
|
||||
Store (Local0, PRQ0)
|
||||
}
|
||||
}
|
||||
Device(LNKB){
|
||||
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
|
||||
Name(_UID, 2)
|
||||
Name(_PRS, ResourceTemplate(){
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{3,4,5,6,7,9,10,11,12}
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (0x0B, Local0)
|
||||
If (And (0x80, PRQ1, Local1))
|
||||
{
|
||||
Store (0x09, Local0)
|
||||
}
|
||||
Return (Local0)
|
||||
}
|
||||
Method (_DIS, 0, NotSerialized)
|
||||
{
|
||||
Or (PRQ1, 0x80, PRQ1)
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (PRR0, ResourceTemplate ()
|
||||
{
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{1}
|
||||
})
|
||||
CreateWordField (PRR0, 0x01, TMP)
|
||||
Store (PRQ1, Local0)
|
||||
If (LLess (Local0, 0x80))
|
||||
{
|
||||
ShiftLeft (One, Local0, TMP)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (Zero, TMP)
|
||||
}
|
||||
Return (PRR0)
|
||||
}
|
||||
Method (_SRS, 1, NotSerialized)
|
||||
{
|
||||
CreateWordField (Arg0, 0x01, TMP)
|
||||
FindSetRightBit (TMP, Local0)
|
||||
Decrement (Local0)
|
||||
Store (Local0, PRQ1)
|
||||
}
|
||||
}
|
||||
Device(LNKC){
|
||||
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
|
||||
Name(_UID, 3)
|
||||
Name(_PRS, ResourceTemplate(){
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{3,4,5,6,7,9,10,11,12}
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (0x0B, Local0)
|
||||
If (And (0x80, PRQ2, Local1))
|
||||
{
|
||||
Store (0x09, Local0)
|
||||
}
|
||||
Return (Local0)
|
||||
}
|
||||
Method (_DIS, 0, NotSerialized)
|
||||
{
|
||||
Or (PRQ2, 0x80, PRQ2)
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (PRR0, ResourceTemplate ()
|
||||
{
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{1}
|
||||
})
|
||||
CreateWordField (PRR0, 0x01, TMP)
|
||||
Store (PRQ2, Local0)
|
||||
If (LLess (Local0, 0x80))
|
||||
{
|
||||
ShiftLeft (One, Local0, TMP)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (Zero, TMP)
|
||||
}
|
||||
Return (PRR0)
|
||||
}
|
||||
Method (_SRS, 1, NotSerialized)
|
||||
{
|
||||
CreateWordField (Arg0, 0x01, TMP)
|
||||
FindSetRightBit (TMP, Local0)
|
||||
Decrement (Local0)
|
||||
Store (Local0, PRQ2)
|
||||
}
|
||||
}
|
||||
Device(LNKD){
|
||||
Name(_HID, EISAID("PNP0C0F")) // PCI interrupt link
|
||||
Name(_UID, 4)
|
||||
Name(_PRS, ResourceTemplate(){
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{3,4,5,6,7,9,10,11,12}
|
||||
})
|
||||
Method (_STA, 0, NotSerialized)
|
||||
{
|
||||
Store (0x0B, Local0)
|
||||
If (And (0x80, PRQ3, Local1))
|
||||
{
|
||||
Store (0x09, Local0)
|
||||
}
|
||||
Return (Local0)
|
||||
}
|
||||
Method (_DIS, 0, NotSerialized)
|
||||
{
|
||||
Or (PRQ3, 0x80, PRQ3)
|
||||
}
|
||||
Method (_CRS, 0, NotSerialized)
|
||||
{
|
||||
Name (PRR0, ResourceTemplate ()
|
||||
{
|
||||
IRQ (Level, ActiveLow, Shared)
|
||||
{1}
|
||||
})
|
||||
CreateWordField (PRR0, 0x01, TMP)
|
||||
Store (PRQ3, Local0)
|
||||
If (LLess (Local0, 0x80))
|
||||
{
|
||||
ShiftLeft (One, Local0, TMP)
|
||||
}
|
||||
Else
|
||||
{
|
||||
Store (Zero, TMP)
|
||||
}
|
||||
Return (PRR0)
|
||||
}
|
||||
Method (_SRS, 1, NotSerialized)
|
||||
{
|
||||
CreateWordField (Arg0, 0x01, TMP)
|
||||
FindSetRightBit (TMP, Local0)
|
||||
Decrement (Local0)
|
||||
Store (Local0, PRQ3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
|
||||
* must match piix4 emulation.
|
||||
*/
|
||||
Name (\_S3, Package (0x04)
|
||||
{
|
||||
0x01, /* PM1a_CNT.SLP_TYP */
|
||||
0x01, /* PM1b_CNT.SLP_TYP */
|
||||
Zero, /* reserved */
|
||||
Zero /* reserved */
|
||||
})
|
||||
Name (\_S4, Package (0x04)
|
||||
{
|
||||
Zero, /* PM1a_CNT.SLP_TYP */
|
||||
Zero, /* PM1b_CNT.SLP_TYP */
|
||||
Zero, /* reserved */
|
||||
Zero /* reserved */
|
||||
})
|
||||
Name (\_S5, Package (0x04)
|
||||
{
|
||||
Zero, /* PM1a_CNT.SLP_TYP */
|
||||
Zero, /* PM1b_CNT.SLP_TYP */
|
||||
Zero, /* reserved */
|
||||
Zero /* reserved */
|
||||
})
|
||||
}
|
||||
273
bochs/bios/acpi-dsdt.hex
Normal file
273
bochs/bios/acpi-dsdt.hex
Normal file
@ -0,0 +1,273 @@
|
||||
/*
|
||||
*
|
||||
* Intel ACPI Component Architecture
|
||||
* ASL Optimizing Compiler version 20090320 [Oct 24 2009]
|
||||
* Copyright (C) 2000 - 2009 Intel Corporation
|
||||
* Supports ACPI Specification Revision 3.0a
|
||||
*
|
||||
* Compilation of "acpi-dsdt.dsl.i" - Sun Dec 20 15:20:28 2009
|
||||
*
|
||||
* C source code output
|
||||
*
|
||||
*/
|
||||
const unsigned char AmlCode[] =
|
||||
{
|
||||
0x44,0x53,0x44,0x54,0x0D,0x08,0x00,0x00, /* 00000000 "DSDT...." */
|
||||
0x01,0x95,0x42,0x58,0x50,0x43,0x00,0x00, /* 00000008 "..BXPC.." */
|
||||
0x42,0x58,0x44,0x53,0x44,0x54,0x00,0x00, /* 00000010 "BXDSDT.." */
|
||||
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
|
||||
0x20,0x03,0x09,0x20,0x10,0x1C,0x5C,0x00, /* 00000020 " .. ..\." */
|
||||
0x5B,0x80,0x44,0x42,0x47,0x5F,0x01,0x0B, /* 00000028 "[.DBG_.." */
|
||||
0x44,0xB0,0x0A,0x04,0x5B,0x81,0x0B,0x44, /* 00000030 "D...[..D" */
|
||||
0x42,0x47,0x5F,0x03,0x44,0x42,0x47,0x4C, /* 00000038 "BG_.DBGL" */
|
||||
0x20,0x10,0x49,0x1F,0x5F,0x53,0x42,0x5F, /* 00000040 " .I._SB_" */
|
||||
0x5B,0x82,0x41,0x1F,0x50,0x43,0x49,0x30, /* 00000048 "[.A.PCI0" */
|
||||
0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000050 "._HID.A." */
|
||||
0x0A,0x03,0x08,0x5F,0x41,0x44,0x52,0x00, /* 00000058 "..._ADR." */
|
||||
0x08,0x5F,0x55,0x49,0x44,0x01,0x08,0x5F, /* 00000060 "._UID.._" */
|
||||
0x50,0x52,0x54,0x12,0x47,0x15,0x18,0x12, /* 00000068 "PRT.G..." */
|
||||
0x0B,0x04,0x0B,0xFF,0xFF,0x00,0x4C,0x4E, /* 00000070 "......LN" */
|
||||
0x4B,0x44,0x00,0x12,0x0B,0x04,0x0B,0xFF, /* 00000078 "KD......" */
|
||||
0xFF,0x01,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 00000080 "..LNKA.." */
|
||||
0x0C,0x04,0x0B,0xFF,0xFF,0x0A,0x02,0x4C, /* 00000088 ".......L" */
|
||||
0x4E,0x4B,0x42,0x00,0x12,0x0C,0x04,0x0B, /* 00000090 "NKB....." */
|
||||
0xFF,0xFF,0x0A,0x03,0x4C,0x4E,0x4B,0x43, /* 00000098 "....LNKC" */
|
||||
0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x01, /* 000000A0 "........" */
|
||||
0x00,0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 000000A8 "..LNKA.." */
|
||||
0x0D,0x04,0x0C,0xFF,0xFF,0x01,0x00,0x01, /* 000000B0 "........" */
|
||||
0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04, /* 000000B8 "LNKB...." */
|
||||
0x0C,0xFF,0xFF,0x01,0x00,0x0A,0x02,0x4C, /* 000000C0 ".......L" */
|
||||
0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C, /* 000000C8 "NKC....." */
|
||||
0xFF,0xFF,0x01,0x00,0x0A,0x03,0x4C,0x4E, /* 000000D0 "......LN" */
|
||||
0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 000000D8 "KD......" */
|
||||
0xFF,0x02,0x00,0x00,0x4C,0x4E,0x4B,0x42, /* 000000E0 "....LNKB" */
|
||||
0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x02, /* 000000E8 "........" */
|
||||
0x00,0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 000000F0 "..LNKC.." */
|
||||
0x0E,0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A, /* 000000F8 "........" */
|
||||
0x02,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E, /* 00000100 ".LNKD..." */
|
||||
0x04,0x0C,0xFF,0xFF,0x02,0x00,0x0A,0x03, /* 00000108 "........" */
|
||||
0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04, /* 00000110 "LNKA...." */
|
||||
0x0C,0xFF,0xFF,0x03,0x00,0x00,0x4C,0x4E, /* 00000118 "......LN" */
|
||||
0x4B,0x43,0x00,0x12,0x0D,0x04,0x0C,0xFF, /* 00000120 "KC......" */
|
||||
0xFF,0x03,0x00,0x01,0x4C,0x4E,0x4B,0x44, /* 00000128 "....LNKD" */
|
||||
0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x03, /* 00000130 "........" */
|
||||
0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x41,0x00, /* 00000138 "...LNKA." */
|
||||
0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x03,0x00, /* 00000140 "........" */
|
||||
0x0A,0x03,0x4C,0x4E,0x4B,0x42,0x00,0x12, /* 00000148 "..LNKB.." */
|
||||
0x0D,0x04,0x0C,0xFF,0xFF,0x04,0x00,0x00, /* 00000150 "........" */
|
||||
0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04, /* 00000158 "LNKD...." */
|
||||
0x0C,0xFF,0xFF,0x04,0x00,0x01,0x4C,0x4E, /* 00000160 "......LN" */
|
||||
0x4B,0x41,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000168 "KA......" */
|
||||
0xFF,0x04,0x00,0x0A,0x02,0x4C,0x4E,0x4B, /* 00000170 ".....LNK" */
|
||||
0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 00000178 "B......." */
|
||||
0x04,0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x43, /* 00000180 "....LNKC" */
|
||||
0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x05, /* 00000188 "........" */
|
||||
0x00,0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12, /* 00000190 "..LNKA.." */
|
||||
0x0D,0x04,0x0C,0xFF,0xFF,0x05,0x00,0x01, /* 00000198 "........" */
|
||||
0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04, /* 000001A0 "LNKB...." */
|
||||
0x0C,0xFF,0xFF,0x05,0x00,0x0A,0x02,0x4C, /* 000001A8 ".......L" */
|
||||
0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C, /* 000001B0 "NKC....." */
|
||||
0xFF,0xFF,0x05,0x00,0x0A,0x03,0x4C,0x4E, /* 000001B8 "......LN" */
|
||||
0x4B,0x44,0x00,0x08,0x5F,0x43,0x52,0x53, /* 000001C0 "KD.._CRS" */
|
||||
0x11,0x42,0x07,0x0A,0x6E,0x88,0x0D,0x00, /* 000001C8 ".B..n..." */
|
||||
0x02,0x0C,0x00,0x00,0x00,0x00,0x00,0xFF, /* 000001D0 "........" */
|
||||
0x00,0x00,0x00,0x00,0x01,0x47,0x01,0xF8, /* 000001D8 ".....G.." */
|
||||
0x0C,0xF8,0x0C,0x01,0x08,0x88,0x0D,0x00, /* 000001E0 "........" */
|
||||
0x01,0x0C,0x03,0x00,0x00,0x00,0x00,0xF7, /* 000001E8 "........" */
|
||||
0x0C,0x00,0x00,0xF8,0x0C,0x88,0x0D,0x00, /* 000001F0 "........" */
|
||||
0x01,0x0C,0x03,0x00,0x00,0x00,0x0D,0xFF, /* 000001F8 "........" */
|
||||
0xFF,0x00,0x00,0x00,0xF3,0x87,0x17,0x00, /* 00000200 "........" */
|
||||
0x00,0x0C,0x03,0x00,0x00,0x00,0x00,0x00, /* 00000208 "........" */
|
||||
0x00,0x0A,0x00,0xFF,0xFF,0x0B,0x00,0x00, /* 00000210 "........" */
|
||||
0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x87, /* 00000218 "........" */
|
||||
0x17,0x00,0x00,0x0C,0x01,0x00,0x00,0x00, /* 00000220 "........" */
|
||||
0x00,0x00,0x00,0x00,0xC0,0xFF,0xFF,0xBF, /* 00000228 "........" */
|
||||
0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0xC0, /* 00000230 "........" */
|
||||
0x3E,0x79,0x00,0x10,0x4D,0x2B,0x2E,0x5F, /* 00000238 ">y..M+._" */
|
||||
0x53,0x42,0x5F,0x50,0x43,0x49,0x30,0x5B, /* 00000240 "SB_PCI0[" */
|
||||
0x82,0x2A,0x56,0x47,0x41,0x5F,0x08,0x5F, /* 00000248 ".*VGA_._" */
|
||||
0x41,0x44,0x52,0x0C,0x00,0x00,0x02,0x00, /* 00000250 "ADR....." */
|
||||
0x14,0x08,0x5F,0x53,0x31,0x44,0x00,0xA4, /* 00000258 ".._S1D.." */
|
||||
0x00,0x14,0x08,0x5F,0x53,0x32,0x44,0x00, /* 00000260 "..._S2D." */
|
||||
0xA4,0x00,0x14,0x08,0x5F,0x53,0x33,0x44, /* 00000268 "...._S3D" */
|
||||
0x00,0xA4,0x00,0x5B,0x82,0x42,0x23,0x49, /* 00000270 "...[.B#I" */
|
||||
0x53,0x41,0x5F,0x08,0x5F,0x41,0x44,0x52, /* 00000278 "SA_._ADR" */
|
||||
0x0C,0x00,0x00,0x01,0x00,0x5B,0x80,0x50, /* 00000280 ".....[.P" */
|
||||
0x34,0x30,0x43,0x02,0x0A,0x60,0x0A,0x04, /* 00000288 "40C..`.." */
|
||||
0x5B,0x82,0x2D,0x52,0x54,0x43,0x5F,0x08, /* 00000290 "[.-RTC_." */
|
||||
0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x0B, /* 00000298 "_HID.A.." */
|
||||
0x00,0x08,0x5F,0x43,0x52,0x53,0x11,0x18, /* 000002A0 ".._CRS.." */
|
||||
0x0A,0x15,0x47,0x01,0x70,0x00,0x70,0x00, /* 000002A8 "..G.p.p." */
|
||||
0x10,0x02,0x22,0x00,0x01,0x47,0x01,0x72, /* 000002B0 ".."..G.r" */
|
||||
0x00,0x72,0x00,0x02,0x06,0x79,0x00,0x5B, /* 000002B8 ".r...y.[" */
|
||||
0x82,0x44,0x04,0x4B,0x42,0x44,0x5F,0x08, /* 000002C0 ".D.KBD_." */
|
||||
0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x03, /* 000002C8 "_HID.A.." */
|
||||
0x03,0x14,0x09,0x5F,0x53,0x54,0x41,0x00, /* 000002D0 "..._STA." */
|
||||
0xA4,0x0A,0x0F,0x14,0x29,0x5F,0x43,0x52, /* 000002D8 "....)_CR" */
|
||||
0x53,0x00,0x08,0x54,0x4D,0x50,0x5F,0x11, /* 000002E0 "S..TMP_." */
|
||||
0x18,0x0A,0x15,0x47,0x01,0x60,0x00,0x60, /* 000002E8 "...G.`.`" */
|
||||
0x00,0x01,0x01,0x47,0x01,0x64,0x00,0x64, /* 000002F0 "...G.d.d" */
|
||||
0x00,0x01,0x01,0x22,0x02,0x00,0x79,0x00, /* 000002F8 "..."..y." */
|
||||
0xA4,0x54,0x4D,0x50,0x5F,0x5B,0x82,0x33, /* 00000300 ".TMP_[.3" */
|
||||
0x4D,0x4F,0x55,0x5F,0x08,0x5F,0x48,0x49, /* 00000308 "MOU_._HI" */
|
||||
0x44,0x0C,0x41,0xD0,0x0F,0x13,0x14,0x09, /* 00000310 "D.A....." */
|
||||
0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,0x0F, /* 00000318 "_STA...." */
|
||||
0x14,0x19,0x5F,0x43,0x52,0x53,0x00,0x08, /* 00000320 ".._CRS.." */
|
||||
0x54,0x4D,0x50,0x5F,0x11,0x08,0x0A,0x05, /* 00000328 "TMP_...." */
|
||||
0x22,0x00,0x10,0x79,0x00,0xA4,0x54,0x4D, /* 00000330 ""..y..TM" */
|
||||
0x50,0x5F,0x5B,0x82,0x47,0x04,0x46,0x44, /* 00000338 "P_[.G.FD" */
|
||||
0x43,0x30,0x08,0x5F,0x48,0x49,0x44,0x0C, /* 00000340 "C0._HID." */
|
||||
0x41,0xD0,0x07,0x00,0x14,0x09,0x5F,0x53, /* 00000348 "A....._S" */
|
||||
0x54,0x41,0x00,0xA4,0x0A,0x0F,0x14,0x2C, /* 00000350 "TA.....," */
|
||||
0x5F,0x43,0x52,0x53,0x00,0x08,0x42,0x55, /* 00000358 "_CRS..BU" */
|
||||
0x46,0x30,0x11,0x1B,0x0A,0x18,0x47,0x01, /* 00000360 "F0....G." */
|
||||
0xF2,0x03,0xF2,0x03,0x00,0x04,0x47,0x01, /* 00000368 "......G." */
|
||||
0xF7,0x03,0xF7,0x03,0x00,0x01,0x22,0x40, /* 00000370 "......"@" */
|
||||
0x00,0x2A,0x04,0x00,0x79,0x00,0xA4,0x42, /* 00000378 ".*..y..B" */
|
||||
0x55,0x46,0x30,0x5B,0x82,0x4B,0x05,0x4C, /* 00000380 "UF0[.K.L" */
|
||||
0x50,0x54,0x5F,0x08,0x5F,0x48,0x49,0x44, /* 00000388 "PT_._HID" */
|
||||
0x0C,0x41,0xD0,0x04,0x00,0x14,0x28,0x5F, /* 00000390 ".A....(_" */
|
||||
0x53,0x54,0x41,0x00,0x70,0x5E,0x5E,0x5E, /* 00000398 "STA.p^^^" */
|
||||
0x2E,0x50,0x58,0x31,0x33,0x44,0x52,0x53, /* 000003A0 ".PX13DRS" */
|
||||
0x41,0x60,0x7B,0x60,0x0C,0x00,0x00,0x00, /* 000003A8 "A`{`...." */
|
||||
0x80,0x60,0xA0,0x06,0x93,0x60,0x00,0xA4, /* 000003B0 ".`...`.." */
|
||||
0x00,0xA1,0x04,0xA4,0x0A,0x0F,0x14,0x21, /* 000003B8 ".......!" */
|
||||
0x5F,0x43,0x52,0x53,0x00,0x08,0x42,0x55, /* 000003C0 "_CRS..BU" */
|
||||
0x46,0x30,0x11,0x10,0x0A,0x0D,0x47,0x01, /* 000003C8 "F0....G." */
|
||||
0x78,0x03,0x78,0x03,0x08,0x08,0x22,0x80, /* 000003D0 "x.x..."." */
|
||||
0x00,0x79,0x00,0xA4,0x42,0x55,0x46,0x30, /* 000003D8 ".y..BUF0" */
|
||||
0x5B,0x82,0x41,0x06,0x43,0x4F,0x4D,0x31, /* 000003E0 "[.A.COM1" */
|
||||
0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 000003E8 "._HID.A." */
|
||||
0x05,0x01,0x08,0x5F,0x55,0x49,0x44,0x01, /* 000003F0 "..._UID." */
|
||||
0x14,0x28,0x5F,0x53,0x54,0x41,0x00,0x70, /* 000003F8 ".(_STA.p" */
|
||||
0x5E,0x5E,0x5E,0x2E,0x50,0x58,0x31,0x33, /* 00000400 "^^^.PX13" */
|
||||
0x44,0x52,0x53,0x43,0x60,0x7B,0x60,0x0C, /* 00000408 "DRSC`{`." */
|
||||
0x00,0x00,0x00,0x08,0x60,0xA0,0x06,0x93, /* 00000410 "....`..." */
|
||||
0x60,0x00,0xA4,0x00,0xA1,0x04,0xA4,0x0A, /* 00000418 "`......." */
|
||||
0x0F,0x14,0x21,0x5F,0x43,0x52,0x53,0x00, /* 00000420 "..!_CRS." */
|
||||
0x08,0x42,0x55,0x46,0x30,0x11,0x10,0x0A, /* 00000428 ".BUF0..." */
|
||||
0x0D,0x47,0x01,0xF8,0x03,0xF8,0x03,0x00, /* 00000430 ".G......" */
|
||||
0x08,0x22,0x10,0x00,0x79,0x00,0xA4,0x42, /* 00000438 "."..y..B" */
|
||||
0x55,0x46,0x30,0x5B,0x82,0x42,0x06,0x43, /* 00000440 "UF0[.B.C" */
|
||||
0x4F,0x4D,0x32,0x08,0x5F,0x48,0x49,0x44, /* 00000448 "OM2._HID" */
|
||||
0x0C,0x41,0xD0,0x05,0x01,0x08,0x5F,0x55, /* 00000450 ".A...._U" */
|
||||
0x49,0x44,0x0A,0x02,0x14,0x28,0x5F,0x53, /* 00000458 "ID...(_S" */
|
||||
0x54,0x41,0x00,0x70,0x5E,0x5E,0x5E,0x2E, /* 00000460 "TA.p^^^." */
|
||||
0x50,0x58,0x31,0x33,0x44,0x52,0x53,0x43, /* 00000468 "PX13DRSC" */
|
||||
0x60,0x7B,0x60,0x0C,0x00,0x00,0x00,0x80, /* 00000470 "`{`....." */
|
||||
0x60,0xA0,0x06,0x93,0x60,0x00,0xA4,0x00, /* 00000478 "`...`..." */
|
||||
0xA1,0x04,0xA4,0x0A,0x0F,0x14,0x21,0x5F, /* 00000480 "......!_" */
|
||||
0x43,0x52,0x53,0x00,0x08,0x42,0x55,0x46, /* 00000488 "CRS..BUF" */
|
||||
0x30,0x11,0x10,0x0A,0x0D,0x47,0x01,0xF8, /* 00000490 "0....G.." */
|
||||
0x02,0xF8,0x02,0x00,0x08,0x22,0x08,0x00, /* 00000498 ".....".." */
|
||||
0x79,0x00,0xA4,0x42,0x55,0x46,0x30,0x5B, /* 000004A0 "y..BUF0[" */
|
||||
0x82,0x40,0x05,0x50,0x58,0x31,0x33,0x08, /* 000004A8 ".@.PX13." */
|
||||
0x5F,0x41,0x44,0x52,0x0C,0x03,0x00,0x01, /* 000004B0 "_ADR...." */
|
||||
0x00,0x5B,0x80,0x50,0x31,0x33,0x43,0x02, /* 000004B8 ".[.P13C." */
|
||||
0x0A,0x5C,0x0A,0x24,0x5B,0x81,0x33,0x50, /* 000004C0 ".\.$[.3P" */
|
||||
0x31,0x33,0x43,0x03,0x44,0x52,0x53,0x41, /* 000004C8 "13C.DRSA" */
|
||||
0x20,0x44,0x52,0x53,0x42,0x20,0x44,0x52, /* 000004D0 " DRSB DR" */
|
||||
0x53,0x43,0x20,0x44,0x52,0x53,0x45,0x20, /* 000004D8 "SC DRSE " */
|
||||
0x44,0x52,0x53,0x46,0x20,0x44,0x52,0x53, /* 000004E0 "DRSF DRS" */
|
||||
0x47,0x20,0x44,0x52,0x53,0x48,0x20,0x44, /* 000004E8 "G DRSH D" */
|
||||
0x52,0x53,0x49,0x20,0x44,0x52,0x53,0x4A, /* 000004F0 "RSI DRSJ" */
|
||||
0x20,0x10,0x4F,0x2E,0x5F,0x53,0x42,0x5F, /* 000004F8 " .O._SB_" */
|
||||
0x5B,0x81,0x24,0x2F,0x03,0x50,0x43,0x49, /* 00000500 "[.$/.PCI" */
|
||||
0x30,0x49,0x53,0x41,0x5F,0x50,0x34,0x30, /* 00000508 "0ISA_P40" */
|
||||
0x43,0x01,0x50,0x52,0x51,0x30,0x08,0x50, /* 00000510 "C.PRQ0.P" */
|
||||
0x52,0x51,0x31,0x08,0x50,0x52,0x51,0x32, /* 00000518 "RQ1.PRQ2" */
|
||||
0x08,0x50,0x52,0x51,0x33,0x08,0x5B,0x82, /* 00000520 ".PRQ3.[." */
|
||||
0x4E,0x0A,0x4C,0x4E,0x4B,0x41,0x08,0x5F, /* 00000528 "N.LNKA._" */
|
||||
0x48,0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F, /* 00000530 "HID.A..." */
|
||||
0x08,0x5F,0x55,0x49,0x44,0x01,0x08,0x5F, /* 00000538 "._UID.._" */
|
||||
0x50,0x52,0x53,0x11,0x09,0x0A,0x06,0x23, /* 00000540 "PRS....#" */
|
||||
0xF8,0x1E,0x18,0x79,0x00,0x14,0x1A,0x5F, /* 00000548 "...y..._" */
|
||||
0x53,0x54,0x41,0x00,0x70,0x0A,0x0B,0x60, /* 00000550 "STA.p..`" */
|
||||
0xA0,0x0D,0x7B,0x0A,0x80,0x50,0x52,0x51, /* 00000558 "..{..PRQ" */
|
||||
0x30,0x61,0x70,0x0A,0x09,0x60,0xA4,0x60, /* 00000560 "0ap..`.`" */
|
||||
0x14,0x11,0x5F,0x44,0x49,0x53,0x00,0x7D, /* 00000568 ".._DIS.}" */
|
||||
0x50,0x52,0x51,0x30,0x0A,0x80,0x50,0x52, /* 00000570 "PRQ0..PR" */
|
||||
0x51,0x30,0x14,0x3F,0x5F,0x43,0x52,0x53, /* 00000578 "Q0.?_CRS" */
|
||||
0x00,0x08,0x50,0x52,0x52,0x30,0x11,0x09, /* 00000580 "..PRR0.." */
|
||||
0x0A,0x06,0x23,0x02,0x00,0x18,0x79,0x00, /* 00000588 "..#...y." */
|
||||
0x8B,0x50,0x52,0x52,0x30,0x01,0x54,0x4D, /* 00000590 ".PRR0.TM" */
|
||||
0x50,0x5F,0x70,0x50,0x52,0x51,0x30,0x60, /* 00000598 "P_pPRQ0`" */
|
||||
0xA0,0x0C,0x95,0x60,0x0A,0x80,0x79,0x01, /* 000005A0 "...`..y." */
|
||||
0x60,0x54,0x4D,0x50,0x5F,0xA1,0x07,0x70, /* 000005A8 "`TMP_..p" */
|
||||
0x00,0x54,0x4D,0x50,0x5F,0xA4,0x50,0x52, /* 000005B0 ".TMP_.PR" */
|
||||
0x52,0x30,0x14,0x1B,0x5F,0x53,0x52,0x53, /* 000005B8 "R0.._SRS" */
|
||||
0x01,0x8B,0x68,0x01,0x54,0x4D,0x50,0x5F, /* 000005C0 "..h.TMP_" */
|
||||
0x82,0x54,0x4D,0x50,0x5F,0x60,0x76,0x60, /* 000005C8 ".TMP_`v`" */
|
||||
0x70,0x60,0x50,0x52,0x51,0x30,0x5B,0x82, /* 000005D0 "p`PRQ0[." */
|
||||
0x4F,0x0A,0x4C,0x4E,0x4B,0x42,0x08,0x5F, /* 000005D8 "O.LNKB._" */
|
||||
0x48,0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F, /* 000005E0 "HID.A..." */
|
||||
0x08,0x5F,0x55,0x49,0x44,0x0A,0x02,0x08, /* 000005E8 "._UID..." */
|
||||
0x5F,0x50,0x52,0x53,0x11,0x09,0x0A,0x06, /* 000005F0 "_PRS...." */
|
||||
0x23,0xF8,0x1E,0x18,0x79,0x00,0x14,0x1A, /* 000005F8 "#...y..." */
|
||||
0x5F,0x53,0x54,0x41,0x00,0x70,0x0A,0x0B, /* 00000600 "_STA.p.." */
|
||||
0x60,0xA0,0x0D,0x7B,0x0A,0x80,0x50,0x52, /* 00000608 "`..{..PR" */
|
||||
0x51,0x31,0x61,0x70,0x0A,0x09,0x60,0xA4, /* 00000610 "Q1ap..`." */
|
||||
0x60,0x14,0x11,0x5F,0x44,0x49,0x53,0x00, /* 00000618 "`.._DIS." */
|
||||
0x7D,0x50,0x52,0x51,0x31,0x0A,0x80,0x50, /* 00000620 "}PRQ1..P" */
|
||||
0x52,0x51,0x31,0x14,0x3F,0x5F,0x43,0x52, /* 00000628 "RQ1.?_CR" */
|
||||
0x53,0x00,0x08,0x50,0x52,0x52,0x30,0x11, /* 00000630 "S..PRR0." */
|
||||
0x09,0x0A,0x06,0x23,0x02,0x00,0x18,0x79, /* 00000638 "...#...y" */
|
||||
0x00,0x8B,0x50,0x52,0x52,0x30,0x01,0x54, /* 00000640 "..PRR0.T" */
|
||||
0x4D,0x50,0x5F,0x70,0x50,0x52,0x51,0x31, /* 00000648 "MP_pPRQ1" */
|
||||
0x60,0xA0,0x0C,0x95,0x60,0x0A,0x80,0x79, /* 00000650 "`...`..y" */
|
||||
0x01,0x60,0x54,0x4D,0x50,0x5F,0xA1,0x07, /* 00000658 ".`TMP_.." */
|
||||
0x70,0x00,0x54,0x4D,0x50,0x5F,0xA4,0x50, /* 00000660 "p.TMP_.P" */
|
||||
0x52,0x52,0x30,0x14,0x1B,0x5F,0x53,0x52, /* 00000668 "RR0.._SR" */
|
||||
0x53,0x01,0x8B,0x68,0x01,0x54,0x4D,0x50, /* 00000670 "S..h.TMP" */
|
||||
0x5F,0x82,0x54,0x4D,0x50,0x5F,0x60,0x76, /* 00000678 "_.TMP_`v" */
|
||||
0x60,0x70,0x60,0x50,0x52,0x51,0x31,0x5B, /* 00000680 "`p`PRQ1[" */
|
||||
0x82,0x4F,0x0A,0x4C,0x4E,0x4B,0x43,0x08, /* 00000688 ".O.LNKC." */
|
||||
0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0,0x0C, /* 00000690 "_HID.A.." */
|
||||
0x0F,0x08,0x5F,0x55,0x49,0x44,0x0A,0x03, /* 00000698 ".._UID.." */
|
||||
0x08,0x5F,0x50,0x52,0x53,0x11,0x09,0x0A, /* 000006A0 "._PRS..." */
|
||||
0x06,0x23,0xF8,0x1E,0x18,0x79,0x00,0x14, /* 000006A8 ".#...y.." */
|
||||
0x1A,0x5F,0x53,0x54,0x41,0x00,0x70,0x0A, /* 000006B0 "._STA.p." */
|
||||
0x0B,0x60,0xA0,0x0D,0x7B,0x0A,0x80,0x50, /* 000006B8 ".`..{..P" */
|
||||
0x52,0x51,0x32,0x61,0x70,0x0A,0x09,0x60, /* 000006C0 "RQ2ap..`" */
|
||||
0xA4,0x60,0x14,0x11,0x5F,0x44,0x49,0x53, /* 000006C8 ".`.._DIS" */
|
||||
0x00,0x7D,0x50,0x52,0x51,0x32,0x0A,0x80, /* 000006D0 ".}PRQ2.." */
|
||||
0x50,0x52,0x51,0x32,0x14,0x3F,0x5F,0x43, /* 000006D8 "PRQ2.?_C" */
|
||||
0x52,0x53,0x00,0x08,0x50,0x52,0x52,0x30, /* 000006E0 "RS..PRR0" */
|
||||
0x11,0x09,0x0A,0x06,0x23,0x02,0x00,0x18, /* 000006E8 "....#..." */
|
||||
0x79,0x00,0x8B,0x50,0x52,0x52,0x30,0x01, /* 000006F0 "y..PRR0." */
|
||||
0x54,0x4D,0x50,0x5F,0x70,0x50,0x52,0x51, /* 000006F8 "TMP_pPRQ" */
|
||||
0x32,0x60,0xA0,0x0C,0x95,0x60,0x0A,0x80, /* 00000700 "2`...`.." */
|
||||
0x79,0x01,0x60,0x54,0x4D,0x50,0x5F,0xA1, /* 00000708 "y.`TMP_." */
|
||||
0x07,0x70,0x00,0x54,0x4D,0x50,0x5F,0xA4, /* 00000710 ".p.TMP_." */
|
||||
0x50,0x52,0x52,0x30,0x14,0x1B,0x5F,0x53, /* 00000718 "PRR0.._S" */
|
||||
0x52,0x53,0x01,0x8B,0x68,0x01,0x54,0x4D, /* 00000720 "RS..h.TM" */
|
||||
0x50,0x5F,0x82,0x54,0x4D,0x50,0x5F,0x60, /* 00000728 "P_.TMP_`" */
|
||||
0x76,0x60,0x70,0x60,0x50,0x52,0x51,0x32, /* 00000730 "v`p`PRQ2" */
|
||||
0x5B,0x82,0x4F,0x0A,0x4C,0x4E,0x4B,0x44, /* 00000738 "[.O.LNKD" */
|
||||
0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000740 "._HID.A." */
|
||||
0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x0A, /* 00000748 "..._UID." */
|
||||
0x04,0x08,0x5F,0x50,0x52,0x53,0x11,0x09, /* 00000750 ".._PRS.." */
|
||||
0x0A,0x06,0x23,0xF8,0x1E,0x18,0x79,0x00, /* 00000758 "..#...y." */
|
||||
0x14,0x1A,0x5F,0x53,0x54,0x41,0x00,0x70, /* 00000760 ".._STA.p" */
|
||||
0x0A,0x0B,0x60,0xA0,0x0D,0x7B,0x0A,0x80, /* 00000768 "..`..{.." */
|
||||
0x50,0x52,0x51,0x33,0x61,0x70,0x0A,0x09, /* 00000770 "PRQ3ap.." */
|
||||
0x60,0xA4,0x60,0x14,0x11,0x5F,0x44,0x49, /* 00000778 "`.`.._DI" */
|
||||
0x53,0x00,0x7D,0x50,0x52,0x51,0x33,0x0A, /* 00000780 "S.}PRQ3." */
|
||||
0x80,0x50,0x52,0x51,0x33,0x14,0x3F,0x5F, /* 00000788 ".PRQ3.?_" */
|
||||
0x43,0x52,0x53,0x00,0x08,0x50,0x52,0x52, /* 00000790 "CRS..PRR" */
|
||||
0x30,0x11,0x09,0x0A,0x06,0x23,0x02,0x00, /* 00000798 "0....#.." */
|
||||
0x18,0x79,0x00,0x8B,0x50,0x52,0x52,0x30, /* 000007A0 ".y..PRR0" */
|
||||
0x01,0x54,0x4D,0x50,0x5F,0x70,0x50,0x52, /* 000007A8 ".TMP_pPR" */
|
||||
0x51,0x33,0x60,0xA0,0x0C,0x95,0x60,0x0A, /* 000007B0 "Q3`...`." */
|
||||
0x80,0x79,0x01,0x60,0x54,0x4D,0x50,0x5F, /* 000007B8 ".y.`TMP_" */
|
||||
0xA1,0x07,0x70,0x00,0x54,0x4D,0x50,0x5F, /* 000007C0 "..p.TMP_" */
|
||||
0xA4,0x50,0x52,0x52,0x30,0x14,0x1B,0x5F, /* 000007C8 ".PRR0.._" */
|
||||
0x53,0x52,0x53,0x01,0x8B,0x68,0x01,0x54, /* 000007D0 "SRS..h.T" */
|
||||
0x4D,0x50,0x5F,0x82,0x54,0x4D,0x50,0x5F, /* 000007D8 "MP_.TMP_" */
|
||||
0x60,0x76,0x60,0x70,0x60,0x50,0x52,0x51, /* 000007E0 "`v`p`PRQ" */
|
||||
0x33,0x08,0x5F,0x53,0x33,0x5F,0x12,0x06, /* 000007E8 "3._S3_.." */
|
||||
0x04,0x01,0x01,0x00,0x00,0x08,0x5F,0x53, /* 000007F0 "......_S" */
|
||||
0x34,0x5F,0x12,0x06,0x04,0x00,0x00,0x00, /* 000007F8 "4_......" */
|
||||
0x00,0x08,0x5F,0x53,0x35,0x5F,0x12,0x06, /* 00000800 ".._S5_.." */
|
||||
0x04,0x00,0x00,0x00,0x00,
|
||||
};
|
||||
365
bochs/bios/apmbios.S
Normal file
365
bochs/bios/apmbios.S
Normal file
@ -0,0 +1,365 @@
|
||||
// APM BIOS support for the Bochs BIOS
|
||||
// Copyright (C) 2004 Fabrice Bellard
|
||||
//
|
||||
// Debugging extensions, 16-bit interface and extended power options
|
||||
// Copyright (C) 2005 Struan Bartlett
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#if defined(APM_REAL)
|
||||
#define APMSYM(s) apmreal_ ## s
|
||||
#elif defined(APM_PROT16)
|
||||
#define APMSYM(s) apm16_ ## s
|
||||
#elif defined(APM_PROT32)
|
||||
#define APMSYM(s) apm32_ ## s
|
||||
#else
|
||||
#error unsupported APM mode
|
||||
#endif
|
||||
|
||||
APMSYM(out_str):
|
||||
push eax
|
||||
push ebx
|
||||
mov ebx, eax
|
||||
APMSYM(out_str1):
|
||||
SEG CS
|
||||
mov al, byte ptr [bx]
|
||||
cmp al, #0
|
||||
je APMSYM(out_str2)
|
||||
outb dx, al
|
||||
inc ebx
|
||||
jmp APMSYM(out_str1)
|
||||
APMSYM(out_str2):
|
||||
pop ebx
|
||||
pop eax
|
||||
ret
|
||||
|
||||
APMSYM(07_poweroff_str):
|
||||
.ascii "Shutdown"
|
||||
db 0
|
||||
APMSYM(07_suspend_str):
|
||||
.ascii "Suspend"
|
||||
db 0
|
||||
APMSYM(07_standby_str):
|
||||
.ascii "Standby"
|
||||
db 0
|
||||
|
||||
#if DEBUG_APM
|
||||
APMSYM(put_str):
|
||||
push edx
|
||||
mov dx, #INFO_PORT
|
||||
call APMSYM(out_str)
|
||||
pop edx
|
||||
ret
|
||||
|
||||
; print the hex number in eax
|
||||
APMSYM(put_num):
|
||||
push eax
|
||||
push ebx
|
||||
push ecx
|
||||
push edx
|
||||
mov ecx, eax
|
||||
mov bx, #8
|
||||
mov dx, #INFO_PORT
|
||||
APMSYM(put_num1):
|
||||
mov eax, ecx
|
||||
shr eax, #28
|
||||
add al, #0x30
|
||||
cmp al, #0x39
|
||||
jbe APMSYM(put_num2)
|
||||
add al, #0x27
|
||||
APMSYM(put_num2):
|
||||
outb dx, al
|
||||
shl ecx, #4
|
||||
dec bx
|
||||
jne APMSYM(put_num1)
|
||||
pop edx
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop eax
|
||||
ret
|
||||
|
||||
APMSYM(put_reg):
|
||||
outb dx, al
|
||||
shr eax, #8
|
||||
outb dx, al
|
||||
shr eax, #8
|
||||
outb dx, al
|
||||
shr eax, #8
|
||||
outb dx, al
|
||||
|
||||
mov eax,ebx
|
||||
call APMSYM(put_num)
|
||||
|
||||
mov al, #0x3b
|
||||
outb dx,al
|
||||
mov al, #0x20
|
||||
outb dx,al
|
||||
ret
|
||||
|
||||
APMSYM(put_regs):
|
||||
push eax
|
||||
push edx
|
||||
push ebx
|
||||
mov dx, #INFO_PORT
|
||||
|
||||
mov ebx, eax
|
||||
mov eax, #0x3d584145 // 'EAX='
|
||||
call APMSYM(put_reg)
|
||||
pop ebx
|
||||
push ebx
|
||||
mov eax, #0x3d584245 // 'EBX='
|
||||
call APMSYM(put_reg)
|
||||
mov ebx, ecx
|
||||
mov eax, #0x3d584345 // 'ECX='
|
||||
call APMSYM(put_reg)
|
||||
mov ebx, edx
|
||||
mov eax, #0x3d584445 // 'EDX='
|
||||
call APMSYM(put_reg)
|
||||
mov ebx, esi
|
||||
mov eax, #0x3d495345 // 'ESI='
|
||||
call APMSYM(put_reg)
|
||||
mov ebx, edi
|
||||
mov eax, #0x3d494445 // 'EDI='
|
||||
call APMSYM(put_reg)
|
||||
|
||||
mov al, #0x0a
|
||||
outb dx, al
|
||||
pop ebx
|
||||
pop edx
|
||||
pop eax
|
||||
ret
|
||||
#endif
|
||||
|
||||
#if defined(APM_PROT32)
|
||||
_apm32_entry:
|
||||
#endif
|
||||
#if defined(APM_PROT16)
|
||||
_apm16_entry:
|
||||
#endif
|
||||
pushf
|
||||
|
||||
#if defined(APM_REAL)
|
||||
_apmreal_entry:
|
||||
#endif
|
||||
|
||||
#if DEBUG_APM
|
||||
call APMSYM(put_regs)
|
||||
#endif
|
||||
|
||||
#if defined(APM_REAL)
|
||||
;-----------------
|
||||
; APM installation check
|
||||
APMSYM(00):
|
||||
cmp al, #0x00
|
||||
jne APMSYM(01)
|
||||
|
||||
mov ah, #1 // APM major version
|
||||
mov al, #2 // APM minor version
|
||||
|
||||
mov bh, #0x50 // 'P'
|
||||
mov bl, #0x4d // 'M'
|
||||
|
||||
// bit 0 : 16 bit interface supported
|
||||
// bit 1 : 32 bit interface supported
|
||||
mov cx, #0x3
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM real mode interface connect
|
||||
APMSYM(01):
|
||||
cmp al, #0x01
|
||||
jne APMSYM(02)
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM 16 bit protected mode interface connect
|
||||
APMSYM(02):
|
||||
cmp al, #0x02
|
||||
jne APMSYM(03)
|
||||
|
||||
mov bx, #_apm16_entry
|
||||
|
||||
mov ax, #0xf000 // 16 bit code segment base
|
||||
mov si, #0xfff0 // 16 bit code segment size
|
||||
mov cx, #0xf000 // data segment address
|
||||
mov di, #0xfff0 // data segment length
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM 32 bit protected mode interface connect
|
||||
APMSYM(03):
|
||||
cmp al, #0x03
|
||||
jne APMSYM(04)
|
||||
mov ax, #0xf000 // 32 bit code segment base
|
||||
mov ebx, #_apm32_entry
|
||||
mov cx, #0xf000 // 16 bit code segment base
|
||||
// 32 bit code segment size (low 16 bits)
|
||||
// 16 bit code segment size (high 16 bits)
|
||||
mov esi, #0xfff0fff0
|
||||
mov dx, #0xf000 // data segment address
|
||||
mov di, #0xfff0 // data segment length
|
||||
jmp APMSYM(ok)
|
||||
#endif
|
||||
|
||||
;-----------------
|
||||
; APM interface disconnect
|
||||
APMSYM(04):
|
||||
cmp al, #0x04
|
||||
jne APMSYM(05)
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM cpu idle
|
||||
APMSYM(05):
|
||||
cmp al, #0x05
|
||||
jne APMSYM(07)
|
||||
sti
|
||||
hlt
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM Set Power State
|
||||
APMSYM(07):
|
||||
cmp al, #0x07
|
||||
jne APMSYM(08)
|
||||
|
||||
cmp bx, #1
|
||||
jne APMSYM(ok)
|
||||
|
||||
cmp cx, #3
|
||||
je APMSYM(07_poweroff)
|
||||
|
||||
cmp cx, #2
|
||||
je APMSYM(07_suspend)
|
||||
|
||||
cmp cx, #1
|
||||
je APMSYM(07_standby)
|
||||
|
||||
jne APMSYM(ok)
|
||||
|
||||
APMSYM(07_poweroff):
|
||||
// send power off event to emulator
|
||||
cli
|
||||
mov dx, #0x8900
|
||||
mov ax, #APMSYM(07_poweroff_str)
|
||||
call APMSYM(out_str)
|
||||
|
||||
APMSYM(07_1):
|
||||
hlt
|
||||
jmp APMSYM(07_1)
|
||||
|
||||
APMSYM(07_suspend):
|
||||
push edx
|
||||
mov dx, #0x8900
|
||||
mov ax, #APMSYM(07_suspend_str)
|
||||
call APMSYM(out_str)
|
||||
pop edx
|
||||
jmp APMSYM(ok)
|
||||
|
||||
APMSYM(07_standby):
|
||||
push edx
|
||||
mov dx, #0x8900
|
||||
mov ax, #APMSYM(07_standby_str)
|
||||
call APMSYM(out_str)
|
||||
pop edx
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM Enable / Disable
|
||||
APMSYM(08):
|
||||
cmp al, #0x08
|
||||
jne APMSYM(0a)
|
||||
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; Get Power Status
|
||||
APMSYM(0a):
|
||||
cmp al, #0x0a
|
||||
jne APMSYM(0b)
|
||||
mov bh, #0x01 // on line
|
||||
// mov bh, #0x02 // battery
|
||||
mov bl, #0xff // unknown battery status
|
||||
// mov bl, #0x03 // charging
|
||||
mov ch, #0x80 // no system battery
|
||||
// mov ch, #0x8 // charging
|
||||
mov cl, #0xff // unknown remaining time
|
||||
// mov cl, #50
|
||||
mov dx, #0xffff // unknown remaining time
|
||||
mov si, #0 // zero battery
|
||||
// mov si, #1 // one battery
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; Get PM Event
|
||||
APMSYM(0b):
|
||||
cmp al, #0x0b
|
||||
jne APMSYM(0e)
|
||||
mov ah, #0x80 // no event pending
|
||||
jmp APMSYM(error)
|
||||
|
||||
;-----------------
|
||||
; APM Driver Version
|
||||
APMSYM(0e):
|
||||
cmp al, #0x0e
|
||||
jne APMSYM(0f)
|
||||
|
||||
mov ah, #1
|
||||
mov al, #2
|
||||
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM Engage / Disengage
|
||||
APMSYM(0f):
|
||||
cmp al, #0x0f
|
||||
jne APMSYM(10)
|
||||
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
; APM Get Capabilities
|
||||
APMSYM(10):
|
||||
cmp al, #0x10
|
||||
jne APMSYM(unimplemented)
|
||||
|
||||
mov bl, #0
|
||||
mov cx, #0
|
||||
|
||||
jmp APMSYM(ok)
|
||||
|
||||
;-----------------
|
||||
APMSYM(ok):
|
||||
popf
|
||||
clc
|
||||
#if defined(APM_REAL)
|
||||
jmp iret_modify_cf
|
||||
#else
|
||||
retf
|
||||
#endif
|
||||
APMSYM(unimplemented):
|
||||
APMSYM(error):
|
||||
popf
|
||||
stc
|
||||
#if defined(APM_REAL)
|
||||
jmp iret_modify_cf
|
||||
#else
|
||||
retf
|
||||
#endif
|
||||
|
||||
#undef APM_PROT32
|
||||
#undef APM_PROT16
|
||||
#undef APM_REAL
|
||||
#undef APMSYM
|
||||
4
bochs/bios/bios_usage
Normal file
4
bochs/bios/bios_usage
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/csh -f
|
||||
gcc -E rombios.c | grep "^\.org" | sed -e 's/\.org //' | sed -e 's/ .*//' | sort >! temp.usage
|
||||
usage rombios.bin temp.usage
|
||||
/bin/rm temp.usage
|
||||
589
bochs/bios/biossums.c
Normal file
589
bochs/bios/biossums.c
Normal file
@ -0,0 +1,589 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/* biossums.c --- written by Eike W. for the Bochs BIOS */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
void check( int value, char* message );
|
||||
|
||||
#define LEN_BIOS_DATA 0x10000
|
||||
#define MAX_OFFSET (LEN_BIOS_DATA - 1)
|
||||
|
||||
|
||||
#define BIOS_OFFSET 0xFFFF
|
||||
|
||||
long chksum_bios_get_offset( byte* data, long offset );
|
||||
byte chksum_bios_calc_value( byte* data, long offset );
|
||||
byte chksum_bios_get_value( byte* data, long offset );
|
||||
void chksum_bios_set_value( byte* data, long offset, byte value );
|
||||
|
||||
|
||||
#define _32__LEN 9
|
||||
#define _32__CHKSUM 10
|
||||
|
||||
#define _32__MINHDR 16
|
||||
|
||||
long chksum__32__get_offset( byte* data, long offset );
|
||||
byte chksum__32__calc_value( byte* data, long offset );
|
||||
byte chksum__32__get_value( byte* data, long offset );
|
||||
void chksum__32__set_value( byte* data, long offset, byte value );
|
||||
|
||||
|
||||
#define _MP__LEN 8
|
||||
#define _MP__CHKSUM 10
|
||||
|
||||
#define _MP__MINHDR 16
|
||||
|
||||
long chksum__mp__get_offset( byte* data, long offset );
|
||||
byte chksum__mp__calc_value( byte* data, long offset );
|
||||
byte chksum__mp__get_value( byte* data, long offset );
|
||||
void chksum__mp__set_value( byte* data, long offset, byte value );
|
||||
|
||||
|
||||
#define PCMP_BASELEN 4
|
||||
#define PCMP_CHKSUM 7
|
||||
#define PCMP_EXT_LEN 40
|
||||
#define PCMP_EXT_CHKSUM 42
|
||||
|
||||
#define PCMP_MINHDR 42
|
||||
|
||||
long chksum_pcmp_get_offset( byte* data, long offset );
|
||||
byte chksum_pcmp_calc_value( byte* data, long offset );
|
||||
byte chksum_pcmp_get_value( byte* data, long offset );
|
||||
void chksum_pcmp_set_value( byte* data, long offset, byte value );
|
||||
|
||||
|
||||
#define _PIR_LEN 6
|
||||
#define _PIR_CHKSUM 31
|
||||
|
||||
#define _PIR_MINHDR 32
|
||||
|
||||
long chksum__pir_get_offset( byte *data, long offset );
|
||||
byte chksum__pir_calc_value( byte* data, long offset );
|
||||
byte chksum__pir_get_value( byte* data, long offset );
|
||||
void chksum__pir_set_value( byte* data, long offset, byte value );
|
||||
|
||||
#define _PNP_LEN 5
|
||||
#define _PNP_CHKSUM 8
|
||||
|
||||
#define _PNP_MINHDR 32
|
||||
|
||||
long chksum__pnp_get_offset( byte *data, long offset );
|
||||
byte chksum__pnp_calc_value( byte* data, long offset );
|
||||
byte chksum__pnp_get_value( byte* data, long offset );
|
||||
void chksum__pnp_set_value( byte* data, long offset, byte value );
|
||||
|
||||
byte bios_data[LEN_BIOS_DATA];
|
||||
long bios_len;
|
||||
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
FILE* stream;
|
||||
long offset, tmp_offset;
|
||||
byte cur_val = 0, new_val = 0;
|
||||
int arg = 1, hits, pad = 0;
|
||||
|
||||
|
||||
if ((argc == 3) && (!strcmp(argv[1], "-pad"))) {
|
||||
pad = 1;
|
||||
arg = 2;
|
||||
} else if (argc != 2) {
|
||||
printf("Error. Need a file-name as an argument.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
memset(bios_data, 0xff, LEN_BIOS_DATA);
|
||||
|
||||
if ((stream = fopen(argv[arg], "rb")) == NULL) {
|
||||
printf("Error opening %s for reading.\n", argv[arg]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
bios_len = fread(bios_data, 1, LEN_BIOS_DATA, stream);
|
||||
if ((bios_len < LEN_BIOS_DATA) && (pad == 0)) {
|
||||
printf("Error reading 64KBytes from %s.\n", argv[arg]);
|
||||
fclose(stream);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fclose(stream);
|
||||
if (pad == 1) goto write_bios;
|
||||
|
||||
hits = 0;
|
||||
offset = 0L;
|
||||
while( (tmp_offset = chksum__32__get_offset( bios_data, offset )) != -1L ) {
|
||||
offset = tmp_offset;
|
||||
cur_val = chksum__32__get_value( bios_data, offset );
|
||||
new_val = chksum__32__calc_value( bios_data, offset );
|
||||
printf( "\n\nPCI-Bios header at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X ", new_val );
|
||||
hits++;
|
||||
}
|
||||
if( hits == 1 && cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum__32__set_value( bios_data, offset, new_val );
|
||||
}
|
||||
if( hits >= 2 ) {
|
||||
printf( "Multiple PCI headers! No checksum set." );
|
||||
}
|
||||
if( hits ) {
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
|
||||
hits = 0;
|
||||
offset = 0L;
|
||||
while( (tmp_offset = chksum__mp__get_offset( bios_data, offset )) != -1L ) {
|
||||
offset = tmp_offset;
|
||||
cur_val = chksum__mp__get_value( bios_data, offset );
|
||||
new_val = chksum__mp__calc_value( bios_data, offset );
|
||||
printf( "\n\nMP header at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X ", new_val );
|
||||
hits++;
|
||||
}
|
||||
if( hits == 1 && cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum__mp__set_value( bios_data, offset, new_val );
|
||||
}
|
||||
if( hits >= 2 ) {
|
||||
printf( "Warning! Multiple MP headers. No checksum set." );
|
||||
}
|
||||
if( hits ) {
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
|
||||
hits = 0;
|
||||
offset = 0L;
|
||||
while( (tmp_offset = chksum_pcmp_get_offset( bios_data, offset )) != -1L ) {
|
||||
offset = tmp_offset;
|
||||
cur_val = chksum_pcmp_get_value( bios_data, offset );
|
||||
new_val = chksum_pcmp_calc_value( bios_data, offset );
|
||||
printf( "\n\nPCMP header at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X ", new_val );
|
||||
hits++;
|
||||
}
|
||||
if( hits == 1 && cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum_pcmp_set_value( bios_data, offset, new_val );
|
||||
}
|
||||
if( hits >= 2 ) {
|
||||
printf( "Warning! Multiple PCMP headers. No checksum set." );
|
||||
}
|
||||
if( hits ) {
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
|
||||
hits = 0;
|
||||
offset = 0L;
|
||||
while( (tmp_offset = chksum__pir_get_offset( bios_data, offset )) != -1L ) {
|
||||
offset = tmp_offset;
|
||||
cur_val = chksum__pir_get_value( bios_data, offset );
|
||||
new_val = chksum__pir_calc_value( bios_data, offset );
|
||||
printf( "\n\n$PIR header at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X\n ", new_val );
|
||||
hits++;
|
||||
}
|
||||
if( hits == 1 && cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum__pir_set_value( bios_data, offset, new_val );
|
||||
}
|
||||
if( hits >= 2 ) {
|
||||
printf( "Warning! Multiple $PIR headers. No checksum set." );
|
||||
}
|
||||
if( hits ) {
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
|
||||
hits = 0;
|
||||
offset = 0L;
|
||||
while( (tmp_offset = chksum__pnp_get_offset( bios_data, offset )) != -1L ) {
|
||||
offset = tmp_offset;
|
||||
cur_val = chksum__pnp_get_value( bios_data, offset );
|
||||
new_val = chksum__pnp_calc_value( bios_data, offset );
|
||||
printf( "\n\n$PnP header at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X\n ", new_val );
|
||||
hits++;
|
||||
}
|
||||
if( hits == 1 && cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum__pnp_set_value( bios_data, offset, new_val );
|
||||
}
|
||||
if( hits >= 2 ) {
|
||||
printf( "Warning! Multiple $PnP headers. No checksum set." );
|
||||
}
|
||||
if( hits ) {
|
||||
printf( "\n" );
|
||||
}
|
||||
|
||||
offset = 0L;
|
||||
offset = chksum_bios_get_offset( bios_data, offset );
|
||||
cur_val = chksum_bios_get_value( bios_data, offset );
|
||||
new_val = chksum_bios_calc_value( bios_data, offset );
|
||||
printf( "\n\nBios checksum at: 0x%4lX\n", offset );
|
||||
printf( "Current checksum: 0x%02X\n", cur_val );
|
||||
printf( "Calculated checksum: 0x%02X ", new_val );
|
||||
if( cur_val != new_val ) {
|
||||
printf( "Setting checksum." );
|
||||
chksum_bios_set_value( bios_data, offset, new_val );
|
||||
}
|
||||
printf( "\n" );
|
||||
|
||||
write_bios:
|
||||
if ((stream = fopen(argv[arg], "wb")) == NULL) {
|
||||
printf("Error opening %s for writing.\n", argv[arg]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (fwrite(bios_data, 1, LEN_BIOS_DATA, stream) < LEN_BIOS_DATA) {
|
||||
printf("Error writing 64KBytes to %s.\n", argv[arg]);
|
||||
fclose(stream);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fclose(stream);
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
void check(int okay, char* message) {
|
||||
|
||||
if (!okay) {
|
||||
printf("\n\nError. %s.\n", message);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long chksum_bios_get_offset( byte* data, long offset ) {
|
||||
|
||||
return( BIOS_OFFSET );
|
||||
}
|
||||
|
||||
|
||||
byte chksum_bios_calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
byte sum;
|
||||
|
||||
sum = 0;
|
||||
for( i = 0; i < MAX_OFFSET; i++ ) {
|
||||
sum = sum + *( data + i );
|
||||
}
|
||||
sum = -sum; /* iso ensures -s + s == 0 on unsigned types */
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
byte chksum_bios_get_value( byte* data, long offset ) {
|
||||
|
||||
return( *( data + BIOS_OFFSET ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum_bios_set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
*( data + BIOS_OFFSET ) = value;
|
||||
}
|
||||
|
||||
|
||||
byte chksum__32__calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
int len;
|
||||
byte sum;
|
||||
|
||||
check( offset + _32__MINHDR <= MAX_OFFSET, "_32_ header out of bounds" );
|
||||
len = *( data + offset + _32__LEN ) << 4;
|
||||
check( offset + len <= MAX_OFFSET, "_32_ header-length out of bounds" );
|
||||
sum = 0;
|
||||
for( i = 0; i < len; i++ ) {
|
||||
if( i != _32__CHKSUM ) {
|
||||
sum = sum + *( data + offset + i );
|
||||
}
|
||||
}
|
||||
sum = -sum;
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
long chksum__32__get_offset( byte* data, long offset ) {
|
||||
|
||||
long result = -1L;
|
||||
|
||||
offset = offset + 0x0F;
|
||||
offset = offset & ~( 0x0F );
|
||||
while( offset + 16 < MAX_OFFSET ) {
|
||||
offset = offset + 16;
|
||||
if( *( data + offset + 0 ) == '_' && \
|
||||
*( data + offset + 1 ) == '3' && \
|
||||
*( data + offset + 2 ) == '2' && \
|
||||
*( data + offset + 3 ) == '_' ) {
|
||||
result = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
||||
byte chksum__32__get_value( byte* data, long offset ) {
|
||||
|
||||
check( offset + _32__CHKSUM <= MAX_OFFSET, "PCI-Bios checksum out of bounds" );
|
||||
return( *( data + offset + _32__CHKSUM ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum__32__set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
check( offset + _32__CHKSUM <= MAX_OFFSET, "PCI-Bios checksum out of bounds" );
|
||||
*( data + offset + _32__CHKSUM ) = value;
|
||||
}
|
||||
|
||||
|
||||
byte chksum__mp__calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
int len;
|
||||
byte sum;
|
||||
|
||||
check( offset + _MP__MINHDR <= MAX_OFFSET, "_MP_ header out of bounds" );
|
||||
len = *( data + offset + _MP__LEN ) << 4;
|
||||
check( offset + len <= MAX_OFFSET, "_MP_ header-length out of bounds" );
|
||||
sum = 0;
|
||||
for( i = 0; i < len; i++ ) {
|
||||
if( i != _MP__CHKSUM ) {
|
||||
sum = sum + *( data + offset + i );
|
||||
}
|
||||
}
|
||||
sum = -sum;
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
long chksum__mp__get_offset( byte* data, long offset ) {
|
||||
|
||||
long result = -1L;
|
||||
|
||||
offset = offset + 0x0F;
|
||||
offset = offset & ~( 0x0F );
|
||||
while( offset + 16 < MAX_OFFSET ) {
|
||||
offset = offset + 16;
|
||||
if( *( data + offset + 0 ) == '_' && \
|
||||
*( data + offset + 1 ) == 'M' && \
|
||||
*( data + offset + 2 ) == 'P' && \
|
||||
*( data + offset + 3 ) == '_' ) {
|
||||
result = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
||||
byte chksum__mp__get_value( byte* data, long offset ) {
|
||||
|
||||
check( offset + _MP__CHKSUM <= MAX_OFFSET, "MP checksum out of bounds" );
|
||||
return( *( data + offset + _MP__CHKSUM ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum__mp__set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
check( offset + _MP__CHKSUM <= MAX_OFFSET, "MP checksum out of bounds" );
|
||||
*( data + offset + _MP__CHKSUM ) = value;
|
||||
}
|
||||
|
||||
|
||||
byte chksum_pcmp_calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
int len;
|
||||
byte sum;
|
||||
|
||||
check( offset + PCMP_MINHDR <= MAX_OFFSET, "PCMP header out of bounds" );
|
||||
len = *( data + offset + PCMP_BASELEN ) + \
|
||||
( *( data + offset + PCMP_BASELEN + 1 ) << 8 );
|
||||
check( offset + len <= MAX_OFFSET, "PCMP header-length out of bounds" );
|
||||
if( *( data + offset + PCMP_EXT_LEN ) | \
|
||||
*( data + offset + PCMP_EXT_LEN + 1 ) | \
|
||||
*( data + offset + PCMP_EXT_CHKSUM ) ) {
|
||||
check( 0, "PCMP header indicates extended tables (unsupported)" );
|
||||
}
|
||||
sum = 0;
|
||||
for( i = 0; i < len; i++ ) {
|
||||
if( i != PCMP_CHKSUM ) {
|
||||
sum = sum + *( data + offset + i );
|
||||
}
|
||||
}
|
||||
sum = -sum;
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
long chksum_pcmp_get_offset( byte* data, long offset ) {
|
||||
|
||||
long result = -1L;
|
||||
|
||||
offset = offset + 0x0F;
|
||||
offset = offset & ~( 0x0F );
|
||||
while( offset + 16 < MAX_OFFSET ) {
|
||||
offset = offset + 16;
|
||||
if( *( data + offset + 0 ) == 'P' && \
|
||||
*( data + offset + 1 ) == 'C' && \
|
||||
*( data + offset + 2 ) == 'M' && \
|
||||
*( data + offset + 3 ) == 'P' ) {
|
||||
result = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
||||
byte chksum_pcmp_get_value( byte* data, long offset ) {
|
||||
|
||||
check( offset + PCMP_CHKSUM <= MAX_OFFSET, "PCMP checksum out of bounds" );
|
||||
return( *( data + offset + PCMP_CHKSUM ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum_pcmp_set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
check( offset + PCMP_CHKSUM <= MAX_OFFSET, "PCMP checksum out of bounds" );
|
||||
*( data + offset + PCMP_CHKSUM ) = value;
|
||||
}
|
||||
|
||||
|
||||
byte chksum__pir_calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
int len;
|
||||
byte sum;
|
||||
|
||||
check( offset + _PIR_MINHDR <= MAX_OFFSET, "$PIR header out of bounds" );
|
||||
len = *( data + offset + _PIR_LEN ) + \
|
||||
( *( data + offset + _PIR_LEN + 1 ) << 8 );
|
||||
check( offset + len <= MAX_OFFSET, "$PIR header-length out of bounds" );
|
||||
sum = 0;
|
||||
for( i = 0; i < len; i++ ) {
|
||||
if( i != _PIR_CHKSUM ) {
|
||||
sum = sum + *( data + offset + i );
|
||||
}
|
||||
}
|
||||
sum = -sum;
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
long chksum__pir_get_offset( byte* data, long offset ) {
|
||||
|
||||
long result = -1L;
|
||||
|
||||
offset = offset + 0x0F;
|
||||
offset = offset & ~( 0x0F );
|
||||
while( offset + 16 < MAX_OFFSET ) {
|
||||
offset = offset + 16;
|
||||
if( *( data + offset + 0 ) == '$' && \
|
||||
*( data + offset + 1 ) == 'P' && \
|
||||
*( data + offset + 2 ) == 'I' && \
|
||||
*( data + offset + 3 ) == 'R' ) {
|
||||
result = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
||||
byte chksum__pir_get_value( byte* data, long offset ) {
|
||||
|
||||
check( offset + _PIR_CHKSUM <= MAX_OFFSET, "$PIR checksum out of bounds" );
|
||||
return( *( data + offset + _PIR_CHKSUM ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum__pir_set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
check( offset + _PIR_CHKSUM <= MAX_OFFSET, "$PIR checksum out of bounds" );
|
||||
*( data + offset + _PIR_CHKSUM ) = value;
|
||||
}
|
||||
|
||||
|
||||
byte chksum__pnp_calc_value( byte* data, long offset ) {
|
||||
|
||||
int i;
|
||||
int len;
|
||||
byte sum;
|
||||
|
||||
check( offset + _PNP_MINHDR <= MAX_OFFSET, "$PnP header out of bounds" );
|
||||
len = *( data + offset + _PNP_LEN );
|
||||
check( offset + len <= MAX_OFFSET, "$PnP header-length out of bounds" );
|
||||
sum = 0;
|
||||
for( i = 0; i < len; i++ ) {
|
||||
if( i != _PNP_CHKSUM ) {
|
||||
sum = sum + *( data + offset + i );
|
||||
}
|
||||
}
|
||||
sum = -sum;
|
||||
return( sum );
|
||||
}
|
||||
|
||||
|
||||
long chksum__pnp_get_offset( byte* data, long offset ) {
|
||||
|
||||
long result = -1L;
|
||||
|
||||
offset = offset + 0x0F;
|
||||
offset = offset & ~( 0x0F );
|
||||
while( offset + 16 < MAX_OFFSET ) {
|
||||
offset = offset + 16;
|
||||
if( *( data + offset + 0 ) == '$' && \
|
||||
*( data + offset + 1 ) == 'P' && \
|
||||
*( data + offset + 2 ) == 'n' && \
|
||||
*( data + offset + 3 ) == 'P' ) {
|
||||
result = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( result );
|
||||
}
|
||||
|
||||
|
||||
byte chksum__pnp_get_value( byte* data, long offset ) {
|
||||
|
||||
check( offset + _PNP_CHKSUM <= MAX_OFFSET, "$PnP checksum out of bounds" );
|
||||
return( *( data + offset + _PNP_CHKSUM ) );
|
||||
}
|
||||
|
||||
|
||||
void chksum__pnp_set_value( byte* data, long offset, byte value ) {
|
||||
|
||||
check( offset + _PNP_CHKSUM <= MAX_OFFSET, "$PnP checksum out of bounds" );
|
||||
*( data + offset + _PNP_CHKSUM ) = value;
|
||||
}
|
||||
|
||||
43
bochs/bios/makesym.perl
Executable file
43
bochs/bios/makesym.perl
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Read output file from as86 (e.g. rombios.txt) and write out a symbol
|
||||
# table suitable for the Bochs debugger.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $WHERE_BEFORE_SYM_TABLE = 0;
|
||||
my $WHERE_IN_SYM_TABLE = 1;
|
||||
my $WHERE_AFTER_SYM_TABLE = 2;
|
||||
|
||||
my $where = $WHERE_BEFORE_SYM_TABLE;
|
||||
while (<STDIN>) {
|
||||
chop;
|
||||
if ($where == $WHERE_BEFORE_SYM_TABLE && /^Symbols:/) {
|
||||
$where = $WHERE_IN_SYM_TABLE;
|
||||
} elsif ($where == $WHERE_IN_SYM_TABLE && /^$/) {
|
||||
$where = $WHERE_AFTER_SYM_TABLE;
|
||||
}
|
||||
if ($where == $WHERE_IN_SYM_TABLE) {
|
||||
my $name;
|
||||
my $junk;
|
||||
foreach my $f (split(/\s+/)) {
|
||||
if ($f =~ /^[[:xdigit:]]{4,}$/) {
|
||||
if (defined($name)) {
|
||||
print '000f', lc($f), ' ', $name, "\n";
|
||||
undef($name);
|
||||
undef($junk);
|
||||
next;
|
||||
}
|
||||
}
|
||||
$name = $junk
|
||||
if (defined($junk));
|
||||
$junk = $f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit(0);
|
||||
44
bochs/bios/notes
Normal file
44
bochs/bios/notes
Normal file
@ -0,0 +1,44 @@
|
||||
####################
|
||||
# Read Disk Sector #
|
||||
####################
|
||||
|
||||
System programming:
|
||||
-------------------
|
||||
|
||||
(Int 13h, ah=2)
|
||||
in 1f7 until BSY cleared
|
||||
out 1f2, AL # number of sectors
|
||||
out 1f3, cl (bits 0-5) # starting sector number
|
||||
out 1f4, ch # cylinder number bits 0..7, 0 based
|
||||
out 1f5, cl (bits 6,7) & dh (bits 6,7) # cyl, bits 8..9, 10..11
|
||||
out 1f6, dh (bits 0..3) --> bits 0..3 # head number
|
||||
dh (bits 4..5) --> ??? # head number
|
||||
dl (bit 0) --> bit 4 # drive number
|
||||
out 1f7, 0x20 # read sectors command normal
|
||||
|
||||
|
||||
|
||||
Drive response:
|
||||
---------------
|
||||
|
||||
* drive sets the busy bit in Status Reg to 1
|
||||
* if command parameters are wrong:
|
||||
> drive sets the aborted-command bit in the Error register and
|
||||
error bit in the Status register to 1.
|
||||
> Drive also sets the busy bit in the Status register to 0.
|
||||
> Drive then generates an interrupt to the system.
|
||||
* else:
|
||||
> drive executes an implied seek to desired track and
|
||||
reads sectors into sector buffer
|
||||
> when sector buffer is filled and the data is ready to be
|
||||
transferred, the drive sets the data-request bit to 1, sets
|
||||
the busy bit to 0, and generates an interrupt.
|
||||
> on a single-sector transfer, after the system has transferred
|
||||
the data, the drive sets the data-request bit and the busy bit to 0.
|
||||
> on a multiple-sector transfer, after the system has transferred
|
||||
the first sector of data, the drive sets the data-request bit to 0,
|
||||
and the busy bit to 1. When each subsequent sector is ready to be
|
||||
transferred, the drive sets the data-request bit to 1, the busy bit to 0,
|
||||
and generates an interrupt. When the system has tranferred the last sector,
|
||||
the drive sets the data-request bit and busy bit to 0.
|
||||
|
||||
11498
bochs/bios/rombios.c
Normal file
11498
bochs/bios/rombios.c
Normal file
File diff suppressed because it is too large
Load Diff
248
bochs/bios/rombios.h
Normal file
248
bochs/bios/rombios.h
Normal file
@ -0,0 +1,248 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2006 Volker Ruppert
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
/* define it to include QEMU specific code */
|
||||
//#define BX_QEMU
|
||||
|
||||
#ifndef LEGACY
|
||||
# define BX_ROMBIOS32 1
|
||||
#else
|
||||
# define BX_ROMBIOS32 0
|
||||
#endif
|
||||
|
||||
#define DEBUG_ROMBIOS 0
|
||||
#define DEBUG_ATA 0
|
||||
#define DEBUG_INT13_HD 0
|
||||
#define DEBUG_INT13_CD 0
|
||||
#define DEBUG_INT13_ET 0
|
||||
#define DEBUG_INT13_FL 0
|
||||
#define DEBUG_INT15 0
|
||||
#define DEBUG_INT16 0
|
||||
#define DEBUG_INT1A 0
|
||||
#define DEBUG_INT74 0
|
||||
#define DEBUG_APM 0
|
||||
|
||||
#define PANIC_PORT 0x400
|
||||
#define PANIC_PORT2 0x401
|
||||
#define INFO_PORT 0x402
|
||||
#define DEBUG_PORT 0x403
|
||||
|
||||
#define BIOS_PRINTF_HALT 1
|
||||
#define BIOS_PRINTF_SCREEN 2
|
||||
#define BIOS_PRINTF_INFO 4
|
||||
#define BIOS_PRINTF_DEBUG 8
|
||||
#define BIOS_PRINTF_ALL (BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO)
|
||||
#define BIOS_PRINTF_DEBHALT (BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO | BIOS_PRINTF_HALT)
|
||||
|
||||
#define printf(format, p...) bios_printf(BIOS_PRINTF_SCREEN, format, ##p)
|
||||
|
||||
// Defines the output macros.
|
||||
// BX_DEBUG goes to INFO port until we can easily choose debug info on a
|
||||
// per-device basis. Debug info are sent only in debug mode
|
||||
#if DEBUG_ROMBIOS
|
||||
# define BX_DEBUG(format, p...) bios_printf(BIOS_PRINTF_INFO, format, ##p)
|
||||
#else
|
||||
# define BX_DEBUG(format, p...)
|
||||
#endif
|
||||
#define BX_INFO(format, p...) bios_printf(BIOS_PRINTF_INFO, format, ##p)
|
||||
#define BX_PANIC(format, p...) bios_printf(BIOS_PRINTF_DEBHALT, format, ##p)
|
||||
|
||||
/* put the MP float table and ACPI RSDP in EBDA and the MP and ACPI tables in
|
||||
high memory. Linux kernels < 2.6.30 might not work with this configuration */
|
||||
//#define BX_USE_EBDA_TABLES
|
||||
|
||||
#define ACPI_DATA_SIZE 0x00010000L
|
||||
#define MPTABLE_MAX_SIZE 0x00002000
|
||||
#define PM_IO_BASE 0xb000
|
||||
#define SMB_IO_BASE 0xb100
|
||||
#define SMP_MSR_ADDR 0x0510
|
||||
|
||||
// Define the application NAME
|
||||
#if defined(BX_QEMU)
|
||||
# define BX_APPNAME "QEMU"
|
||||
# define BX_APPVENDOR "QEMU"
|
||||
#else
|
||||
# define BX_APPNAME "Bochs"
|
||||
# define BX_APPVENDOR "The Bochs Project"
|
||||
#endif
|
||||
|
||||
#define E820_RAM 1
|
||||
#define E820_RESERVED 2
|
||||
#define E820_ACPI 3
|
||||
#define E820_NVS 4
|
||||
#define E820_UNUSABLE 5
|
||||
|
||||
#define BX_CPU 3
|
||||
#define BX_USE_PS2_MOUSE 1
|
||||
#define BX_CALL_INT15_4F 1
|
||||
#define BX_USE_EBDA 1
|
||||
#define BX_SUPPORT_FLOPPY 1
|
||||
#define BX_FLOPPY_ON_CNT 37 /* 2 seconds */
|
||||
#define BX_PCIBIOS 1
|
||||
#define BX_APM 1
|
||||
#define BX_PNPBIOS 1
|
||||
/* define it if the (emulated) hardware supports SMM mode */
|
||||
#define BX_USE_SMM
|
||||
|
||||
#define BX_USE_ATADRV 1
|
||||
#define BX_ELTORITO_BOOT 1
|
||||
|
||||
#define BX_MAX_ATA_INTERFACES 4
|
||||
#define BX_MAX_ATA_DEVICES (BX_MAX_ATA_INTERFACES*2)
|
||||
|
||||
#define BX_VIRTUAL_PORTS 1 /* normal output to Bochs ports */
|
||||
#define BX_DEBUG_SERIAL 0 /* output to COM1 */
|
||||
|
||||
/* model byte 0xFC = AT */
|
||||
#define SYS_MODEL_ID 0xFC
|
||||
#define SYS_SUBMODEL_ID 0x00
|
||||
#define BIOS_REVISION 1
|
||||
#define BIOS_CONFIG_TABLE 0xe6f5
|
||||
|
||||
#ifndef BIOS_BUILD_DATE
|
||||
# define BIOS_BUILD_DATE "06/23/99"
|
||||
#endif
|
||||
|
||||
// 1K of base memory used for Extended Bios Data Area (EBDA)
|
||||
// EBDA is used for PS/2 mouse support, and IDE BIOS, etc.
|
||||
#define EBDA_SEG 0x9FC0
|
||||
#define EBDA_SIZE 1 // In KiB
|
||||
#define BASE_MEM_IN_K (640 - EBDA_SIZE)
|
||||
|
||||
/* IPL_SIZE bytes at 0x9ff00 are used for the IPL boot table. */
|
||||
#define IPL_SEG 0x9ff0
|
||||
#define IPL_TABLE_OFFSET 0x0000
|
||||
#define IPL_TABLE_ENTRIES 8
|
||||
#define IPL_COUNT_OFFSET 0x0080 /* u16: number of valid table entries */
|
||||
#define IPL_SEQUENCE_OFFSET 0x0082 /* u16: next boot device */
|
||||
#define IPL_BOOTFIRST_OFFSET 0x0084 /* u16: user selected device */
|
||||
#define IPL_SIZE 0x86
|
||||
#define IPL_TYPE_FLOPPY 0x01
|
||||
#define IPL_TYPE_HARDDISK 0x02
|
||||
#define IPL_TYPE_CDROM 0x03
|
||||
#define IPL_TYPE_BEV 0x80
|
||||
|
||||
/* Ports */
|
||||
#define PORT_DMA_ADDR_2 0x0004
|
||||
#define PORT_DMA_CNT_2 0x0005
|
||||
#define PORT_DMA1_MASK_REG 0x000a
|
||||
#define PORT_DMA1_MODE_REG 0x000b
|
||||
#define PORT_DMA1_CLEAR_FF_REG 0x000c
|
||||
#define PORT_DMA1_MASTER_CLEAR 0x000d
|
||||
#define PORT_PIC1_CMD 0x0020
|
||||
#define PORT_PIC1_DATA 0x0021
|
||||
#define PORT_PIT_COUNTER0 0x0040
|
||||
#define PORT_PIT_MODE 0x0043
|
||||
#define PORT_PS2_DATA 0x0060
|
||||
#define PORT_PS2_CTRLB 0x0061
|
||||
#define PORT_PS2_STATUS 0x0064
|
||||
#define PORT_CMOS_INDEX 0x0070
|
||||
#define PORT_CMOS_DATA 0x0071
|
||||
#define PORT_DIAG 0x0080
|
||||
#define PORT_DMA_PAGE_2 0x0081
|
||||
#define PORT_A20 0x0092
|
||||
#define PORT_PIC2_CMD 0x00a0
|
||||
#define PORT_PIC2_DATA 0x00a1
|
||||
#define PORT_DMA2_MASK_REG 0x00d4
|
||||
#define PORT_DMA2_MODE_REG 0x00d6
|
||||
#define PORT_DMA2_MASTER_CLEAR 0x00da
|
||||
#define PORT_ATA2_CMD_BASE 0x0170
|
||||
#define PORT_ATA1_CMD_BASE 0x01f0
|
||||
#define PORT_FD_DOR 0x03f2
|
||||
#define PORT_FD_STATUS 0x03f4
|
||||
#define PORT_FD_DATA 0x03f5
|
||||
|
||||
#define CPUID_MSR (1 << 5)
|
||||
#define CPUID_APIC (1 << 9)
|
||||
#define CPUID_MTRR (1 << 12)
|
||||
|
||||
#define APIC_BASE ((uint8_t *)0xfee00000)
|
||||
#define APIC_ICR_LOW 0x300
|
||||
#define APIC_SVR 0x0F0
|
||||
#define APIC_ID 0x020
|
||||
#define APIC_LVT3 0x370
|
||||
|
||||
#define APIC_ENABLED 0x0100
|
||||
|
||||
#define AP_BOOT_ADDR 0x9f000
|
||||
|
||||
#define SMI_CMD_IO_ADDR 0xb2
|
||||
|
||||
#define BIOS_TMP_STORAGE 0x00030000 /* 64 KB used to copy the BIOS to shadow RAM */
|
||||
|
||||
#define MSR_MTRRcap 0x000000fe
|
||||
#define MSR_MTRRfix64K_00000 0x00000250
|
||||
#define MSR_MTRRfix16K_80000 0x00000258
|
||||
#define MSR_MTRRfix16K_A0000 0x00000259
|
||||
#define MSR_MTRRfix4K_C0000 0x00000268
|
||||
#define MSR_MTRRfix4K_C8000 0x00000269
|
||||
#define MSR_MTRRfix4K_D0000 0x0000026a
|
||||
#define MSR_MTRRfix4K_D8000 0x0000026b
|
||||
#define MSR_MTRRfix4K_E0000 0x0000026c
|
||||
#define MSR_MTRRfix4K_E8000 0x0000026d
|
||||
#define MSR_MTRRfix4K_F0000 0x0000026e
|
||||
#define MSR_MTRRfix4K_F8000 0x0000026f
|
||||
#define MSR_MTRRdefType 0x000002ff
|
||||
|
||||
#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
|
||||
#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
|
||||
|
||||
#define MTRR_MEMTYPE_UC 0
|
||||
#define MTRR_MEMTYPE_WC 1
|
||||
#define MTRR_MEMTYPE_WT 4
|
||||
#define MTRR_MEMTYPE_WP 5
|
||||
#define MTRR_MEMTYPE_WB 6
|
||||
|
||||
#define QEMU_CFG_CTL_PORT 0x510
|
||||
#define QEMU_CFG_DATA_PORT 0x511
|
||||
#define QEMU_CFG_SIGNATURE 0x00
|
||||
#define QEMU_CFG_ID 0x01
|
||||
#define QEMU_CFG_UUID 0x02
|
||||
|
||||
#define PCI_ADDRESS_SPACE_MEM 0x00
|
||||
#define PCI_ADDRESS_SPACE_IO 0x01
|
||||
#define PCI_ADDRESS_SPACE_MEM_PREFETCH 0x08
|
||||
|
||||
#define PCI_ROM_SLOT 6
|
||||
#define PCI_NUM_REGIONS 7
|
||||
|
||||
#define PCI_DEVICES_MAX 64
|
||||
|
||||
#define PCI_VENDOR_ID 0x00 /* 16 bits */
|
||||
#define PCI_DEVICE_ID 0x02 /* 16 bits */
|
||||
#define PCI_COMMAND 0x04 /* 16 bits */
|
||||
#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */
|
||||
#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */
|
||||
#define PCI_CLASS_DEVICE 0x0a /* Device class */
|
||||
#define PCI_INTERRUPT_LINE 0x3c /* 8 bits */
|
||||
#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */
|
||||
#define PCI_MIN_GNT 0x3e /* 8 bits */
|
||||
#define PCI_MAX_LAT 0x3f /* 8 bits */
|
||||
|
||||
#define PCI_VENDOR_ID_INTEL 0x8086
|
||||
#define PCI_DEVICE_ID_INTEL_82441 0x1237
|
||||
#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
|
||||
#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
|
||||
#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
|
||||
#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
|
||||
#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
|
||||
|
||||
#define PCI_VENDOR_ID_IBM 0x1014
|
||||
#define PCI_VENDOR_ID_APPLE 0x106b
|
||||
2328
bochs/bios/rombios32.c
Normal file
2328
bochs/bios/rombios32.c
Normal file
File diff suppressed because it is too large
Load Diff
17
bochs/bios/rombios32.ld
Normal file
17
bochs/bios/rombios32.ld
Normal file
@ -0,0 +1,17 @@
|
||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||
OUTPUT_ARCH(i386)
|
||||
ENTRY(_start);
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x000e0000;
|
||||
.text : { *(.text) }
|
||||
.rodata : { *(.rodata*) }
|
||||
_end = . ;
|
||||
.data 0x700 : AT (_end) { __data_start = .; *(.data); __data_end = .;}
|
||||
.bss : { __bss_start = .; *(.bss) *(COMMON); __bss_end = .;}
|
||||
/DISCARD/ : { *(.stab)
|
||||
*(.stabstr)
|
||||
*(.comment)
|
||||
*(.note)
|
||||
}
|
||||
}
|
||||
119
bochs/bios/rombios32start.S
Normal file
119
bochs/bios/rombios32start.S
Normal file
@ -0,0 +1,119 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 32 bit Bochs BIOS init code
|
||||
// Copyright (C) 2006 Fabrice Bellard
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include "rombios.h"
|
||||
|
||||
.globl _start
|
||||
.globl smp_ap_boot_code_start
|
||||
.globl smp_ap_boot_code_end
|
||||
.global smm_relocation_start
|
||||
.global smm_relocation_end
|
||||
.global smm_code_start
|
||||
.global smm_code_end
|
||||
|
||||
_start:
|
||||
/* clear bss section */
|
||||
xor %eax, %eax
|
||||
mov $__bss_start, %edi
|
||||
mov $__bss_end, %ecx
|
||||
sub %edi, %ecx
|
||||
rep stosb
|
||||
|
||||
/* copy data section */
|
||||
mov $_end, %esi
|
||||
mov $__data_start, %edi
|
||||
mov $__data_end, %ecx
|
||||
sub %edi, %ecx
|
||||
rep movsb
|
||||
|
||||
jmp rombios32_init
|
||||
|
||||
.code16
|
||||
smp_ap_boot_code_start:
|
||||
cli
|
||||
xor %ax, %ax
|
||||
mov %ax, %ds
|
||||
|
||||
mov $SMP_MSR_ADDR, %ebx
|
||||
11:
|
||||
mov 0(%ebx), %ecx
|
||||
test %ecx, %ecx
|
||||
jz 12f
|
||||
mov 4(%ebx), %eax
|
||||
mov 8(%ebx), %edx
|
||||
wrmsr
|
||||
add $12, %ebx
|
||||
jmp 11b
|
||||
12:
|
||||
|
||||
lock incw smp_cpus
|
||||
1:
|
||||
hlt
|
||||
jmp 1b
|
||||
smp_ap_boot_code_end:
|
||||
|
||||
/* code to relocate SMBASE to 0xa0000 */
|
||||
smm_relocation_start:
|
||||
mov $0x38000 + 0x7efc, %ebx
|
||||
addr32 mov (%ebx), %al /* revision ID to see if x86_64 or x86 */
|
||||
cmp $0x64, %al
|
||||
je 1f
|
||||
mov $0x38000 + 0x7ef8, %ebx
|
||||
jmp 2f
|
||||
1:
|
||||
mov $0x38000 + 0x7f00, %ebx
|
||||
2:
|
||||
movl $0xa0000, %eax
|
||||
addr32 movl %eax, (%ebx)
|
||||
/* indicate to the BIOS that the SMM code was executed */
|
||||
mov $0x00, %al
|
||||
movw $0xb3, %dx
|
||||
outb %al, %dx
|
||||
rsm
|
||||
smm_relocation_end:
|
||||
|
||||
/* minimal SMM code to enable or disable ACPI */
|
||||
smm_code_start:
|
||||
movw $0xb2, %dx
|
||||
inb %dx, %al
|
||||
cmp $0xf0, %al
|
||||
jne 1f
|
||||
|
||||
/* ACPI disable */
|
||||
mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */
|
||||
inw %dx, %ax
|
||||
andw $~1, %ax
|
||||
outw %ax, %dx
|
||||
|
||||
jmp 2f
|
||||
|
||||
1:
|
||||
cmp $0xf1, %al
|
||||
jne 2f
|
||||
|
||||
/* ACPI enable */
|
||||
mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */
|
||||
inw %dx, %ax
|
||||
orw $1, %ax
|
||||
outw %ax, %dx
|
||||
|
||||
2:
|
||||
rsm
|
||||
smm_code_end:
|
||||
99
bochs/bios/usage.cc
Normal file
99
bochs/bios/usage.cc
Normal file
@ -0,0 +1,99 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
//
|
||||
// MandrakeSoft S.A.
|
||||
// 43, rue d'Aboukir
|
||||
// 75002 Paris - France
|
||||
// http://www.linux-mandrake.com/
|
||||
// http://www.mandrakesoft.com/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
unsigned char bios[65536];
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int bios_file;
|
||||
FILE * org_file;
|
||||
unsigned org, last_org, offset;
|
||||
int retval;
|
||||
unsigned int to_read, index;
|
||||
double elements, ratio;
|
||||
|
||||
if (argc !=3 ) {
|
||||
fprintf(stderr, "Usage: usage bios-file org-file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
bios_file = open(argv[1], O_RDONLY);
|
||||
org_file = fopen(argv[2], "r");
|
||||
|
||||
if ( (bios_file<0) | (org_file==NULL) ) {
|
||||
fprintf(stderr, "problems opening files.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("files opened OK\n");
|
||||
|
||||
to_read = 65536;
|
||||
index = 0;
|
||||
while (to_read > 0) {
|
||||
retval = read(bios_file, &bios[index], to_read);
|
||||
if (retval <= 0) {
|
||||
fprintf(stderr, "problem reading bios file\n");
|
||||
exit(1);
|
||||
}
|
||||
to_read -= retval;
|
||||
index += retval;
|
||||
}
|
||||
printf("bios file read in OK\n");
|
||||
|
||||
last_org = 0;
|
||||
|
||||
while (1) {
|
||||
retval = fscanf(org_file, "0x%x\n", &org);
|
||||
if (retval <= 0) break;
|
||||
printf("%04x .. %04x ", last_org, org-1);
|
||||
for (offset=org-1; offset>last_org; offset--) {
|
||||
if (bios[offset] != 0) break;
|
||||
}
|
||||
if (offset > last_org) {
|
||||
elements = (1.0 + double(offset) - double(last_org));
|
||||
}
|
||||
else {
|
||||
if (bios[last_org] == 0)
|
||||
elements = 0.0;
|
||||
else
|
||||
elements = 1.0;
|
||||
}
|
||||
|
||||
ratio = elements / (double(org) - double(last_org));
|
||||
ratio *= 100.0;
|
||||
printf("%6.2lf\n", ratio);
|
||||
last_org = org;
|
||||
}
|
||||
}
|
||||
626
bochs/bochs.h
Normal file
626
bochs/bochs.h
Normal file
@ -0,0 +1,626 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id$
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001-2010 The Bochs Project
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA B 02110-1301 USA
|
||||
|
||||
//
|
||||
// bochs.h is the master header file for all C++ code. It includes all
|
||||
// the system header files needed by bochs, and also includes all the bochs
|
||||
// C++ header files. Because bochs.h and the files that it includes has
|
||||
// structure and class definitions, it cannot be called from C code.
|
||||
//
|
||||
|
||||
#ifndef BX_BOCHS_H
|
||||
# define BX_BOCHS_H 1
|
||||
|
||||
#include "config.h" /* generated by configure script from config.h.in */
|
||||
|
||||
#include "../core/SAL/bochs/failbochs.hpp"
|
||||
|
||||
#ifndef __QNXNTO__
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
// In a win32 compile (including cygwin), windows.h is required for several
|
||||
// files in gui and iodev. It is important to include it here in a header
|
||||
// file so that WIN32-specific data types can be used in fields of classes.
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(__sun__)
|
||||
#undef EAX
|
||||
#undef ECX
|
||||
#undef EDX
|
||||
#undef EBX
|
||||
#undef ESP
|
||||
#undef EBP
|
||||
#undef ESI
|
||||
#undef EDI
|
||||
#undef EIP
|
||||
#undef CS
|
||||
#undef DS
|
||||
#undef ES
|
||||
#undef SS
|
||||
#undef FS
|
||||
#undef GS
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef WIN32
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# include <io.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#if BX_WITH_MACOS
|
||||
# include <types.h>
|
||||
# include <stat.h>
|
||||
# include <cstdio>
|
||||
# include <unistd.h>
|
||||
#elif BX_WITH_CARBON
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# include <sys/param.h> /* for MAXPATHLEN */
|
||||
# include <sys/time.h>
|
||||
# include <utime.h>
|
||||
#else
|
||||
# ifndef WIN32
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#ifdef macintosh
|
||||
# define SuperDrive "[fd:]"
|
||||
#endif
|
||||
|
||||
#ifndef __QNXNTO__
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "osdep.h" /* platform dependent includes and defines */
|
||||
#include "bx_debug/debug.h"
|
||||
#include "bxversion.h"
|
||||
|
||||
#include "gui/siminterface.h"
|
||||
|
||||
// BX_SHARE_PATH should be defined by the makefile. If not, give it
|
||||
// a value of NULL to avoid compile problems.
|
||||
#ifndef BX_SHARE_PATH
|
||||
#define BX_SHARE_PATH NULL
|
||||
#endif
|
||||
|
||||
// prototypes
|
||||
int bx_begin_simulation(int argc, char *argv[]);
|
||||
void bx_stop_simulation();
|
||||
char *bx_find_bochsrc(void);
|
||||
int bx_parse_cmdline(int arg, int argc, char *argv[]);
|
||||
int bx_read_configuration(const char *rcfile);
|
||||
int bx_write_configuration(const char *rcfile, int overwrite);
|
||||
void bx_reset_options(void);
|
||||
Bit32u crc32(const Bit8u *buf, int len);
|
||||
// for param-tree testing only
|
||||
void print_tree(bx_param_c *node, int level = 0);
|
||||
|
||||
//
|
||||
// some macros to interface the CPU and memory to external environment
|
||||
// so that these functions can be redirected to the debugger when
|
||||
// needed.
|
||||
//
|
||||
|
||||
#define BXRS_PARAM_SPECIAL(parent, name, maxvalue, save_handler, restore_handler) \
|
||||
{ \
|
||||
bx_param_num_c *param = new bx_param_num_c(parent, #name, "", "", 0, maxvalue, 0); \
|
||||
param->set_base(BASE_HEX); \
|
||||
param->set_sr_handlers(this, save_handler, restore_handler); \
|
||||
}
|
||||
|
||||
#define BXRS_PARAM_SPECIAL64(parent, name, save_handler, restore_handler) \
|
||||
BXRS_PARAM_SPECIAL(parent, name, BX_MAX_BIT64U, save_handler, restore_handler)
|
||||
#define BXRS_PARAM_SPECIAL32(parent, name, save_handler, restore_handler) \
|
||||
BXRS_PARAM_SPECIAL(parent, name, BX_MAX_BIT32U, save_handler, restore_handler)
|
||||
#define BXRS_PARAM_SPECIAL16(parent, name, save_handler, restore_handler) \
|
||||
BXRS_PARAM_SPECIAL(parent, name, BX_MAX_BIT16U, save_handler, restore_handler)
|
||||
#define BXRS_PARAM_SPECIAL8(parent, name, save_handler, restore_handler) \
|
||||
BXRS_PARAM_SPECIAL(parent, name, BX_MAX_BIT8U, save_handler, restore_handler)
|
||||
|
||||
#define BXRS_HEX_PARAM_SIMPLE32(parent, name) \
|
||||
new bx_shadow_num_c(parent, #name, (Bit32u*)&(name), BASE_HEX)
|
||||
#define BXRS_HEX_PARAM_SIMPLE64(parent, name) \
|
||||
new bx_shadow_num_c(parent, #name, (Bit64u*)&(name), BASE_HEX)
|
||||
|
||||
#define BXRS_HEX_PARAM_SIMPLE(parent, name) \
|
||||
new bx_shadow_num_c(parent, #name, &(name), BASE_HEX)
|
||||
#define BXRS_HEX_PARAM_FIELD(parent, name, field) \
|
||||
new bx_shadow_num_c(parent, #name, &(field), BASE_HEX)
|
||||
|
||||
#define BXRS_DEC_PARAM_SIMPLE(parent, name) \
|
||||
new bx_shadow_num_c(parent, #name, &(name), BASE_DEC)
|
||||
#define BXRS_DEC_PARAM_FIELD(parent, name, field) \
|
||||
new bx_shadow_num_c(parent, #name, &(field), BASE_DEC)
|
||||
|
||||
#define BXRS_PARAM_BOOL(parent, name, field) \
|
||||
new bx_shadow_bool_c(parent, #name, (bx_bool*)(&(field)))
|
||||
|
||||
// =-=-=-=-=-=-=- Normal optimized use -=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
// some pc_systems functions just redirect to the IO devices so optimize
|
||||
// by eliminating call here
|
||||
//
|
||||
// #define BX_INP(addr, len) bx_pc_system.inp(addr, len)
|
||||
// #define BX_OUTP(addr, val, len) bx_pc_system.outp(addr, val, len)
|
||||
#define BX_INP(addr, len) bx_devices.inp(addr, len)
|
||||
#define BX_OUTP(addr, val, len) bx_devices.outp(addr, val, len)
|
||||
#define BX_TICK1() bx_pc_system.tick1()
|
||||
#define BX_TICKN(n) bx_pc_system.tickn(n)
|
||||
#define BX_INTR bx_pc_system.INTR
|
||||
#define BX_SET_INTR(b) bx_pc_system.set_INTR(b)
|
||||
#define BX_CPU_C bx_cpu_c
|
||||
#define BX_MEM_C bx_mem_c
|
||||
#define BX_HRQ (bx_pc_system.HRQ)
|
||||
|
||||
#if BX_SUPPORT_SMP
|
||||
#define BX_CPU(x) (bx_cpu_array[x])
|
||||
#else
|
||||
#define BX_CPU(x) (&bx_cpu)
|
||||
#endif
|
||||
|
||||
#define BX_MEM(x) (&bx_mem)
|
||||
|
||||
#define BX_SET_ENABLE_A20(enabled) bx_pc_system.set_enable_a20(enabled)
|
||||
#define BX_GET_ENABLE_A20() bx_pc_system.get_enable_a20()
|
||||
|
||||
#if BX_SUPPORT_A20
|
||||
# define A20ADDR(x) ((bx_phy_address)(x) & bx_pc_system.a20_mask)
|
||||
#else
|
||||
# define A20ADDR(x) ((bx_phy_address)(x))
|
||||
#endif
|
||||
|
||||
#if BX_SUPPORT_SMP
|
||||
# define BX_TICK1_IF_SINGLE_PROCESSOR() \
|
||||
if (BX_SMP_PROCESSORS == 1) BX_TICK1()
|
||||
# define BX_TICKN_IF_SINGLE_PROCESSOR(n) \
|
||||
if (BX_SMP_PROCESSORS == 1) BX_TICKN(n)
|
||||
#else
|
||||
# define BX_TICK1_IF_SINGLE_PROCESSOR() BX_TICK1()
|
||||
# define BX_TICKN_IF_SINGLE_PROCESSOR(n) BX_TICKN(n)
|
||||
#endif
|
||||
|
||||
// you can't use static member functions on the CPU, if there are going
|
||||
// to be 2 cpus. Check this early on.
|
||||
#if BX_SUPPORT_SMP
|
||||
# if BX_USE_CPU_SMF
|
||||
# error For SMP simulation, BX_USE_CPU_SMF must be 0.
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Ways for the the external environment to report back information
|
||||
// to the debugger.
|
||||
//
|
||||
|
||||
#if BX_DEBUGGER
|
||||
# define BX_DBG_ASYNC_INTR bx_guard.async.irq
|
||||
# define BX_DBG_ASYNC_DMA bx_guard.async.dma
|
||||
|
||||
# define BX_DBG_DMA_REPORT(addr, len, what, val) \
|
||||
if (bx_guard.report.dma) bx_dbg_dma_report(addr, len, what, val)
|
||||
# define BX_DBG_IAC_REPORT(vector, irq) \
|
||||
if (bx_guard.report.irq) bx_dbg_iac_report(vector, irq)
|
||||
# define BX_DBG_A20_REPORT(val) \
|
||||
if (bx_guard.report.a20) bx_dbg_a20_report(val)
|
||||
# define BX_DBG_IO_REPORT(port, size, op, val) \
|
||||
if (bx_guard.report.io) bx_dbg_io_report(port, size, op, val)
|
||||
# define BX_DBG_LIN_MEMORY_ACCESS(cpu, lin, phy, len, pl, rw, data) \
|
||||
bx_dbg_lin_memory_access(cpu, lin, phy, len, pl, rw, data)
|
||||
# define BX_DBG_PHY_MEMORY_ACCESS(cpu, phy, len, rw, data) \
|
||||
bx_dbg_phy_memory_access(cpu, phy, len, rw, data)
|
||||
#else // #if BX_DEBUGGER
|
||||
// debugger not compiled in, use empty stubs
|
||||
# define BX_DBG_ASYNC_INTR 1
|
||||
# define BX_DBG_ASYNC_DMA 1
|
||||
# define BX_DBG_DMA_REPORT(addr, len, what, val) /* empty */
|
||||
# define BX_DBG_IAC_REPORT(vector, irq) /* empty */
|
||||
# define BX_DBG_A20_REPORT(val) /* empty */
|
||||
# define BX_DBG_IO_REPORT(port, size, op, val) /* empty */
|
||||
# define BX_DBG_LIN_MEMORY_ACCESS(cpu, lin, phy, len, pl, rw, data) /* empty */
|
||||
# define BX_DBG_PHY_MEMORY_ACCESS(cpu, phy, len, rw, data) /* empty */
|
||||
#endif // #if BX_DEBUGGER
|
||||
|
||||
#define MAGIC_LOGNUM 0x12345678
|
||||
|
||||
typedef class BOCHSAPI logfunctions
|
||||
{
|
||||
char *prefix;
|
||||
// values of onoff: 0=ignore, 1=report, 2=ask, 3=fatal
|
||||
#define ACT_IGNORE 0
|
||||
#define ACT_REPORT 1
|
||||
#define ACT_ASK 2
|
||||
#define ACT_FATAL 3
|
||||
#define N_ACT 4
|
||||
int onoff[N_LOGLEV];
|
||||
class iofunctions *logio;
|
||||
// default log actions for all devices, declared and initialized
|
||||
// in logio.cc.
|
||||
BOCHSAPI_CYGONLY static int default_onoff[N_LOGLEV];
|
||||
public:
|
||||
logfunctions(void);
|
||||
logfunctions(class iofunctions *);
|
||||
~logfunctions(void);
|
||||
|
||||
void info(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
|
||||
void error(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
|
||||
void panic(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
|
||||
void pass(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
|
||||
void ldebug(const char *fmt, ...) BX_CPP_AttrPrintf(2, 3);
|
||||
void fatal (const char *prefix, const char *fmt, va_list ap, int exit_status);
|
||||
void ask (int level, const char *prefix, const char *fmt, va_list ap);
|
||||
void put(const char *);
|
||||
void setio(class iofunctions *);
|
||||
void setonoff(int loglev, int value) {
|
||||
assert (loglev >= 0 && loglev < N_LOGLEV);
|
||||
onoff[loglev] = value;
|
||||
}
|
||||
char *getprefix () { return prefix; }
|
||||
int getonoff(int level) {
|
||||
assert (level>=0 && level<N_LOGLEV);
|
||||
return onoff[level];
|
||||
}
|
||||
static void set_default_action (int loglev, int action) {
|
||||
assert (loglev >= 0 && loglev < N_LOGLEV);
|
||||
assert (action >= 0 && action < N_ACT);
|
||||
default_onoff[loglev] = action;
|
||||
}
|
||||
static int get_default_action (int loglev) {
|
||||
assert (loglev >= 0 && loglev < N_LOGLEV);
|
||||
return default_onoff[loglev];
|
||||
}
|
||||
} logfunc_t;
|
||||
|
||||
#define BX_LOGPREFIX_SIZE 51
|
||||
|
||||
class BOCHSAPI iofunctions {
|
||||
int magic;
|
||||
char logprefix[BX_LOGPREFIX_SIZE];
|
||||
FILE *logfd;
|
||||
class logfunctions *log;
|
||||
void init(void);
|
||||
void flush(void);
|
||||
|
||||
// Log Class types
|
||||
public:
|
||||
iofunctions(void);
|
||||
iofunctions(FILE *);
|
||||
iofunctions(int);
|
||||
iofunctions(const char *);
|
||||
~iofunctions(void);
|
||||
|
||||
void out(int level, const char *pre, const char *fmt, va_list ap);
|
||||
|
||||
void init_log(const char *fn);
|
||||
void init_log(int fd);
|
||||
void init_log(FILE *fs);
|
||||
void exit_log();
|
||||
void set_log_prefix(const char *prefix);
|
||||
int get_n_logfns() { return n_logfn; }
|
||||
logfunc_t *get_logfn(int index) { return logfn_list[index]; }
|
||||
void add_logfn(logfunc_t *fn);
|
||||
void remove_logfn(logfunc_t *fn);
|
||||
void set_log_action(int loglevel, int action);
|
||||
const char *getlevel(int i);
|
||||
char *getaction(int i);
|
||||
|
||||
protected:
|
||||
int n_logfn;
|
||||
#define MAX_LOGFNS 512
|
||||
logfunc_t *logfn_list[MAX_LOGFNS];
|
||||
const char *logfn;
|
||||
};
|
||||
|
||||
typedef class BOCHSAPI iofunctions iofunc_t;
|
||||
|
||||
#define SAFE_GET_IOFUNC() \
|
||||
((io==NULL)? (io=new iofunc_t("/dev/stderr")) : io)
|
||||
#define SAFE_GET_GENLOG() \
|
||||
((genlog==NULL)? (genlog=new logfunc_t(SAFE_GET_IOFUNC())) : genlog)
|
||||
|
||||
#if BX_NO_LOGGING
|
||||
|
||||
#define BX_INFO(x)
|
||||
#define BX_DEBUG(x)
|
||||
#define BX_ERROR(x)
|
||||
#define BX_PANIC(x) (LOG_THIS panic) x
|
||||
#define BX_PASS(x) (LOG_THIS pass) x
|
||||
|
||||
#define BX_ASSERT(x)
|
||||
|
||||
#else
|
||||
|
||||
#define BX_INFO(x) (LOG_THIS info) x
|
||||
#define BX_DEBUG(x) (LOG_THIS ldebug) x
|
||||
#define BX_ERROR(x) (LOG_THIS error) x
|
||||
#define BX_PANIC(x) (LOG_THIS panic) x
|
||||
#define BX_PASS(x) (LOG_THIS pass) x
|
||||
|
||||
#if BX_ASSERT_ENABLE
|
||||
#define BX_ASSERT(x) do {if (!(x)) BX_PANIC(("failed assertion \"%s\" at %s:%d\n", #x, __FILE__, __LINE__));} while (0)
|
||||
#else
|
||||
#define BX_ASSERT(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
BOCHSAPI extern iofunc_t *io;
|
||||
BOCHSAPI extern logfunc_t *genlog;
|
||||
|
||||
#ifndef UNUSED
|
||||
# define UNUSED(x) ((void)x)
|
||||
#endif
|
||||
|
||||
#if BX_SUPPORT_X86_64
|
||||
#define FMT_ADDRX FMT_ADDRX64
|
||||
#else
|
||||
#define FMT_ADDRX FMT_ADDRX32
|
||||
#endif
|
||||
|
||||
#if BX_PHY_ADDRESS_LONG
|
||||
#define FMT_PHY_ADDRX FMT_ADDRX64
|
||||
#else
|
||||
#define FMT_PHY_ADDRX FMT_ADDRX32
|
||||
#endif
|
||||
|
||||
#define FMT_LIN_ADDRX FMT_ADDRX
|
||||
|
||||
#if BX_GDBSTUB
|
||||
// defines for GDB stub
|
||||
void bx_gdbstub_init(void);
|
||||
void bx_gdbstub_break(void);
|
||||
int bx_gdbstub_check(unsigned int eip);
|
||||
#define GDBSTUB_STOP_NO_REASON (0xac0)
|
||||
|
||||
#if BX_SUPPORT_SMP
|
||||
#error GDB stub was written for single processor support. If multiprocessor support is added, then we can remove this check.
|
||||
// The big problem is knowing which CPU gdb is referring to. In other words,
|
||||
// what should we put for "n" in BX_CPU(n)->dbg_xlate_linear2phy() and
|
||||
// BX_CPU(n)->dword.eip, etc.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
bx_bool interrupts;
|
||||
bx_bool exceptions;
|
||||
bx_bool debugger;
|
||||
bx_bool print_timestamps;
|
||||
#if BX_DEBUGGER
|
||||
bx_bool magic_break_enabled;
|
||||
#endif
|
||||
#if BX_GDBSTUB
|
||||
bx_bool gdbstub_enabled;
|
||||
#endif
|
||||
#if BX_SUPPORT_APIC
|
||||
bx_bool apic;
|
||||
#endif
|
||||
#if BX_DEBUG_LINUX
|
||||
bx_bool linux_syscall;
|
||||
#endif
|
||||
void* record_io;
|
||||
} bx_debug_t;
|
||||
|
||||
void CDECL bx_signal_handler(int signum);
|
||||
int bx_atexit(void);
|
||||
BOCHSAPI extern bx_debug_t bx_dbg;
|
||||
|
||||
// determinted by XAPIC option
|
||||
BOCHSAPI extern Bit32u apic_id_mask;
|
||||
|
||||
// memory access type (read/write/execute/rw)
|
||||
#define BX_READ 0
|
||||
#define BX_WRITE 1
|
||||
#define BX_EXECUTE 2
|
||||
#define BX_RW 3
|
||||
|
||||
// to be used in concatenation with BX_READ/BX_WRITE/BX_EXECUTE/BX_RW
|
||||
#define BX_PDPTR0_ACCESS 0x010
|
||||
#define BX_PDPTR1_ACCESS 0x020
|
||||
#define BX_PDPTR2_ACCESS 0x030
|
||||
#define BX_PDPTR3_ACCESS 0x040
|
||||
#define BX_PTE_ACCESS 0x050
|
||||
#define BX_PDE_ACCESS 0x060
|
||||
#define BX_PDPTE_ACCESS 0x070
|
||||
#define BX_PML4E_ACCESS 0x080
|
||||
#define BX_EPT_PTE_ACCESS 0x090
|
||||
#define BX_EPT_PDE_ACCESS 0x0a0
|
||||
#define BX_EPT_PDPTE_ACCESS 0x0b0
|
||||
#define BX_EPT_PML4E_ACCESS 0x0c0
|
||||
#define BX_VMCS_ACCESS 0x0d0
|
||||
#define BX_VMX_MSR_BITMAP_ACCESS 0x0e0
|
||||
#define BX_VMX_IO_BITMAP_ACCESS 0x0f0
|
||||
#define BX_VMX_LOAD_MSR_ACCESS 0x100
|
||||
#define BX_VMX_STORE_MSR_ACCESS 0x110
|
||||
#define BX_VMX_VTPR_ACCESS 0x120
|
||||
#define BX_SMRAM_ACCESS 0x130
|
||||
|
||||
// types of reset
|
||||
#define BX_RESET_SOFTWARE 10
|
||||
#define BX_RESET_HARDWARE 11
|
||||
|
||||
#include "memory/memory.h"
|
||||
#include "pc_system.h"
|
||||
#include "plugin.h"
|
||||
#include "gui/gui.h"
|
||||
|
||||
/* --- EXTERNS --- */
|
||||
|
||||
#if BX_GUI_SIGHANDLER
|
||||
extern bx_bool bx_gui_sighandler;
|
||||
#endif
|
||||
|
||||
// This value controls how often each I/O device's periodic() method
|
||||
// gets called. The timer is set up in iodev/devices.cc.
|
||||
#define BX_IODEV_HANDLER_PERIOD 100 // microseconds
|
||||
//#define BX_IODEV_HANDLER_PERIOD 10 // microseconds
|
||||
|
||||
#define BX_PATHNAME_LEN 512
|
||||
|
||||
#define BX_KBD_XT_TYPE 0
|
||||
#define BX_KBD_AT_TYPE 1
|
||||
#define BX_KBD_MF_TYPE 2
|
||||
|
||||
#define BX_N_OPTROM_IMAGES 4
|
||||
#define BX_N_OPTRAM_IMAGES 4
|
||||
#define BX_N_SERIAL_PORTS 4
|
||||
#define BX_N_PARALLEL_PORTS 2
|
||||
#define BX_N_USB_UHCI_PORTS 2
|
||||
#define BX_N_USB_OHCI_PORTS 2
|
||||
#define BX_N_USB_HUB_PORTS 8
|
||||
#define BX_N_PCI_SLOTS 5
|
||||
#define BX_N_USER_PLUGINS 8
|
||||
|
||||
void bx_center_print(FILE *file, const char *line, unsigned maxwidth);
|
||||
|
||||
#include "instrument.h"
|
||||
|
||||
// These are some convenience macros which abstract out accesses between
|
||||
// a variable in native byte ordering to/from guest (x86) memory, which is
|
||||
// always in little endian format. You must deal with alignment (if your
|
||||
// system cares) and endian rearranging. Don't assume anything. You could
|
||||
// put some platform specific asm() statements here, to make use of native
|
||||
// instructions to help perform these operations more efficiently than C++.
|
||||
|
||||
|
||||
#ifdef BX_LITTLE_ENDIAN
|
||||
|
||||
#define WriteHostWordToLittleEndian(hostPtr, nativeVar16) \
|
||||
*((Bit16u*)(hostPtr)) = (nativeVar16)
|
||||
#define WriteHostDWordToLittleEndian(hostPtr, nativeVar32) \
|
||||
*((Bit32u*)(hostPtr)) = (nativeVar32)
|
||||
#define WriteHostQWordToLittleEndian(hostPtr, nativeVar64) \
|
||||
*((Bit64u*)(hostPtr)) = (nativeVar64)
|
||||
|
||||
#define ReadHostWordFromLittleEndian(hostPtr, nativeVar16) \
|
||||
(nativeVar16) = *((Bit16u*)(hostPtr))
|
||||
#define ReadHostDWordFromLittleEndian(hostPtr, nativeVar32) \
|
||||
(nativeVar32) = *((Bit32u*)(hostPtr))
|
||||
#define ReadHostQWordFromLittleEndian(hostPtr, nativeVar64) \
|
||||
(nativeVar64) = *((Bit64u*)(hostPtr))
|
||||
|
||||
#define CopyHostWordLittleEndian(hostAddrDst, hostAddrSrc) \
|
||||
(* (Bit16u *)(hostAddrDst)) = (* (Bit16u *)(hostAddrSrc));
|
||||
#define CopyHostDWordLittleEndian(hostAddrDst, hostAddrSrc) \
|
||||
(* (Bit32u *)(hostAddrDst)) = (* (Bit32u *)(hostAddrSrc));
|
||||
#define CopyHostQWordLittleEndian(hostAddrDst, hostAddrSrc) \
|
||||
(* (Bit64u *)(hostAddrDst)) = (* (Bit64u *)(hostAddrSrc));
|
||||
|
||||
#else
|
||||
|
||||
#define WriteHostWordToLittleEndian(hostPtr, nativeVar16) { \
|
||||
((Bit8u *)(hostPtr))[0] = (Bit8u) (nativeVar16); \
|
||||
((Bit8u *)(hostPtr))[1] = (Bit8u) ((nativeVar16)>>8); \
|
||||
}
|
||||
#define WriteHostDWordToLittleEndian(hostPtr, nativeVar32) { \
|
||||
((Bit8u *)(hostPtr))[0] = (Bit8u) (nativeVar32); \
|
||||
((Bit8u *)(hostPtr))[1] = (Bit8u) ((nativeVar32)>>8); \
|
||||
((Bit8u *)(hostPtr))[2] = (Bit8u) ((nativeVar32)>>16); \
|
||||
((Bit8u *)(hostPtr))[3] = (Bit8u) ((nativeVar32)>>24); \
|
||||
}
|
||||
#define WriteHostQWordToLittleEndian(hostPtr, nativeVar64) { \
|
||||
((Bit8u *)(hostPtr))[0] = (Bit8u) (nativeVar64); \
|
||||
((Bit8u *)(hostPtr))[1] = (Bit8u) ((nativeVar64)>>8); \
|
||||
((Bit8u *)(hostPtr))[2] = (Bit8u) ((nativeVar64)>>16); \
|
||||
((Bit8u *)(hostPtr))[3] = (Bit8u) ((nativeVar64)>>24); \
|
||||
((Bit8u *)(hostPtr))[4] = (Bit8u) ((nativeVar64)>>32); \
|
||||
((Bit8u *)(hostPtr))[5] = (Bit8u) ((nativeVar64)>>40); \
|
||||
((Bit8u *)(hostPtr))[6] = (Bit8u) ((nativeVar64)>>48); \
|
||||
((Bit8u *)(hostPtr))[7] = (Bit8u) ((nativeVar64)>>56); \
|
||||
}
|
||||
|
||||
#define ReadHostWordFromLittleEndian(hostPtr, nativeVar16) { \
|
||||
(nativeVar16) = ((Bit16u) ((Bit8u *)(hostPtr))[0]) | \
|
||||
(((Bit16u) ((Bit8u *)(hostPtr))[1])<<8) ; \
|
||||
}
|
||||
#define ReadHostDWordFromLittleEndian(hostPtr, nativeVar32) { \
|
||||
(nativeVar32) = ((Bit32u) ((Bit8u *)(hostPtr))[0]) | \
|
||||
(((Bit32u) ((Bit8u *)(hostPtr))[1])<<8) | \
|
||||
(((Bit32u) ((Bit8u *)(hostPtr))[2])<<16) | \
|
||||
(((Bit32u) ((Bit8u *)(hostPtr))[3])<<24); \
|
||||
}
|
||||
#define ReadHostQWordFromLittleEndian(hostPtr, nativeVar64) { \
|
||||
(nativeVar64) = ((Bit64u) ((Bit8u *)(hostPtr))[0]) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[1])<<8) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[2])<<16) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[3])<<24) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[4])<<32) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[5])<<40) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[6])<<48) | \
|
||||
(((Bit64u) ((Bit8u *)(hostPtr))[7])<<56); \
|
||||
}
|
||||
|
||||
#define CopyHostWordLittleEndian(hostAddrDst, hostAddrSrc) { \
|
||||
((Bit8u *)(hostAddrDst))[0] = ((Bit8u *)(hostAddrSrc))[0]; \
|
||||
((Bit8u *)(hostAddrDst))[1] = ((Bit8u *)(hostAddrSrc))[1]; \
|
||||
}
|
||||
#define CopyHostDWordLittleEndian(hostAddrDst, hostAddrSrc) { \
|
||||
((Bit8u *)(hostAddrDst))[0] = ((Bit8u *)(hostAddrSrc))[0]; \
|
||||
((Bit8u *)(hostAddrDst))[1] = ((Bit8u *)(hostAddrSrc))[1]; \
|
||||
((Bit8u *)(hostAddrDst))[2] = ((Bit8u *)(hostAddrSrc))[2]; \
|
||||
((Bit8u *)(hostAddrDst))[3] = ((Bit8u *)(hostAddrSrc))[3]; \
|
||||
}
|
||||
#define CopyHostQWordLittleEndian(hostAddrDst, hostAddrSrc) { \
|
||||
((Bit8u *)(hostAddrDst))[0] = ((Bit8u *)(hostAddrSrc))[0]; \
|
||||
((Bit8u *)(hostAddrDst))[1] = ((Bit8u *)(hostAddrSrc))[1]; \
|
||||
((Bit8u *)(hostAddrDst))[2] = ((Bit8u *)(hostAddrSrc))[2]; \
|
||||
((Bit8u *)(hostAddrDst))[3] = ((Bit8u *)(hostAddrSrc))[3]; \
|
||||
((Bit8u *)(hostAddrDst))[4] = ((Bit8u *)(hostAddrSrc))[4]; \
|
||||
((Bit8u *)(hostAddrDst))[5] = ((Bit8u *)(hostAddrSrc))[5]; \
|
||||
((Bit8u *)(hostAddrDst))[6] = ((Bit8u *)(hostAddrSrc))[6]; \
|
||||
((Bit8u *)(hostAddrDst))[7] = ((Bit8u *)(hostAddrSrc))[7]; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
BX_CPP_INLINE Bit32u bx_bswap32(Bit32u val32)
|
||||
{
|
||||
Bit32u b0 = val32 & 0xff; val32 >>= 8;
|
||||
Bit32u b1 = val32 & 0xff; val32 >>= 8;
|
||||
Bit32u b2 = val32 & 0xff; val32 >>= 8;
|
||||
Bit32u b3 = val32;
|
||||
return (b0<<24) | (b1<<16) | (b2<<8) | b3;
|
||||
}
|
||||
|
||||
BX_CPP_INLINE Bit64u bx_bswap64(Bit64u val64)
|
||||
{
|
||||
Bit64u b0 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b1 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b2 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b3 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b4 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b5 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b6 = val64 & 0xff; val64 >>= 8;
|
||||
Bit64u b7 = val64;
|
||||
return (b0<<56) | (b1<<48) | (b2<<40) | (b3<<32) | (b4<<24) | (b5<<16) | (b6<<8) | b7;
|
||||
}
|
||||
|
||||
#endif /* BX_BOCHS_H */
|
||||
57
bochs/bochsrc-multiple-ne2k
Normal file
57
bochs/bochsrc-multiple-ne2k
Normal file
@ -0,0 +1,57 @@
|
||||
# configuration file generated by Bochs
|
||||
plugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, pci_ide=1, acpi=1, ioapic=1
|
||||
config_interface: textconfig
|
||||
display_library: x
|
||||
memory: host=32, guest=32
|
||||
romimage: file="/usr/share/bochs/BIOS-bochs-latest"
|
||||
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
|
||||
boot: cdrom
|
||||
floppy_bootsig_check: disabled=0
|
||||
floppya: type=1_44, 1_44="a.img", status=inserted, write_protected=0
|
||||
# no floppyb
|
||||
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
|
||||
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
|
||||
ata2: enabled=0
|
||||
ata3: enabled=0
|
||||
ata0-slave: type=cdrom, path=fli4l.iso, status=inserted
|
||||
parport1: enabled=1, file=""
|
||||
parport2: enabled=0
|
||||
com1: enabled=1, mode=null, dev=""
|
||||
com2: enabled=0
|
||||
com3: enabled=0
|
||||
com4: enabled=0
|
||||
usb_uhci: enabled=0
|
||||
usb_ohci: enabled=0
|
||||
i440fxsupport: enabled=1
|
||||
vga_update_interval: 50000
|
||||
vga: extension=vbe
|
||||
cpu: count=1, ips=4000000, reset_on_triple_fault=1, ignore_bad_msrs=1
|
||||
cpuid: cpuid_limit_winnt=0, mmx=1, sse=sse2, xapic=1, sep=1, aes=0, xsave=0, movbe=0
|
||||
cpuid: stepping=3, vendor_string="GenuineIntel", brand_string=" Intel(R) Pentium(R) 4 CPU "
|
||||
print_timestamps: enabled=0
|
||||
# no gdb stub
|
||||
port_e9_hack: enabled=0
|
||||
text_snapshot_check: enabled=0
|
||||
private_colormap: enabled=0
|
||||
clock: sync=none, time0=local
|
||||
# no cmosimage
|
||||
ne2k: card=0, enabled=1, ioaddr=0x320, irq=10, mac=fe:fd:00:00:00:02, ethmod=tuntap, ethdev=/dev/net/tun:tap0, script=none
|
||||
ne2k: card=1, enabled=0, ioaddr=0x320, irq=7, mac=fe:fd:00:00:00:01, ethmod=null, ethdev=xl0, script=none
|
||||
ne2k: card=2, enabled=0
|
||||
ne2k: card=3, enabled=0
|
||||
pnic: enabled=0
|
||||
sb16: enabled=0
|
||||
# no loader
|
||||
log: -
|
||||
logprefix: %t%e%d
|
||||
panic: action=ask
|
||||
error: action=report
|
||||
info: action=report
|
||||
debug: action=ignore
|
||||
pass: action=fatal
|
||||
keyboard_type: mf
|
||||
keyboard_serial_delay: 250
|
||||
keyboard_paste_delay: 100000
|
||||
keyboard_mapping: enabled=0, map=
|
||||
user_shortcut: keys=none
|
||||
mouse: enabled=0, type=ps2, toggle=ctrl+mbutton
|
||||
320
bochs/build/batch-build.perl
Executable file
320
bochs/build/batch-build.perl
Executable file
@ -0,0 +1,320 @@
|
||||
#!/usr/bin/perl
|
||||
#####################################################################
|
||||
# $Id$
|
||||
#####################################################################
|
||||
#
|
||||
# Batch build tool for multiple configurations
|
||||
#
|
||||
# switches:
|
||||
# - show output vs. send it all to nohup. --nohup
|
||||
# - serial or parallel. --parallel
|
||||
#
|
||||
# no args: serial, display output
|
||||
# --nohup: serial, output to nohup.out. (Need summary.)
|
||||
# --nohup --parallel: parallel, output to nohup.out
|
||||
# --parallel: parallel, spawn xterm for each
|
||||
#
|
||||
|
||||
sub usage {
|
||||
print <<EOF;
|
||||
Usage: $0 [--nohup] [--parallel]
|
||||
--nohup causes the output of all compiles to go into nohup.out
|
||||
--parallel causes all compiles to be run in parallel
|
||||
|
||||
Usage: $0 --clean
|
||||
--clean erases the build directories and recreates them from scratch
|
||||
|
||||
Combinations of nohup and parallel:
|
||||
no args: serial compile, output goes to stdout
|
||||
--nohup: serial compile, output goes into individual nohup.out files
|
||||
--nohup --parallel: parallel compile, output goes to individual nohup.out files
|
||||
--parallel: parallel compile, spawn an xterm for each configuration
|
||||
EOF
|
||||
}
|
||||
|
||||
$DEBUG=0;
|
||||
|
||||
$TEST_STANDARD = 1;
|
||||
$TEST_GUIS = 1;
|
||||
$TEST_CPU = 1;
|
||||
$TEST_SMP = 1;
|
||||
$TEST_IODEV = 1;
|
||||
$TEST_PCI = 1;
|
||||
$TEST_X86_64 = 1;
|
||||
$TEST_SSE = 1;
|
||||
$TEST_PLUGINS = 1;
|
||||
$TEST_DEVICES = 1;
|
||||
|
||||
$pwd = `pwd`;
|
||||
chop $pwd;
|
||||
|
||||
# create all the configurations that we should test. The first argument
|
||||
# is the configuration name, which must be a valid directory name. To be
|
||||
# safe, don't put spaces, slashes, ".", or ".." in here.
|
||||
if ($TEST_STANDARD) {
|
||||
add_configuration ('normal',
|
||||
'');
|
||||
add_configuration ('dbg',
|
||||
'--enable-debugger');
|
||||
}
|
||||
|
||||
if ($TEST_PLUGINS) {
|
||||
add_configuration ('plug',
|
||||
'--enable-plugins');
|
||||
add_configuration ('plug-d',
|
||||
'--enable-plugins --enable-debugger');
|
||||
add_configuration ('plug-allgui',
|
||||
'--enable-plugins --with-all-libs');
|
||||
add_configuration ('plug-allgui-d',
|
||||
'--enable-plugins --with-all-libs --enable-debugger');
|
||||
add_configuration ('plug-smp',
|
||||
'--enable-plugins --enable-smp');
|
||||
add_configuration ('plug-smp-d',
|
||||
'--enable-plugins --enable-smp --enable-debugger');
|
||||
add_configuration ('plug-x86-64',
|
||||
'--enable-plugins --enable-x86-64');
|
||||
add_configuration ('plug-wx',
|
||||
'--enable-plugins --with-wx');
|
||||
}
|
||||
|
||||
if ($TEST_DEVICES) {
|
||||
add_configuration ('alldev',
|
||||
'--enable-ne2000 --enable-pci --enable-port-e9-hack --enable-cdrom --enable-iodebug');
|
||||
add_configuration ('ne2000',
|
||||
'--enable-ne2000');
|
||||
add_configuration ('pci',
|
||||
'--enable-pci');
|
||||
add_configuration ('port-e9-hack',
|
||||
'--enable-port-e9-hack');
|
||||
add_configuration ('cdrom',
|
||||
'--enable-cdrom');
|
||||
add_configuration ('gdbstub',
|
||||
'--enable-gdbstub');
|
||||
add_configuration ('iodebug',
|
||||
'--enable-iodebug');
|
||||
}
|
||||
|
||||
if ($TEST_GUIS) {
|
||||
# test with various gui options
|
||||
add_configuration ('wx',
|
||||
'--with-wx');
|
||||
add_configuration ('wx-d',
|
||||
'--with-wx --enable-debugger');
|
||||
add_configuration ('sdl',
|
||||
'--with-sdl');
|
||||
add_configuration ('sdl-d',
|
||||
'--with-sdl --enable-debugger');
|
||||
add_configuration ('term',
|
||||
'--with-term');
|
||||
add_configuration ('term-d',
|
||||
'--with-term --enable-debugger');
|
||||
add_configuration ('rfb',
|
||||
'--with-rfb');
|
||||
add_configuration ('rfb-d',
|
||||
'--with-rfb --enable-debugger');
|
||||
add_configuration ('nogui',
|
||||
'--with-nogui');
|
||||
add_configuration ('nogui-d',
|
||||
'--with-nogui --enable-debugger');
|
||||
}
|
||||
|
||||
if ($TEST_CPU) {
|
||||
# test with various cpu options
|
||||
add_configuration ('i386',
|
||||
'--enable-cpu-level=3 --disable-mmx');
|
||||
add_configuration ('i486',
|
||||
'--enable-cpu-level=4 --disable-mmx');
|
||||
add_configuration ('i586',
|
||||
'--enable-cpu-level=5');
|
||||
add_configuration ('i686',
|
||||
'--enable-cpu-level=6');
|
||||
add_configuration ('large-pages',
|
||||
'--enable-large-pages');
|
||||
add_configuration ('pae',
|
||||
'--enable-pae');
|
||||
add_configuration ('repeat',
|
||||
'--enable-repeat-speedups');
|
||||
add_configuration ('globalpg',
|
||||
'--enable-global-pages');
|
||||
add_configuration ('icache',
|
||||
'--enable-icache');
|
||||
add_configuration ('cpuall',
|
||||
'--enable-large-pages --enable-pae --enable-global-pages --enable-all-optimizations');
|
||||
}
|
||||
|
||||
if ($TEST_SMP) {
|
||||
# smp
|
||||
add_configuration ('smp',
|
||||
'--enable-smp');
|
||||
add_configuration ('smp-d',
|
||||
'--enable-smp --enable-debugger');
|
||||
add_configuration ('smp-wx',
|
||||
'--enable-smp --with-wx');
|
||||
add_configuration ('smp-wx-d',
|
||||
'--enable-smp --with-wx --enable-debugger');
|
||||
}
|
||||
|
||||
if ($TEST_X86_64) {
|
||||
# test x86-64
|
||||
add_configuration ('64bit',
|
||||
'--enable-x86-64');
|
||||
add_configuration ('64bit-d',
|
||||
'--enable-x86-64 --enable-debugger');
|
||||
add_configuration ('64bit-wx',
|
||||
'--enable-x86-64 --with-wx');
|
||||
add_configuration ('64bit-wx-d',
|
||||
'--enable-x86-64 --with-wx --enable-debugger');
|
||||
}
|
||||
|
||||
if ($TEST_SSE) {
|
||||
# test SSE configurations
|
||||
add_configuration ('sse1',
|
||||
'--enable-sse=1');
|
||||
add_configuration ('sse2',
|
||||
'--enable-sse=2');
|
||||
add_configuration ('sse3',
|
||||
'--enable-sse=3');
|
||||
add_configuration ('sse4',
|
||||
'--enable-sse=4');
|
||||
add_configuration ('sse2-dbg',
|
||||
'--enable-sse=2 --enable-debugger');
|
||||
add_configuration ('sse2-x86-64-wx-d',
|
||||
'--enable-sse=2 --enable-x86-64 --with-wx --enable-debugger');
|
||||
}
|
||||
|
||||
my $nohup = 0;
|
||||
my $parallel = 0;
|
||||
my $clean = 0;
|
||||
foreach my $arg (@ARGV) {
|
||||
if ($arg eq '--clean') {
|
||||
$clean = 1;
|
||||
} elsif ($arg eq '--nohup') {
|
||||
$nohup = 1;
|
||||
} elsif ($arg eq '--parallel') {
|
||||
$parallel = 1;
|
||||
} else {
|
||||
usage(); exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
# this script may be run from various directories, and this affects
|
||||
# the path to the configure command. Try to figure out where the configure
|
||||
# command is found, and set up the build.sh scripts accordingly. If it
|
||||
# can't be found, spit out an error now instead of later.
|
||||
my @configurepath_tries = ("configure", "../configure", "../../configure");
|
||||
my $configurepath;
|
||||
foreach my $trypath (@configurepath_tries) {
|
||||
if (-x $trypath) {
|
||||
print "Found configure at $configurepath.\n" if $DEBUG;
|
||||
$configurepath = $trypath;
|
||||
}
|
||||
}
|
||||
if (!defined $configurepath) {
|
||||
print <<EOF;
|
||||
ERROR I could not locate the configure script. This script is intended
|
||||
to be run from the bochs main directory or a subdirectory of it. Examples:
|
||||
1) cd $BOCHS; ./build/batch-build.perl
|
||||
2) cd $BOCHS/build; ./batch-build.perl
|
||||
|
||||
Here are the places that I tried to find the configure script:
|
||||
EOF
|
||||
foreach (@configurepath_tries) {
|
||||
print " $_\n";
|
||||
}
|
||||
exit 1;
|
||||
}
|
||||
|
||||
$x = 50; $y = 50;
|
||||
$xinc = 30;
|
||||
$yinc = 30;
|
||||
|
||||
for (my $i=0; $i <= $#config_names; $i++) {
|
||||
my $name = "build-$config_names[$i]";
|
||||
my $options = $config_opts[$i];
|
||||
die if (!defined $name || !defined $options);
|
||||
print "Compiling '$name' with opts '$options'\n" if $DEBUG;
|
||||
if ($clean) {
|
||||
my $rmcmd = "rm -rf $name";
|
||||
print "Removing directory $name\n";
|
||||
system $rmcmd;
|
||||
next;
|
||||
}
|
||||
if (! -d $name) { mkdir $name, 0755; }
|
||||
$maybe_nohup = $nohup? "nohup" : "";
|
||||
open (BUILD, ">$name/build.sh");
|
||||
print BUILD <<BUILD_EOF;
|
||||
#!/bin/bash
|
||||
echo Running the configure script
|
||||
export CFLAGS='-g -O2 -Wall'
|
||||
export CXXFLAGS='-g -O2 -Wall'
|
||||
$maybe_nohup ../$configurepath $options
|
||||
if test $? != 0; then
|
||||
echo Configure failed.
|
||||
exit 1
|
||||
fi
|
||||
echo Running make
|
||||
$maybe_nohup make
|
||||
if test $? != 0; then
|
||||
echo Make failed.
|
||||
exit 1
|
||||
fi
|
||||
BUILD_EOF
|
||||
close BUILD;
|
||||
chmod 0755, "$name/build.sh";
|
||||
$gotodir = "cd $name";
|
||||
$startcmd = "nice $maybe_nohup ./build.sh";
|
||||
$header = <<HEADER_EOF;
|
||||
====================================================================
|
||||
Configuration name: $name
|
||||
Directory: $pwd/$name
|
||||
Config Options: $options
|
||||
====================================================================
|
||||
HEADER_EOF
|
||||
print $header;
|
||||
|
||||
if ($parallel && !$nohup) {
|
||||
# special case for parallel without nohup. If you're not careful,
|
||||
# all output from all compiles will go into the window at once, which
|
||||
# is impossible to read. Also very hard to kill them until they have
|
||||
# run their course. Instead, start each compile in a different xterm!
|
||||
# What's even more useful is that after the compile stops it goes into
|
||||
# a bash shell so that you can fix things, run the make again, etc.
|
||||
#
|
||||
# To do this, put the start command in a little shell script called
|
||||
# xterm-init.sh. Start the xterm with "-e xterm-init.sh" so that it
|
||||
# runs the script as it starts.
|
||||
|
||||
open (XTI, ">$name/xterm-init.sh");
|
||||
print XTI <<XTI_EOF;
|
||||
#!/bin/bash
|
||||
cat <<EOF
|
||||
$header
|
||||
EOF
|
||||
$startcmd
|
||||
bash
|
||||
exit 0
|
||||
XTI_EOF
|
||||
close XTI;
|
||||
chmod 0755, "$name/xterm-init.sh";
|
||||
$geometry = "-geom +$x+$y";
|
||||
$x+=$xinc;
|
||||
$y+=$yinc;
|
||||
$startcmd = "xterm -title $name -name $name $geometry -e ./xterm-init.sh";
|
||||
}
|
||||
|
||||
$cmd = "$gotodir && $startcmd";
|
||||
$cmd .= "&" if $parallel;
|
||||
print "Executing '$cmd'\n" if $DEBUG;
|
||||
system $cmd;
|
||||
}
|
||||
|
||||
print "\n"x2;
|
||||
print "batch-build script is done.\n";
|
||||
exit 0;
|
||||
|
||||
sub add_configuration {
|
||||
my ($name, $opts) = @_;
|
||||
push @config_names, $name;
|
||||
push @config_opts, $opts;
|
||||
}
|
||||
|
||||
BIN
bochs/build/beos/resource.zip
Normal file
BIN
bochs/build/beos/resource.zip
Normal file
Binary file not shown.
17
bochs/build/debian/README.Debian
Normal file
17
bochs/build/debian/README.Debian
Normal file
@ -0,0 +1,17 @@
|
||||
bochs for Debian
|
||||
----------------
|
||||
|
||||
I've tried to keep the install the same as the default, everything goes in
|
||||
/usr/local/bochs. Binary symlinks in /usr/local/bin. Yes this is less than
|
||||
ideal. I intend to fix this as soon as I have time.
|
||||
|
||||
Some gotchas....
|
||||
|
||||
I still have problems with the vga font on occasion. It is included in the
|
||||
package and mkfontdir is run, but I still needed to restart X in order to
|
||||
get bochs to run the first time.
|
||||
|
||||
|
||||
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org>, Mon, 17 Sep 2001 14:40:30 -0700
|
||||
65
bochs/build/debian/changelog
Normal file
65
bochs/build/debian/changelog
Normal file
@ -0,0 +1,65 @@
|
||||
bochs (1.3-1) unstable; urgency=low
|
||||
|
||||
* Update for 1.3
|
||||
|
||||
-- Rob Lemley <rjlemley@valinux.com> Mon, 10 Dec 2001 15:16:18 -0800
|
||||
|
||||
bochs (1.3pre1-1) unstable; urgency=low
|
||||
|
||||
* Update for 1.3pre1
|
||||
|
||||
-- Rob Lemley <rjlemley@valinux.com> Wed, 28 Nov 2001 16:47:25 -0800
|
||||
|
||||
bochs (1.2.1cvs20011128-1) unstable; urgency=low
|
||||
|
||||
* Update from cvs
|
||||
* Package now installs in /usr like a good package should
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Wed, 28 Nov 2001 16:39:35 -0800
|
||||
|
||||
bochs (1.2.1cvs20010917-1) unstable; urgency=low
|
||||
|
||||
* Added files to docs
|
||||
* Run mkfontdir after installation to update the font
|
||||
* Added some documentation RE common errors to the README.Debian file
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Mon, 17 Sep 2001 16:09:50 -0700
|
||||
|
||||
bochs (1.2.1-2) unstable; urgency=low
|
||||
|
||||
* Added bochs-dlx stuff. This may be separated out into its own
|
||||
package at some point
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Tue, 12 Jun 2001 19:47:05 -0700
|
||||
|
||||
bochs (1.2.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Tue, 12 Jun 2001 17:57:51 -0700
|
||||
|
||||
bochs (1.2-3) unstable; urgency=low
|
||||
|
||||
* Moved debian dir to build dir
|
||||
* Fixed rules file to work with potato
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Mon, 11 Jun 2001 21:33:06 -0700
|
||||
|
||||
bochs (1.2-2) unstable; urgency=low
|
||||
|
||||
* Backed out changes to Makefile.in to keep in sync with upstream
|
||||
* Modified rules to install temp files in proper place for package build
|
||||
* Added hack to rules file to put symlinks in right places
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Mon, 11 Jun 2001 09:48:21 -0700
|
||||
|
||||
bochs (1.2-1) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
* Adjusted Makefike.in to fix $DESTDIR problems
|
||||
|
||||
-- Rob Lemley <rjlemley@calypsoblue.org> Tue, 5 Jun 2001 21:08:30 -0700
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
End:
|
||||
7
bochs/build/debian/conffiles.ex
Normal file
7
bochs/build/debian/conffiles.ex
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# If you want to use this conffile, remove all comments and put files that
|
||||
# you want dpkg to process here using their absolute pathnames.
|
||||
# See section 9.1 of the packaging manual.
|
||||
#
|
||||
# for example:
|
||||
# /etc/bochs/bochs.conf
|
||||
17
bochs/build/debian/control
Normal file
17
bochs/build/debian/control
Normal file
@ -0,0 +1,17 @@
|
||||
Source: bochs
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Rob Lemley <rjlemley@calypsoblue.org>
|
||||
Build-Depends: debhelper (>> 3.0.0)
|
||||
Standards-Version: 3.5.2
|
||||
|
||||
Package: bochs
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: IA-32 Emulator Project
|
||||
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 or Pentium CPU. Bochs is capable of running most
|
||||
Operating Systems inside the emulation including Linux, Windows 95, DOS,
|
||||
and recently Windows NT 4.
|
||||
10
bochs/build/debian/copyright
Normal file
10
bochs/build/debian/copyright
Normal file
@ -0,0 +1,10 @@
|
||||
This package was debianized by Rob Lemley <rjlemley@calypsoblue.org> on
|
||||
Tue, 5 Jun 2001 21:08:30 -0700.
|
||||
|
||||
It was downloaded from http://bochs.sourceforge.net
|
||||
|
||||
Upstream Author(s): <put author(s) name and email here>
|
||||
|
||||
Copyright:
|
||||
|
||||
<Must follow here>
|
||||
4
bochs/build/debian/cron.d.ex
Normal file
4
bochs/build/debian/cron.d.ex
Normal file
@ -0,0 +1,4 @@
|
||||
#
|
||||
# Regular cron jobs for the bochs package
|
||||
#
|
||||
0 4 * * * root bochs_maintenance
|
||||
0
bochs/build/debian/dirs
Normal file
0
bochs/build/debian/dirs
Normal file
6
bochs/build/debian/docs
Normal file
6
bochs/build/debian/docs
Normal file
@ -0,0 +1,6 @@
|
||||
README
|
||||
TESTFORM.txt
|
||||
macintosh.txt
|
||||
win32.txt
|
||||
COPYING
|
||||
CHANGES
|
||||
45
bochs/build/debian/emacsen-install.ex
Normal file
45
bochs/build/debian/emacsen-install.ex
Normal file
@ -0,0 +1,45 @@
|
||||
#! /bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/install/bochs
|
||||
|
||||
# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
|
||||
# from the install scripts for gettext by Santiago Vila
|
||||
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=bochs
|
||||
|
||||
if [ ${FLAVOR} = emacs ]; then exit 0; fi
|
||||
|
||||
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
|
||||
|
||||
#FLAVORTEST=`echo $FLAVOR | cut -c-6`
|
||||
#if [ ${FLAVORTEST} = xemacs ] ; then
|
||||
# SITEFLAG="-no-site-file"
|
||||
#else
|
||||
# SITEFLAG="--no-site-file"
|
||||
#fi
|
||||
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
|
||||
|
||||
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
|
||||
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
|
||||
# Install-info-altdir does not actually exist.
|
||||
# Maybe somebody will write it.
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo install/${PACKAGE}: install Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
|
||||
fi
|
||||
|
||||
install -m 755 -d ${ELCDIR}
|
||||
cd ${ELDIR}
|
||||
FILES=`echo *.el`
|
||||
cp ${FILES} ${ELCDIR}
|
||||
cd ${ELCDIR}
|
||||
|
||||
cat << EOF > path.el
|
||||
(setq load-path (cons "." load-path) byte-compile-warnings nil)
|
||||
EOF
|
||||
${FLAVOR} ${FLAGS} ${FILES}
|
||||
rm -f *.el path.el
|
||||
|
||||
exit 0
|
||||
15
bochs/build/debian/emacsen-remove.ex
Normal file
15
bochs/build/debian/emacsen-remove.ex
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/remove/bochs
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=bochs
|
||||
|
||||
if [ ${FLAVOR} != emacs ]; then
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/bochs.info.gz
|
||||
fi
|
||||
|
||||
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
|
||||
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
fi
|
||||
18
bochs/build/debian/emacsen-startup.ex
Normal file
18
bochs/build/debian/emacsen-startup.ex
Normal file
@ -0,0 +1,18 @@
|
||||
;; -*-emacs-lisp-*-
|
||||
;;
|
||||
;; Emacs startup file for the Debian GNU/Linux bochs package
|
||||
;;
|
||||
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
|
||||
;; Modified by Dirk Eddelbuettel <edd@debian.org>
|
||||
;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
|
||||
|
||||
;; The bochs package follows the Debian/GNU Linux 'emacsen' policy and
|
||||
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
|
||||
;; xemacs19, emacs20, xemacs20...). The compiled code is then
|
||||
;; installed in a subdirectory of the respective site-lisp directory.
|
||||
;; We have to add this to the load-path:
|
||||
(setq load-path (cons (concat "/usr/share/"
|
||||
(symbol-name flavor)
|
||||
"/site-lisp/bochs") load-path))
|
||||
|
||||
|
||||
22
bochs/build/debian/ex.doc-base.package
Normal file
22
bochs/build/debian/ex.doc-base.package
Normal file
@ -0,0 +1,22 @@
|
||||
Document: bochs
|
||||
Title: Debian bochs Manual
|
||||
Author: <insert document author here>
|
||||
Abstract: This manual describes what bochs is
|
||||
and how it can be used to
|
||||
manage online manuals on Debian systems.
|
||||
Section: unknown
|
||||
|
||||
Format: debiandoc-sgml
|
||||
Files: /usr/share/doc/bochs/bochs.sgml.gz
|
||||
|
||||
Format: postscript
|
||||
Files: /usr/share/doc/bochs/bochs.ps.gz
|
||||
|
||||
Format: text
|
||||
Files: /usr/share/doc/bochs/bochs.text.gz
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/bochs/html/index.html
|
||||
Files: /usr/share/doc/bochs/html/*.html
|
||||
|
||||
|
||||
70
bochs/build/debian/init.d.ex
Normal file
70
bochs/build/debian/init.d.ex
Normal file
@ -0,0 +1,70 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# skeleton example file to build /etc/init.d/ scripts.
|
||||
# This file should be used to construct scripts for /etc/init.d.
|
||||
#
|
||||
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
||||
# Modified for Debian GNU/Linux
|
||||
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
||||
#
|
||||
# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
|
||||
#
|
||||
# This file was automatically customized by dh-make on Tue, 5 Jun 2001 21:08:30 -0700
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/bochs
|
||||
NAME=bochs
|
||||
DESC=bochs
|
||||
|
||||
test -f $DAEMON || exit 0
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
#reload)
|
||||
#
|
||||
# If the daemon can reload its config files on the fly
|
||||
# for example by sending it SIGHUP, do it here.
|
||||
#
|
||||
# If the daemon responds to changes in its config file
|
||||
# directly anyway, make this a do-nothing entry.
|
||||
#
|
||||
# echo "Reloading $DESC configuration files."
|
||||
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
|
||||
# /var/run/$NAME.pid --exec $DAEMON
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
60
bochs/build/debian/manpage.1.ex
Normal file
60
bochs/build/debian/manpage.1.ex
Normal file
@ -0,0 +1,60 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH BOCHS SECTION "June 5, 2001"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
bochs \- program to do something
|
||||
.SH SYNOPSIS
|
||||
.B bochs
|
||||
.RI [ options ] " files" ...
|
||||
.br
|
||||
.B bar
|
||||
.RI [ options ] " files" ...
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B bochs
|
||||
and
|
||||
.B bar
|
||||
commands.
|
||||
This manual page was written for the Debian GNU/Linux distribution
|
||||
because the original program does not have a manual page.
|
||||
Instead, it has documentation in the GNU Info format; see below.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBbochs\fP is a program that...
|
||||
.SH OPTIONS
|
||||
These programs follow the usual GNU command line syntax, with long
|
||||
options starting with two dashes (`-').
|
||||
A summary of options is included below.
|
||||
For a complete description, see the Info files.
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Show version of program.
|
||||
.SH SEE ALSO
|
||||
.BR bar (1),
|
||||
.BR baz (1).
|
||||
.br
|
||||
The programs are documented fully by
|
||||
.IR "The Rise and Fall of a Fooish Bar" ,
|
||||
available via the Info system.
|
||||
.SH AUTHOR
|
||||
This manual page was written by Rob Lemley <rjlemley@calypsoblue.org>,
|
||||
for the Debian GNU/Linux system (but may be used by others).
|
||||
143
bochs/build/debian/manpage.sgml.ex
Normal file
143
bochs/build/debian/manpage.sgml.ex
Normal file
@ -0,0 +1,143 @@
|
||||
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
|
||||
|
||||
<!-- Process this file with docbook-to-man to generate an nroff manual
|
||||
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
|
||||
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
|
||||
less'. A typical entry in a Makefile or Makefile.am is:
|
||||
|
||||
manpage.1: manpage.sgml
|
||||
docbook-to-man $< > $@
|
||||
-->
|
||||
|
||||
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
|
||||
<!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
|
||||
<!ENTITY dhsurname "<surname>SURNAME</surname>">
|
||||
<!-- Please adjust the date whenever revising the manpage. -->
|
||||
<!ENTITY dhdate "<date>June 5, 2001</date>">
|
||||
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
|
||||
allowed: see man(7), man(1). -->
|
||||
<!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
|
||||
<!ENTITY dhemail "<email>rjlemley@calypsoblue.org</email>">
|
||||
<!ENTITY dhusername "Rob Lemley">
|
||||
<!ENTITY dhucpackage "<refentrytitle>BOCHS</refentrytitle>">
|
||||
<!ENTITY dhpackage "bochs">
|
||||
|
||||
<!ENTITY debian "<productname>Debian GNU/Linux</productname>">
|
||||
<!ENTITY gnu "<acronym>GNU</acronym>">
|
||||
]>
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<address>
|
||||
&dhemail;
|
||||
</address>
|
||||
<author>
|
||||
&dhfirstname;
|
||||
&dhsurname;
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2001</year>
|
||||
<holder>&dhusername;</holder>
|
||||
</copyright>
|
||||
&dhdate;
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
&dhucpackage;
|
||||
|
||||
&dhsection;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>&dhpackage;</refname>
|
||||
|
||||
<refpurpose>program to do something</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>&dhpackage;</command>
|
||||
|
||||
<arg><option>-e <replaceable>this</replaceable></option></arg>
|
||||
|
||||
<arg><option>--example <replaceable>that</replaceable></option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
|
||||
<para>This manual page documents briefly the
|
||||
<command>&dhpackage;</command> and <command>bar</command>
|
||||
commands.</para>
|
||||
|
||||
<para>This manual page was written for the &debian; distribution
|
||||
because the original program does not have a manual page.
|
||||
Instead, it has documentation in the &gnu;
|
||||
<application>Info</application> format; see below.</para>
|
||||
|
||||
<para><command>&dhpackage;</command> is a program that...</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<para>These programs follow the usual GNU command line syntax,
|
||||
with long options starting with two dashes (`-'). A summary of
|
||||
options is included below. For a complete description, see the
|
||||
<application>Info</application> files.</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>
|
||||
<option>--help</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show summary of options.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-v</option>
|
||||
<option>--version</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show version of program.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
|
||||
<para>bar (1), baz (1).</para>
|
||||
|
||||
<para>The programs are documented fully by <citetitle>The Rise and
|
||||
Fall of a Fooish Bar</citetitle> available via the
|
||||
<application>Info</application> system.</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
|
||||
<para>This manual page was written by &dhusername; &dhemail; for
|
||||
the &debian; system (but may be used by others). Permission is
|
||||
granted to copy, distribute and/or modify this document under
|
||||
the terms of the <acronym>GNU</acronym> Free Documentation
|
||||
License, Version 1.1 or any later version published by the Free
|
||||
Software Foundation; with no Invariant Sections, no Front-Cover
|
||||
Texts and no Back-Cover Texts.</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:2
|
||||
sgml-indent-data:t
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:nil
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
-->
|
||||
2
bochs/build/debian/menu.ex
Normal file
2
bochs/build/debian/menu.ex
Normal file
@ -0,0 +1,2 @@
|
||||
?package(bochs):needs=X11|text|vc|wm section=Apps/see-menu-manual\
|
||||
title="bochs" command="/usr/bin/bochs"
|
||||
48
bochs/build/debian/postinst
Normal file
48
bochs/build/debian/postinst
Normal file
@ -0,0 +1,48 @@
|
||||
#! /bin/sh
|
||||
# postinst script for bochs
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
#
|
||||
# quoting from the policy:
|
||||
# Any necessary prompting should almost always be confined to the
|
||||
# post-installation script, and should be protected with a conditional
|
||||
# so that unnecessary prompting doesn't happen if a package's
|
||||
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||
# `abort-remove' or `abort-deconfigure'.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
mkfontdir /usr/lib/X11/fonts/misc
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
47
bochs/build/debian/postinst.ex
Normal file
47
bochs/build/debian/postinst.ex
Normal file
@ -0,0 +1,47 @@
|
||||
#! /bin/sh
|
||||
# postinst script for bochs
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
#
|
||||
# quoting from the policy:
|
||||
# Any necessary prompting should almost always be confined to the
|
||||
# post-installation script, and should be protected with a conditional
|
||||
# so that unnecessary prompting doesn't happen if a package's
|
||||
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||
# `abort-remove' or `abort-deconfigure'.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
36
bochs/build/debian/postrm.ex
Normal file
36
bochs/build/debian/postrm.ex
Normal file
@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
# postrm script for bochs
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
||||
42
bochs/build/debian/preinst.ex
Normal file
42
bochs/build/debian/preinst.ex
Normal file
@ -0,0 +1,42 @@
|
||||
#! /bin/sh
|
||||
# preinst script for bochs
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
#
|
||||
# For details see /usr/share/doc/packaging-manual/
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
# if [ "$1" = "upgrade" ]
|
||||
# then
|
||||
# start-stop-daemon --stop --quiet --oknodo \
|
||||
# --pidfile /var/run/bochs.pid \
|
||||
# --exec /usr/sbin/bochs 2>/dev/null || true
|
||||
# fi
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
37
bochs/build/debian/prerm.ex
Normal file
37
bochs/build/debian/prerm.ex
Normal file
@ -0,0 +1,37 @@
|
||||
#! /bin/sh
|
||||
# prerm script for bochs
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
# install-info --quiet --remove /usr/info/bochs.info.gz
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
90
bochs/build/debian/rules
Executable file
90
bochs/build/debian/rules
Executable file
@ -0,0 +1,90 @@
|
||||
#!/usr/bin/make -f
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# This is the debhelper compatability version to use.
|
||||
export DH_COMPAT=2
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
ln -snf build/debian debian
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
pwd
|
||||
export CONFIGURE_ARGS="--prefix=/usr"; ./.conf.linux
|
||||
|
||||
touch configure-stamp
|
||||
|
||||
build: configure-stamp build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#/usr/bin/docbook-to-man debian/bochs.sgml > bochs.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) dist-clean
|
||||
|
||||
dh_clean
|
||||
|
||||
rm -f debian
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/bochs.
|
||||
$(MAKE) unpack_dlx # with normal prefix so that dlxlinux
|
||||
# bochsrc.txt file gets right pathnames
|
||||
$(MAKE) install install_dlx prefix=$(CURDIR)/debian/bochs/usr
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
# dh_installdebconf
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
dh_installmenu
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
dh_installcron
|
||||
dh_installmanpages
|
||||
dh_installinfo
|
||||
# dh_undocumented
|
||||
dh_installchangelogs CHANGES
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_perl
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||
5
bochs/build/debian/watch.ex
Normal file
5
bochs/build/debian/watch.ex
Normal file
@ -0,0 +1,5 @@
|
||||
# Example watch control file for uscan
|
||||
# Rename this file to "watch" and then you can run the "uscan" command
|
||||
# to check for upstream updates and more.
|
||||
# Site Directory Pattern Version Script
|
||||
sunsite.unc.edu /pub/Linux/Incoming bochs-(.*)\.tar\.gz debian uupdate
|
||||
0
bochs/build/linux/README.linux-binary
Normal file
0
bochs/build/linux/README.linux-binary
Normal file
118
bochs/build/linux/bochs-dlx.in
Executable file
118
bochs/build/linux/bochs-dlx.in
Executable file
@ -0,0 +1,118 @@
|
||||
#!/bin/sh
|
||||
BOCHS=@prefix@/bin/bochs
|
||||
DLXINST=@prefix@/share/bochs/dlxlinux
|
||||
GZIP=@GZIP@
|
||||
if [ ! -z $1 ]; then
|
||||
DLXPATH=$1
|
||||
else
|
||||
DLXPATH=$HOME/.bochsdlx
|
||||
fi
|
||||
CONFFILE=$HOME/.bochsdlx/bochsconf
|
||||
|
||||
makedlxdir() {
|
||||
echo
|
||||
echo ---------------------------------------------------------------
|
||||
echo To run the DLX Linux demo, I need to create a directory called
|
||||
echo $DLXPATH, and copy some configuration files
|
||||
echo and a 10 megabyte disk image into the directory.
|
||||
echo ---------------------------------------------------------------
|
||||
ok='unknown'
|
||||
while test $ok = 'unknown'; do
|
||||
echo Is that okay? [y/n]
|
||||
read j
|
||||
case $j in
|
||||
y*) ok=1 ;;
|
||||
n*) ok=0 ;;
|
||||
esac
|
||||
done
|
||||
if test $ok != 1; then
|
||||
echo Aborting
|
||||
exit 1
|
||||
fi
|
||||
#echo DEBUG: Creating $HOME/.bochsdlx/bochsrc
|
||||
echo DLXPATH=$DLXPATH > $CONFFILE
|
||||
. $CONFFILE
|
||||
for file in bochsrc.txt readme.txt testform.txt; do
|
||||
if [ ! -f $DLXPATH/$file ]; then
|
||||
echo Copying $DLXINST/$file '->' $DLXPATH/.
|
||||
cp $DLXINST/$file $DLXPATH/.
|
||||
else
|
||||
echo "ERROR: $file already exists in $DLXPATH. Remove it to replace."
|
||||
fi;
|
||||
done
|
||||
if [ ! -f $DLXPATH/hd10meg.img ]; then
|
||||
echo Uncompressing $DLXINST/hd10meg.img.gz '->' $DLXPATH/hd10meg.img
|
||||
$GZIP -dc $DLXINST/hd10meg.img.gz > $DLXPATH/hd10meg.img
|
||||
else
|
||||
echo "ERROR: hd10meg.img already exists in $DLXPATH. Remove it to replace."
|
||||
fi
|
||||
}
|
||||
|
||||
echo ---------------------------------------------------------------
|
||||
echo " DLX Linux Demo, for Bochs x86 Emulator"
|
||||
echo ---------------------------------------------------------------
|
||||
|
||||
echo -n "Checking for bochs binary..."
|
||||
if test ! -x $BOCHS; then
|
||||
echo FAILED
|
||||
echo ERROR: I could not find bochs in $BOCHS
|
||||
exit 1
|
||||
fi
|
||||
echo ok
|
||||
echo -n "Checking for DLX linux directory..."
|
||||
if test ! -d $DLXINST; then
|
||||
echo FAILED
|
||||
echo ERROR: I could not find the DLX linux directory.
|
||||
exit 1
|
||||
fi
|
||||
echo ok
|
||||
echo -n "Checking for $GZIP..."
|
||||
$GZIP < /dev/null > /dev/null
|
||||
if test $? = 0; then
|
||||
echo ok
|
||||
else
|
||||
echo not found
|
||||
echo ERROR: without $GZIP in your PATH, I cannot continue.
|
||||
exit 1
|
||||
fi
|
||||
echo -n "Checking for $HOME/.bochsdlx directory..."
|
||||
if test -d "$HOME/.bochsdlx"; then
|
||||
echo "ok"
|
||||
if test -f "$CONFFILE"; then
|
||||
. $CONFFILE
|
||||
else
|
||||
makedlxdir
|
||||
fi
|
||||
else
|
||||
#echo DEBUG: Creating $HOME/.bochsdlx
|
||||
mkdir -p $HOME/.bochsdlx
|
||||
mkdir -p $DLXPATH
|
||||
makedlxdir
|
||||
fi
|
||||
echo Entering $DLXPATH
|
||||
cd $DLXPATH
|
||||
|
||||
# Now that we're in the DLXPATH, make sure that bochsrc.txt & hd10meg.img exist
|
||||
if test ! -f bochsrc.txt; then
|
||||
echo ERROR: bochsrc.txt not found
|
||||
exit 1
|
||||
fi
|
||||
if test ! -f hd10meg.img; then
|
||||
echo ERROR: hd10meg.img not found
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Running bochs
|
||||
|
||||
# ok now try it
|
||||
$BOCHS -q
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------------------------
|
||||
echo The DLX Linux demo is over. If you want to free up the disk
|
||||
echo space in your account, remove the .bochsdlx directory from
|
||||
echo your home directory. Example:
|
||||
echo " rm -rf ~/.bochsdlx"
|
||||
echo Please be careful with rm -rf because it can make a mess.
|
||||
echo ---------------------------------------------------------------
|
||||
exit 0
|
||||
BIN
bochs/build/macos/CWPro3_project.sit
Normal file
BIN
bochs/build/macos/CWPro3_project.sit
Normal file
Binary file not shown.
300
bochs/build/macos/bochs.rsrc
Normal file
300
bochs/build/macos/bochs.rsrc
Normal file
@ -0,0 +1,300 @@
|
||||
(This file must be converted with BinHex 4.0)
|
||||
|
||||
:#Q*[BfKc,R*cFQ-!FR0bBe*6483!!!!!!!!!!$GVKP!!!!!!!3!!!$ES!!!ek!!
|
||||
!!)-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!TLEf0SFbjbFh*M45j
|
||||
SER4cUQ&dEh+UFAKcG#"&H'0P!J"bFh*M8P0&4!%!rrrrr`!!!!!!!!!!!!!!!!!
|
||||
!!!!!!,3U'bJ!!!!!!!!kIJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!%!!!$rrrrr3!!!!J!#!!%k6@&M6e-J8h9`F'pbG$T
|
||||
0B@0)C@&NCA*c1J!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!!!!!!!!9!#!!%3%9!M%!!3%!!3!!!!!!!)!!!!!b2$)m!!!!!!#[!&S!%3,r$!$
|
||||
rrrrr!!!!!!!!!!!!@J!!!+m!!!!!!!!!(i!!J!#!!!!H!!%!#J!!!!!!V`"DJJ!
|
||||
!!$&b!!!!!3!!!!!!!!!!!!!!!!!!!!%!!!!!!!!!!!!!!!!!!%!!!!!!!!!!!!!
|
||||
!!!!!!!!!3!!!!!!!V`"D!!!$!!!!!!!!!!KHCfPQ)!!!!!!!!!!!!!!!!'&`F'`
|
||||
!!!!!!!!%!!"D!+m!5!!!!%J!!!!!+-m!!30(58B!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!!!!!!!!!!!!!!!J!!!!!!!#!!!$rJ!!#!J)#!J+!!!i1+bX#!S!!&"3m2!)#J!"
|
||||
lHfPT"!5!!(4dCQB3%)!!YE@QTJd0J!#eY3`-#`Z!!1EQhYjfGS!!NT)0$3S+J!$
|
||||
Ki4iH$`q!!-6%V+`5%S!!JB%0$3S+J!"kHJm2$!b!!0IA(am4%B!!`F'TU4NCJ!$
|
||||
cml+bUUU!!1RTjZE8e)!!GA80$3S+J!$Gh6`m+bZ!!,Hh)5%A&i!!(Ki#!TUDJ!$
|
||||
0cE@e'aZ!!,DfQjX'"S!!H(KZELJSJ!$VkqMSfYU!!&YE$3d,#i!!6Nik1V+bJ!#
|
||||
3!*!!2$`+#S!!6Nif0UDQJ!#KS5)L%4'!!0hGFR*YEB!!bXUbXLSUJ!$ZlYE@DQU
|
||||
!!"iH'KS#!S!!mr2`m0VDJ!"fGQjZ1MU!!1(Kc-`P*B!!0MBH(U1MJ!!N*!B'!`1
|
||||
!!)U+HRSq2S!!4%3l1`3%J!#'KLFR(4f!!"NC&KB$!i!![lqNT!B'J!"$3c`m%K+
|
||||
!!1VUeYE@eS!!%K)5%JS+J!$LiXE'3N+!!2[lp[EDfS!!D'KGA4`FJ!"-6#!J#`Z
|
||||
!!0rIdY*LBS!!(4dH(JB'J!#m[*LB4ND!!)k1I(`2$i!!LiYjH33%J!$)b+bX"JD
|
||||
!!,qrTkFc-i!!JS+#JS'"J!$@eKSD$3f!!2Ihm[,@eS!!&48`-!B'J!$HhXV+EQk
|
||||
!!!i1$Ji,#i!!PjH1MX2$J!$@eV1c$3f!!,@eEQjVDi!!q[Vkq[VkJ!$3d,5d"JD
|
||||
!!0E@YlF5%S!!JS*eGEZlJ!$QjYVDEQk!!0VDfYVCfB!!Q*L%K!B'J!$kqZ$JhYk
|
||||
!!+UUUDQTUB!!TUD9P438J!#2Mi'"+bZ!!"`F2cm%")!!2cmm2$FhJ!$5dVDf-M+
|
||||
!!'PT@eX'"S!!pI@q[VUkJ!$1cKJB$3f!!*qIRTkEQi!!&KB$!`)#J!#ZVQeYD@Q
|
||||
!!12MK)4qIS!!Rjm4%3`-J!$QjVkq%K+!!'*L@eXX,)!!5dY&45NTJ!"483N*"3@
|
||||
!!#BQ)5%#!S!!-c-D'U+LJ!"mI#JS'KU!!(amE'bfYS!!eG@m[!X,J!#[Vkq[V+b
|
||||
!!++LPTBq2S!!hpqhYl1cJ!$dp0rIfpZ!!!S+#JS)#)!!b-JB'!`-J!"fGQ*LAPk
|
||||
!!0E@UUURTi!!eYDkZJB'J!!Z,LSU&"5!!0lHEQi+#S!!RTk)L!B'J!$Nj0rI[,b
|
||||
!!-c-bXV-c)!!m[,@eYE@J!!R*cBf#JU!!0lHcXk#JS!!aF9qIRPjJ!$2ce"34dH
|
||||
!!-R*a-5bXS!!EfpLBPjHJ!$fpXV+YVD!!&YE6Nj'4S!!XE'TUGcFJ!"ZEKmI'4Q
|
||||
!!*UDLSSM)i!!-c-b-M!`J!$DfS+#%K+!!2[ljqIQjS!!`-#'KSD'J!#9PBQ*ZlZ
|
||||
!!1,LfYU#JS!!HRTD@PTDJ!$kq[EfeYD!!%P*#3N'"S!!KiGlHlZlJ!"GA9PC06@
|
||||
!!0lH`m1r[i!!TUCQCQ*LJ!#1MSU+8P+!!1(KZVS0$B!!9&4*538&J!$LiY$3%K+
|
||||
!!&*58P*58S!!hYlHhYhGJ!"LBQ*LB'#!!,DfVUl'aS!!r[lqr[lqJ!"E@dG(VUk
|
||||
!!1,L-M)Q*S!!`X+TUDQTJ!$YlH$JhYk!!0A9Q*L9PB!!cmr1cY$3J!$amI$`lqq
|
||||
!!!B'"JB&"B!!lZl@eYE@J!"eGA4dFR+!!-$!&aF0$B!!Rjp99948J!$YlH[VeYD
|
||||
!!-[,`-!0$B!!)L)J)!S+J!!U+LSU+5Q!!0E@eYE@eS!!4dG&484%J!$Nj1,LeYD
|
||||
!!"B@-M)#!S!!iq1q[J`-J!$DfVkq"JD!!"XE'KSB')!!R*b)L"38J!!Q*Miq%K+
|
||||
!!+UU&"30$B!!P*58P*16J!$mr2EfhYk!!++LLSS'"S!!4NB[,kDQJ!#cXk+L$`q
|
||||
!!,Li3%!k1S!!fGPIAeC@J!#`X"89$3f!!1$J,LiG(B!!cFfq[X("J!$0cCZEQCQ
|
||||
!!$Xl"38&"B!!hYl-c"B@J!$PjGIAeG@!!#dY,Li#!S!!2Mib-M)bJ!"58NY,4dH
|
||||
!!&PC6Ni9&B!!CQC58UkZJ!"A9eC@9PD!!+kZTkI'aS!!Sk13!*!!MSk!!2cmm2$
|
||||
Vki!!,LiZ,LdYJ!!Q*KB@!J+!!$Bf8P)U+S!!CQC99E5dJ!#YVCqIXE'!!%Y,5dY
|
||||
+5S!!p26Sk1EQJ!$%a-6%b-L!!1cXMSk+LS!!jH916N0$J!"SD"SD%a1!!)+#%a-
|
||||
0$B!!`F'q[Y$3J!!J)#!J(Kk!!-R*VUi0$B!!m[,DfYE@J!$Sk1MSjqH!!&pIAPj
|
||||
FA)!!XV*58Nj1J!$)b#3N'KU!!$Xl,Li*#B!!q[VDfYE@J!#+LK-6$!b!!+UUQCN
|
||||
R*i!!+#J5%JS+J!#DQMdp-M+!!)1$L)L!J)!!iZ,LiZ,LJ!#!J(amHRU!!#`X+bX
|
||||
)#)!!DfX2$``-J!$HhYA9dp1!!*qI&aF0$B!!%K)5%K)5J!$TkFA&#JU!!"B@&KB
|
||||
5%S!!B'"58J8&J!$fp[EfprH!!,'aPjF-$)!!Ji0bFK%4J!$bmZlZeYD!!0VDeYE
|
||||
@eS!![,blZlbmJ!"UDQTUD@Q!!,Li&KB1$S!!p[ECfGE@J!#bXTD@"JD!!*16&"3
|
||||
-$)!!`F'fYU5NJ!$ZlYVDeYD!!)k1MSk0MB!!1$Ji1$FhJ!#5NSU+!J+!!1RTRCf
|
||||
@PS!!+bXK)4SDJ!$TkGMB%K+!!*kH,bmK)B!!JS*QCQCQJ!#RTif0#`Z!!0VD-M)
|
||||
Q*S!!,5dR*`)#4dP'1$PK@J#[!1F!!!)#!JiV!K3m!RYT"(4Q%,@Q$E8-#qEHGT)
|
||||
0#Z%H$m5X%S%0#RS2$0FI%F'T'I1bUZRQe(80#Ydm+lFK&ai#QXfe'lDE"RKZ+1[
|
||||
SfPX0#dikXT!!2!T10UDK)K(GFQh+XLVZeQSH'J,cm0TfEMVKc#8f(U-N"J1+HMj
|
||||
%1`5'*adC&J1rT!C$2",UeYB5%JVLaN,lpYTSA4a-)![IdQ)G(JDmQ%D1I!q,H36
|
||||
)V!DrTc1#JS(@'JhhmYB9-!EHbQi1$JZAMX2@X`feEQ[kq[V3Y!E@Ya+#GE[QfQl
|
||||
DfYQBK!Eki0kUUDQQP452J5XF2`3r2$I5YM*T@`Ee[VV1'!fIRTX@!`+ZE@RMK(k
|
||||
I%3cQ[K*L@ba,45P4#38Q)3)c'U*m+"TmE,E9[!Z[VkbLPMlIYl2dhpX+#JM)'!a
|
||||
fBPl@UUI@ZJBZ+K6HEJUHL!ENhlc-bXcbeYBR0JVHcS,&IRR28%I*a,*[BPlfbVC
|
||||
E6NDaUGaZ(aQDLL-c-M$DJK,ljqE!KSD9LE[LfS*k@PVkpYC*#3D(HlYG@6AH`lq
|
||||
QCQ+1LP,KZJe853ALd"*58P,HhYeLBQ#fVXEqr[jE4klL-LE#UDRYi0l9Q*A2cY$
|
||||
am1m'"JAZeYCeG(,!&`fI996YkpE,`!dL)!SU+LR@eYC(486NiYB@-J,M[JcD[JB
|
||||
E'KLFL"3Q2K+U&!f8P*2mpYkLLJC',kDcSJqi3$VCAeD`&3hJ,Kh0[X(0QjNl"3A
|
||||
Hc"EPep8Y,J)q-M*55dGC6K9Q8UjA9PDZTmDMN!#1r2$V,LiY*KB#0P)UCP@dVCq
|
||||
a5dY+p1MQa-6)l)k+j8j$D"S6JK-0`El3)#!HbDi0mYV@k1MRAejFXP*1b#3D1bi
|
||||
*qYV@LK--UTNR+")+QMdbJiL!iZ,LJ(ak,#X)D`m-hYA6RaF0%K)5kF8+&KB5B&)
|
||||
&p[EhXCF-Jh)4mZl@fYE@[,ZmDQTTZ"B1pYR@XTB'Na3-`EDNlYV@MSk01$JhNSS
|
||||
#kCf@+b%DkGJ5RLmKJQCQTid,fM)Q,5F#,!!!!!"D!+m!3!Mq!#-*(%L`S-'$#"-
|
||||
UA-L3!1'`KT%`14*&%BR&LaBGBGaSND,(Mb"$L[4i594*NU)FB8)BkL($)48GbG5
|
||||
)4'6(N5G,RM4CNq+PQMp0#[8CG1G1EbaG-U3i8k-SLp-`SCZ+EXL3!%KA%rBXk@J
|
||||
)9A45V4B8KJf10%dYdZCLpr(5Y+3%!3aF!XfE0fKL0ShbpJD9-TP)N!$9kiQNhLK
|
||||
4!+L*SXE('bUN[qSY3G@Z(DV"@)FX!4$C'lC$!#JG'[BY'+m@QNB&UdGC&"pUPeJ
|
||||
0QrBi8Q5",38#f-hlPm!KBP$a4X9+)P"4ShMc(S9%*99-5&C'FV668F(0[1#8a9C
|
||||
@'ZT$GS,qD8VQ*eNC12$5`p0H*MdF1#fUZ0aGF*Sh4mL8!cKFX*(qhD,i4`8QhA!
|
||||
fa#8!AM)-!+J-B`i!M84#"@H4f!2!-!X#8%mNQ`"JcbDD-EJ&JdKYjKY"Z3f%L6G
|
||||
2hIG44c9&*a!51Y&S(3`i`S#"4GjJ-J3%+&%N`L#$f$F0"26NJKjhCF&4L8qjN!$
|
||||
&R4)XIS513D&NiJd'kr$!JbH9d%4B48raj#@14+E*3jTU%VRQ)'[bd*-M4'+5c**
|
||||
-DXHGGZqYpek6D@QA(RIZ`@&#&fYk!PLCBilN%6R$f"2+$h9GSX`cbPcLSd#BC!,
|
||||
!$d0-`p-d@GQQhc"HjY*#,QLK"NHVrQN0#NpCkQN#4a@CB25L4cf"9")58b%c5LL
|
||||
SN!$cJaQmCC)*0)p`kLNjBN@53!)ll,"+"!XJ8-@fZcecL5hLS+HR"qr-JJ8$$2b
|
||||
j(UhBT'F#!$@a`dk[[*DC%dAHM2*%+1D3!!2!PGiJ`iHPj,bK6#JkX2,I0Cm3!%!
|
||||
'G'#&K$Z(*%$,P394L`!$UlaM`#VR-S!)V@LTDUX*QB688c[$)-XE1BqX8)3KZi5
|
||||
JJMNZZ1#T+iSS8Xl23!1G44C4r'#)2R2-XX1dddjK`"3lR'&!"!Bd$I88UcJ6MM0
|
||||
#,)RHH[3NQ@3PPG#$Ud9Lm+(I$qV!SXBT(m3`E$l'rZ##h5kiR-RqAe'KX`k0Pea
|
||||
5$akm2*%*-4PNXmS8Cqb3!1dCN!#Id3!RjElc$LH3!&rp$J,CB,%i*eAXPSNCHSa
|
||||
M$6-Qr3$!*BjimLB2pEL`QcQM32-$16LEdqrG,N$M-J"[6&-93N0iNb%jhV46ccI
|
||||
8&+2+0GLq-d8#$8bq#J)4B*[ppPc)X!XLqi`McbTRd()(R&jf%B)RkhJ#`85"Xr)
|
||||
l!1B38)%D#Ub`!Jj%R2+f'J!NJMT8aaXcf1-5"f#%2KE)3(e8J!RT5-FplT'%IU"
|
||||
!1@E3`[e1i6m!rSm!RYT0YZMJ*5$j"!#)mK)2eX&#&VTM0fEB3a"`B)&ie0!#k4K
|
||||
!#%))J%aF``,qr8Y(&,V!3aGd3ADmqF%23QJ'2#MJE4dF!4*rd!88T+*fd)"'i(B
|
||||
L#RDiJ45HB"m,Na'#&,V*6D436KXkk$m1HY#0DP"%%HCBK#!8)BjZG1-DGN11*lC
|
||||
4MN')"Ji%L3-l!K#1S0M0$m3KaKCf5BASid%A%1@Q1-(TM&p5"MAm*ETr$#!D(-a
|
||||
M'dICaM$d`e1C)!!849N%#bb#KhaSacVBG%Ed4I+5Ah)$4AEcNhXKJ452E"-N[65
|
||||
N5#*K#BrJBE*S%),rp1B0N!#N*5eI0iMfkG)S60P8*&*8%,"iJeifF4d(+(",&FE
|
||||
*R)-B%LPm3K&*8)#BFCTPqhV&49'3!!*M#rlK*N3)!TCT81!9(QN("54aLB(U""!
|
||||
8!))M"NT28I`c+1jmKNq3!1"1CHb6*D'iU%BhbY'0kP-K&@P18`#6NHC`"*aP%NQ
|
||||
0KK)5R3bPRR"jb90%kT5RG18jB+&+Y!UbPC4NCLT5S3T#[(%[S331+3IjD%*LFT1
|
||||
CHS0895Q93QMN%@pi4DJ%'3+6X1%GY@K#("-9#P+aT*4)b%8J5cM4,eMKL%IXjK%
|
||||
JH8CbpY-1Q3!J2hc)&'Xmj)dP)+-NJV%1@Ld%!$5N*aM#XF1VNV-,e34M&+UUaB,
|
||||
-83Gal(8BYFK&,Z5M'mlmJV"['-*Z50S4i9(&2rTKK6ImXk(0f!-k#4VqE54-0&X
|
||||
)+3%E`9L2fS,K"rmX)4,H!!!dd1%(5J"J&m)iKR"ria86P*8JGU%*Vf)d%&&J!K0
|
||||
#3B*!6!+6S@#&+$84`CT%8"*2&*-8iQJ"2B3aN!"T)1'TM[!$NkiLN@Ni`US&#FA
|
||||
U6()5GNKhTLQeL&[!BK*([+j,-1""MJD4B$Cj*)bZ)e)b@U!R26'T81YaMc6#C"(
|
||||
T#)5iYc8"+0+%!@q3!-)Lm`S`QAlLKNIq)"4mX)Fpq-!($)8L&2Q!"LTd4iiH+p%
|
||||
-CP#Q-hI$(8hBkX,[XG@Xm[5UY+4&%e8!a3V[dbK`p[3M,ai'0#!e%DY+05+H#S8
|
||||
M-M8m2b6J$2,3([j[KL%198QM$0)i#b+baBeDU#9XU+'(HR14T,24kmrJ2)R`a,#
|
||||
[PS4L&1j`Kii"`)GR@130MqJ8!-K"%&P-kaeBQ-!F$S%%GRLJ!6YJaM,Q))YCD)d
|
||||
,h,$'&*aQ!!C%S"0EABq63aG5AmAS1+*3aL0q)#NPiZdE3q!N+N"J#P0FS!NqZ!&
|
||||
[@2!*GhcM#r*B@J0QX3X!#'&D(3+!1`BLM'RY3"l1B%!+UT''flBV6dmf9+j%X3N
|
||||
9+#F6+'K#'2))`#D-)J3jbpQaP"-&RbNL#%()3Y$+)A"3-'%4ah9!')V!M@`XS'1
|
||||
Vb-BihJ&UDf&"(J`)4`4Z`D"Z(#)AKdL$,IiXBBXd())Y*J'!P$e"#TV-4!c8q-%
|
||||
6KS'+BZ&-"ITZd)0i+4@&k(Fh*L$%1+l9J3l-BJ*,SaE6V%@eMh(#!*EE3DXMm#j
|
||||
bZ!-*IZ#'2$M"$$Ke!3!88CYb@"#0YkR$"6A(QGh`"SfGm`BD9%K*Mi!+J3ALiK2
|
||||
kq-30&Z%%!3LJ&$d)3!"k%!FC4#!$A6!($3LiQa#S)`b("'!4&R%02N,!R*)-J5-
|
||||
GbB00S!)DS9"(2hS"L[QKJ!NEI1-T`J"j043K&IB3XMh1iAEHG+%*'b5PreD!F0i
|
||||
JJa3*IX!NaN'(L8cA$5iBF649q-*2T@,H(36J$'XBMhLN)aj*L-)L"[l3MqTlhiD
|
||||
$r-GZ90#2&AcI"ZIS`V&8F)d"H0m#+iJ'%3Ml!aD6!J+EEq%+*6RL5pU5"rP43#c
|
||||
3"[fMHSF85U-%4DX%3(XdDAk%J!VB3853!!kp`%1K3!@2K(RPC%jIK`3YjL@iC%P
|
||||
[iRpHFJQE`(LlJ3Tl3!3,q%D'`"Xhi%Bii$!&Y!QB)%eXmMVRY%)3F"a&N3NCK3l
|
||||
fp9)XP4)3-#3m8%b4"),$*),Sj!P8j4&(1%h5e$ipH#mRS4)ap4,V8#86G3P!3!&
|
||||
'B",+3!'qm$F8S!&HJP$(-!ML8!*H!!3N%BB8F!`mi5&%8d!k@-SC2i3PIeK"
|
||||
+e9&CK3lIe"Eq,"8i4$%8lq9KK*K8'I@)NML*([9FP(L*Q*KIPRJ33c!4'$&5)N9
|
||||
6STJ4BX)4!2CR43%82YK,21&65E@*"h&VJ&'+!1BS,S@)4%J54F91['K8V,1&#Y&
|
||||
GS[J4Q@%9Al&6"3%r&9%39S'-"8&849K9`*J3-"'+d[9832898q'-!f&mA)%91,@
|
||||
0J6J%PD"CZ(J*Bk@*%"%6*08LaaL)XAJ89l@0"S&NUh+2ZF"1*C'1+&*@Cc9E*l*
|
||||
G2h%4pq80bS!+hp!Fhi!+-C)5MNJ3p0)9AS%+[c80G4&VVk)UU+%*Z8J4`2L2D58
|
||||
3[q"AMm!+*LP40E%*F#88e,!*#1)4'Q,q$dX`NfrJ9a5"$0dJ@-U`)3,a$EaJ'YT
|
||||
K'Sq9&MpT'#8"GK44$e3JNdY!"Fp`&B0B%#Y#@M5P%5IaAZk&P+eSA3-4N3Ha9B6
|
||||
5C+JaPNEQC%p@PQDj@I-"NK55(`PT%Bp`'IF9&CL3!"pX44MHd!f03"FHSJaU!`f
|
||||
X!&LMB"e[F"ZEJ3IF)3LmB3HDX*!!(P)29Z&jM"B-l8)*MA!-`S%%b3!2R'9@rpK
|
||||
HDV-%(E%*I!#CTH*E[q%4U,NCMB!1#!*fVfNGY%9Ee@B(P*!!(-F3#DYT@qe#(l3
|
||||
e%%1`$E!S%94@Lalj'e%"&'ma"$8"%kjT%YpP9,dS#ZcM*L@K#8U3!"@KrM+%hQ"
|
||||
Zf!#2rAJ3pZ886986AE&G)+&GN8!4%Y'+NI#F3b%#5NKP)V!1kQ8VF&!'3i"GTH@
|
||||
G`Z#*%q%)q)3ES5#%3q&IZN)QM1)MJ$-RYR4,DU+-&"&'mZN*da!VjdBSA#80,$)
|
||||
0hZN(SZ)6$iN9fl"I[c)6RFBS,8@GF3)$P94,1*JQ[H)*J`!@CA"Nfj'MHr)HAl-
|
||||
ZVr)R66)Sf(!SVq-*90C8Zd)4T!##lU"%j2"jS*G&0BF+0h-h5k3X@0T$@DSI93!
|
||||
)KG)Z2*TN6bB05aD@6()SF0+&dS9bMN)4AV31jK!T0,G%30CMmc0NH-SES@"ZVk*
|
||||
NB,NR6NB2K1)HrL+f*Y0`BQeU,leS$U%J+DM`#jIL,BiJ2#VL+BpK+CNLS&La$"1
|
||||
!"9bJTqT&TR&@-TSP$AZL(Ri#$r5J#DYD"@DJ%68e%[4b&1L3!!N0-JVfJ+XheRD
|
||||
08DN-)LU#j@fVX!!4J!Aki@4+BKE5F!8HJ`A1d!Q`SQITGM+jFK'b@QXe!KD2B!m
|
||||
k0Jam!!fld3Lr!+lK#QD64K",GchCJJ!)3+cX5U`,%!l0S!G5!!ri%$@cX$%-3!C
|
||||
Jk4j3PM)TT6)*kK(SJ!5-35bSm"04)5UMB!i%-5$2`Nq6m'fd`&i#S35d3![Bm"Z
|
||||
BF+mEJ`@@-`A[-+`-X!#RUJQXmKkK8jkik2k$2-%+YG-[2IB@b2!,$'*@BV!Ehk!
|
||||
`Ze%!Ra!$,+!054!1fB!2da!+6d!0c*!!!(IJ$T[`9`2KEHJbYHK5$Arb(V%#$e#
|
||||
QPEAQ+rA`FiV%V5T!$[S'!+cJ$YF3")T35)SJF%"c$J!!#cjE!q13!(40B`!'m(6
|
||||
9X!f#F!Gh)!@6`$46i!c1N!!#,E"NJi)HUeSbmD'90&)2XDFI8H!f(%3%-I!%qH!
|
||||
#1(FhZp%2E3Y`!aFdLX!%FI!*Bj!!!hhJE9M!#3RJ0!M!#8[c$Z2!!-i!XZ'@2FF
|
||||
J,[#K@CU&"00J*%J!)0R''pUJ"T!!4frqS`@6BU9VTabK)"RYm!Bqm!)c9%JirS!
|
||||
$+k!#NkX,94!1A0!-qc!"(5!2i4!1$#"aib!qf4"ZYmX&fm)!l$S,eM#r%e#rG0!
|
||||
#J3-J!+C*qJ'%MUSlqBBhHE-E5p!McIJE!m'c!,!05Y1kll!!dFBd%X`dCj!!03r
|
||||
h$N[$#3M`"C@R(hKJG*1`*NF8JT@d$Ym!$8q`C3*X0bi$$6`N#U5L%1fJ(293$cT
|
||||
3$jH!#%3l$V#EG0@#"3X`"3K30Gjf"YMcDPFK$(mJ2Pb(2Pp(%FU!$%K83#PFFf3
|
||||
E`$RcH6bd"+6`Zk9b94*""Hlf+8l3Gi)RH$e3#M,`F*b!"4(3$&[`$I93EEDR$NP
|
||||
!!-d%!#D3!!,i-%Y,f!Aq+Y"bE-%+,U`F,Y!2DT!!"$['1rVf!bZJ"MP!@-Va#kb
|
||||
$#G0`!!f8b303aJ)3H)*A#J&J$Vq6#5kJ!+dAH3"N!mRL$ZB%*!#JHCXR!K2K$ZD
|
||||
!JMd8Ea9!ErrM389`F2p"!!d8"Yjh!PX`aQr("!F)4`"%!'1maa0J$Cdk"r@%)&h
|
||||
!3Rl32Zf6$1[J9TR3"8R`IIe`$FT%$L0`J'rd2d63")NdC$p3[20QcQkd!ZZX5+L
|
||||
3!!rXS#Mma5YZi!KZ)%BK)'9,Z%,E$%1TJ-id4(diP!6&l%aQ!!lFphhLP`RrB!2
|
||||
B&`AJS$-T5%5li3,YehdfY!9"pJ1mZ-m3d%L1"!ST42j0F-*$6!"(#3K)f2YphfF
|
||||
"1("((Y5!,J!,Te"(qL26haGrLK"+6k")e*Pr,)4jr+I5AT*'[*%%NDI-,Jf"SK5
|
||||
"$8J1$U"l#4KpTd!%ED!,bN%0R)I8Ip`&*#L#Jh!*he"l2l!)b-a'8Th9F!3,""3
|
||||
+#S#!@Dd'&R""cc5#CEf"+J3"Q4!#,fT*Z14rJm!1-+Y-S+!1r32A(64[Hi"+MaG
|
||||
+DM#"jr!l,X!+ILa01KM3kl$222'DfH8'4mL%KVf$NE319*!!)FT"$Vd`"JG)"1!
|
||||
!3leJ!bLJ6+1`T$(D*[mh6kc)+e%a+I"cLlr5cq+eJ@U#6Qk#"0r!"jcd(jQ!$+,
|
||||
q54'AapFiH%kHi!CFG*8BJ)cFj"8V%SA6L346L$jJ3!&)i0Flb)4!SSLL8!Kl5-*
|
||||
[`N)3S%[k@"'!k(1`#*a'LK-Q-9#!i!YJJ!6Qp!aJi!Z!!)*%XJj!)!N16K%$03M
|
||||
eJ1!Xj!PLi1"'J%fN-+,k[9&#f#[ZP"-KlJ9Hi)%3i%qq-!KH8!)pq"(ZC"&Z%)C
|
||||
!J!6Yi!9LU+3$UP&4Z8rHN!#'`!!)ib5(Pf!%!`8%Vj!!8#8"$"33K`d1"%UqNTG
|
||||
!iQ!SKX"3!K6`&SrB%KLbj9cHj9jZBcGQD--3jQ'H4E8XC2pK"ZB!$@0qBfhqjA!
|
||||
HjffZjA*HjhCqjhLHjhFHLIkCf1GpML&q(ZLB11ElC)JSPDL)RZL+AK'8LK#%hK!
|
||||
KHP)PC9+5,ZNVkP++Q1Qh'#3QJH8'mHJ-%5-S1P+M6ZQ9IQX+bL[Be*&2FC@+k1K
|
||||
m(ScX#+ZQ1&eYZZPF*0km@%qiH*bI(ZXJCBhrPDJeXZVL6GbYRZb*1*fZq1[V')V
|
||||
@qL,h9C!!aFP19(AXiMf`bMkG1I',"`(U#c&6T&84aTK6laL,eJkFAY'-i1Q&ZmL
|
||||
2!`(Z)#AZd[9Hf@MZ3B83e1%4eM'2fTMM!Q&mc!l[!L([5dA[YfCDjRiPi$NM3h&
|
||||
6rhl!`%N@IDS*E(%[""m*"Sm3iUiVphAZSIi49RA[ApEq#VH&(UfLNEdS@-lH%#&
|
||||
9RNL`lJe[%$d&mF2666ZDmQJ"9Vr0mJ9"k$Blb5&CA5T+N!"[%)$)S!c0iF8*iBd
|
||||
T!Gj,B#(3m&Z4J'5`BQ4JeBZA!1Ya-4Fb4L'Ai&EQS&Vhi3MIm!KL-JS*#3"Za3I
|
||||
DaCHE-&XeYKp2Ea8!S*1HJ9J!B!I5m&LUSKVe`!IQm!JX`b$Y-&[J'[F&(q[r+!B
|
||||
RXTI)B!r)J!aMIa'M-"JH83r)J"K8CEE3m!ZI0C+(J4cei21ce5'8B"VFm9K$f3)
|
||||
rf3fMMj3P34HJE`mR!ZiJqIK8m!hfS!bk*P%8m3cQX!N8X3RQS!b)m3f,-3ScE&'
|
||||
5rZ&A*A(jkKPF'e)*['!(8K!DC,!,TB%+Y9!,jP!2`B!-Uc)-LP%2`c$$aj!!#cZ
|
||||
E#j8!HLpK(iH)kQhKZlplpemBmed*AJBa"'AD,J!"$`iF6CTDj$T)lf#,&Z*DD#+
|
||||
)N!"KVPa93N@+Y%5MaMFB-8jcY)4929'1[%hcKZ55U#AeA)kXYd58+#51N!#S&18
|
||||
4TkK,5$aLK!#-%MDL4!Fb,%K3fN##5CP#T'H`iX9)!!"Sl!B03,e)MUa5BrA)UKK
|
||||
(2@dL!d$0CEeZ5aaK3KFh,LDINC!!c14Ceq-5!,b+BK2i80SS!-(L$SQVT)a!10L
|
||||
82#B+6jT&M&BpeJ2`UbS!QcG[L[lbKQl)k&m!h&'K-P,CY%B!S#eT$8#($J#SH&V
|
||||
eb9FchdEB[[80CJi!T@qS!0MMfVV4-H2"i2%phQLd%K08V9j(Y535*UZG26Y#2(T
|
||||
)kde,8(Gl*UUdGYe$N!"BRBNlBqEj[p!GXQ2FDV!KkqFh3NF*E+`D3J`!'[N*R@f
|
||||
X!q#R50$aKTADC)+1UjrmLf5)DAJUM3T(*2aP#&'X@XNUC5,CK$iUk,-+MKCfZ5U
|
||||
5dX5S$)"$I+020`IcSDS4"$dD`L5EPRKNP&&NZL6"EdC""TP'IQRbNRT'@@f*8HT
|
||||
"4a3MmGTNP%HH'@868ZCT4)G,RU''Pfm1q@@6VYaTK"9dK+(q"!eHkTN')f8DXG#
|
||||
M8+Kb-"*[[((%1laQmXJE6$"aC+DkH(*[3d64@FR45`BC4)4+24%"dd&QJN-*MaK
|
||||
G&)PTLK)')h43`L63B3$pDBK"EF,V,NFp%Q8D5A[#D#CdbTSTb5&@X[85%6SGa*1
|
||||
52&PR(BS3+Q1)l@KbK*eTr#JUVN)a!DR9Rei0p0H82M[88@pj`SYA%5qCTPLIGXA
|
||||
V@%aj3)*34a##!al'bX$Nd&1,fR#PPEb4pPZU9V@e8(*YY662VLbGD3JH-)@KiSS
|
||||
p*HA3P85Bq#4-+XPPUEq8)+L5ZkB4N!!S*C*"pa*(!SdNP"mBaN[KFXZp"#j[dN@
|
||||
#"ajJr["jBTrRpE4B6cJpPZ1Si2QV+-Cbm8-*TZ&4BZH"#rBS3"-!Z,NN3fYPZ&j
|
||||
-,JjDQ+!(%ATLY09@9K42"d(RBhUB0UTTICR#'ak$@T!!KM%PX#9UkjNFQDCC3Mf
|
||||
MkHC+13jkk+'*4[YYYKheCT!!)6!TBk#k0fHXXEq1JXKcE2)0(*5dHE#h8CVZqQ`
|
||||
R4hlQB4fe@r%%Jf551AYYb*1GUA)Bd%Q'RXC%&hed[*QDU2LQ63"PE4iJ)-AQa-'
|
||||
qC+9+JJk&4clXXBH2lBF"rdraSB('((0F-#166+jMRre3M0IFU)NB)MfbcJGL2ZK
|
||||
TSZmXFA)eCJF%H0!+FS5#Hkq#"LVqb''1(ra!IHf$B!6Cpi1LK+jiG-ZA3+3b%'N
|
||||
XT3TGQ0Jk["'pcl#$(@#MLF!U*3Tb$--HS5"(*NE4L%Hi`afr'!AhZRFGlM%TKcU
|
||||
d"cRD&`SH##0i#XQAjc4B%,i"aRljqL$D-%!+*,#$GDZV9E#db"0c'"#'9(V'-j6
|
||||
a$(D0DRhQS)XbaTJcMj6'I4"J#$hN1"'*N!"1Ai!C(N%8`Mbd3H"V+,696J6@3Mk
|
||||
8$aPUc"8k()51p8%$#BMd&MiQm3i%4#!#9E$+--4"MdU8SB04q8-R1L%1K$J&$Kd
|
||||
X#"1VS!))M*!!C[qMQFCbp32bN3-D2@K%0eK"KACi5e@0G-3Ek[ibK%RXi"d,L!!
|
||||
#YQB9FdJ%)4f8KLcH-BYX-#!0$%R)Xjj&MbUB3@%R,"FXY9LTZ+#L%FL`ac!55)i
|
||||
&aK!DhQ)N!-LK)@P*)3%*f!%@NVQ+pQN#AdR8e`6HB3!%-)!E5q'J31iQ$40N`S3
|
||||
R2+%i(A8c6!aK5D%`KaPLZ$jbE#m8d-M%LH**MTrF%jpB3+BP-a!"3Yb##bm04c1
|
||||
q8"4m'"-,P9b!%jd''(Jdp&"KZf,A5K)hC(b8'Sd3MPA)BBBIm-%P6e"'2(p3dRZ
|
||||
H!3(bQ-8ik"!,!`b8%fIJ""DF%9-`B%-@8jM#1eEKM!JmB+F$-3JQ*bV1QK3VABY
|
||||
baa-qL[k+4kL`(G"i`XZfd`fTrZ3"*hf(,%5cUQ8N3!+A1)NST#Q2"@#"%fMPa#`
|
||||
@`)!&+"%1%QN"*Q2CZYA4LLH9`J3`H$%-9)"8N6q4%#D@G!P@)'&p2jK'UfB3L6X
|
||||
dB"Aiq)N(%[!!"rNK!Cc)"J)'qSjhB)%"$)K&C&cd%(d*EU,AGG3V9`)-C2""J6m
|
||||
`Jb+lJ4PS9+8G+G,"LUbLJ"X!J!#I`!8!j%&FNBbL'JR!aa"5Jl9l6Q%"#d!!&UV
|
||||
jAd[`G'm(dB4FKGS6BXAb%ShJ!cPqi!)AQ1-CN8JI!-b"$J$m"J$GF-Ik!&!!4Rc
|
||||
L#EhB`#Si-B%rJ*FAY%K!-13*$Ij[H-5Ncm@a-kT4[m"!C(30EGh#jRSA-@a#L'C
|
||||
i!LSD51%IN!$M$IU*JL)88BiJP-2+","+-@#KM4`ii`chE%!$*V!0@54J%Y3!`!p
|
||||
1&!PKA1'H1h"'R0-`0IXaCRj9b)6r`LQ+0fa#+pI*a$#fX!Y8R'r#CJ$!!)+3!!9
|
||||
&-$S,9SDdP9h`!fh8S4Ucf)&*m@N!!qc!d`-p`cXimHB%M#21h"J)h4M$40$+pBT
|
||||
hBB9q!,d*)UK"$A[B3LK8S13*Vfm&@3M#P#-GD8@S!392B-3mZ$'&rVjM"ja'3#@
|
||||
aB&*Q*q!-cRLZ(LL433h5Jb+f@a4Fe)HAGSa#a0Fj4kh9F!TErX1#&fXS0*0GB*9
|
||||
rp+-F`!lfX+fX#&1JJ!PGH%)1JX!'@R"#ZCTqacLbm3jVF%+Yf&j!"[)"LBJF*"I
|
||||
IdG9YZ+D-F`0J#d`S3KMB[@k5Af!BjTXdK4(0[K$Ni!@-aX'8(feP0B5!#IGST#Z
|
||||
qd)%*C#-FiC!!4`0fd)!TF')9@$!e!b+`J'9@33El'%I81c#,$X5#$*8#3*lEdA%
|
||||
!'+)#)fIh+G+KK5G-HX)6R[4eH'(&rBRM$@m3KabJ%'`,J%)&LdK"CI2jhfa-S!2
|
||||
MN!!(YTmE$JBi)a[M-)!qR5'$E"cqXLZH3!SQ-!&VH#!qA%YKV0YRKM8BiJN[6'!
|
||||
$PmaNUlMq)j'ML83V4)!"4iJ$'Mq`LJVdJ1Q`VQ)"q-bdTKX!jKe-i3c-hX%CN!!
|
||||
HL`fXr$TiQ$SG4#'#,S4!GBGLa6#Z%iTGK+,3+L#(#N32MAaN'!#V%3h-(L4%UmK
|
||||
M&9DYj'8pM8p0plk5#$J$3CdpK8VHBS*iX-)ihL%"Y)'L#j&6QmG4KP"iJRaJS*4
|
||||
$1`S$UHYJ&p36[bGSRaM3KJe!"-26[fScU4h!+I9E[fHcT'C`Kb4""dX`[`CBKSN
|
||||
"K8a`"0QCPiRaK0,)Ke&!"3ScK`8k(d6,K!8NNGc#QN#C"[DK!T%BL8Z`JRfD!Nr
|
||||
E[Gj,*J2`2GmcJ*4L!(%B!MLS"X$MrS3'Z!1e!38!8!QA8BC(N!#eV,-(!k3`XbY
|
||||
$@i+pXG#9eiU99I''8,!+D&#'ELL'!,$$!)L$If!!HAJ(SU-kCrL#I8J",UL#+VL
|
||||
&3K5a+XJ!&GX"CS#(aaQ%,C`*0lU1(eL%G###Mc+(3T1`-R5""')I9(J'8q("aCU
|
||||
')rJ%"8L#HlJ"F!J!!4#!(VM$!#L&(JL(E"LVI`!&'RJ#mV1+De#!8f!h($L(V!1
|
||||
!*jJ(5)c%2"-&+NJUUmL%IcL(D&#$'fJR&b!(*J1[FcJ"imZNGM!9Z-#%!f!%I6"
|
||||
(IF!&A'#%!R!#@#b&1bb&Ij!!!4UJJAN$Y"KB0f%-1hDc!4(l!3MqN!#F6!L"Sk'
|
||||
Ldl)(pXQ%,DJe*JJ"-mL`,X!"NE-eEIL(pN%&XcL#FMc(Ff3%@,L(GT6&(NL&44J
|
||||
L)K!jNG0(NUY)UkJ#1r!8(QL85`#!%'L@QLa)83Lap[Q(%b!jNY[(-&#$-)#&Jfb
|
||||
I40M)Fr`%#iL(TBb(!HL#pZ'&&E#eUG6(8eJ"AEL1$$!r,+J'6e!GV#1'QK6,GF!
|
||||
!Gb!I9&J$&HJiFaJ")YM(I!3l0B#&81Li+)#&6h#!H(!&!S"$K!`"!UJ!@aXj`95
|
||||
$0X$+6*U(+j!!!0mDKc[S`PS"J,!FbfEa"(Ii!A2J!aZ)"`Y)JNAB3N$6!QT-5EL
|
||||
8b&0SJM#%S2jSY)'hl%PE8iIf-BHH@3G23)*+N!#&UjX*+h)%8S!!&3!KRaR,bP5
|
||||
U*&L"cGa-TAa+pM%(EDJeB34+08J(&2"'#FS("f"0GLZ!&'5I")+'8"!&FC!!TCT
|
||||
`"!LB6@B*JIpc(Z!86J!`Je4J0b*B!D9F5J[SKh2SJR0c!A"!!A[-ZQZ)JMD)Ke4
|
||||
)6Q+iJ3'i"KA!$J*BJ3T)KF2-K#jB"(ASKhlB!QKJTa9D(9)J"@C*KTS8JI1-R"C
|
||||
%'hH`L[BmK@+cY5,!!3Z3!-qP[)&&X-G-!)8)C8UQY)#+I0!NB%SE1)GVi%qV))C
|
||||
&d-cja!(#5,-'fmh*V%NHm$qed4fI-G*-B2i#X!Xl05J#&Bh2'Zf('Th2&5##)P#
|
||||
$0E#+(l#!)-K5TP5(+$J(!R!&TP`"('K1#%`c8H"0CQ'@b43Drh[*Y&N(pQN$`Da
|
||||
5Z,65))J'(&L"q$a8(!"6`Jc6-CA+NBZ'q&4+q6c8)1M*8pL#%K@&XHc3f'NF6!'
|
||||
&jRR5LB%!2mh(5a9'3,8e&)h,5a96HF)"4P8$&,e53"djBK3a9##&XI68!2382A8
|
||||
FY5R9kqL#'fK1@eA9UEa84K@j`h3""@K0`5bfYm5"'d$3%[d&0`$1aR&5*ie%ddN
|
||||
Eb&Q#0-`k-d!"#cM9G+9+4Ke-B9a*&eL"`@4A@b1#'`L"kb#(6A!%S2i*eYha9Kj
|
||||
3!G24(3#-R(9SKfriXc%pKhL9ef9Yc9-)JhjBZ9j39PNP!KZi9[CN"8rJeR!083#
|
||||
-RB`"J1Cj(+&"Qdia@3J3!h1Va#jBf(Pp@*(EJj@,!ANGaL4)6UYSK*lT@)rYeYM
|
||||
abQ"*-diK'T-Pf0bj")4Y(e")"EH8eDTm6DYSJX%NJL6ic%bUJr6NeS%03"l`K)*
|
||||
NX"(K'L4`!fC"fD*eRSr&P$F`8[E*"h@!9VJm"5*J!@JF!#+i@(,9-#V3fSlP@Tr
|
||||
a"$G!Ph3"$H%)fjNS@aiifl2TeVFC"!KJKEj%5"8)K4K3J(6Jc`N,aBeY`ClY9q#
|
||||
%!)K"PlG3*2kkh)QI+P['-GU29FC"@)G,-%X*fMal%!-khG1J8GeJ"GUl%*KDbDe
|
||||
[HDH8N!#Pl1,0GAM*cRAFaPd(CG!"2[$'8+!#`JA)YH%BP-hGhGfL&%+#LR)9UKJ
|
||||
#6`!*a6Q8$89Hb6RHmhe*fL`AJ&6F6-%8i`A1f46F&GU*DHK""`'A0JcDF@UCC9%
|
||||
EAk!!52cAj"d%$'#B5j!!"!SJi*-0h0-Lh*,`*I',K2b&QF[*Q2kYRX&e"!V`KFC
|
||||
&Ak)4SF'p"!U3!!6dABI3a4PcZ9m*TQ!*hJj*'5H9@!)+S)"A5'![3!*-13B+m!)
|
||||
!jS#e33)[U'&*N!#%5jKKAr!#$K$LGR#$'IECJJ5@K-&9&"H'Q4DQiJG4ha35"51
|
||||
J!#!)PJ4'!M#JJ(E!&"(Ji%%3BbVJhCRJiN)iQMUJ!'-3"@2SBJf1i#Xf'$`1&-4
|
||||
)#35QJ-&pK6mQBEa3"K*H"`i'PJa1i"3#JLjHLAB)C%R`K"A@Bib`iNS'%Jl1'$m
|
||||
'"P&i"5r!#bm!C8mHia8Di5KHL88@"5!JR$bJJ$c!j#U'P9M'#&HQi4,`K@F3AP%
|
||||
!!b&q"8")&b!)C"*Z"f#3!)416Z9#8"3Ji!!++!&BTQAmRH9S&Mr%!)Rr'GbZ%4Y
|
||||
+TQEm$3J!1`!!"`#Z!(i!"`!"!!%!!`!$!!3!!!!0!!`!%!"D!&S!b`$,!#J!8J!
|
||||
!(P&eD@0V9'PYCDSJCA3JG@iJC)jMEfe`FQ9cFf9eFJ!!+!"A!!8I4dP')(0[ER3
|
||||
JFQ9aG@Pc)("[GA)JGQPcG@&XDA0PFJ!S!&`!(!aMCA4dC5"TE@&RC5i!!!!!r`!
|
||||
!!&[8T5562q8b-!!%!!!!!!!!!!#k*S3PZLD%*3!!!!!!!!!!!!!!!!!!!!!)Bf*
|
||||
[G'KKEAN!!!!+BQpMD(-ZFR0bB`!!!!!8,5"cCA3JGQ9bFfP[EL"dEb!b,M!!!!!
|
||||
$,!!,!!!!!!$0!FB!i3)!"!*25`!!!!!!'3!'!%X"fBL"9'KTFb"cEfCdGf&bC5"
|
||||
TFb"bC@aPBA0PC#"eEQ4PFL"dD'8J4dj9)%a(8%`Z$8C[FL"YEh*P)'PZCQpbE@&
|
||||
dD@pZ,#"bC@&N)(4SC5"QD@aP)#G$6e"C58j(*b"TEQ0XG@4PC#"TEL"dD'8JBQp
|
||||
MD(-JC'PcG(*TBR9dD@pZ,L!J!!!!!!!!V3!'!0%"ZSK@6@&M6e-JF'pbG#"LH5"
|
||||
%BACTC#"#BA4dCA*SB@dX)&4TE5"6C@jPBf&X,#"$D(*TFh4[F'KP)%*[G'KKEAN
|
||||
JB@jN)%4KEQPPE#"(D@e`C@aPGQPMD#i!!!!!!0)!"J$e!EL)E94SC5"#Ef0SFb"
|
||||
dC@&Y)'Pc)'a[EfYTEQFJCQpb)'%JE@&TER4KD@jPFL"QEh)J3QpMD(-JEfiJ6@&
|
||||
M6e-Z)!e*CL"jEh8JG'KTEQXJH@pe)'0KEL"SC@a`,#"`E'9KFf8JBfpZG'&MG#"
|
||||
eFbi!!!!!!!!&!!B!&J(1L"G#Ef0SFb!b,M%Z-5!JCQpb)%eKBdp6$3!!!!!!!%m
|
||||
!"J#$!Fq)XP0[GA*MC5"MEf4P)'C[FL"#Ef0SFb"TFb"KGQ&TE'&LE'8JCR*[E5"
|
||||
dD'8J3QpMD(-JD'pYC5"`B@GP)'&d)!eSG(4`1Lm[BQpMD(-ZFfpeFQ0PCQpbCf8
|
||||
ZEQ9d,L"8D'8JC'pMG@ePER4KG'P[EL"TFb"[EQaTEQ8JBA3JD(4dF$S[,f*[BfK
|
||||
c,R0[GA*MC@C[FQGP,QjPG#pNEf-[C'pMBQp[DbpTEQ4PH#jSG'eX)#i!!!!!!)B
|
||||
!"J#R!Fb)C8PQ)(P[G5"hEh9XC#"XD@YP)'0[ER4bD@*eG'8JG'mJG'KP)%*[BfK
|
||||
c)("bEfTPBh3X)("XC@&cC5"UEfPZ)'PZ)#"dD'8JBQpMD(-YC'9fC@a[F'9bFb"
|
||||
YB@PXD@jR)'aTFh3Z!!!!!!!!%!'j!,m#%d!#!)!!!!!!!"!"Z3#r!K0!!J#!!!!
|
||||
!!!!3!EN![`)63!)!J!!!!!!!%!'j!,m#%d!#!)!!!!!!!"!"Z3#r!K0!!J#!!!!
|
||||
"!!!!0ZJ!!$AS!!!!Je028P3(fJ#!!"`!EJ!$4%P86!!!!#*%6%p(!!!!,P"*3e3
|
||||
!!!!kBfYTC!!!!%B!J2rr!!!bZ!3[T"3!J!!!!!!!!!3[SH3!J2rr!!!!'33[Sp`
|
||||
!J!!'!!!b@33[T%J&3@*[GA318(*[DQ9MG'pb)%4KG'%aNJ:
|
||||
BIN
bochs/build/macos/bochsico.bmp
Normal file
BIN
bochs/build/macos/bochsico.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
12
bochs/build/macos/macos_defines.h
Normal file
12
bochs/build/macos/macos_defines.h
Normal file
@ -0,0 +1,12 @@
|
||||
#define NO_ASSEMBLER
|
||||
#define USE_WITH_CPU_SIM
|
||||
#define PARANOID
|
||||
|
||||
#define fileno(A) 0
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
inline long read(int fd, void *buf, std::size_t nbytes);
|
||||
long read(int fd, void *buf, std::size_t nbytes) {return read(fd, (char*)buf, nbytes);}
|
||||
inline long write(int fd, const void *buf, std::size_t nbytes);
|
||||
long write(int fd, const void *buf, std::size_t nbytes) {return write(fd, (const char*)buf, nbytes);}
|
||||
#endif
|
||||
30
bochs/build/macosx/Info.plist.in
Normal file
30
bochs/build/macosx/Info.plist.in
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>bochs</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@VERSION@ Carbon</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>bochs-icn</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.sourceforge.bochs.bochs</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Bochs Carbon @VERSION@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>Bochs Carbon (@VERSION@)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>BOCHS</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
0
bochs/build/macosx/README.macosx-binary
Normal file
0
bochs/build/macosx/README.macosx-binary
Normal file
BIN
bochs/build/macosx/bochs-icn.icns
Normal file
BIN
bochs/build/macosx/bochs-icn.icns
Normal file
Binary file not shown.
70
bochs/build/macosx/bochs.applescript
Normal file
70
bochs/build/macosx/bochs.applescript
Normal file
@ -0,0 +1,70 @@
|
||||
property bochs_path : "Contents/MacOS/bochs"
|
||||
property bochs_app : ""
|
||||
|
||||
on run
|
||||
tell application "Finder" to get container of (path to me) as string
|
||||
set script_path to POSIX path of result
|
||||
|
||||
-- Locate bochs
|
||||
set bochs_alias to findBochs()
|
||||
|
||||
-- Tell Terminal to run bochs from the command line
|
||||
--Use the script's directory as the current directory
|
||||
tell application "Terminal"
|
||||
activate
|
||||
do script "cd '" & script_path & "';exec '" & (POSIX path of bochs_app) & bochs_path&"'"
|
||||
-- Wait for Terminal to change the name first, then change it to ours
|
||||
delay 1
|
||||
set AppleScript's text item delimiters to "/"
|
||||
set the text_item_list to every text item of the script_path
|
||||
set AppleScript's text item delimiters to ""
|
||||
|
||||
|
||||
set next_to_last to ((count of text_item_list) - 1)
|
||||
set the folder_name to item next_to_last of text_item_list
|
||||
set name of front window to "Running bochs in ../" & folder_name & "/"
|
||||
end tell
|
||||
end run
|
||||
|
||||
-- Taken from examples at http://www.applescriptsourcebook.com/tips/findlibrary.html
|
||||
to Hunt for itemName at folderList
|
||||
--Returns path to itemName as string, or empty string if not found
|
||||
repeat with aFolder in folderList
|
||||
try
|
||||
if class of aFolder is constant then
|
||||
return alias ((path to aFolder as string) & itemName) as string
|
||||
else if folder of (info for alias aFolder) then
|
||||
return alias (aFolder & itemName) as string
|
||||
end if
|
||||
on error number -43 --item not there, go to next folder
|
||||
end try
|
||||
end repeat
|
||||
return "" --return empty string if item not found
|
||||
end Hunt
|
||||
|
||||
on findBochs()
|
||||
try
|
||||
if bochs_app is "" then error number -43
|
||||
return alias bochs_app
|
||||
on error number -43
|
||||
-- bochs_app no good, go hunting
|
||||
try
|
||||
tell application "Finder" to get container of (path to me) as string
|
||||
set this_dir_alias to alias result
|
||||
tell application "Finder" to get container of (this_dir_alias) as string
|
||||
set one_up_dir_alias to alias result
|
||||
set TheUsualPlaces to {this_dir_alias as string, one_up_dir_alias as string}
|
||||
Hunt for "bochs.app" at TheUsualPlaces
|
||||
set result_alias to result
|
||||
if result_alias is "" then error number -43
|
||||
set bochs_app to result_alias as string
|
||||
return result_alias
|
||||
on error number -43
|
||||
--Give up seeking, Ask the user
|
||||
choose application with prompt "Please locate Bochs:" as alias
|
||||
set result_alias to result
|
||||
set bochs_app to result_alias as string
|
||||
return result_alias
|
||||
end try
|
||||
end try
|
||||
end findBochs
|
||||
1365
bochs/build/macosx/bochs.r
Executable file
1365
bochs/build/macosx/bochs.r
Executable file
File diff suppressed because it is too large
Load Diff
117
bochs/build/macosx/diskimage.pl
Executable file
117
bochs/build/macosx/diskimage.pl
Executable file
@ -0,0 +1,117 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1991-2002 and beyond by Bungie Studios, Inc.
|
||||
# and the "Aleph One" developers.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# This license is contained in the file "COPYING",
|
||||
# which is included with this source code; it is available online at
|
||||
# http://www.gnu.org/licenses/gpl.html
|
||||
#
|
||||
#
|
||||
|
||||
my $fullfolderPath = shift(@ARGV);
|
||||
die "err: No folder specified" unless defined($fullfolderPath) && length($fullfolderPath);
|
||||
|
||||
$fullfolderPath =~ s{/$}{};
|
||||
$fullfolderPath =~ m{([^/]+)$};
|
||||
|
||||
local $folderName = $1;
|
||||
local $folderSize = undef;
|
||||
local $imageName = "'$fullfolderPath.dmg'";
|
||||
local $imageSectors = undef;
|
||||
local $imageTemp = "'$fullfolderPath-tmp.dmg'";
|
||||
|
||||
local $mount_point = "bochs-image-mount";
|
||||
|
||||
die "err: $folderName is not a directory\n" if(!-d $fullfolderPath);
|
||||
|
||||
# Know a better way to get the first value from du?
|
||||
($folderSize) = split(m/ /, `du -s "$fullfolderPath"`);
|
||||
die "err: du failed with $?\n" if($?);
|
||||
|
||||
# Inflate $folderSize for disk image overhead. Minimum 5 MB disk
|
||||
local $fiveMBImage=20*(2048);
|
||||
# BBD: I had to raise this to 20meg or the ditto command would run
|
||||
# out of disk space. Apparently the technique of measuring the
|
||||
# amount of space required is not working right.
|
||||
|
||||
$imageSectors = $folderSize + int($folderSize * 0.15);
|
||||
if($imageSectors < $fiveMBImage)
|
||||
{
|
||||
$imageSectors = $fiveMBImage;
|
||||
}
|
||||
print "Minimum sectors = $fiveMBImage\n";
|
||||
print "Folder sectors = $folderSize\n";
|
||||
print "Image sectors = $imageSectors\n";
|
||||
|
||||
# Create image, overwriting prior version
|
||||
`hdiutil create -ov -sectors $imageSectors $imageTemp`;
|
||||
die "err: hdiutil create failed with $?\n" if($?);
|
||||
|
||||
# Initialize the image
|
||||
local $hdid_info=`hdid -nomount $imageTemp`;
|
||||
die "err: hdid -nomount failed with $?\n" if($?);
|
||||
|
||||
$hdid_info =~ s/( |\t|\n)+/~!/g;
|
||||
local (@hdid_info) = split(m/~!/, $hdid_info);
|
||||
|
||||
local ($disk_dev, $hfs_dev);
|
||||
|
||||
$disk_dev = $hdid_info[0];
|
||||
$hfs_dev = $hdid_info[4];
|
||||
$mount_dev = $hdid_info[4];
|
||||
|
||||
$disk_dev =~ s{/dev/}{};
|
||||
$hfs_dev =~ s/disk/rdisk/;
|
||||
|
||||
`newfs_hfs -v "$folderName" $hfs_dev`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`hdiutil eject $disk_dev`;
|
||||
die "err: newfs_hfs failed with $err\n";
|
||||
}
|
||||
|
||||
# Fill the image
|
||||
|
||||
`mkdir $mount_point`;
|
||||
`/sbin/mount -t hfs $mount_dev $mount_point`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`hdiutil eject $disk_dev`;
|
||||
die "err: mount failed with $err\n";
|
||||
}
|
||||
|
||||
`ditto -rsrcFork "$fullfolderPath" $mount_point`;
|
||||
if($?)
|
||||
{
|
||||
local $err = $?;
|
||||
`umount $mount_dev`;
|
||||
`hdiutil eject $disk_dev`;
|
||||
`rmdir $mount_point`;
|
||||
die "err: ditto failed with $err\n";
|
||||
}
|
||||
`umount $mount_dev`;
|
||||
`hdiutil eject $disk_dev`;
|
||||
`rmdir $mount_point`;
|
||||
|
||||
# Create the compressed image
|
||||
`hdiutil convert $imageTemp -format UDCO -o $imageName`;
|
||||
die "err: hdiutil convert failed with $?\n" if($?);
|
||||
|
||||
`rm $imageTemp`;
|
||||
|
||||
print "$imageName is your new diskimage\n";
|
||||
99
bochs/build/macosx/make-dmg.sh
Executable file
99
bochs/build/macosx/make-dmg.sh
Executable file
@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Make a DMG of Bochs. This script must be run from the main source
|
||||
# directory, e.g. "./build/macosx/make-dmg.sh". If you haven't run
|
||||
# configure yet, it runs .conf.macosx for you. Then it creates a
|
||||
# temporary directory _dmg_top and does a make install into that
|
||||
# directory, and builds a disk image. At the end it cleans up the
|
||||
# temporary directory.
|
||||
#
|
||||
|
||||
VERSION=@VERSION@ # substituted in with configure script
|
||||
VERSION=2.0.pre4
|
||||
BUILDROOT=./_dmg_top
|
||||
INSTALL_PREFIX=$BUILDROOT/Bochs-${VERSION}
|
||||
DMG=./Bochs-${VERSION}.dmg
|
||||
|
||||
# test if we're in the right directory. if not, bomb.
|
||||
echo '-- Is the script run from the right directory?'
|
||||
if test -f main.cc -a -f bochs.h; then
|
||||
echo yes
|
||||
else
|
||||
echo no
|
||||
echo ERROR: Run it from the top of the Bochs source tree, where bochs.h is found.
|
||||
exit 10
|
||||
fi
|
||||
|
||||
# test if configure has been run already. if not, run .conf.macosx.
|
||||
configured=0
|
||||
echo '-- Has configure been run already?'
|
||||
if test -f config.h -a -f Makefile; then
|
||||
echo yes
|
||||
else
|
||||
echo no. I will run .conf.macosx now.
|
||||
/bin/sh -x .conf.macosx
|
||||
conf_retcode=$?
|
||||
configured=1
|
||||
if test "$conf_retcode" != 0; then
|
||||
echo ERROR: configure failed. Correct errors in .conf.macosx and try again.
|
||||
exit 20
|
||||
fi
|
||||
fi
|
||||
|
||||
# remove any leftovers from previous image creation.
|
||||
echo "-- Removing leftovers from previous runs"
|
||||
rm -rf ${BUILDROOT} ${BUILDROOT}.dmg ${DMG}
|
||||
|
||||
# make new buildroot directory
|
||||
echo "-- Making ${BUILDROOT} directory"
|
||||
mkdir ${BUILDROOT} && mkdir ${INSTALL_PREFIX}
|
||||
if test $? != 0; then
|
||||
echo ERROR: mkdir ${BUILDROOT} or mkdir ${INSTALL_PREFIX} failed
|
||||
exit 30
|
||||
fi
|
||||
|
||||
# run make and then make install into it
|
||||
echo "-- Running make"
|
||||
make
|
||||
if test $? != 0; then
|
||||
echo ERROR: make failed
|
||||
exit 40
|
||||
fi
|
||||
|
||||
echo "-- Running make install with prefix=${INSTALL_PREFIX}"
|
||||
make install prefix=${INSTALL_PREFIX}
|
||||
if test $? != 0; then
|
||||
echo ERROR: make install with prefix=${INSTALL_PREFIX} failed
|
||||
exit 50
|
||||
fi
|
||||
|
||||
# create new disk image
|
||||
echo "-- Making a disk image with root at ${BUILDROOT}, using diskimage.pl"
|
||||
./build/macosx/diskimage.pl ${BUILDROOT}
|
||||
if test $? != 0; then
|
||||
echo ERROR: diskimage.pl script failed
|
||||
exit 60
|
||||
fi
|
||||
|
||||
if test ! -f ${BUILDROOT}.dmg; then
|
||||
echo ERROR: diskimage.pl succeeded but I cannot find the image ${BUILDROOT}.dmg.
|
||||
exit 70
|
||||
fi
|
||||
|
||||
# rename to the right thing
|
||||
echo "-- Renaming the output disk image to ${DMG}"
|
||||
mv ${BUILDROOT}.dmg ${DMG}
|
||||
if test $? != 0; then
|
||||
echo ERROR: rename failed
|
||||
exit 80
|
||||
fi
|
||||
|
||||
echo "-- Done! The final disk image is "
|
||||
ls -l ${DMG}
|
||||
|
||||
echo "-- Cleaning up the temporary files in ${BUILDROOT}"
|
||||
rm -rf ${BUILDROOT}
|
||||
|
||||
exit 0
|
||||
8
bochs/build/macosx/pbdevelopment.plist
Normal file
8
bochs/build/macosx/pbdevelopment.plist
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>PBXProjectSourcePath</key>
|
||||
<string>/Users/bryce/bochs/bochs/bochs.pbproj</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
bochs/build/macosx/script.data
Executable file
BIN
bochs/build/macosx/script.data
Executable file
Binary file not shown.
2712
bochs/build/macosx/script.r
Normal file
2712
bochs/build/macosx/script.r
Normal file
File diff suppressed because it is too large
Load Diff
10
bochs/build/makeall.sh
Executable file
10
bochs/build/makeall.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in build-*; do
|
||||
echo "*** Starting make in $i ***"
|
||||
make -C $i
|
||||
echo "*** make done in $i ***"
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
done
|
||||
48
bochs/build/redhat/NOTES
Normal file
48
bochs/build/redhat/NOTES
Normal file
@ -0,0 +1,48 @@
|
||||
Here's a useful usenet article that shows how to build a filelist
|
||||
instead of having to specify each one.
|
||||
-----------------------------------------------------------------
|
||||
|
||||
From: John Ross Hunt (bigboote@mediaone.net)
|
||||
Subject: RE: Newbie to build spec files
|
||||
Newsgroups: linux.redhat.rpm
|
||||
Date: 2000/07/27
|
||||
|
||||
|
||||
> So, is there a better way, in RPM 3, to populate %files?
|
||||
> Because I know
|
||||
> 'buildroot' and it has nothing to do with %files.
|
||||
|
||||
I found this bit of code in a .spec file to build a %files list on the fly
|
||||
and have been using it ever since. I've always thought RPM should be able
|
||||
to provide a default %files list in the event one isn't present in the .spec
|
||||
file.
|
||||
|
||||
--
|
||||
John Ross Hunt
|
||||
bigboote@mediaone.net <mailto:bigboote@mediaone.net>
|
||||
|
||||
|
||||
|
||||
%define pkg_name foo
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
cd $RPM_BUILD_ROOT
|
||||
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
|
||||
find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
|
||||
-e '/\/etc\//s|^|%config|' >> \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
|
||||
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
|
||||
%files -f ../file.list.%{pkg_name}
|
||||
%doc README TODO example
|
||||
-----------------------------------------------------------------
|
||||
81
bochs/build/redhat/bochs.rpmspec.template
Normal file
81
bochs/build/redhat/bochs.rpmspec.template
Normal file
@ -0,0 +1,81 @@
|
||||
Summary: Bochs Project x86 PC Emulator
|
||||
Name: bochs
|
||||
Version: @SEDVERSION@
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Group: Applications/Emulators
|
||||
URL:http://bochs.sourceforge.net
|
||||
Packager:Volker Ruppert <info@vruppert.de>
|
||||
Source:bochs-@SEDVERSION@.tar.gz
|
||||
BuildRoot: /var/tmp/%{name}-buildroot
|
||||
|
||||
%description
|
||||
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, Pentium Pro or
|
||||
AMD64 CPU, including optional MMX, SSEx and 3DNow! instructions.
|
||||
Bochs is capable of running most Operating Systems inside the emulation
|
||||
including Linux, DOS, Windows 9X/NT/2000/XP or Windows 7.
|
||||
|
||||
%define pkg_name bochs
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
||||
tar xzvf $RPM_SOURCE_DIR/bochs-@SEDVERSION@.tar.gz
|
||||
if test "/" != $RPM_BUILD_ROOT; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
%build
|
||||
cd $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
||||
CONFIGURE_ARGS="--prefix=/usr --mandir=$RPM_BUILD_ROOT/%{_mandir}"
|
||||
export CONFIGURE_ARGS
|
||||
sh .conf.linux
|
||||
make
|
||||
make unpack_dlx # must use prefix=/usr since this step sets up
|
||||
# the paths in dlx bochsrc file.
|
||||
%install
|
||||
pwd
|
||||
cd $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
||||
for i in "" usr usr/bin usr/lib usr/share usr/share/doc %{_mandir}; do
|
||||
if ! test -d $RPM_BUILD_ROOT/$i; then mkdir $RPM_BUILD_ROOT/$i; fi
|
||||
done
|
||||
make install install_dlx prefix=$RPM_BUILD_ROOT/usr
|
||||
# Build list of plugins on the fly (if any). This allows the
|
||||
# spec file to support RPM building with or without plugins.
|
||||
cd $RPM_BUILD_ROOT
|
||||
find ./usr/lib -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
find ./usr/lib -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
|
||||
-e '/\/etc\//s|^|%config|' >> \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
find ./usr/lib -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
|
||||
$RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
# We could use the same technique to produce the complete file list,
|
||||
# with only one very minor problem: it lists directories that are
|
||||
# used by other programs, so when you remove the package you get
|
||||
# errors like
|
||||
# error: cannot remove /usr/share/doc - directory not empty
|
||||
|
||||
%files -f file.list.%{pkg_name}
|
||||
%defattr(-, root, root)
|
||||
/usr/bin/bochs
|
||||
/usr/bin/bochs-dlx
|
||||
/usr/bin/bxcommit
|
||||
/usr/bin/bximage
|
||||
/usr/share/bochs/*
|
||||
/usr/share/doc/*
|
||||
%{_mandir}/*
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_DIR/bochs-@SEDVERSION@
|
||||
rm -rf $RPM_BUILD_DIR/file.list.%{pkg_name}
|
||||
if test "/" != $RPM_BUILD_ROOT; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
%preun
|
||||
# clean up the bochsout.txt that is always produced if you
|
||||
# run bochs-dlx.
|
||||
rm -rf /usr/share/bochs/dlxlinux/bochsout.txt
|
||||
%postun
|
||||
rmdir /usr/share/bochs > /dev/null 2>&1
|
||||
100
bochs/build/redhat/make-rpm
Executable file
100
bochs/build/redhat/make-rpm
Executable file
@ -0,0 +1,100 @@
|
||||
#!/bin/bash -x
|
||||
#########################################################################
|
||||
# $Id$
|
||||
#########################################################################
|
||||
# build/redhat/make-rpm
|
||||
#
|
||||
# This script creates an RPM from the bochs directory. You must run
|
||||
# it as root from the top of the source directory (where the configure
|
||||
# scripts are). Then just run:
|
||||
# ./build/redhat/make-rpm
|
||||
#
|
||||
#########################################################################
|
||||
|
||||
CAT=cat
|
||||
RM=rm
|
||||
CP=cp
|
||||
MV=mv
|
||||
MKDIR=mkdir
|
||||
GREP=grep
|
||||
ECHO=echo
|
||||
RPM=rpm
|
||||
RPMBUILD=/usr/bin/rpmbuild
|
||||
SED=sed
|
||||
TAR=tar
|
||||
RPMSRCPATH=_rpm_top
|
||||
SOURCES=${RPMSRCPATH}/SOURCES
|
||||
SPECS=${RPMSRCPATH}/SPECS
|
||||
RPMSPEC="build/redhat/bochs.rpmspec.template"
|
||||
TMPDIR=/tmp
|
||||
|
||||
echo Reading version from configure.in script.
|
||||
VERSION='unknown'
|
||||
eval `${GREP} '^VERSION="' configure.in`
|
||||
if test $? != 0 -o "$VERSION" = unknown; then
|
||||
echo Could not get version number from configure.in script.
|
||||
echo Exiting.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# clean up previous rpm builds
|
||||
${RM} -rf *.rpm ${RPMSRCPATH}
|
||||
if test -f Makefile; then
|
||||
make dist-clean
|
||||
fi
|
||||
|
||||
# make a TAR.GZ of the entire source directory, exactly as it is. The
|
||||
# tar is placed in $SOURCES/bochs-$VERSION.tar.gz. Because the current
|
||||
# directory could be named nearly anything, I copy all the contents into
|
||||
# $SOURCES/bochs-$VERSION and then build a tar in $SOURCES.
|
||||
|
||||
${RM} -rf ${TMPDIR}/bochs-${VERSION}
|
||||
test $? = 0 || exit 1
|
||||
${MKDIR} ${TMPDIR}/bochs-${VERSION}
|
||||
test $? = 0 || exit 1
|
||||
${TAR} cf - * .??* | (cd ${TMPDIR}/bochs-${VERSION} && tar xf -)
|
||||
test $? = 0 || exit 1
|
||||
(cd ${TMPDIR}; tar czf bochs-${VERSION}.tar.gz --exclude=CVS bochs-${VERSION})
|
||||
test $? = 0 || exit 1
|
||||
${RM} -rf ${TMPDIR}/bochs-${VERSION}
|
||||
test $? = 0 || exit 1
|
||||
|
||||
# create RPM build area
|
||||
rm -rf ${RPMSRCPATH}
|
||||
mkdir ${RPMSRCPATH} ${RPMSRCPATH}/SOURCES ${RPMSRCPATH}/SPECS ${RPMSRCPATH}/BUILD ${RPMSRCPATH}/RPMS ${RPMSRCPATH}/SRPMS
|
||||
test $? = 0 || exit 1 # test that mkdir succeeded
|
||||
|
||||
# copy source into sources
|
||||
${MV} ${TMPDIR}/bochs-${VERSION}.tar.gz ${SOURCES}
|
||||
test $? = 0 || exit 1
|
||||
|
||||
# copy the spec into SPECS. The template is in $RPMSPEC, and we use
|
||||
# SED to substitute in the version number.
|
||||
${RM} -f ${SPECS}/bochs.spec
|
||||
test $? = 0 || exit 1
|
||||
${CAT} ${RPMSPEC} | ${SED} "s/@SEDVERSION@/${VERSION}/g" > ${SPECS}/bochs.spec
|
||||
test $? = 0 || exit 1
|
||||
|
||||
# finally, start the rpm build.
|
||||
if [ -x ${RPMBUILD} ]
|
||||
then
|
||||
${RPMBUILD} -ba --define "_topdir `pwd`/${RPMSRCPATH}" ${SPECS}/bochs.spec
|
||||
else
|
||||
${RPM} -ba --define "_topdir `pwd`/${RPMSRCPATH}" ${SPECS}/bochs.spec
|
||||
fi
|
||||
|
||||
# test status
|
||||
if test $? = 0; then
|
||||
echo RPM build succeeded
|
||||
else
|
||||
echo RPM build failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# copy all rpms out into main directory
|
||||
ALLRPMS=`find ${RPMSRCPATH} -name '*.rpm'`
|
||||
if test "$ALLRPMS" != ""; then
|
||||
echo Moving .rpm files into the main directory.
|
||||
mv ${ALLRPMS} .
|
||||
ls -l *.rpm
|
||||
fi
|
||||
0
bochs/build/win32/README.win32-binary
Normal file
0
bochs/build/win32/README.win32-binary
Normal file
22
bochs/build/win32/bochs.win32.manifest
Executable file
22
bochs/build/win32/bochs.win32.manifest
Executable file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="2.4.5.0"
|
||||
processorArchitecture="X86"
|
||||
name="Bochs.Bochs.Bochs"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Quartus</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
22
bochs/build/win32/bochs.win64.manifest
Executable file
22
bochs/build/win32/bochs.win64.manifest
Executable file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="2.4.5.0"
|
||||
processorArchitecture="X86"
|
||||
name="Bochs.Bochs.Bochs"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Quartus</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="amd64"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
6
bochs/build/win32/cc2cpp
Executable file
6
bochs/build/win32/cc2cpp
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
list=`find . -name '*.cc' | sed 's/\.cc$//'`
|
||||
for i in $list; do
|
||||
mv ${i}.cc ${i}.cpp
|
||||
done
|
||||
6
bochs/build/win32/cpp2cc
Executable file
6
bochs/build/win32/cpp2cc
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
list=`find . -name '*.cpp' | sed 's/\.cpp$//'`
|
||||
for i in $list; do
|
||||
mv ${i}.cpp ${i}.cc
|
||||
done
|
||||
6
bochs/build/win32/diffcc2cpp
Executable file
6
bochs/build/win32/diffcc2cpp
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
list=`find . -name '*.cpp' | sed 's/\.cpp$//'`
|
||||
for i in $list; do
|
||||
diff -u ${i}.cc ${i}.cpp
|
||||
done
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user