some INFO->DEBUG/ERROR cleanups
This commit is contained in:
parent
baeeb6d99c
commit
28885e4973
@ -59,7 +59,7 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
|
||||
if ( descriptor.segment ) {
|
||||
if ( descriptor.u.segment.executable==0 ) {
|
||||
BX_INFO(("jump_protected: S=1: descriptor not executable"));
|
||||
BX_ERROR(("jump_protected: S=1: descriptor not executable"));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
@ -67,14 +67,14 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
if ( descriptor.u.segment.c_ed ) {
|
||||
// descripor DPL must be <= CPL else #GP(selector)
|
||||
if (descriptor.dpl > CPL) {
|
||||
BX_INFO(("jump_protected: dpl > CPL"));
|
||||
BX_ERROR(("jump_protected: dpl > CPL"));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* segment must be PRESENT else #NP(selector) */
|
||||
if (descriptor.p == 0) {
|
||||
BX_INFO(("jump_protected: p == 0"));
|
||||
BX_ERROR(("jump_protected: p == 0"));
|
||||
exception(BX_NP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
@ -105,14 +105,14 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
|
||||
// descriptor DPL must = CPL else #GP(selector)
|
||||
if (descriptor.dpl != CPL) {
|
||||
BX_INFO(("jump_protected: dpl != CPL"));
|
||||
BX_ERROR(("jump_protected: dpl != CPL"));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* segment must be PRESENT else #NP(selector) */
|
||||
if (descriptor.p == 0) {
|
||||
BX_INFO(("jump_protected: p == 0"));
|
||||
BX_ERROR(("jump_protected: p == 0"));
|
||||
exception(BX_NP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
@ -177,7 +177,7 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
|
||||
// IP must be in code seg limit, else #GP(0)
|
||||
if (EIP > BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].cache.u.segment.limit_scaled) {
|
||||
BX_INFO(("jump_protected: TSS.p == 0"));
|
||||
BX_ERROR(("jump_protected: TSS.p == 0"));
|
||||
exception(BX_GP_EXCEPTION, 0, 0);
|
||||
return;
|
||||
}
|
||||
@ -190,18 +190,18 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
break;
|
||||
|
||||
case 4: // 286 call gate
|
||||
//BX_INFO(("jump_protected: JUMP TO 286 CALL GATE:"));
|
||||
BX_ERROR(("jump_protected: JUMP TO 286 CALL GATE:"));
|
||||
|
||||
// descriptor DPL must be >= CPL else #GP(gate selector)
|
||||
if (descriptor.dpl < CPL) {
|
||||
BX_INFO(("jump_protected: gate.dpl < CPL"));
|
||||
BX_ERROR(("jump_protected: gate.dpl < CPL"));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// descriptor DPL must be >= gate selector RPL else #GP(gate selector)
|
||||
if (descriptor.dpl < selector.rpl) {
|
||||
BX_INFO(("jump_protected: gate.dpl < selector.rpl"));
|
||||
BX_ERROR(("jump_protected: gate.dpl < selector.rpl"));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
}
|
||||
@ -230,28 +230,28 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
if ( (gate_cs_descriptor.valid==0) ||
|
||||
(gate_cs_descriptor.segment==0) ||
|
||||
(gate_cs_descriptor.u.segment.executable==0) ) {
|
||||
BX_INFO(("jump_protected: AR byte: not code segment."));
|
||||
BX_ERROR(("jump_protected: AR byte: not code segment."));
|
||||
exception(BX_GP_EXCEPTION, gate_cs_raw & 0xfffc, 0);
|
||||
}
|
||||
|
||||
// if non-conforming, code segment descriptor DPL must = CPL else #GP(CS selector)
|
||||
if (gate_cs_descriptor.u.segment.c_ed==0) {
|
||||
if (gate_cs_descriptor.dpl != CPL) {
|
||||
BX_INFO(("jump_protected: non-conform: code seg des DPL != CPL."));
|
||||
BX_ERROR(("jump_protected: non-conform: code seg des DPL != CPL."));
|
||||
exception(BX_GP_EXCEPTION, gate_cs_raw & 0xfffc, 0);
|
||||
}
|
||||
}
|
||||
// if conforming, then code segment descriptor DPL must <= CPL else #GP(CS selector)
|
||||
else {
|
||||
if (gate_cs_descriptor.dpl > CPL) {
|
||||
BX_INFO(("jump_protected: conform: code seg des DPL > CPL."));
|
||||
BX_ERROR(("jump_protected: conform: code seg des DPL > CPL."));
|
||||
exception(BX_GP_EXCEPTION, gate_cs_raw & 0xfffc, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// code segment must be present else #NP(CS selector)
|
||||
if (gate_cs_descriptor.p==0) {
|
||||
BX_INFO(("jump_protected: code seg not present."));
|
||||
BX_ERROR(("jump_protected: code seg not present."));
|
||||
exception(BX_NP_EXCEPTION, gate_cs_raw & 0xfffc, 0);
|
||||
}
|
||||
|
||||
@ -315,11 +315,11 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
// else #GP(TSS selector)
|
||||
parse_descriptor(dword1, dword2, &tss_descriptor);
|
||||
if (tss_descriptor.valid==0 || tss_descriptor.segment) {
|
||||
BX_INFO(("jump_protected: TSS selector points to bad TSS"));
|
||||
BX_ERROR(("jump_protected: TSS selector points to bad TSS"));
|
||||
exception(BX_GP_EXCEPTION, raw_tss_selector & 0xfffc, 0);
|
||||
}
|
||||
if (tss_descriptor.type!=9 && tss_descriptor.type!=1) {
|
||||
BX_INFO(("jump_protected: TSS selector points to bad TSS"));
|
||||
BX_ERROR(("jump_protected: TSS selector points to bad TSS"));
|
||||
exception(BX_GP_EXCEPTION, raw_tss_selector & 0xfffc, 0);
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
break;
|
||||
|
||||
case 12: // 386 call gate
|
||||
//BX_INFO(("jump_protected: JUMP TO 386 CALL GATE:"));
|
||||
//BX_ERROR(("jump_protected: JUMP TO 386 CALL GATE:"));
|
||||
|
||||
// descriptor DPL must be >= CPL else #GP(gate selector)
|
||||
if (descriptor.dpl < CPL) {
|
||||
@ -433,7 +433,7 @@ BX_CPU_C::jump_protected(BxInstruction_t *i, Bit16u cs_raw, Bit32u disp32)
|
||||
break;
|
||||
|
||||
default:
|
||||
BX_INFO(("jump_protected: gate type %u unsupported",
|
||||
BX_ERROR(("jump_protected: gate type %u unsupported",
|
||||
(unsigned) descriptor.type));
|
||||
exception(BX_GP_EXCEPTION, cs_raw & 0xfffc, 0);
|
||||
return;
|
||||
|
@ -189,7 +189,7 @@ bx_gui_c::snapshot_handler(void)
|
||||
bx_gui_c::toggle_mouse_enable(void)
|
||||
{
|
||||
int old = bx_options.Omouse_enabled->get ();
|
||||
BX_INFO (("toggle mouse_enabled, now %d", !old));
|
||||
BX_DEBUG (("toggle mouse_enabled, now %d", !old));
|
||||
bx_options.Omouse_enabled->set (!old);
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ bx_gui_c::mouse_enabled_changed (Boolean val)
|
||||
// This is only called when SIM->get_init_done is 1. Note that VAL
|
||||
// is the new value of mouse_enabled, which may not match the old
|
||||
// value which is still in bx_options.Omouse_enabled->get ().
|
||||
BX_INFO (("replacing the mouse bitmaps"));
|
||||
BX_DEBUG (("replacing the mouse bitmaps"));
|
||||
if (val)
|
||||
replace_bitmap(BX_GUI_THIS mouse_hbar_id, BX_GUI_THIS mouse_bmap_id);
|
||||
else
|
||||
|
@ -321,7 +321,6 @@ if (bx_options.Oprivate_colormap->get ()) {
|
||||
dimension_x = columns * font_width;
|
||||
dimension_y = rows * font_height + headerbar_y;
|
||||
|
||||
BX_INFO(("font %u wide x %u high", (unsigned) font_width, (unsigned) font_height));
|
||||
|
||||
/* create opaque window */
|
||||
win = XCreateSimpleWindow(bx_x_display, RootWindow(bx_x_display,bx_x_screen_num),
|
||||
@ -382,7 +381,8 @@ if (bx_options.Oprivate_colormap->get ()) {
|
||||
black_pixel = col_vals[0];
|
||||
white_pixel = col_vals[15];
|
||||
|
||||
BX_INFO(("default_depth = %d", default_depth));
|
||||
BX_INFO(("font %u wide x %u high, display depth = %d",
|
||||
(unsigned) font_width, (unsigned) font_height, default_depth));
|
||||
|
||||
//select_visual();
|
||||
|
||||
@ -523,7 +523,7 @@ if (bx_options.Oprivate_colormap->get ()) {
|
||||
void
|
||||
bx_gui_c::mouse_enabled_changed_specific (Boolean val)
|
||||
{
|
||||
BX_INFO (("mouse_enabled=%d, x11 specific code", val?1:0));
|
||||
BX_DEBUG (("mouse_enabled=%d, x11 specific code", val?1:0));
|
||||
if (val) {
|
||||
BX_INFO(("[x] Mouse on"));
|
||||
mouse_enable_x = current_x;
|
||||
|
@ -98,7 +98,7 @@ bx_devices_c::~bx_devices_c(void)
|
||||
void
|
||||
bx_devices_c::init(BX_MEM_C *newmem)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: devices.cc,v 1.14 2001-08-18 03:28:23 yakovlev Exp $"));
|
||||
BX_DEBUG(("Init $Id: devices.cc,v 1.15 2001-08-31 16:06:32 fries Exp $"));
|
||||
mem = newmem;
|
||||
// Start with all IO port address registered to unmapped handler
|
||||
// MUST be called first
|
||||
@ -267,7 +267,7 @@ bx_devices_c::port92_write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
(unsigned) value));
|
||||
BX_DEBUG(("A20: set_enable_a20() called"));
|
||||
BX_SET_ENABLE_A20( (value & 0x02) >> 1 );
|
||||
BX_INFO(("A20: now %u", (unsigned) BX_GET_ENABLE_A20()));
|
||||
BX_DEBUG(("A20: now %u", (unsigned) BX_GET_ENABLE_A20()));
|
||||
bx_cpu_reset = (value & 0x01); /* high speed reset */
|
||||
if (bx_cpu_reset) {
|
||||
BX_PANIC(("PORT 92h write: CPU reset requested!"));
|
||||
|
@ -81,7 +81,7 @@ bx_floppy_ctrl_c::~bx_floppy_ctrl_c(void)
|
||||
void
|
||||
bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: floppy.cc,v 1.17 2001-08-23 13:02:50 yakovlev Exp $"));
|
||||
BX_DEBUG(("Init $Id: floppy.cc,v 1.18 2001-08-31 16:06:32 fries Exp $"));
|
||||
BX_FD_THIS devices = d;
|
||||
|
||||
BX_FD_THIS devices->register_irq(6, "Floppy Drive");
|
||||
@ -135,6 +135,10 @@ bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
if (evaluate_media(bx_options.floppya.Otype->get (), bx_options.floppya.Opath->getptr (),
|
||||
& BX_FD_THIS s.media[0]))
|
||||
BX_FD_THIS s.media_present[0] = 1;
|
||||
#define MED (BX_FD_THIS s.media[0])
|
||||
BX_INFO(("fd0: '%s' ro=%d, h=%d,t=%d,spt=%d", bx_options.floppya.Opath->getptr(),
|
||||
MED.write_protected, MED.heads, MED.tracks, MED.sectors_per_track));
|
||||
#undef MED
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,6 +180,10 @@ bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
if (evaluate_media(bx_options.floppyb.Otype->get (), bx_options.floppyb.Opath->getptr (),
|
||||
& BX_FD_THIS s.media[1]))
|
||||
BX_FD_THIS s.media_present[1] = 1;
|
||||
#define MED (BX_FD_THIS s.media[1])
|
||||
BX_INFO(("fd1: '%s' ro=%d, h=%d,t=%d,spt=%d", bx_options.floppyb.Opath->getptr(),
|
||||
MED.write_protected, MED.heads, MED.tracks, MED.sectors_per_track));
|
||||
#undef MED
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,7 +202,7 @@ bx_floppy_ctrl_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
bx_pc_system.register_timer( this, timer_handler,
|
||||
bx_options.Ofloppy_command_delay->get (), 0,0);
|
||||
|
||||
BX_INFO(("bx_options.Ofloppy_command_delay = %u",
|
||||
BX_DEBUG(("bx_options.Ofloppy_command_delay = %u",
|
||||
(unsigned) bx_options.Ofloppy_command_delay->get ()));
|
||||
}
|
||||
|
||||
@ -402,17 +410,15 @@ bx_floppy_ctrl_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
bx_pc_system.activate_timer( BX_FD_THIS s.floppy_timer_index,
|
||||
bx_options.Ofloppy_command_delay->get (), 0 );
|
||||
}
|
||||
if (bx_dbg.floppy) {
|
||||
BX_INFO(("io_write: digital output register"));
|
||||
BX_INFO((" motor on, drive1 = %d", motor_on_drive1 > 0));
|
||||
BX_INFO((" motor on, drive0 = %d", motor_on_drive0 > 0));
|
||||
BX_INFO((" dma_and_interrupt_enable=%02x",
|
||||
BX_DEBUG(("io_write: digital output register"));
|
||||
BX_DEBUG((" motor on, drive1 = %d", motor_on_drive1 > 0));
|
||||
BX_DEBUG((" motor on, drive0 = %d", motor_on_drive0 > 0));
|
||||
BX_DEBUG((" dma_and_interrupt_enable=%02x",
|
||||
(unsigned) dma_and_interrupt_enable));
|
||||
BX_INFO((" normal_operation=%02x",
|
||||
BX_DEBUG((" normal_operation=%02x",
|
||||
(unsigned) normal_operation));
|
||||
BX_INFO((" drive_select=%02x",
|
||||
BX_DEBUG((" drive_select=%02x",
|
||||
(unsigned) drive_select));
|
||||
}
|
||||
if (drive_select>1) {
|
||||
BX_PANIC(("io_write: drive_select>1"));
|
||||
}
|
||||
@ -423,8 +429,7 @@ bx_floppy_ctrl_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
break;
|
||||
|
||||
case 0x3F5: /* diskette controller data */
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("command = %02x", (unsigned) value));
|
||||
BX_DEBUG(("command = %02x", (unsigned) value));
|
||||
if (BX_FD_THIS s.command_complete) {
|
||||
if (BX_FD_THIS s.pending_command!=0)
|
||||
BX_PANIC(("io: 3f5: receiving new comm, old one (%02x) pending",
|
||||
@ -496,30 +501,26 @@ bx_floppy_ctrl_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
BX_FD_THIS s.command_complete = 1;
|
||||
}
|
||||
}
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("io_write: diskette controller data"));
|
||||
BX_DEBUG(("io_write: diskette controller data"));
|
||||
return;
|
||||
break;
|
||||
#endif // #if BX_DMA_FLOPPY_IO
|
||||
|
||||
case 0x3F6: /* diskette controller (reserved) */
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("io_write: reserved register unsupported"));
|
||||
BX_DEBUG(("io_write: reserved register unsupported"));
|
||||
// this address shared with the hard drive controller
|
||||
BX_FD_THIS devices->hard_drive->write_handler(BX_FD_THIS devices->hard_drive, address, value, io_len);
|
||||
break;
|
||||
|
||||
#if BX_DMA_FLOPPY_IO
|
||||
case 0x3F7: /* diskette controller configuration control register */
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("io_write: config control register"));
|
||||
BX_DEBUG(("io_write: config control register"));
|
||||
BX_FD_THIS s.data_rate = value & 0x03;
|
||||
if (bx_dbg.floppy)
|
||||
switch (BX_FD_THIS s.data_rate) {
|
||||
case 0: BX_INFO((" 500 Kbps")); break;
|
||||
case 1: BX_INFO((" 300 Kbps")); break;
|
||||
case 2: BX_INFO((" 250 Kbps")); break;
|
||||
case 3: BX_INFO((" 1 Mbps")); break;
|
||||
case 0: BX_DEBUG((" 500 Kbps")); break;
|
||||
case 1: BX_DEBUG((" 300 Kbps")); break;
|
||||
case 2: BX_DEBUG((" 250 Kbps")); break;
|
||||
case 3: BX_DEBUG((" 1 Mbps")); break;
|
||||
}
|
||||
return;
|
||||
break;
|
||||
@ -550,12 +551,9 @@ bx_floppy_ctrl_c::floppy_command(void)
|
||||
Bit32u logical_sector;
|
||||
|
||||
|
||||
if (bx_dbg.floppy) {
|
||||
BX_INFO(("FLOPPY COMMAND: "));
|
||||
BX_DEBUG(("FLOPPY COMMAND: "));
|
||||
for (i=0; i<BX_FD_THIS s.command_size; i++)
|
||||
BX_INFO(("[%02x] ", (unsigned) BX_FD_THIS s.command[i]));
|
||||
BX_INFO((""));
|
||||
}
|
||||
BX_DEBUG(("[%02x] ", (unsigned) BX_FD_THIS s.command[i]));
|
||||
|
||||
#if 0
|
||||
/* execute phase of command is in progress (non DMA mode) */
|
||||
@ -589,8 +587,7 @@ bx_floppy_ctrl_c::floppy_command(void)
|
||||
drive = (BX_FD_THIS s.command[1] & 0x03);
|
||||
BX_FD_THIS s.DOR &= 0xfc;
|
||||
BX_FD_THIS s.DOR |= drive;
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("floppy_command(): recalibrate drive %u",
|
||||
BX_DEBUG(("floppy_command(): recalibrate drive %u",
|
||||
(unsigned) drive));
|
||||
if (drive > 1)
|
||||
BX_PANIC(("floppy_command(): drive > 1"));
|
||||
@ -636,8 +633,7 @@ bx_floppy_ctrl_c::floppy_command(void)
|
||||
|
||||
/* read ready */
|
||||
BX_FD_THIS s.main_status_reg = FD_MS_MRQ | FD_MS_DIO | FD_MS_BUSY;
|
||||
if (bx_dbg.floppy)
|
||||
BX_INFO(("sense interrupt status"));
|
||||
BX_DEBUG(("sense interrupt status"));
|
||||
return;
|
||||
break;
|
||||
|
||||
@ -727,15 +723,13 @@ bx_floppy_ctrl_c::floppy_command(void)
|
||||
eot = BX_FD_THIS s.command[6]; /* 1..36 depending */
|
||||
sector_size = BX_FD_THIS s.command[5];
|
||||
data_length = BX_FD_THIS s.command[8];
|
||||
if (bx_dbg.floppy) {
|
||||
BX_INFO(("read/write normal data"));
|
||||
BX_INFO(("BEFORE"));
|
||||
BX_INFO((" drive = %u", (unsigned) drive));
|
||||
BX_INFO((" head = %u", (unsigned) head));
|
||||
BX_INFO((" cylinder = %u", (unsigned) cylinder));
|
||||
BX_INFO((" sector = %u", (unsigned) sector));
|
||||
BX_INFO((" eot = %u", (unsigned) eot));
|
||||
}
|
||||
BX_DEBUG(("read/write normal data"));
|
||||
BX_DEBUG(("BEFORE"));
|
||||
BX_DEBUG((" drive = %u", (unsigned) drive));
|
||||
BX_DEBUG((" head = %u", (unsigned) head));
|
||||
BX_DEBUG((" cylinder = %u", (unsigned) cylinder));
|
||||
BX_DEBUG((" sector = %u", (unsigned) sector));
|
||||
BX_DEBUG((" eot = %u", (unsigned) eot));
|
||||
if (drive > 1)
|
||||
BX_PANIC(("io: bad drive #"));
|
||||
if (head > 1)
|
||||
@ -767,12 +761,9 @@ bx_floppy_ctrl_c::floppy_command(void)
|
||||
BX_PANIC(("sector_size not 512"));
|
||||
}
|
||||
if ( cylinder >= BX_FD_THIS s.media[drive].tracks ) {
|
||||
BX_INFO(("io: normal read/write: params out of range"));
|
||||
BX_INFO(("*** sector # %02xh", (unsigned) sector));
|
||||
BX_INFO(("*** cylinder #%02xh", (unsigned) cylinder));
|
||||
BX_INFO(("*** eot #%02xh", (unsigned) eot));
|
||||
BX_INFO(("*** head #%02xh", (unsigned) head));
|
||||
BX_PANIC(("bailing"));
|
||||
BX_PANIC(("io: norm r/w parms out of range: sec#%02xh cyl#%02xh eot#%02h head#%02xh",
|
||||
(unsigned) sector, (unsigned) cylinder, (unsigned) eot,
|
||||
(unsigned) head));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1237,7 +1228,6 @@ bx_floppy_ctrl_c::evaluate_media(unsigned type, char *path, floppy_t *media)
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
BX_INFO(("opened %s with readonly=%d", path, media->write_protected));
|
||||
|
||||
#if BX_WITH_MACOS
|
||||
if (!strcmp(bx_options.floppya.Opath->getptr (), SuperDrive))
|
||||
|
@ -95,7 +95,7 @@ bx_hard_drive_c::~bx_hard_drive_c(void)
|
||||
bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
{
|
||||
BX_HD_THIS devices = d;
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.27 2001-08-15 20:54:36 bdenney Exp $"));
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.28 2001-08-31 16:06:32 fries Exp $"));
|
||||
|
||||
/* HARD DRIVE 0 */
|
||||
|
||||
@ -187,18 +187,18 @@ bx_hard_drive_c::init(bx_devices_c *d, bx_cmos_c *cmos)
|
||||
|
||||
/* open hard drive image file */
|
||||
if (bx_options.diskc.Opresent->get ()) {
|
||||
BX_INFO(("Opening image for device 0"));
|
||||
if ((BX_HD_THIS s[0].hard_drive->open(bx_options.diskc.Opath->getptr ())) < 0) {
|
||||
BX_PANIC(("could not open hard drive image file '%s'",
|
||||
bx_options.diskc.Opath->getptr ()));
|
||||
}
|
||||
BX_INFO(("hd0: '%s'",bx_options.diskc.Opath->getptr ()));
|
||||
}
|
||||
if (bx_options.diskd.Opresent->get () && !bx_options.cdromd.Opresent->get ()) {
|
||||
BX_INFO(("Opening image for device 1"));
|
||||
if ((BX_HD_THIS s[1].hard_drive->open(bx_options.diskd.Opath->getptr ())) < 0) {
|
||||
BX_PANIC(("could not open hard drive image file '%s'",
|
||||
bx_options.diskd.Opath->getptr ()));
|
||||
}
|
||||
BX_INFO(("hd1: '%s'",bx_options.diskd.Opath->getptr()));
|
||||
}
|
||||
|
||||
// generate CMOS values for hard drive if not using a CMOS image
|
||||
|
@ -265,12 +265,12 @@ bx_unmapped_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
if ( BX_UM_THIS s.bios_message_i >= BX_BIOS_MESSAGE_SIZE ) {
|
||||
BX_UM_THIS s.bios_message[ BX_BIOS_MESSAGE_SIZE - 1] = 0;
|
||||
BX_UM_THIS s.bios_message_i = 0;
|
||||
bioslog->info("BIOS message: %s", BX_UM_THIS s.bios_message);
|
||||
bioslog->info("%s", BX_UM_THIS s.bios_message);
|
||||
}
|
||||
else if ((value & 0xff) == '\n') {
|
||||
BX_UM_THIS s.bios_message[ BX_UM_THIS s.bios_message_i - 1 ] = 0;
|
||||
BX_UM_THIS s.bios_message_i = 0;
|
||||
bioslog->info("BIOS message: %s", BX_UM_THIS s.bios_message);
|
||||
bioslog->info("%s", BX_UM_THIS s.bios_message);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -126,12 +126,22 @@ iofunctions::init_log(int fd)
|
||||
void
|
||||
iofunctions::out(int f, int l, char *prefix, char *fmt, va_list ap)
|
||||
{
|
||||
char c=' ';
|
||||
assert (magic==MAGIC_LOGNUM);
|
||||
assert (this != NULL);
|
||||
assert (logfd != NULL);
|
||||
|
||||
if( showtick )
|
||||
fprintf(logfd, "%011lld ", bx_pc_system.time_ticks());
|
||||
fprintf(logfd, "%011lld", bx_pc_system.time_ticks());
|
||||
|
||||
switch(l) {
|
||||
case LOGLEV_INFO: c='i'; break;
|
||||
case LOGLEV_PANIC: c='p'; break;
|
||||
case LOGLEV_ERROR: c='e'; break;
|
||||
case LOGLEV_DEBUG: c='d'; break;
|
||||
default: break;
|
||||
}
|
||||
fprintf(logfd, "%c",c);
|
||||
|
||||
if(prefix != NULL)
|
||||
fprintf(logfd, "%s ", prefix);
|
||||
|
@ -87,7 +87,7 @@ BX_MEM_C::~BX_MEM_C(void)
|
||||
void
|
||||
BX_MEM_C::init_memory(int memsize)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: misc_mem.cc,v 1.13 2001-06-27 20:27:49 fries Exp $"));
|
||||
BX_DEBUG(("Init $Id: misc_mem.cc,v 1.14 2001-08-31 16:06:32 fries Exp $"));
|
||||
// you can pass 0 if memory has been allocated already through
|
||||
// the constructor, or the desired size of memory if it hasn't
|
||||
|
||||
@ -175,13 +175,13 @@ BX_MEM_C::load_ROM(const char *path, Bit32u romaddress)
|
||||
path
|
||||
));
|
||||
else
|
||||
BX_INFO(("rom at 0x%06x/%u ('%s')",
|
||||
BX_INFO(("rom at 0x%05x/%u ('%s')",
|
||||
(unsigned) romaddress,
|
||||
(unsigned) stat_buf.st_size,
|
||||
path
|
||||
));
|
||||
#else // #if BX_PCI_SUPPORT
|
||||
BX_INFO(("rom at 0x%06x/%u ('%s')",
|
||||
BX_INFO(("rom at 0x%05x/%u ('%s')",
|
||||
(unsigned) romaddress,
|
||||
(unsigned) stat_buf.st_size,
|
||||
path
|
||||
|
Loading…
Reference in New Issue
Block a user