sourceforge patch #423726. He writes:
> you'll find as attachment a little patch which make
> bochs support the double fault. currently, when 2 pages
> fault occur, bochs does not generate a double fault (as
> the Intel documentation says) but do
> generate a other page fault, which make a triple fault,
> and bochs will exit.
>
> this very little patch make bochs support this double
> fault, which is
> used in our OS in order to dynamically increse kernel
> level stacks.
To see the commit logs for this use either cvsweb or
cvs update -r BRANCH-io-cleanup and then 'cvs log' the various files.
In general this provides a generic interface for logging.
logfunctions:: is a class that is inherited by some classes, and also
. allocated as a standalone global called 'genlog'. All logging uses
. one of the ::info(), ::error(), ::ldebug(), ::panic() methods of this
. class through 'BX_INFO(), BX_ERROR(), BX_DEBUG(), BX_PANIC()' macros
. respectively.
.
. An example usage:
. BX_INFO(("Hello, World!\n"));
iofunctions:: is a class that is allocated once by default, and assigned
as the iofunction of each logfunctions instance. It is this class that
maintains the file descriptor and other output related code, at this
point using vfprintf(). At some future point, someone may choose to
write a gui 'console' for bochs to which messages would be redirected
simply by assigning a different iofunction class to the various logfunctions
objects.
More cleanup is coming, but this works for now. If you want to see alot
of debugging output, in main.cc, change onoff[LOGLEV_DEBUG]=0 to =1.
Comments, bugs, flames, to me: todd@fries.net
to plex86 on 5/14/2001 and said that it was okay:
> Yes, thanks to MandrakeSoft, the Elpin VGA BIOS 2.40 was licensed
> for use in _both_ plex86 and bochs. So you can distribute 2.40.
>
> Replace the text in 'bios/VGABIOS-elpin-LICENSE', with the
> same file from the plex86 CVS tree. Substitute bochs wherever
> plex86 occurs.
compile warnings with or without it on Linux, so it seems no longer
necessary. It may have been introduced to cope with the fabs symbol
conflict, which was already removed in rev1.3 of fpu_etc.c.
supported on more than just linux. Also since about half the options
said "Don't use this" I put the more stable/usable options toward the
top, and the rest in a separate table below.
signal. First, selection of the GUI should cause BX_GUI_SIGHANDLER to
be defined in config.h.in. Then, the GUI should define member functions
Bit32u get_sighandler_mask ();
void sighandler (int sig);
The mask function returns a bitfield where one bit corresponds to each
signal. For any signal whose bit is set to 1 in the return value of
get_sighandler_mask, the gui will control that signal. When the signal
arrives, bx_gui.sighandler(sig) will be called by bx_signal_handler,
instead of the default behavior of that signal.
1 or 2 hard disks.
- int13: check how many disks first, and only return an error if DL exceeds
the number of disks (ignoring bit 7 of course)
- added drive number arg to get_hd_geometry, so that get_hd_geometry can
retrieve the numbers corresponding to hard drive 0 or 1
- hard_drive_post will now set up the EBDA area for drive 0 if it exists,
then for drive 1 if it exists.
- made the code that fills 0x1b-0x23 for diskc conditional on diskc being
present; this was probably not necessary.
- added some code (still commented out) that will help in supporting a second
IDE interface.
since at present there's no way to actually manage this. To use both,
we will need to put the cdrom (or diskd) onto second ide controller with
a different IRQ.
Basicly what it does is, it help VGA16 find the syncing, because of the
technique it uses, bochs did not help it figure out the timing diffrences
with its one size fits all timing.
The 82c54 model (pit.cc) implements timer modes 0, 2, and 3 in its handler
functions, without caring which timer number is involved. However, the
I/O write code that sets the mode is inconsistent.
Timer 0 can be set to modes 0,2,3 only.
Timer 1 can be set to mode 2 only.
Timer 2 can be set to mode 2,3 only.
From a quick reading of an 8254 datasheet, I can't see any reason to
restrict which timer can be in which mode, so I think it's correct to
allow ALL timers to go into ALL modes that are implemented.
unfortunately is the same as the C library function fabs. Many
compilers seem to use the static one with no complaint, but others
don't like it. Just rename fabs, to eliminate the potential
conflict.
For compilers (such as Microsoft VC++) which don't allow "LL" after a
constant to make it 64-bit, this patch declares all such constants as
BX_CONST64(value). Then in config.in, a switch called
BX_64BIT_CONSTANTS_USE_LL controls whether the macro puts the
LL's in or not. Configure sets the macro, if you're on a platform
that can run such things.
- use Bit64u and other compiler-independent types
- moved contents of macutils.* into osdep.*.
- now in osdep.h, I allow all code to use the real library function name.
If that function is not available, #define it to point to the
bx_* replacement function instead. And cause the bx_* replacement
function to be compiled in osdep.cc.
- check for snprintf, strtoull
- check if empty structs allowed
- check for hash_map.h
- check for blank labels as in void main () { int x=2; label: }
- if debugger, turn on disasm too
didn't compile with some compiler.
- put conditional "#if BX_HAVE_HASH_MAP" around code that uses
<hash_map.h>.
- replace calls to snprintf with bx_snprintf.
- arg1 of bx_dbg_watch is an int, not a Boolean.
- put /*comments symbols*/ around any chars after #endif. Other compilers
do not get it.
- fix cases in which a pointer is cast to a 32-bit int, then back to a
pointer. This breaks on a machine with 64-bit pointers. Examples:
FPU_sub arg 2 and FPU_div arg 2. The int->ptr->int conversions are
now done more safely by macros REGNO2PTR and PTR2INT.
- use GCC_ATTRIBUTE macro instead of __attribute__. For compilers that
do not support __attribute__, the macro can be defined to be nothing.
- in fpu_entry.c, arg1 of FPU_load_int32 is (s32*), but the calls to
it cast their data to (u32*).
- if compiler does NOT inline functions in poly.h, the "extern inline"
setting caused duplicate symbols to be created. Changed them to
"static inline" so that the mul_32_32 from different .c files do not
conflict.
- implemented setcc so that it doesn't use curly brackets inside parens
- comment out sigcontext structure definition, which conflicts with
non-linux or non-intel operating systems. It's not used by bochs anyway.