Only rename bx_pci2isa_c class

This commit is contained in:
Stanislav Shwartsman 2006-08-21 21:29:16 +00:00
parent eade11529f
commit 8d7919dadd
2 changed files with 24 additions and 24 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: pci2isa.cc,v 1.35 2006-06-14 16:44:33 sshwarts Exp $
// $Id: pci2isa.cc,v 1.36 2006-08-21 21:29:16 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -38,11 +38,11 @@
#define LOG_THIS thePci2IsaBridge->
bx_pci2isa_c *thePci2IsaBridge = NULL;
bx_piix3_c *thePci2IsaBridge = NULL;
int libpci2isa_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
{
thePci2IsaBridge = new bx_pci2isa_c ();
thePci2IsaBridge = new bx_piix3_c ();
bx_devices.pluginPci2IsaBridge = thePci2IsaBridge;
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, thePci2IsaBridge, BX_PLUGIN_PCI2ISA);
return(0); // Success
@ -50,18 +50,18 @@ int libpci2isa_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, ch
void libpci2isa_LTX_plugin_fini(void) {}
bx_pci2isa_c::bx_pci2isa_c()
bx_piix3_c::bx_piix3_c()
{
put("P2I");
settype(PCI2ISALOG);
}
bx_pci2isa_c::~bx_pci2isa_c()
bx_piix3_c::~bx_piix3_c()
{
// nothing for now
}
void bx_pci2isa_c::init(void)
void bx_piix3_c::init(void)
{
unsigned i;
// called once when bochs initializes
@ -104,7 +104,7 @@ void bx_pci2isa_c::init(void)
BX_P2I_THIS s.pci_conf[0x63] = 0x80;
}
void bx_pci2isa_c::reset(unsigned type)
void bx_piix3_c::reset(unsigned type)
{
BX_P2I_THIS s.pci_conf[0x05] = 0x00;
BX_P2I_THIS s.pci_conf[0x06] = 0x00;
@ -146,7 +146,7 @@ void bx_pci2isa_c::reset(unsigned type)
}
#if BX_SUPPORT_SAVE_RESTORE
void bx_pci2isa_c::register_state(void)
void bx_piix3_c::register_state(void)
{
unsigned i;
char name[6];
@ -175,7 +175,7 @@ void bx_pci2isa_c::register_state(void)
}
}
void bx_pci2isa_c::after_restore_state(void)
void bx_piix3_c::after_restore_state(void)
{
for (unsigned i=0; i<16; i++) {
if (BX_P2I_THIS s.irq_registry[i]) {
@ -185,7 +185,7 @@ void bx_pci2isa_c::after_restore_state(void)
}
#endif
void bx_pci2isa_c::pci_register_irq(unsigned pirq, unsigned irq)
void bx_piix3_c::pci_register_irq(unsigned pirq, unsigned irq)
{
if ((irq < 16) && (((1 << irq) & 0xdef8) > 0)) {
if (BX_P2I_THIS s.pci_conf[0x60 + pirq] < 16) {
@ -199,7 +199,7 @@ void bx_pci2isa_c::pci_register_irq(unsigned pirq, unsigned irq)
}
}
void bx_pci2isa_c::pci_unregister_irq(unsigned pirq)
void bx_piix3_c::pci_unregister_irq(unsigned pirq)
{
Bit8u irq = BX_P2I_THIS s.pci_conf[0x60 + pirq];
if (irq < 16) {
@ -212,7 +212,7 @@ void bx_pci2isa_c::pci_unregister_irq(unsigned pirq)
}
}
void bx_pci2isa_c::pci_set_irq(Bit8u devfunc, unsigned line, bx_bool level)
void bx_piix3_c::pci_set_irq(Bit8u devfunc, unsigned line, bx_bool level)
{
Bit8u pirq = ((devfunc >> 3) + line - 2) & 0x03;
#if BX_SUPPORT_APIC
@ -242,14 +242,14 @@ void bx_pci2isa_c::pci_set_irq(Bit8u devfunc, unsigned line, bx_bool level)
// static IO port read callback handler
// redirects to non-static class handler to avoid virtual functions
Bit32u bx_pci2isa_c::read_handler(void *this_ptr, Bit32u address, unsigned io_len)
Bit32u bx_piix3_c::read_handler(void *this_ptr, Bit32u address, unsigned io_len)
{
#if !BX_USE_P2I_SMF
bx_pci2isa_c *class_ptr = (bx_pci2isa_c *) this_ptr;
bx_piix3_c *class_ptr = (bx_piix3_c *) this_ptr;
return class_ptr->read(address, io_len);
}
Bit32u bx_pci2isa_c::read(Bit32u address, unsigned io_len)
Bit32u bx_piix3_c::read(Bit32u address, unsigned io_len)
{
#else
UNUSED(this_ptr);
@ -278,14 +278,14 @@ Bit32u bx_pci2isa_c::read(Bit32u address, unsigned io_len)
// static IO port write callback handler
// redirects to non-static class handler to avoid virtual functions
void bx_pci2isa_c::write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len)
void bx_piix3_c::write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len)
{
#if !BX_USE_P2I_SMF
bx_pci2isa_c *class_ptr = (bx_pci2isa_c *) this_ptr;
bx_piix3_c *class_ptr = (bx_piix3_c *) this_ptr;
class_ptr->write(address, value, io_len);
}
void bx_pci2isa_c::write(Bit32u address, Bit32u value, unsigned io_len)
void bx_piix3_c::write(Bit32u address, Bit32u value, unsigned io_len)
{
#else
UNUSED(this_ptr);
@ -330,7 +330,7 @@ void bx_pci2isa_c::write(Bit32u address, Bit32u value, unsigned io_len)
}
// pci configuration space read callback handler
Bit32u bx_pci2isa_c::pci_read_handler(Bit8u address, unsigned io_len)
Bit32u bx_piix3_c::pci_read_handler(Bit8u address, unsigned io_len)
{
Bit32u value = 0;
@ -346,7 +346,7 @@ Bit32u bx_pci2isa_c::pci_read_handler(Bit8u address, unsigned io_len)
}
// pci configuration space write callback handler
void bx_pci2isa_c::pci_write_handler(Bit8u address, Bit32u value, unsigned io_len)
void bx_piix3_c::pci_write_handler(Bit8u address, Bit32u value, unsigned io_len)
{
if ((address >= 0x10) && (address < 0x34))
return;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: pci2isa.h,v 1.13 2006-05-27 15:54:48 sshwarts Exp $
// $Id: pci2isa.h,v 1.14 2006-08-21 21:29:16 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -37,10 +37,10 @@
#endif
class bx_pci2isa_c : public bx_pci2isa_stub_c {
class bx_piix3_c : public bx_pci2isa_stub_c {
public:
bx_pci2isa_c();
virtual ~bx_pci2isa_c();
bx_piix3_c();
virtual ~bx_piix3_c();
virtual void init(void);
virtual void reset(unsigned type);
virtual void pci_set_irq(Bit8u devfunc, unsigned line, bx_bool level);