The way the standard BIOS was done was a huge mistake for the x86 systems. Microware OS9 (for the 6809/68000) used to have device modules. They were small files that were tweaked for the machine that could be on disk on in ROM. A serial driver device module would say something like "use chip driver mc68681.drv, interrupt 4 and memory i/o of 0x80008". There was a second name module that gave names to com1 and com2 for the device module. The chip driver would be loaded off disk and the ROM based name module or device module could be replaced from one on the disk. The main processing loop of the OS knew how to share interrupts as the modules contained enough info to figure out which chip caused the interrupt. It could reload an reinitialize modules. Add a few fields for PCI style IDs and device UUIDs and it could be used on all modern hardware.