From 10412cdf1e54cec8b7b472219bb2bc8f2ea3c8ea Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Thu, 3 May 2001 20:40:08 +0000 Subject: [PATCH] - why restrict when people read the sector count? This was causing unnecessary panics on openbsd when sector count was read soon after a reset. --- bochs/iodev/harddrv.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bochs/iodev/harddrv.cc b/bochs/iodev/harddrv.cc index 0088e4c53..daf9d4d72 100644 --- a/bochs/iodev/harddrv.cc +++ b/bochs/iodev/harddrv.cc @@ -489,18 +489,10 @@ bx_hard_drive_c::read(Bit32u address, unsigned io_len) value8 = BX_SELECTED_CONTROLLER.error_register; goto return_value8; break; - case 0x1f2: // hard disk sector count / interrupt reason - if (BX_SELECTED_CONTROLLER.current_command==0x20 || - BX_SELECTED_CONTROLLER.current_command==0x21 || - BX_SELECTED_CONTROLLER.current_command==0x30 || - BX_SELECTED_CONTROLLER.current_command==0xa0) { - value8 = BX_SELECTED_CONTROLLER.sector_count; - goto return_value8; - } - bx_panic("disk: IO read(0x1f2): current command (0x%2x) not read/write\n", BX_SELECTED_CONTROLLER.current_command); + value8 = BX_SELECTED_CONTROLLER.sector_count; + goto return_value8; break; - case 0x1f3: // sector number value8 = BX_SELECTED_CONTROLLER.sector_no; goto return_value8;