- freshen the patch so that it applies cleanly

This commit is contained in:
Bryce Denney 2001-09-19 15:29:07 +00:00
parent 690c4eee31
commit 367cf8f490

View File

@ -6,10 +6,12 @@ Date: Thu May 17 17:36:31 EDT 2001
Detailed description:
Add LBA support.
This builds okay, but I want to find a way to actually see that it's
making some difference before committing it. Anyway have an OS or
making some difference before committing it. Anybody have an OS or
diagnostic program that tests if LBA is in use? What would LBA allow
me to do that I can't do without it?
Updated Wed Sep 19 11:29:18 EDT 2001 so that it applies cleanly.
Apply patch to:
current cvs sources
Instructions:
@ -19,29 +21,11 @@ Instructions:
Index: bios/rombios.c
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
retrieving revision 1.3
diff -u -r1.3 rombios.c
--- bios/rombios.c 2001/05/03 21:13:20 1.3
+++ bios/rombios.c 2001/05/17 18:09:55
@@ -244,7 +244,7 @@
static void debugger_off();
static void keyboard_panic();
-#define DEBUG_ROMBIOS 0
+#define DEBUG_ROMBIOS 1
#if DEBUG_ROMBIOS
# define printf(format, p...) bios_printf(0, format, ##p)
@@ -767,7 +767,7 @@
Boolean oldval;
Bit8u temp8;
- // Use keyboard conroller to set A20 enable
+ // Use keyboard controller to set A20 enable
// get current Output Port settings first
if ( (inb(0x64) & 0x02) != 0 )
@@ -1281,6 +1281,7 @@
retrieving revision 1.15
diff -u -r1.15 rombios.c
--- bios/rombios.c 2001/08/15 04:56:00 1.15
+++ bios/rombios.c 2001/09/19 15:26:54
@@ -1350,6 +1350,7 @@
{
Bit8u scan_code, ascii_code, shift_flags;
@ -49,7 +33,7 @@ diff -u -r1.3 rombios.c
switch (GET_AH()) {
case 0x00: /* read keyboard input */
@@ -1450,6 +1451,7 @@
@@ -1519,6 +1520,7 @@
// DS has been set to F000 before call
//
@ -57,7 +41,7 @@ diff -u -r1.3 rombios.c
scancode = GET_AL();
if (scancode == 0) {
@@ -1638,6 +1640,56 @@
@@ -1707,6 +1709,56 @@
@ -114,7 +98,7 @@ diff -u -r1.3 rombios.c
void
@@ -1654,6 +1706,7 @@
@@ -1723,6 +1775,7 @@
Bit8u sector_count;
unsigned int i;
Bit16u tempbx;
@ -122,18 +106,19 @@ diff -u -r1.3 rombios.c
write_byte(0x0040, 0x008e, 0); // clear completion flag
@@ -1742,9 +1795,6 @@
panic("int13_function(): num_sectors out of range!\n");
@@ -1810,10 +1863,6 @@
if ( (num_sectors > 128) || (num_sectors == 0) )
panic("int13_function(): num_sectors out of range!");
-
- if (head > 15)
- panic("hard drive BIOS:(read/verify) head > 15\n");
- panic("hard drive BIOS:(read/verify) head > 15");
-
if ( GET_AH() == 0x04 ) {
SET_AH(0);
set_disk_ret_status(0);
@@ -1757,10 +1807,17 @@
panic("hard drive BIOS:(read/verify) BUSY bit set\n");
@@ -1826,10 +1875,17 @@
panic("hard drive BIOS:(read/verify) BUSY bit set");
}
outb(0x01f2, num_sectors);
- outb(0x01f3, sector);
@ -154,16 +139,16 @@ diff -u -r1.3 rombios.c
outb(0x01f7, 0x20);
while (1) {
@@ -1879,19 +1936,24 @@
@@ -1948,19 +2004,24 @@
if ( (num_sectors > 128) || (num_sectors == 0) )
panic("int13_function(): num_sectors out of range!\n");
panic("int13_function(): num_sectors out of range!");
- if (head > 15)
- panic("hard drive BIOS:(read) head > 15\n");
- panic("hard drive BIOS:(read) head > 15");
-
status = inb(0x1f7);
if (status & 0x80) {
panic("hard drive BIOS:(read) BUSY bit set\n");
panic("hard drive BIOS:(read) BUSY bit set");
}
// should check for Drive Ready Bit also in status reg
outb(0x01f2, num_sectors);
@ -186,7 +171,7 @@ diff -u -r1.3 rombios.c
outb(0x01f7, 0x30);
// wait for busy bit to turn off after seeking
@@ -4242,7 +4304,7 @@
@@ -4386,7 +4447,7 @@
;-------------------------------------------------
@ -198,11 +183,11 @@ diff -u -r1.3 rombios.c
Index: iodev/harddrv.cc
===================================================================
RCS file: /cvsroot/bochs/bochs/iodev/harddrv.cc,v
retrieving revision 1.10
diff -u -r1.10 harddrv.cc
--- iodev/harddrv.cc 2001/05/15 14:49:56 1.10
+++ iodev/harddrv.cc 2001/05/17 18:09:58
@@ -566,13 +566,21 @@
retrieving revision 1.31
diff -u -r1.31 harddrv.cc
--- iodev/harddrv.cc 2001/09/19 15:10:38 1.31
+++ iodev/harddrv.cc 2001/09/19 15:26:57
@@ -568,13 +568,21 @@
goto return_value8;
case 0x1f6: // hard disk drive and head register
@ -226,7 +211,7 @@ diff -u -r1.10 harddrv.cc
case 0x1f7: // Hard Disk Status
case 0x3f6: // Hard Disk Alternate Status
@@ -1263,13 +1271,15 @@
@@ -1268,13 +1276,15 @@
break;
case 0x1f6: // hard disk drive and head register
@ -241,13 +226,13 @@ diff -u -r1.10 harddrv.cc
// b4: DRV
// b3..0 HD3..HD0
- if ( (value & 0xe0) != 0xa0 ) // 101xxxxx
- BX_INFO(("disk: IO write 1f6 (%02x): not 101xxxxxb\n", (unsigned) value));
- BX_INFO(("IO write 1f6 (%02x): not 101xxxxxb", (unsigned) value));
+ if ( (value & 0xa0) != 0xa0 ) // 1x1xxxxx
+ BX_INFO(("disk: IO write 1f6 (%02x): not 1x1xxxxxb\n", (unsigned) value));
+ BX_INFO(("IO write 1f6 (%02x): not 1x1xxxxxb", (unsigned) value));
BX_HD_THIS drive_select = (value >> 4) & 0x01;
WRITE_HEAD_NO(value & 0xf);
if (BX_SELECTED_CONTROLLER.lba_mode == 0 && ((value >> 6) & 1) == 1)
@@ -1720,11 +1730,13 @@
@@ -1730,11 +1740,13 @@
{
Bit32u logical_sector;