Changeset 35096 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Dec 14, 2010 3:48:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r35068 r35096 228 228 # define VBOX_IS_SCSI_DEVICE(device_id) (device_id >= BX_MAX_ATA_DEVICES) 229 229 # define VBOX_GET_SCSI_DEVICE(device_id) (device_id - BX_MAX_ATA_DEVICES) 230 #else 231 # define BX_MAX_STORAGE_DEVICES BX_MAX_ATA_DEVICES 230 232 #endif 231 233 … … 5453 5455 write_byte(0x0040, 0x008e, 0); // clear completion flag 5454 5456 5455 #ifdef VBOX_WITH_SCSI5456 5457 // basic check : device has to be defined 5457 5458 if ( (GET_ELDL() < 0x80) || (GET_ELDL() >= 0x80 + BX_MAX_STORAGE_DEVICES) ) { 5458 BX_ INFO("int13_harddisk: function %02x, ELDL out of range %02x\n", GET_AH(), GET_ELDL());5459 BX_DEBUG("int13_harddisk: function %02x, ELDL out of range %02x\n", GET_AH(), GET_ELDL()); 5459 5460 goto int13_fail; 5460 5461 } 5461 #else 5462 // basic check : device has to be defined 5463 if ( (GET_ELDL() < 0x80) || (GET_ELDL() >= 0x80 + BX_MAX_ATA_DEVICES) ) { 5464 BX_INFO("int13_harddisk: function %02x, ELDL out of range %02x\n", GET_AH(), GET_ELDL()); 5462 5463 // Get the ata channel 5464 device=read_byte(ebda_seg,&EbdaData->ata.hdidmap[GET_ELDL()-0x80]); 5465 5466 // basic check : device has to be valid 5467 if (device >= BX_MAX_STORAGE_DEVICES) { 5468 BX_DEBUG("int13_harddisk: function %02x, unmapped device for ELDL=%02x\n", GET_AH(), GET_ELDL()); 5465 5469 goto int13_fail; 5466 5470 } 5467 #endif5468 5469 // Get the ata channel5470 device=read_byte(ebda_seg,&EbdaData->ata.hdidmap[GET_ELDL()-0x80]);5471 5472 #ifdef VBOX_WITH_SCSI5473 // basic check : device has to be valid5474 if (device >= BX_MAX_STORAGE_DEVICES) {5475 BX_INFO("int13_harddisk: function %02x, unmapped device for ELDL=%02x\n", GET_AH(), GET_ELDL());5476 goto int13_fail;5477 }5478 #else5479 // basic check : device has to be valid5480 if (device >= BX_MAX_ATA_DEVICES) {5481 BX_INFO("int13_harddisk: function %02x, unmapped device for ELDL=%02x\n", GET_AH(), GET_ELDL());5482 goto int13_fail;5483 }5484 #endif5485 5471 5486 5472 switch (GET_AH()) { … … 5543 5529 // sanity check on cyl heads, sec 5544 5530 if( (cylinder >= nlc) || (head >= nlh) || (sector > nlspt )) { 5545 BX_INFO("int13_harddisk: function %02x, parameters out of range %04x/%04x/%04x!\n", GET_AH(), cylinder, head, sector);5531 BX_INFO("int13_harddisk: function %02x, disk %02x, parameters out of range %04x/%04x/%04x!\n", GET_AH(), GET_DL(), cylinder, head, sector); 5546 5532 goto int13_fail; 5547 5533 } … … 6023 6009 /* basic check : device should be 0xE0+ */ 6024 6010 if( (GET_ELDL() < 0xE0) || (GET_ELDL() >= 0xE0+BX_MAX_ATA_DEVICES) ) { 6025 BX_ INFO("int13_cdrom: function %02x, ELDL out of range %02x\n", GET_AH(), GET_ELDL());6011 BX_DEBUG("int13_cdrom: function %02x, ELDL out of range %02x\n", GET_AH(), GET_ELDL()); 6026 6012 goto int13_fail; 6027 6013 } … … 6032 6018 /* basic check : device has to be valid */ 6033 6019 if (device >= BX_MAX_ATA_DEVICES) { 6034 BX_ INFO("int13_cdrom: function %02x, unmapped device for ELDL=%02x\n", GET_AH(), GET_ELDL());6020 BX_DEBUG("int13_cdrom: function %02x, unmapped device for ELDL=%02x\n", GET_AH(), GET_ELDL()); 6035 6021 goto int13_fail; 6036 6022 }
Note:
See TracChangeset
for help on using the changeset viewer.