- removed useless VLB-IDE support (ISA and PCI IDE are working okay)
- removed dangerous options from the harddrive code
This commit is contained in:
parent
a01347f17d
commit
2b196e5c61
@ -721,9 +721,6 @@ typedef
|
||||
#error To enable USB, you must also enable PCI
|
||||
#endif
|
||||
|
||||
// Promise VLBIDE DC2300 Support
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
|
||||
#define BX_SUPPORT_BUSMOUSE 0
|
||||
|
||||
#define BX_SUPPORT_FPU 0
|
||||
|
94
bochs/configure
vendored
94
bochs/configure
vendored
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in Id: configure.in,v 1.270 2005/02/12 10:37:24 vruppert Exp .
|
||||
# From configure.in Id: configure.in,v 1.271 2005/02/15 20:46:17 vruppert Exp .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.57.
|
||||
#
|
||||
@ -1046,7 +1046,6 @@ Optional Features:
|
||||
--enable-pcidev enable PCI host device mapping support
|
||||
--enable-usb enable limited USB support
|
||||
--enable-pnic enable pseudo NIC support
|
||||
--enable-dc2300-vlb-ide enable Promise DC2300 VLB-IDE support
|
||||
--enable-4meg-pages support 4Megabyte pages extensions
|
||||
--enable-pae support Physical Address Extensions
|
||||
--enable-guest2host-tlb support guest to host addr TLB for speed
|
||||
@ -3540,7 +3539,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 3543 "configure"' > conftest.$ac_ext
|
||||
echo '#line 3542 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -4615,7 +4614,7 @@ fi
|
||||
|
||||
|
||||
# Provide some information about the compiler.
|
||||
echo "$as_me:4618:" \
|
||||
echo "$as_me:4617:" \
|
||||
"checking for Fortran 77 compiler version" >&5
|
||||
ac_compiler=`set X $ac_compile; echo $2`
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
|
||||
@ -5631,11 +5630,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:5634: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:5633: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:5638: \$? = $ac_status" >&5
|
||||
echo "$as_me:5637: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -5864,11 +5863,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:5867: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:5866: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:5871: \$? = $ac_status" >&5
|
||||
echo "$as_me:5870: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -5931,11 +5930,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:5934: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:5933: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:5938: \$? = $ac_status" >&5
|
||||
echo "$as_me:5937: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -7991,7 +7990,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 7994 "configure"
|
||||
#line 7993 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -8089,7 +8088,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8092 "configure"
|
||||
#line 8091 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -10248,11 +10247,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:10251: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:10250: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:10255: \$? = $ac_status" >&5
|
||||
echo "$as_me:10254: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -10315,11 +10314,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:10318: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:10317: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:10322: \$? = $ac_status" >&5
|
||||
echo "$as_me:10321: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -11572,7 +11571,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 11575 "configure"
|
||||
#line 11574 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -11670,7 +11669,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 11673 "configure"
|
||||
#line 11672 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -12493,11 +12492,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12496: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12495: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:12500: \$? = $ac_status" >&5
|
||||
echo "$as_me:12499: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -12560,11 +12559,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12563: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12562: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:12567: \$? = $ac_status" >&5
|
||||
echo "$as_me:12566: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -14554,11 +14553,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14557: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14556: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:14561: \$? = $ac_status" >&5
|
||||
echo "$as_me:14560: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -14787,11 +14786,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14790: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14789: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:14794: \$? = $ac_status" >&5
|
||||
echo "$as_me:14793: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -14854,11 +14853,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14857: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14856: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:14861: \$? = $ac_status" >&5
|
||||
echo "$as_me:14860: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -16914,7 +16913,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 16917 "configure"
|
||||
#line 16916 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -17012,7 +17011,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 17015 "configure"
|
||||
#line 17014 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -19169,7 +19168,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 19172 "configure"
|
||||
#line 19171 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -32395,39 +32394,6 @@ fi
|
||||
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for Promise DC2300 VLB-IDE support" >&5
|
||||
echo $ECHO_N "checking for Promise DC2300 VLB-IDE support... $ECHO_C" >&6
|
||||
# Check whether --enable-dc2300-vlb-ide or --disable-dc2300-vlb-ide was given.
|
||||
if test "${enable_dc2300_vlb_ide+set}" = set; then
|
||||
enableval="$enable_dc2300_vlb_ide"
|
||||
if test "$enableval" = yes; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
else
|
||||
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define BX_PDC20230C_VLBIDE_SUPPORT 0
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
fi;
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for 4Meg pages support" >&5
|
||||
echo $ECHO_N "checking for 4Meg pages support... $ECHO_C" >&6
|
||||
# Check whether --enable-4meg-pages or --disable-4meg-pages was given.
|
||||
|
@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(bochs.h)
|
||||
AC_REVISION([[$Id: configure.in,v 1.270 2005-02-12 10:37:24 vruppert Exp $]])
|
||||
AC_REVISION([[$Id: configure.in,v 1.271 2005-02-15 20:46:17 vruppert Exp $]])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_HEADER(ltdlconf.h)
|
||||
|
||||
@ -918,23 +918,6 @@ fi
|
||||
AC_SUBST(NETLOW_OBJS)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for Promise DC2300 VLB-IDE support)
|
||||
AC_ARG_ENABLE(dc2300-vlb-ide,
|
||||
[ --enable-dc2300-vlb-ide enable Promise DC2300 VLB-IDE support],
|
||||
[if test "$enableval" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 0)
|
||||
fi],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(BX_PDC20230C_VLBIDE_SUPPORT, 0)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for 4Meg pages support)
|
||||
AC_ARG_ENABLE(4meg-pages,
|
||||
[ --enable-4meg-pages support 4Megabyte pages extensions],
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.cc,v 1.129 2005-02-08 18:32:03 vruppert Exp $
|
||||
// $Id: harddrv.cc,v 1.130 2005-02-15 20:46:20 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -45,20 +45,6 @@
|
||||
|
||||
#define LOG_THIS theHardDrive->
|
||||
|
||||
// WARNING: dangerous options!
|
||||
// These options provoke certain kinds of errors for testing purposes when they
|
||||
// are set to a nonzero value. DO NOT ENABLE THEM when using any disk image
|
||||
// you care about.
|
||||
#define TEST_READ_BEYOND_END 0
|
||||
#define TEST_WRITE_BEYOND_END 0
|
||||
#ifdef __GNUC__
|
||||
# if TEST_READ_BEYOND_END || TEST_WRITE_BEYOND_END
|
||||
# warning BEWARE: Dangerous options are enabled in harddrv.cc. If you are not trying to provoke hard drive errors you should disable them right now.
|
||||
# endif
|
||||
#endif
|
||||
// end of dangerous options.
|
||||
|
||||
|
||||
#define INDEX_PULSE_CYCLE 10
|
||||
|
||||
#define PACKET_SIZE 12
|
||||
@ -163,7 +149,7 @@ bx_hard_drive_c::init(void)
|
||||
char string[5];
|
||||
char sbtext[8];
|
||||
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.129 2005-02-08 18:32:03 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: harddrv.cc,v 1.130 2005-02-15 20:46:20 vruppert Exp $"));
|
||||
|
||||
for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) {
|
||||
if (bx_options.ata[channel].Opresent->get() == 1) {
|
||||
@ -450,14 +436,6 @@ bx_hard_drive_c::init(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
BX_HD_THIS pdc20230c.prog_mode = 0;
|
||||
BX_HD_THIS pdc20230c.prog_count = 0;
|
||||
BX_HD_THIS pdc20230c.p1f3_value = 0;
|
||||
BX_HD_THIS pdc20230c.p1f4_value = 0;
|
||||
#endif
|
||||
|
||||
|
||||
// generate CMOS values for hard drive if not using a CMOS image
|
||||
if (!bx_options.cmos.OcmosImage->get ()) {
|
||||
DEV_cmos_set_reg(0x12, 0x00); // start out with: no drive 0, no drive 1
|
||||
@ -692,64 +670,6 @@ bx_hard_drive_c::read(Bit32u address, unsigned io_len)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20230c is only available for first ata channel
|
||||
if (channel == 0) {
|
||||
|
||||
// Detect the switch to programming mode
|
||||
if (!BX_HD_THIS pdc20230c.prog_mode) {
|
||||
switch (port) {
|
||||
case 0x02:
|
||||
if ((BX_HD_THIS pdc20230c.prog_count == 0) || (BX_HD_THIS pdc20230c.prog_count > 2)) {
|
||||
BX_HD_THIS pdc20230c.prog_count++;
|
||||
}
|
||||
else {
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
break;
|
||||
case 0x16:
|
||||
if ((BX_HD_THIS pdc20230c.prog_count == 1) || (BX_HD_THIS pdc20230c.prog_count == 2)) {
|
||||
BX_HD_THIS pdc20230c.prog_count++;
|
||||
}
|
||||
else {
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
BX_HD_THIS pdc20230c.prog_count=0;
|
||||
}
|
||||
|
||||
if (BX_HD_THIS pdc20230c.prog_count == 5) {
|
||||
BX_HD_THIS pdc20230c.prog_mode = 1;
|
||||
BX_SELECTED_CONTROLLER(channel).sector_count &= 0x7f;
|
||||
BX_INFO(("Promise VLB-IDE DC2300: Switching to Programming mode"));
|
||||
}
|
||||
}
|
||||
|
||||
// Returns value when in programming mode
|
||||
if (BX_HD_THIS pdc20230c.prog_mode) {
|
||||
switch (port) {
|
||||
case 0x05:
|
||||
// Leave programming mode
|
||||
BX_HD_THIS pdc20230c.prog_mode = 0;
|
||||
BX_INFO(("Promise VLB-IDE DC2300: Leaving Programming mode"));
|
||||
// Value will be sent be normal code
|
||||
break;
|
||||
case 0x03:
|
||||
// Special programming register
|
||||
value32 = BX_HD_THIS pdc20230c.p1f3_value;
|
||||
GOTO_RETURN_VALUE ;
|
||||
break;
|
||||
case 0x04:
|
||||
// Special programming register
|
||||
value32 = BX_HD_THIS pdc20230c.p1f4_value;
|
||||
GOTO_RETURN_VALUE ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (port) {
|
||||
case 0x00: // hard disk data (16bit) 0x1f0
|
||||
if (BX_SELECTED_CONTROLLER(channel).status.drq == 0) {
|
||||
@ -830,9 +750,6 @@ if (channel == 0) {
|
||||
BX_SELECTED_CONTROLLER(channel).status.drq = 1;
|
||||
BX_SELECTED_CONTROLLER(channel).status.seek_complete = 1;
|
||||
|
||||
#if TEST_READ_BEYOND_END==1
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("multi-sector read reached invalid sector %lu, aborting", (unsigned long)logical_sector));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
@ -1238,26 +1155,6 @@ bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20230c is only available for first ata channel
|
||||
if (channel == 0) {
|
||||
BX_HD_THIS pdc20230c.prog_count = 0;
|
||||
|
||||
if (BX_HD_THIS pdc20230c.prog_mode != 0) {
|
||||
switch (port) {
|
||||
case 0x03:
|
||||
BX_HD_THIS pdc20230c.p1f3_value = value;
|
||||
return;
|
||||
break;
|
||||
case 0x04:
|
||||
BX_HD_THIS pdc20230c.p1f4_value = value;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (bx_dbg.disk || (BX_SELECTED_IS_CD(channel) && bx_dbg.cdrom)) {
|
||||
switch (io_len) {
|
||||
case 1:
|
||||
@ -1330,17 +1227,11 @@ if (channel == 0) {
|
||||
off_t logical_sector;
|
||||
off_t ret;
|
||||
|
||||
#if TEST_WRITE_BEYOND_END==1
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("write reached invalid sector %lu, aborting", (unsigned long)logical_sector));
|
||||
command_aborted (channel, BX_SELECTED_CONTROLLER(channel).current_command);
|
||||
return;
|
||||
}
|
||||
#if TEST_WRITE_BEYOND_END==2
|
||||
logical_sector += 100000;
|
||||
#endif
|
||||
ret = BX_SELECTED_DRIVE(channel).hard_drive->lseek(logical_sector * 512, SEEK_SET);
|
||||
if (ret < 0) {
|
||||
BX_ERROR(("could not lseek() hard drive image file at byte %lu", (unsigned long)logical_sector * 512));
|
||||
@ -2107,17 +1998,11 @@ if (channel == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
#if TEST_READ_BEYOND_END==2
|
||||
BX_SELECTED_CONTROLLER(channel).cylinder_no += 100000;
|
||||
#endif
|
||||
if (!calculate_logical_address(channel, &logical_sector)) {
|
||||
BX_ERROR(("initial read from sector %lu out of bounds, aborting", (unsigned long)logical_sector));
|
||||
command_aborted(channel, value);
|
||||
break;
|
||||
}
|
||||
#if TEST_READ_BEYOND_END==3
|
||||
logical_sector += 100000;
|
||||
#endif
|
||||
ret=BX_SELECTED_DRIVE(channel).hard_drive->lseek(logical_sector * 512, SEEK_SET);
|
||||
if (ret < 0) {
|
||||
BX_ERROR (("could not lseek() hard drive image file, aborting"));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: harddrv.h,v 1.27 2005-02-08 18:32:14 vruppert Exp $
|
||||
// $Id: harddrv.h,v 1.28 2005-02-15 20:46:40 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -758,16 +758,6 @@ private:
|
||||
|
||||
int iolight_timer_index;
|
||||
|
||||
#if BX_PDC20230C_VLBIDE_SUPPORT
|
||||
// pdc20630c is only available for 1st ata channel
|
||||
struct pdc20630c_t {
|
||||
bx_bool prog_mode;
|
||||
Bit8u prog_count;
|
||||
Bit32u p1f3_value;
|
||||
Bit32u p1f4_value;
|
||||
} pdc20230c;
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif // INCLUDE_ONLY_SPARSE_HEADER
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user