- added missing features that are required for winxp boot :

. read port 0x70 (cmos) : return index
  . atapi function 46 and 4a : return error
- put back the log prefix for cmos that disappeared when we did the plugins
This commit is contained in:
Christophe Bothamy 2002-11-25 21:48:22 +00:00
parent 27247753ce
commit e03430ec8d
2 changed files with 19 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: cmos.cc,v 1.26 2002-10-25 11:44:38 bdenney Exp $
// $Id: cmos.cc,v 1.27 2002-11-25 21:48:19 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -63,6 +63,9 @@ libcmos_LTX_plugin_fini(void)
bx_cmos_c::bx_cmos_c(void)
{
put("CMOS");
settype(CMOSLOG);
unsigned i;
for (i=0; i<BX_NUM_CMOS_REGS; i++)
s.reg[i] = 0;
@ -79,7 +82,7 @@ bx_cmos_c::~bx_cmos_c(void)
void
bx_cmos_c::init(void)
{
BX_DEBUG(("Init $Id: cmos.cc,v 1.26 2002-10-25 11:44:38 bdenney Exp $"));
BX_DEBUG(("Init $Id: cmos.cc,v 1.27 2002-11-25 21:48:19 cbothamy Exp $"));
// CMOS RAM & RTC
DEV_register_ioread_handler(this, read_handler, 0x0070, "CMOS RAM", 7);
@ -245,6 +248,11 @@ bx_cmos_c::read(Bit32u address, unsigned io_len)
switch (address) {
case 0x0070:
BX_INFO(("CMOS read of CMOS index. returning 0x%02x", BX_CMOS_THIS s.cmos_mem_address));
ret8 = BX_CMOS_THIS s.cmos_mem_address;
return(ret8);
break;
case 0x0071:
if (BX_CMOS_THIS s.cmos_mem_address >= BX_NUM_CMOS_REGS) {
BX_PANIC(("unsupported cmos io read, register(0x%02x)!",

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: harddrv.cc,v 1.88 2002-11-08 22:14:55 cbothamy Exp $
// $Id: harddrv.cc,v 1.89 2002-11-25 21:48:22 cbothamy Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -175,7 +175,7 @@ bx_hard_drive_c::init(void)
Bit8u channel;
char string[5];
BX_DEBUG(("Init $Id: harddrv.cc,v 1.88 2002-11-08 22:14:55 cbothamy Exp $"));
BX_DEBUG(("Init $Id: harddrv.cc,v 1.89 2002-11-25 21:48:22 cbothamy Exp $"));
for (channel=0; channel<BX_MAX_ATA_CHANNEL; channel++) {
if (bx_options.ata[channel].Opresent->get() == 1) {
@ -1742,6 +1742,8 @@ if ( quantumsMax == 0)
case 0xba: // scan
case 0xbb: // set cd speed
case 0x4e: // stop play/scan
case 0x46: // ???
case 0x4a: // ???
BX_ERROR(("ATAPI command 0x%x not implemented yet",
atapi_command));
atapi_cmd_error(channel, SENSE_ILLEGAL_REQUEST, ASC_INV_FIELD_IN_CMD_PACKET);
@ -1750,6 +1752,9 @@ if ( quantumsMax == 0)
default:
BX_PANIC(("Unknown ATAPI command 0x%x (%d)",
atapi_command, atapi_command));
// We'd better signal the error if the user chose to continue
atapi_cmd_error(channel, SENSE_ILLEGAL_REQUEST, ASC_INV_FIELD_IN_CMD_PACKET);
raise_interrupt(channel);
break;
}
}
@ -2050,6 +2055,8 @@ if ( quantumsMax == 0)
default:
BX_PANIC(("SET FEATURES with unknown subcommand: 0x%02x", (unsigned) BX_SELECTED_CONTROLLER(channel).features ));
// We'd better signal the error if the user chose to continue
command_aborted(channel, value);
}
break;