How interchangeable was PC BIOS?
Usually not interchangeable at all. Keep in mind, there is no single PC-BIOS, but a machine BIOS. Different CPUs, chips sets and additional hardware need specific initialisation. And, at least for generic DOS, specific drivers.
To start with, plug-in-compatible bios was only a thing for 100% hardware clones, something only true for early PC, PC-XT and PC-AT. Everything else had to have a specific BIOS anyway.
Already during the late 80s AT class 286 machines diverted from IBM hardware. Examples are Chips&Technologies NEAT chisets or Opti's AT-Controller. While they may look as simple VLSI integration of various (Intel) peripherals into a few new chips, they also added more functionality not found before. For example ROM shadowing (for speed), embedded LIM controllers and more.
In the beginning it might still have worked with some generic BIOS, due default values, guaranteed by hardware - except these usually rendered the additions useless. With more advanced memory controllers, even that will no longer work, as here each chip designer went for his own game.
Heck, it already starts with accessing the BIOS itself. With the inclusion of a BIOS setup (*1) the address space needed soon exhausted the address space provided by default. So ROM switching was added. Of course there was no IBM standard to be copied, so chip manufacturers came up with their own ways.
It is the BIOS job to bring all on board hardware into a working state. Set memory speeds, bank interleaving, burst access and more - just for memory that is. And improvements didn't end with memory.
It has become a bit less diverse since more and more components have been moved into the CPUs, so BIOS will find the same 'I/O' hardware on all boards featuring the same CPU (*2), unifying much of the hardware initialisation (again). Then again, While CPU manufacturers provide default designs to Motherboard manufacturers, they do not simply produce them, but tweek it with additional functions, better routing to allow some overclocking or alike. All of this needs to be reflected in BIOS.
In addition, modern BIOS need to provide a (somewhat) compatible UI interface - the well known BOIS screens. Here even more all hardware needs to be considered, as they have to support many modern media alike.
Long story short: BIOS were already not interchangeable back in the days of 8088/286 computers and they are even less today.
Now, for the additions:
"Obviously No! For it could be no other way." That is plainly incorrect.
But it is the way it is. For any other way, some machine independent way of storing configuration details would be needed - but there is none.
BIOS is just code, and code can be data driven. Configuration code is often data driven, and that's not a recent invention.
To be data driven, the data has to be accessible and supplied from external. Neither of this is true, as a BIOS is self contained and uses at maximum external indicators.
Data for hardware configuration was there in the very beginning (IBM PC Model 5150) as simple DIP switches and/or jumpers. This was followed shortly after with the more sophisticated concept of settings stored in battery-backed CMOS memories, with sensible defaults pre-programmed.
Neither DIP-switches not the CMOS did give sufficient data for configuration. They only held parameters for the BIOS to act on, not description of the hardware features and how to handle them.
For example, already with the original IBM-PC the meaning of the SW2 block varied with the BIOS used and had to be checked/changed according to what BIOS to be put into the ROM slots - in so far my above claim of interchangeability for the original PC is already false.
It didn't change with the introduction of the CMOS storage. Here the content was as well depending on BIOS version and on manufacturer. For example Bit 1 of byte 11h was (just a list from my BIOS scratchbook from back in the days)
- IBM PC-AT: Undefined
- IBM PS/2: Fixed disk type (whole byte), except if ESDI or SCSI
- Award AT BIOS: Typematic setting (whole byte)
- Award BIOS: Password needed for BIOS or BOOT
- AMI Flex BIOS: Typematic setting (whole byte)
- AMI Advanced BIOS: Password needed for BIOS or BOOT
- AMI BIOS: NumLock state after boot
- (something) NEAT BIOS: Map Memory above 640Ki to above 1 Mi
- AMI WinBIOS: NumLock state after boot (but other bits differ from above)
- ... the list goes on for almost a page.
The same is true for many other bytes in there.
Long story short, the CMOS isn't a data enabling device and BIOS independent configuration, but simply a scratchpad used by each BIOS in its own way to keep proprietary settings across a power-off state.
So, a rather fully portable BIOS was always possible, in theory, across machines that were broadly compatible but requiring slightly different hardware configuration or interfacing.
No, as this information was neither part of the 'data' stored in switches or CMOS RAM. They are merely markers and depend on each BIOS.
Bottom Line: Neither DIP-switches nor CMOS contains (standardized) machine, device and BIOS independent information. Their content is only valid for a certain BIOS and a certain chipset compiled by a certain manufacturer.
Doing such would require a storage that describes the machine (like what chips at which ports should perform which operation) in a standardized way and lists the needed BIOS capabilities. But there isn't. all of this information is hard coded within each BIOS image, which makes it only be usable or exactly one setup.
There is a reason that modern OS bring their own basic drivers ... and just think about the huge complexity there is in Linux or Windows, and all of it doesn't help, there's still a need for configuration in multiple steps. It's an illusion that a hard coded system like a BIOS can do this for more than one configutation.
Now, there is some agnostic way (modern) BIOSes operate. For one, they contain way more device initialisation code than their grandfathers and much of this is stored in data tables and run in full or part by generic installation functions, but these tables are not only vendor specific, but also within the BIOS code, so again not independent, external configuration. It only simplifies BIOS coding.
The amount of tables (and code) is configured by the board vendor to suit his needs. So a BIOS from one vendor may not fit a basically compatible board from the same or another vendor. In addition, the core module is as well tailored to a specific CPU or CPU family. So no chance to move a Ryzen BIOS to an Athlon board and even less to some Intel Core something.
As said, that's today's BIOSes with their huge sizes and hidden storage - In the area rewuested the situation was more tight and equally diverse.
*1 - IBM's original PC/XT BIOS didn't need any setup, only the AT introduced changeable defaults - which was done by booting a dedicated setup-disk (or later using some DOS utilities). Clone maker added this as on board functions.
*2 - That's BTW the reason why it's so important to get a BIOS update with new CPU's - they are essentially the whole computer in one module.