How does the BIOS disable a controller on the motherboard?

2

What happens when you disable a controller in the BIOS? How does it stop the OS from picking it up when it scans the buses for devices.

Does it stop power going to the controller, if so how does it do that?

Any help would be appreciated.

Thanks.

RJSmith92

Posted 2013-10-08T20:37:41.913

Reputation: 820

Would depend on the type of motherboard and BIOS (Basic Input and Output System) being used. Most likely, the BIOS just doesn't tell the system about the devices, so power could still be put through (as a way to charge electronic devices, for instance). – Doktoro Reichard – 2013-10-08T20:43:34.490

Also, what controllers? – Austin T French – 2013-10-08T20:46:47.233

For example the on-board NIC, when I go into the BIOS and disable it and then go into Device Manager, the controller isn't there. I presumed the BIOS cuts power off to the controller. Thanks – RJSmith92 – 2013-10-08T20:50:25.423

@DoktoroReichard That used to be it, except most modern OS's do their own hardware detection/abstraction instead of depending on the BIOS (matters more now that BIOS is becoming Legacy to UEFI). – Ƭᴇcʜιᴇ007 – 2013-10-08T20:52:33.553

I thought it was that @techie007. The OS ignores the BIOS abstraction layer an interacts with the hardware directly. – RJSmith92 – 2013-10-08T20:54:41.047

Answers

2

A motherboard's chipset typically looks like a PCI-E device to the BIOS. It also can control the appearance of other hardware to the rest of the system and would be most likely to be involved in this function.

The chipset's PCI-E device likely has registers that enable or disable other hardware in the system, as well as "lock bit" registers that say "don't accept any more changes until next reset." The BIOS reads the NVRAM and configures the chipset accordingly, then locks it.

The ability to disable virtualization support, as well as locking this change until reboot, is built-in to the CPU itself, changeable via one of the CPU's MSRs. Some other capability may also be controlled by this mechanism. Again, the BIOS would typically program the MSRs in the desired fashion before handing control to a bootloader.

It's also possible that reads and writes to certain I/O ports, memory addresses, I2C or SMBus addresses can also control the appearance of hardware. Most of this stuff would fall under ACPI.

LawrenceC

Posted 2013-10-08T20:37:41.913

Reputation: 63 487

Well, they can't quite "not do anything at all" because in order to receive resource assignment they have to be enumerated on the bus - and enumeration requires that the respond to memory reads in PCI configuration space, which each device populates. Configuration requires that they respond to writes as well. So if they couldn't do anything at all they'd simply be invisible on the bus. – Jamie Hanrahan – 2015-09-02T20:59:25.647

Thanks for the answer @ultrasawblade, so just to clarify, the BIOS disables a device by configuring it rather than cutting off power the device? Does this mean that you can only disable onboard controllers in the BIOS as the BIOS knows how to use them, it wouldn't know how to disable expansion cards without drivers? – RJSmith92 – 2013-10-09T11:14:27.153

I'm not keen on the fine details but PCI/PCI-E cards are expressly designed to not do anything until they receive resource assignment from the BIOS or OS. Whether or not that translates to no power consumption depends on the device. As far as making an expansion device invisible, it'd be something a chipset could do I'm sure. I can't think of any but there may be BIOSes out there that can disable specific PCI cards. There's no standard power controlling function in a standard PC. Anything of that nature would be a feature of the device, even if it's an internal device. – LawrenceC – 2013-10-10T00:20:59.153

2

Usually, yes the motherboard can and will cut power from the disabled device (not always, and/or not always enough power to be noticeable). But this is not the only way it can make the device unavailable to the OS.

It can control power to devices because one of the motherboard's primary jobs is to control electricity to and from devices (power, data, 1 vs. 0, on vs. off, etc.).

Ƭᴇcʜιᴇ007

Posted 2013-10-08T20:37:41.913

Reputation: 103 763