fixed compilation error with debugger enabled
- read PCI confAddr value from the devices code for debugger output - PCI confData value isn't needed at all (changes by each read / write access) - PCI framework methods don't need to be virtual
This commit is contained in:
parent
b63d835b30
commit
ab57eb3615
@ -317,7 +317,6 @@ void bx_devices_c::reset(unsigned type)
|
||||
#if BX_SUPPORT_PCI
|
||||
if (pci.enabled) {
|
||||
pci.confAddr = 0;
|
||||
pci.confData = 0;
|
||||
}
|
||||
#endif
|
||||
mem->disable_smram();
|
||||
@ -328,9 +327,8 @@ void bx_devices_c::register_state()
|
||||
{
|
||||
#if BX_SUPPORT_PCI
|
||||
if (pci.enabled) {
|
||||
bx_list_c *list = new bx_list_c(SIM->get_bochs_root(), "devices", "Generic PCI State");
|
||||
bx_list_c *list = new bx_list_c(SIM->get_bochs_root(), "pcicore", "Generic PCI State");
|
||||
BXRS_HEX_PARAM_FIELD(list, confAddr, pci.confAddr);
|
||||
BXRS_HEX_PARAM_FIELD(list, confData, pci.confData);
|
||||
}
|
||||
#endif
|
||||
bx_virt_timer.register_state();
|
||||
@ -429,7 +427,6 @@ Bit32u bx_devices_c::read(Bit32u address, unsigned io_len)
|
||||
}
|
||||
else
|
||||
retval = 0xFFFFFFFF;
|
||||
BX_DEV_THIS pci.confData = retval;
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
@ -485,7 +482,6 @@ void bx_devices_c::write(Bit32u address, Bit32u value, unsigned io_len)
|
||||
if ((io_len <= 4) && (handle < BX_MAX_PCI_DEVICES)) {
|
||||
if (((regnum>=4) && (regnum<=7)) || (regnum==12) || (regnum==13) || (regnum>14)) {
|
||||
BX_DEV_THIS pci.pci_handler[handle].handler->pci_write_handler(regnum, value, io_len);
|
||||
BX_DEV_THIS pci.confData = value << (8 * (address & 0x03));
|
||||
}
|
||||
else
|
||||
BX_DEBUG(("read only register, write ignored"));
|
||||
|
@ -422,18 +422,16 @@ public:
|
||||
void mouse_enabled_changed(bx_bool enabled);
|
||||
void mouse_motion(int delta_x, int delta_y, int delta_z, unsigned button_state, bx_bool absxy);
|
||||
|
||||
virtual bx_bool is_pci_device(const char *name);
|
||||
bx_bool is_pci_device(const char *name);
|
||||
#if BX_SUPPORT_PCI
|
||||
virtual bx_bool register_pci_handlers(bx_pci_device_stub_c *device,
|
||||
Bit8u *devfunc, const char *name,
|
||||
const char *descr);
|
||||
virtual bx_bool pci_set_base_mem(void *this_ptr, memory_handler_t f1,
|
||||
memory_handler_t f2, Bit32u *addr,
|
||||
Bit8u *pci_conf, unsigned size);
|
||||
virtual bx_bool pci_set_base_io(void *this_ptr, bx_read_handler_t f1,
|
||||
bx_write_handler_t f2, Bit32u *addr,
|
||||
Bit8u *pci_conf, unsigned size,
|
||||
const Bit8u *iomask, const char *name);
|
||||
Bit32u pci_get_confAddr(void) {return pci.confAddr;}
|
||||
bx_bool register_pci_handlers(bx_pci_device_stub_c *device, Bit8u *devfunc,
|
||||
const char *name, const char *descr);
|
||||
bx_bool pci_set_base_mem(void *this_ptr, memory_handler_t f1, memory_handler_t f2,
|
||||
Bit32u *addr, Bit8u *pci_conf, unsigned size);
|
||||
bx_bool pci_set_base_io(void *this_ptr, bx_read_handler_t f1, bx_write_handler_t f2,
|
||||
Bit32u *addr, Bit8u *pci_conf, unsigned size,
|
||||
const Bit8u *iomask, const char *name);
|
||||
#endif
|
||||
|
||||
static void timer_handler(void *);
|
||||
@ -571,7 +569,6 @@ private:
|
||||
bx_bool slot_used[BX_N_PCI_SLOTS];
|
||||
|
||||
Bit32u confAddr;
|
||||
Bit32u confData;
|
||||
#endif
|
||||
} pci;
|
||||
|
||||
|
@ -250,8 +250,7 @@ void bx_pci_bridge_c::debug_dump(int argc, char **argv)
|
||||
int arg, i, j, r;
|
||||
|
||||
dbg_printf("i440FX PMC/DBX\n\n");
|
||||
dbg_printf("confAddr = 0x%08x\n", BX_PCI_THIS confAddr);
|
||||
dbg_printf("confData = 0x%08x\n", BX_PCI_THIS confData);
|
||||
dbg_printf("confAddr = 0x%08x\n\n", DEV_pci_get_confAddr());
|
||||
|
||||
if (argc == 0) {
|
||||
for (i = 0x59; i < 0x60; i++) {
|
||||
|
@ -224,6 +224,7 @@ extern "C" {
|
||||
#define DEV_register_pci_handlers(a,b,c,d) \
|
||||
(bx_devices.register_pci_handlers(a,b,c,d))
|
||||
#define DEV_is_pci_device(name) bx_devices.is_pci_device(name)
|
||||
#define DEV_pci_get_confAddr() bx_devices.pci_get_confAddr()
|
||||
#define DEV_pci_set_irq(a,b,c) bx_devices.pluginPci2IsaBridge->pci_set_irq(a,b,c)
|
||||
#define DEV_pci_set_base_mem(a,b,c,d,e,f) \
|
||||
(bx_devices.pci_set_base_mem(a,b,c,d,e,f))
|
||||
|
Loading…
Reference in New Issue
Block a user