(TODO: find a way to call plugin_fini() for non-core devices if plugins are
disabled)
- set the device pointers back to stubs after unloading plugins
- added debug message "Exit" in all device plugin destructors
* IRQ 0, 2 and 13 are usually not connected to the I/O APIC INTIN pins
* if the IRQ line is set to inactive, clear IRR bit (same as PIC, but that
needs to be checked)
* added symbols for I/O APIC input types according to the specs
* TODO: PIC INTR is connected to INTIN0, edge/level handling in I/O APIC and
APIC code, ...
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
Some devices already had one. Some I had to add an empty one.
I did a little cleaning of init() methods to make them more uniform
but generally I left them alone.
- I also put these exact diffs into a patch "patch.iodev-add-reset"
in case I want to revert these changes for some reason, for example
if they break an old patch. It should be deleted after a while.
- fixed handling of rotate_on_autoeoi for master PIC in in IAC()
- removed old IRQ handling functions (trigger_irq / untrigger_irq)
- replaced BX_INFO in case of bx_dbg.pic by BX_DEBUG calls
- new functions raise_irq() and lower_irq()
- all trigger_irq() / untrigger_irq() calls are replaced by the new functions
- REMARK: timer IRQ handling is not correct but it works
- TODO: IOAPIC IRQ handling needs to be changed
probably been treated as ifdef instead, but a sun compiler doesn't like
them. Anyway, they were being used around a check for irq_num > 15.
This bounds check seems ok to do all the time, so I just removed the
#if BX_DEBUG lines and corresponding #endifs.
[ #468340 ] pic:slave: OCW3 not implemented
The service_master_pic() method supported special mask mode but
service_slave_pic() did not. I added the code to service_slave_pic(). I
have no clear way to test that this is actually working right. If I can put
a gdb breakpoint in the pic.cc code and then step through and watch it work,
I'll be more confident.
BX_SUPPORT_APIC were used. To follow the pattern used by other
names like this, I changed them all to BX_SUPPORT_APIC.
Thanks to Tom Lindström for chasing this down!
To see the commit logs for this use either cvsweb or
cvs update -r BRANCH-io-cleanup and then 'cvs log' the various files.
In general this provides a generic interface for logging.
logfunctions:: is a class that is inherited by some classes, and also
. allocated as a standalone global called 'genlog'. All logging uses
. one of the ::info(), ::error(), ::ldebug(), ::panic() methods of this
. class through 'BX_INFO(), BX_ERROR(), BX_DEBUG(), BX_PANIC()' macros
. respectively.
.
. An example usage:
. BX_INFO(("Hello, World!\n"));
iofunctions:: is a class that is allocated once by default, and assigned
as the iofunction of each logfunctions instance. It is this class that
maintains the file descriptor and other output related code, at this
point using vfprintf(). At some future point, someone may choose to
write a gui 'console' for bochs to which messages would be redirected
simply by assigning a different iofunction class to the various logfunctions
objects.
More cleanup is coming, but this works for now. If you want to see alot
of debugging output, in main.cc, change onoff[LOGLEV_DEBUG]=0 to =1.
Comments, bugs, flames, to me: todd@fries.net