- These are the three patches that cegis submitted on the sf bug list
This commit is contained in:
parent
f331d20e55
commit
bfd7fc33ba
142
bochs/patches/patch.harddrv-sco-osr5
Normal file
142
bochs/patches/patch.harddrv-sco-osr5
Normal file
@ -0,0 +1,142 @@
|
||||
----------------------------------------------------------------------
|
||||
Patch name: patch.harddrv-sco-osr5
|
||||
Author: Carl Sopchak
|
||||
Date: May, 1st 2002
|
||||
|
||||
Detailed description:
|
||||
The attached patch contains the changes needed to
|
||||
harddrv.cc in order to install SCO's Open Server
|
||||
Release 5 (unix) O/S within bochs. Also required were
|
||||
changes to rombios.c that were made by Christophe
|
||||
Bothamy (that he kindly sent me). I believe the
|
||||
rombios.c changes were already committed to CVS.
|
||||
|
||||
NOTE: These changes mostly implement functions that
|
||||
were not previously implemented. The changes I made
|
||||
were specifically to get past stop points during the
|
||||
OSR5 install. I do not know if they fully meet any
|
||||
requirements of any spec. (For example, the Stop Start
|
||||
Disk ATAPI command should read the disk's TOC, but that
|
||||
part was NOT implemented.) Also, I do not have any
|
||||
good way of throughly testing these mods.
|
||||
|
||||
If there are changes needed to these, I'd be happy to
|
||||
make them, and test them to the best of my ability.
|
||||
Just let me know.
|
||||
|
||||
Please make these mods part of the standard bochs
|
||||
distribution (after testing).
|
||||
|
||||
Thanks,
|
||||
|
||||
Carl
|
||||
|
||||
Patch was created with:
|
||||
cvs diff -u
|
||||
Apply patch to what version:
|
||||
cvs checked out on May, 1st 2002
|
||||
Instructions:
|
||||
To patch, go to main bochs directory.
|
||||
Type "cd iodev"
|
||||
Type "patch -p0 < THIS_PATCH_FILE".
|
||||
----------------------------------------------------------------------
|
||||
Index: harddrv.cc
|
||||
===================================================================
|
||||
RCS file: /cvsroot/bochs/bochs/iodev/harddrv.cc,v
|
||||
retrieving revision 1.54
|
||||
diff -u -r1.54 harddrv.cc
|
||||
--- harddrv.cc 23 Apr 2002 07:44:34 -0000 1.54
|
||||
+++ harddrv.cc 1 May 2002 18:16:33 -0000
|
||||
@@ -1005,7 +1005,10 @@
|
||||
if (!LoEj && !Start) { // stop the disc
|
||||
BX_PANIC(("Stop disc not implemented"));
|
||||
} else if (!LoEj && Start) { // start the disc and read the TOC
|
||||
- BX_PANIC(("Start disc not implemented"));
|
||||
+ // BX_PANIC(("Start disc not implemented"));
|
||||
+ BX_ERROR(("FIXME: ATAPI start disc not reading TOC"));
|
||||
+ atapi_cmd_nop();
|
||||
+ raise_interrupt();
|
||||
} else if (LoEj && !Start) { // Eject the disc
|
||||
atapi_cmd_nop();
|
||||
if (BX_HD_THIS s[1].cdrom.ready) {
|
||||
@@ -1798,6 +1801,7 @@
|
||||
BX_SELECTED_CONTROLLER.status.busy = 0;
|
||||
|
||||
} else {
|
||||
+ BX_DEBUG(("ATAPI Device Reset on non-cd device"));
|
||||
command_aborted(0x08);
|
||||
}
|
||||
break;
|
||||
@@ -1845,6 +1849,35 @@
|
||||
raise_interrupt();
|
||||
break;
|
||||
|
||||
+ case 0x70: // SEEK (cgs)
|
||||
+ if (BX_SELECTED_HD.device_type == IDE_DISK) {
|
||||
+ BX_DEBUG(("write cmd 0x70 (SEEK) executing"));
|
||||
+ if (!calculate_logical_address(&logical_sector)) {
|
||||
+ BX_ERROR(("initial seek to sector %u out of bounds, aborting", logical_sector));
|
||||
+ command_aborted(value);
|
||||
+ break;
|
||||
+ }
|
||||
+ BX_SELECTED_CONTROLLER.error_register = 0;
|
||||
+ BX_SELECTED_CONTROLLER.status.busy = 0;
|
||||
+ BX_SELECTED_CONTROLLER.status.drive_ready = 1;
|
||||
+ BX_SELECTED_CONTROLLER.status.seek_complete = 1;
|
||||
+ BX_SELECTED_CONTROLLER.status.drq = 1;
|
||||
+ BX_SELECTED_CONTROLLER.status.corrected_data = 0;
|
||||
+ BX_SELECTED_CONTROLLER.status.err = 0;
|
||||
+ BX_SELECTED_CONTROLLER.buffer_index = 0;
|
||||
+ BX_DEBUG(("s[0].controller.control.disable_irq = %02x", (BX_HD_THIS s[0]).controller.control.disable_irq));
|
||||
+ BX_DEBUG(("s[1].controller.control.disable_irq = %02x", (BX_HD_THIS s[1]).controller.control.disable_irq));
|
||||
+ BX_DEBUG(("SEEK completed. error_register = %02x", BX_SELECTED_CONTROLLER.error_register));
|
||||
+ raise_interrupt();
|
||||
+ BX_DEBUG(("SEEK interrupt completed"));
|
||||
+ } else {
|
||||
+ BX_ERROR(("write cmd 0x70 (SEEK) not supported for non-disk"));
|
||||
+ command_aborted(0x70);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+
|
||||
// List all the write operations that are defined in the ATA/ATAPI spec
|
||||
// that we don't support. Commands that are listed here will cause a
|
||||
// BX_ERROR, which is non-fatal, and the command will be aborted.
|
||||
@@ -1874,7 +1907,6 @@
|
||||
case 0x42: BX_ERROR(("write cmd 0x42 (READ VERIFY SECTORS EXT) not supported"));command_aborted(0x42); break;
|
||||
case 0x50: BX_ERROR(("write cmd 0x50 (FORMAT TRACK) not supported")); command_aborted(0x50); break;
|
||||
case 0x51: BX_ERROR(("write cmd 0x51 (CONFIGURE STREAM) not supported"));command_aborted(0x51); break;
|
||||
- case 0x70: BX_ERROR(("write cmd 0x70 (SEEK) not supported"));command_aborted(0x70); break;
|
||||
case 0x87: BX_ERROR(("write cmd 0x87 (CFA TRANSLATE SECTOR) not supported"));command_aborted(0x87); break;
|
||||
case 0x92: BX_ERROR(("write cmd 0x92 (DOWNLOAD MICROCODE) not supported"));command_aborted(0x92); break;
|
||||
case 0x94: BX_ERROR(("write cmd 0x94 (STANDBY IMMEDIATE) not supported")); command_aborted(0x94); break;
|
||||
@@ -1932,7 +1964,9 @@
|
||||
prev_control_reset = BX_SELECTED_CONTROLLER.control.reset;
|
||||
BX_HD_THIS s[0].controller.control.reset = value & 0x04;
|
||||
BX_HD_THIS s[1].controller.control.reset = value & 0x04;
|
||||
- BX_SELECTED_CONTROLLER.control.disable_irq = value & 0x02;
|
||||
+ // CGS: was: BX_SELECTED_CONTROLLER.control.disable_irq = value & 0x02;
|
||||
+ BX_HD_THIS s[0].controller.control.disable_irq = value & 0x02;
|
||||
+ BX_HD_THIS s[1].controller.control.disable_irq = value & 0x02;
|
||||
//BX_DEBUG(( "adpater control reg: reset controller = %d",
|
||||
// (unsigned) (BX_SELECTED_CONTROLLER.control.reset) ? 1 : 0 ));
|
||||
//BX_DEBUG(( "adpater control reg: disable_irq(14) = %d",
|
||||
@@ -1986,6 +2020,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ BX_DEBUG(("s[0].controller.control.disable_irq = %02x", (BX_HD_THIS s[0]).controller.control.disable_irq));
|
||||
+ BX_DEBUG(("s[1].controller.control.disable_irq = %02x", (BX_HD_THIS s[1]).controller.control.disable_irq));
|
||||
break;
|
||||
#if 0
|
||||
// you'll need these to support second IDE controller, not needed yet.
|
||||
@@ -2616,6 +2652,8 @@
|
||||
void
|
||||
bx_hard_drive_c::raise_interrupt()
|
||||
{
|
||||
+ BX_DEBUG(("raise_interrupt called, disable_irq = %02x", BX_SELECTED_CONTROLLER.control.disable_irq));
|
||||
+ if (!BX_SELECTED_CONTROLLER.control.disable_irq) { BX_DEBUG(("raising interrupt")); } else { BX_DEBUG(("Not raising interrupt")); }
|
||||
if (!BX_SELECTED_CONTROLLER.control.disable_irq) {
|
||||
Bit32u irq = 14; // always 1st IDE controller
|
||||
// for second controller, you would want irq 15
|
74
bochs/patches/patch.logfilefmteip
Normal file
74
bochs/patches/patch.logfilefmteip
Normal file
@ -0,0 +1,74 @@
|
||||
----------------------------------------------------------------------
|
||||
Patch name: patch.logfilefmteip
|
||||
Author: Carl Sopchak
|
||||
Date: May, 1st 2002
|
||||
|
||||
Detailed description:
|
||||
While working with Bela Lubkin of Caldera, trying to
|
||||
get bochs to install SCO OSR5, Bela asked me to add the
|
||||
EIP to the log file. The attached patch changes the
|
||||
timestamp portion of a log file entry to
|
||||
|
||||
tttttttttt-x-@eeeeeee[sssss]
|
||||
|
||||
where tttttttttt is the ticks, x is the type of entry
|
||||
(error, panic, info, debug), eeeeeeee is the EIP (in
|
||||
hex), and sssss remains the subsystem (e.g., HD, FDD,
|
||||
BIOS, etc)
|
||||
|
||||
Please make this part of the standard bochs package.
|
||||
|
||||
Thanks,
|
||||
|
||||
Carl
|
||||
|
||||
Patch was created with:
|
||||
cvs diff -u
|
||||
Apply patch to what version:
|
||||
cvs checked out on May, 1st 2002
|
||||
Instructions:
|
||||
To patch, go to main bochs directory.
|
||||
Type "patch -p0 < THIS_PATCH_FILE".
|
||||
----------------------------------------------------------------------
|
||||
Index: bochs.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/bochs/bochs/bochs.h,v
|
||||
retrieving revision 1.63
|
||||
diff -u -r1.63 bochs.h
|
||||
--- bochs.h 23 Apr 2002 07:44:34 -0000 1.63
|
||||
+++ bochs.h 1 May 2002 18:11:54 -0000
|
||||
@@ -265,6 +265,7 @@
|
||||
|
||||
class iofunctions {
|
||||
int showtick,magic;
|
||||
+ int showeip;
|
||||
FILE *logfd;
|
||||
class logfunctions *log;
|
||||
void init(void);
|
||||
Index: logio.cc
|
||||
===================================================================
|
||||
RCS file: /cvsroot/bochs/bochs/logio.cc,v
|
||||
retrieving revision 1.17
|
||||
diff -u -r1.17 logio.cc
|
||||
--- logio.cc 18 Apr 2002 00:22:19 -0000 1.17
|
||||
+++ logio.cc 1 May 2002 18:11:54 -0000
|
||||
@@ -51,6 +51,7 @@
|
||||
// number is set.
|
||||
magic=MAGIC_LOGNUM;
|
||||
showtick = 1;
|
||||
+ showeip = 1;
|
||||
n_logfn = 0;
|
||||
init_log(stderr);
|
||||
log = new logfunc_t(this);
|
||||
@@ -145,7 +146,10 @@
|
||||
case LOGLEV_DEBUG: c='d'; break;
|
||||
default: break;
|
||||
}
|
||||
- fprintf(logfd, "%c",c);
|
||||
+ fprintf(logfd, "-%c",c);
|
||||
+
|
||||
+ if( showeip )
|
||||
+ fprintf(logfd, "-@%08x", BX_CPU(0)->eip);
|
||||
|
||||
if(prefix != NULL)
|
||||
fprintf(logfd, "%s ", prefix);
|
161
bochs/patches/patch.marklog
Normal file
161
bochs/patches/patch.marklog
Normal file
@ -0,0 +1,161 @@
|
||||
----------------------------------------------------------------------
|
||||
Patch name: patch.marklog
|
||||
Author: Carl Sopchak
|
||||
Date: May, 1st 2002
|
||||
|
||||
Detailed description:
|
||||
While working on getting SCO OSR5 installed into bochs,
|
||||
I added this mod to the gui programs. It adds a button
|
||||
(labelled XX LOG; my bitmap artsmanship leaves MUCH to
|
||||
be desired!) to the gui bar that writes a BX_ERROR
|
||||
entry into the log file. The format of the entry is:
|
||||
|
||||
tttttttttt-x-@eeeeeeee[XGUI ]
|
||||
================================
|
||||
Log Marker # nnnn
|
||||
================================
|
||||
|
||||
where nnnn is a sequential number from the beginning of
|
||||
the bochs session. A message is also written to stdout
|
||||
stating that the entry was logged, which also shows the
|
||||
number.
|
||||
|
||||
This is useful to log demarcation points in the log
|
||||
file (e.g., "skip everything before marker #1"; "stuff
|
||||
between markers 3 & 4 is where the hard disk gets
|
||||
initialized", etc.)
|
||||
|
||||
Please make this a part of the standard bochs package.
|
||||
|
||||
Thanks,
|
||||
|
||||
Carl
|
||||
|
||||
Patch was created with:
|
||||
cvs diff -u
|
||||
Apply patch to what version:
|
||||
cvs checked out on May, 1st 2002
|
||||
Instructions:
|
||||
To patch, go to main bochs directory.
|
||||
Type "cd gui"
|
||||
Type "patch -p0 < THIS_PATCH_FILE".
|
||||
----------------------------------------------------------------------
|
||||
Index: gui.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/bochs/bochs/gui/gui.h,v
|
||||
retrieving revision 1.27
|
||||
diff -u -r1.27 gui.h
|
||||
--- gui.h 20 Apr 2002 07:19:35 -0000 1.27
|
||||
+++ gui.h 1 May 2002 18:13:03 -0000
|
||||
@@ -78,6 +78,7 @@
|
||||
static void cdromD_handler(void);
|
||||
static void reset_handler(void);
|
||||
static void power_handler(void);
|
||||
+ static void marklog_handler(void);
|
||||
static void copy_handler(void);
|
||||
static void paste_handler(void);
|
||||
static void snapshot_handler(void);
|
||||
@@ -91,6 +92,7 @@
|
||||
unsigned floppyA_bmap_id, floppyA_eject_bmap_id, floppyA_hbar_id;
|
||||
unsigned floppyB_bmap_id, floppyB_eject_bmap_id, floppyB_hbar_id;
|
||||
unsigned cdromD_bmap_id, cdromD_eject_bmap_id, cdromD_hbar_id;
|
||||
+ unsigned marklog_bmap_id, marklog_hbar_id;
|
||||
unsigned power_bmap_id, power_hbar_id;
|
||||
unsigned reset_bmap_id, reset_hbar_id;
|
||||
unsigned copy_bmap_id, copy_hbar_id;
|
||||
@@ -98,11 +100,13 @@
|
||||
unsigned snapshot_bmap_id, snapshot_hbar_id;
|
||||
unsigned config_bmap_id, config_hbar_id;
|
||||
unsigned mouse_bmap_id, nomouse_bmap_id, mouse_hbar_id;
|
||||
+
|
||||
+ unsigned markercount;
|
||||
};
|
||||
|
||||
|
||||
#define BX_MAX_PIXMAPS 16
|
||||
-#define BX_MAX_HEADERBAR_ENTRIES 10
|
||||
+#define BX_MAX_HEADERBAR_ENTRIES 11
|
||||
#define BX_HEADER_BAR_Y 32
|
||||
|
||||
// align pixmaps towards left or right side of header bar
|
||||
Index: gui.cc
|
||||
===================================================================
|
||||
RCS file: /cvsroot/bochs/bochs/gui/gui.cc,v
|
||||
retrieving revision 1.41
|
||||
diff -u -r1.41 gui.cc
|
||||
--- gui.cc 18 Apr 2002 00:22:19 -0000 1.41
|
||||
+++ gui.cc 1 May 2002 18:13:03 -0000
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "gui/bitmaps/paste.h"
|
||||
#include "gui/bitmaps/configbutton.h"
|
||||
#include "gui/bitmaps/cdromd.h"
|
||||
+#include "gui/bitmaps/marklog.h"
|
||||
#if BX_WITH_MACOS
|
||||
# include <Disks.h>
|
||||
#endif
|
||||
@@ -75,13 +76,15 @@
|
||||
BX_GUI_THIS nomouse_bmap_id = create_bitmap(bx_nomouse_bmap,
|
||||
BX_MOUSE_BMAP_X, BX_MOUSE_BMAP_Y);
|
||||
|
||||
-
|
||||
BX_GUI_THIS power_bmap_id = create_bitmap(bx_power_bmap, BX_POWER_BMAP_X, BX_POWER_BMAP_Y);
|
||||
BX_GUI_THIS reset_bmap_id = create_bitmap(bx_reset_bmap, BX_RESET_BMAP_X, BX_RESET_BMAP_Y);
|
||||
BX_GUI_THIS snapshot_bmap_id = create_bitmap(bx_snapshot_bmap, BX_SNAPSHOT_BMAP_X, BX_SNAPSHOT_BMAP_Y);
|
||||
BX_GUI_THIS copy_bmap_id = create_bitmap(bx_copy_bmap, BX_COPY_BMAP_X, BX_COPY_BMAP_Y);
|
||||
BX_GUI_THIS paste_bmap_id = create_bitmap(bx_paste_bmap, BX_PASTE_BMAP_X, BX_PASTE_BMAP_Y);
|
||||
BX_GUI_THIS config_bmap_id = create_bitmap(bx_config_bmap, BX_CONFIG_BMAP_X, BX_CONFIG_BMAP_Y);
|
||||
+ BX_GUI_THIS marklog_bmap_id = create_bitmap(bx_marklog_bmap, BX_MARKLOG_BMAP_X, BX_MARKLOG_BMAP_Y);
|
||||
+
|
||||
+ BX_GUI_THIS markercount = 0;
|
||||
|
||||
|
||||
// Add the initial bitmaps to the headerbar, and enable callback routine, for use
|
||||
@@ -145,6 +148,9 @@
|
||||
// Copy button
|
||||
BX_GUI_THIS copy_hbar_id = headerbar_bitmap(BX_GUI_THIS copy_bmap_id,
|
||||
BX_GRAVITY_RIGHT, copy_handler);
|
||||
+ // Mark Log button
|
||||
+ BX_GUI_THIS marklog_hbar_id = headerbar_bitmap(BX_GUI_THIS marklog_bmap_id,
|
||||
+ BX_GRAVITY_RIGHT, marklog_handler);
|
||||
|
||||
show_headerbar();
|
||||
}
|
||||
@@ -262,6 +268,15 @@
|
||||
bx_pc_system.ResetSignal( PCS_SET ); /* XXX is this right? */
|
||||
for (int i=0; i<BX_SMP_PROCESSORS; i++)
|
||||
BX_CPU(i)->reset(BX_RESET_HARDWARE);
|
||||
+}
|
||||
+
|
||||
+ void
|
||||
+bx_gui_c::marklog_handler(void)
|
||||
+{
|
||||
+ // the user pressed Mark Log button, so write error marker to log file
|
||||
+ BX_GUI_THIS markercount += 1;
|
||||
+ BX_ERROR (("\n================================\nLog Marker # %d\n================================", BX_GUI_THIS markercount));
|
||||
+ fprintf (stderr, "Marker # %d written to log.\n", BX_GUI_THIS markercount);
|
||||
}
|
||||
|
||||
void
|
||||
--- /dev/null Thu Aug 30 16:30:55 2001
|
||||
+++ bitmaps/marklog.h Wed May 1 09:58:00 2002
|
||||
@@ -0,0 +1,20 @@
|
||||
+/////////////////////////////////////////////////////////////////////////
|
||||
+// $Id: patch.marklog,v 1.1 2002-05-01 21:07:13 cbothamy Exp $
|
||||
+/////////////////////////////////////////////////////////////////////////
|
||||
+//
|
||||
+#define BX_MARKLOG_BMAP_X 32
|
||||
+#define BX_MARKLOG_BMAP_Y 32
|
||||
+
|
||||
+static const unsigned char bx_marklog_bmap[(BX_MARKLOG_BMAP_X * BX_MARKLOG_BMAP_Y)/8] = {
|
||||
+ 0x60, 0x18, 0x86, 0x01, 0xc0, 0x0c, 0xcc, 0x00, 0x80, 0x07, 0x78, 0x00,
|
||||
+ 0x00, 0x03, 0x30, 0x00, 0x80, 0x07, 0x78, 0x00, 0xc0, 0x0c, 0xcc, 0x00,
|
||||
+ 0x60, 0x18, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
|
||||
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,
|
||||
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x30, 0x18, 0x00,
|
||||
+ 0x00, 0x30, 0x18, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x30, 0x18, 0x00,
|
||||
+ 0x00, 0x30, 0x18, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x30, 0x00, 0x00,
|
||||
+ 0x00, 0x30, 0x1e, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x30, 0x18, 0x00,
|
||||
+ 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
+ };
|
Loading…
Reference in New Issue
Block a user