From ddd9f03de29942897159a7a51be6c4c0c8ecc7ca Mon Sep 17 00:00:00 2001 From: vruppert Date: Sat, 26 Jul 2008 08:02:27 +0000 Subject: [PATCH] - removed some optional devices from the bx_devices_c object - biosdev is now an optional plugin --- iodev/biosdev.cc | 3 +-- iodev/devices.cc | 27 ++++----------------------- iodev/extfpuirq.cc | 3 +-- iodev/gameport.cc | 3 +-- iodev/iodev.h | 10 +--------- iodev/parallel.cc | 5 ++--- iodev/pcidev.cc | 5 ++--- iodev/pcipnic.cc | 3 +-- iodev/pcivga.cc | 3 +-- iodev/sb16.cc | 3 +-- iodev/soundlnx.cc | 4 ++-- iodev/soundosx.cc | 4 ++-- iodev/soundwin.cc | 4 ++-- 13 files changed, 21 insertions(+), 56 deletions(-) diff --git a/iodev/biosdev.cc b/iodev/biosdev.cc index e96c21f9..c9e297a2 100644 --- a/iodev/biosdev.cc +++ b/iodev/biosdev.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: biosdev.cc,v 1.13 2008/02/15 22:05:41 sshwarts Exp $ +// $Id: biosdev.cc,v 1.14 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -53,7 +53,6 @@ logfunctions *vgabioslog; int libbiosdev_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { theBiosDevice = new bx_biosdev_c(); - bx_devices.pluginBiosDevice = theBiosDevice; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theBiosDevice, BX_PLUGIN_BIOSDEV); return(0); // Success } diff --git a/iodev/devices.cc b/iodev/devices.cc index b0f23780..bb26261f 100644 --- a/iodev/devices.cc +++ b/iodev/devices.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: devices.cc,v 1.121 2008/04/17 14:39:32 sshwarts Exp $ +// $Id: devices.cc,v 1.122 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -78,35 +78,21 @@ void bx_devices_c::init_stubs() #if BX_SUPPORT_ACPI pluginACPIController = &stubACPIController; #endif -#if BX_SUPPORT_PCIVGA - pluginPciVgaAdapter = NULL; -#endif -#if BX_SUPPORT_PCIDEV - pluginPciDevAdapter = NULL; -#endif #if BX_SUPPORT_PCIUSB pluginPciUSBAdapter = &stubUsbAdapter; #endif -#if BX_SUPPORT_PCIPNIC - pluginPciPNicAdapter = NULL; -#endif #endif pit = NULL; pluginKeyboard = &stubKeyboard; pluginDmaDevice = &stubDma; pluginFloppyDevice = &stubFloppy; - pluginBiosDevice = NULL; pluginCmosDevice = &stubCmos; pluginSerialDevice = &stubSerial; - pluginParallelDevice = NULL; pluginUnmapped = NULL; pluginVgaDevice = &stubVga; pluginPicDevice = &stubPic; pluginHardDrive = &stubHardDrive; - pluginSB16Device = NULL; pluginNE2kDevice =&stubNE2k; - pluginExtFpuIrq = NULL; - pluginGameport = NULL; pluginSpeaker = &stubSpeaker; #if BX_SUPPORT_BUSMOUSE pluginBusMouse = &stubBusMouse; @@ -124,7 +110,7 @@ void bx_devices_c::init(BX_MEM_C *newmem) unsigned i; const char def_name[] = "Default"; - BX_DEBUG(("Init $Id: devices.cc,v 1.121 2008/04/17 14:39:32 sshwarts Exp $")); + BX_DEBUG(("Init $Id: devices.cc,v 1.122 2008/07/26 08:02:27 vruppert Exp $")); mem = newmem; /* set no-default handlers, will be overwritten by the real default handler */ @@ -166,14 +152,14 @@ void bx_devices_c::init(BX_MEM_C *newmem) // "by hand" in this file. Basically, we're using core plugins when we // want to control the init order. // - // CB: UNMAPPED and BIOSDEV should maybe be optional + // CB: UNMAPPED should maybe be optional PLUG_load_plugin(unmapped, PLUGTYPE_CORE); - PLUG_load_plugin(biosdev, PLUGTYPE_CORE); PLUG_load_plugin(cmos, PLUGTYPE_CORE); PLUG_load_plugin(dma, PLUGTYPE_CORE); PLUG_load_plugin(pic, PLUGTYPE_CORE); PLUG_load_plugin(vga, PLUGTYPE_CORE); PLUG_load_plugin(floppy, PLUGTYPE_CORE); + PLUG_load_plugin(biosdev, PLUGTYPE_OPTIONAL); PLUG_load_plugin(harddrv, PLUGTYPE_OPTIONAL); PLUG_load_plugin(keyboard, PLUGTYPE_OPTIONAL); #if BX_SUPPORT_BUSMOUSE @@ -244,9 +230,6 @@ void bx_devices_c::init(BX_MEM_C *newmem) ioapic->init (); #endif - // BIOS log - pluginBiosDevice->init (); - // CMOS RAM & RTC pluginCmosDevice->init (); @@ -344,7 +327,6 @@ void bx_devices_c::reset(unsigned type) #if BX_SUPPORT_APIC ioapic->reset(type); #endif - pluginBiosDevice->reset(type); pluginCmosDevice->reset(type); pluginDmaDevice->reset(type); pluginFloppyDevice->reset(type); @@ -422,7 +404,6 @@ void bx_devices_c::exit() bx_slowdown_timer.exit(); PLUG_unload_plugin(unmapped); - PLUG_unload_plugin(biosdev); PLUG_unload_plugin(cmos); PLUG_unload_plugin(dma); PLUG_unload_plugin(pic); diff --git a/iodev/extfpuirq.cc b/iodev/extfpuirq.cc index a296441e..e19c5155 100644 --- a/iodev/extfpuirq.cc +++ b/iodev/extfpuirq.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: extfpuirq.cc,v 1.9 2008/01/26 22:24:01 sshwarts Exp $ +// $Id: extfpuirq.cc,v 1.10 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -42,7 +42,6 @@ bx_extfpuirq_c *theExternalFpuIrq = NULL; int libextfpuirq_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { theExternalFpuIrq = new bx_extfpuirq_c(); - bx_devices.pluginExtFpuIrq = theExternalFpuIrq; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theExternalFpuIrq, BX_PLUGIN_EXTFPUIRQ); return(0); // Success } diff --git a/iodev/gameport.cc b/iodev/gameport.cc index 84efd7b1..1a559d50 100644 --- a/iodev/gameport.cc +++ b/iodev/gameport.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: gameport.cc,v 1.15 2008/01/26 22:24:02 sshwarts Exp $ +// $Id: gameport.cc,v 1.16 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2003 MandrakeSoft S.A. @@ -62,7 +62,6 @@ bx_gameport_c *theGameport = NULL; int libgameport_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { theGameport = new bx_gameport_c(); - bx_devices.pluginGameport = theGameport; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theGameport, BX_PLUGIN_GAMEPORT); return(0); // Success } diff --git a/iodev/iodev.h b/iodev/iodev.h index 4ab74ff4..a8c473db 100644 --- a/iodev/iodev.h +++ b/iodev/iodev.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: iodev.h,v 1.94 2008/06/11 21:10:02 sshwarts Exp $ +// $Id: iodev.h,v 1.95 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -417,7 +417,6 @@ public: static void timer_handler(void *); void timer(void); - bx_devmodel_c *pluginBiosDevice; #if BX_SUPPORT_APIC bx_ioapic_c *ioapic; #endif @@ -427,9 +426,6 @@ public: #if BX_SUPPORT_ACPI bx_acpi_ctrl_stub_c *pluginACPIController; #endif - bx_devmodel_c *pluginPciVgaAdapter; - bx_devmodel_c *pluginPciDevAdapter; - bx_devmodel_c *pluginPciPNicAdapter; bx_pit_c *pit; bx_keyb_stub_c *pluginKeyboard; bx_dma_stub_c *pluginDmaDevice; @@ -439,15 +435,11 @@ public: #if BX_SUPPORT_PCIUSB bx_pci_usb_stub_c *pluginPciUSBAdapter; #endif - bx_devmodel_c *pluginParallelDevice; bx_devmodel_c *pluginUnmapped; bx_vga_stub_c *pluginVgaDevice; bx_pic_stub_c *pluginPicDevice; bx_hard_drive_stub_c *pluginHardDrive; - bx_devmodel_c *pluginSB16Device; bx_ne2k_stub_c *pluginNE2kDevice; - bx_devmodel_c *pluginExtFpuIrq; - bx_devmodel_c *pluginGameport; bx_speaker_stub_c *pluginSpeaker; #if BX_SUPPORT_BUSMOUSE bx_busm_stub_c *pluginBusMouse; diff --git a/iodev/parallel.cc b/iodev/parallel.cc index e4824350..5400b00d 100644 --- a/iodev/parallel.cc +++ b/iodev/parallel.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: parallel.cc,v 1.34 2008/01/26 22:24:02 sshwarts Exp $ +// $Id: parallel.cc,v 1.35 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -42,7 +42,6 @@ bx_parallel_c *theParallelDevice = NULL; int libparallel_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { theParallelDevice = new bx_parallel_c(); - bx_devices.pluginParallelDevice = theParallelDevice; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theParallelDevice, BX_PLUGIN_PARALLEL); return(0); // Success } @@ -77,7 +76,7 @@ void bx_parallel_c::init(void) char name[16], pname[20]; bx_list_c *base; - BX_DEBUG(("Init $Id: parallel.cc,v 1.34 2008/01/26 22:24:02 sshwarts Exp $")); + BX_DEBUG(("Init $Id: parallel.cc,v 1.35 2008/07/26 08:02:27 vruppert Exp $")); for (unsigned i=0; idevfunc, pcidev->intpin, 0); /* diff --git a/iodev/pcipnic.cc b/iodev/pcipnic.cc index 3a2b61f8..fa8946f7 100644 --- a/iodev/pcipnic.cc +++ b/iodev/pcipnic.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: pcipnic.cc,v 1.27 2008/02/15 22:05:43 sshwarts Exp $ +// $Id: pcipnic.cc,v 1.28 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2003 Fen Systems Ltd. @@ -40,7 +40,6 @@ const Bit8u pnic_iomask[16] = {2, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int libpcipnic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { thePNICDevice = new bx_pcipnic_c(); - bx_devices.pluginPciPNicAdapter = thePNICDevice; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, thePNICDevice, BX_PLUGIN_PCIPNIC); return 0; // Success } diff --git a/iodev/pcivga.cc b/iodev/pcivga.cc index 706b0aba..3285dd19 100644 --- a/iodev/pcivga.cc +++ b/iodev/pcivga.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: pcivga.cc,v 1.17 2008/01/26 22:24:02 sshwarts Exp $ +// $Id: pcivga.cc,v 1.18 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002,2003 Mike Nordell @@ -43,7 +43,6 @@ bx_pcivga_c* thePciVgaAdapter = 0; int libpcivga_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { thePciVgaAdapter = new bx_pcivga_c(); - bx_devices.pluginPciVgaAdapter = thePciVgaAdapter; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, thePciVgaAdapter, BX_PLUGIN_PCIVGA); return 0; // Success } diff --git a/iodev/sb16.cc b/iodev/sb16.cc index 03d33cd7..415be622 100644 --- a/iodev/sb16.cc +++ b/iodev/sb16.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: sb16.cc,v 1.61 2008/07/20 21:05:21 vruppert Exp $ +// $Id: sb16.cc,v 1.62 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -47,7 +47,6 @@ bx_sb16_c *theSB16Device = NULL; int libsb16_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]) { theSB16Device = new bx_sb16_c(); - bx_devices.pluginSB16Device = theSB16Device; BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theSB16Device, BX_PLUGIN_SB16); return(0); // Success } diff --git a/iodev/soundlnx.cc b/iodev/soundlnx.cc index 0ac91034..46c29f0c 100644 --- a/iodev/soundlnx.cc +++ b/iodev/soundlnx.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: soundlnx.cc,v 1.17 2008/07/20 08:08:23 vruppert Exp $ +// $Id: soundlnx.cc,v 1.18 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -36,7 +36,7 @@ #if (defined(linux) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && BX_SUPPORT_SB16 -#define LOG_THIS bx_devices.pluginSB16Device-> +#define LOG_THIS sb16-> #include "soundlnx.h" diff --git a/iodev/soundosx.cc b/iodev/soundosx.cc index 1df3106e..47211bfb 100644 --- a/iodev/soundosx.cc +++ b/iodev/soundosx.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: soundosx.cc,v 1.9 2008/02/15 22:05:43 sshwarts Exp $ +// $Id: soundosx.cc,v 1.10 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // This file (SOUNDOSX.CC) written and donated by Brian Huffman @@ -20,7 +20,7 @@ #if defined(macintosh) && BX_SUPPORT_SB16 -#define LOG_THIS bx_devices.pluginSB16Device-> +#define LOG_THIS sb16-> #include "soundosx.h" diff --git a/iodev/soundwin.cc b/iodev/soundwin.cc index ee3d6711..fda6a46c 100644 --- a/iodev/soundwin.cc +++ b/iodev/soundwin.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: soundwin.cc,v 1.20 2008/02/15 22:05:43 sshwarts Exp $ +// $Id: soundwin.cc,v 1.21 2008/07/26 08:02:27 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2001 MandrakeSoft S.A. @@ -41,7 +41,7 @@ #include "soundwin.h" -#define LOG_THIS bx_devices.pluginSB16Device-> +#define LOG_THIS sb16-> bx_sound_windows_c::bx_sound_windows_c(bx_sb16_c *sb16) :bx_sound_output_c(sb16) -- 2.11.4.GIT