3.8.1 BIOSUEFI.txt
Document Details

Uploaded by LawfulJadeite
Collegetown University
Full Transcript
Current Segment IndicatorBIOS/UEFI 0:00-2:38 In this lesson, we’re going to talk about BIOS and CMOS. For the sake of clarification, when we say BIOS and CMOS we’re really talking about four things: UEFI, legacy BIOS, CMOS, and EEPROM. UEFI stands for Unified Extensible Firmware Interface and is a f...
Current Segment IndicatorBIOS/UEFI 0:00-2:38 In this lesson, we’re going to talk about BIOS and CMOS. For the sake of clarification, when we say BIOS and CMOS we’re really talking about four things: UEFI, legacy BIOS, CMOS, and EEPROM. UEFI stands for Unified Extensible Firmware Interface and is a firmware interface for PCs. It was designed to replace the BIOS. The UEFI design improves the software interoperability and the address limitations of BIOS. It also provides better security to protect against bootkit attacks. UEFI provides faster start-up time, support for drives larger than 2.2 TB, support for 64-bit firmware device drivers, and compatibility with both BIOS and UEFI hardware. Most PCs use UEFI but some still use a legacy BIOS. Because of this, the term BIOS has become a generic term referring to both UEFI and legacy BIOS. The term CMOS has also become a generic term because CMOS chips have been replaced by Electrically Erasable Programmable Read-only Memory or EEPROM chips. Yet, many people still call them CMOS. EEPROM is a type of non-volatile memory used in computers and other electronic devices to store relatively small amounts of data. EEPROM also replaced EPROM chips and have been used for computer BIOS since 1994. EEPROM allows individual bytes to be erased and reprogrammed. Meaning that you can update the BIOS in your computer without having to open the computer and remove any chips. Now that we’ve cleared that up, in this lesson we’ll use the generically accepted terms of BIOS and CMOS because it will be important for you to know them both. To understand the BIOS, the CMOS, and the role that they play in a PC system, you need to understand that the CPU inside the PC doesn’t know how to directly communicate with the other devices that are installed on the motherboard. Furthermore, the CPU doesn’t know how to contact RAM or the storage devices connected to the motherboard. In order for the CPU to do this, it needs software. It needs programming. And it needs a set of instructions that tell it how to communicate with these devices. The problem is that the CPU can’t store the software in the RAM or disk because it doesn’t know how to communicate with the RAM or the hard disk natively. So, it can’t load the software it needs to communicate with these devices from these devices. So, what do we do? ROM 2:39-4:04 Well, what we do is implement a special chip in the motherboard called a ROM chip. ROM stands for Read-only Memory. A ROM chip is kind of like a RAM chip, a Random Access Memory chip. However, a ROM chip retains its contents even if the system is powered off. This is called persistent data. A RAM chip loses its content when the PC is turned off. However, ROM chips, unlike RAM chips, can’t be written to. Whatever was written on that ROM chip when it left the factory, is what’s there. You can’t add information to it. ROM chips installed in the motherboard contain hundreds of little programs that were burned into the ROM before it left the factory. These little programs allow the CPU to communicate with various devices attached to the motherboard like the keyboard, the disk drives, and the memory. The CPU reads the information from the ROM chip the same way it reads information from the RAM. All of the hundreds of little programs stored on the ROM chip are collectively referred to as the basic input-output services or BIOS chip. Most of the ROM chips used by PC systems with a BIOS vary from 365 KB to 1 MB in size. Now, in the industry, we say BIOS chip, but the BIOS is not really the ROM chip itself. The BIOS is really the software on the ROM chip. Devices 4:05-4:29 Devices that are connected to or a part of the motherboard can be categorized into three different categories. We have devices that have non-configurable parameters and aren’t likely to ever be replaced. We have devices that have configurable parameters or that are likely to be changed from time-to-time. And then we have custom devices that may or may not be present in any given system. Non-configurable Devices 4:30-4:57 Let’s first talk about non-configurable devices. These types of devices can be handled by the BIOS alone. Because the parameters don’t change, nothing has to be changed in the programming that allows the CPU to communicate with that given device. These are devices such as the keyboard, or the system speaker, not audio speakers that you listen to music through, but the speaker that is built into the PC case that provides a simple beeping sound. Configurable Devices 4:58-5:58 The second category are configurable devices with parameters that can be changed or upgraded from time-to-time. The BIOS can’t handle these parameters alone because the presence of the device, the quantities, or parameters may change from system to system. For example, we can have 1 GB of memory in one machine and 4 GB in another machine. We can have a 40 GB or 250 GB hard drive installed in the system. If we had only a BIOS, then theoretically, if we changed anything in the system like adding more memory or adding a bigger hard drive, then we’d have to install a new BIOS chip that supported the new parameters associated with those new devices because the BIOS isn’t re-writable. Instead, PCs use a second RAM chip in conjunction to the ROM chip that can be written to and read from. These chips are called EEPROM chips. However, most people still refer to them as CMOS. I’ll introduce you to CMOS in a minute. Custom Devices 5:59-7:41 This brings us to the third category of devices present in the PC system. These include devices like sound cards, network adapters and video cards. There’s an endless variety of different types of cards that can be inserted into the expansion slots of the PC. Within each category like sound boards, there’s an endless variety of different models that can be installed. You can buy a sound card from this manufacturer or that manufacturer. They all do the same thing, but they’re built slightly differently. The problem with custom devices is that there’s no feasible way to build a BIOS ROM chip or a CMOS RAM chip that’s extensive enough to accommodate every last different type of device that you could possibly put in the PC. So, your PC system uses one of two strategies to allow the CPU to communicate with these types of devices. The first strategy is to put Option ROM or OPROM into the devices. OPROM is firmware run by the PC BIOS during platform initialization. Option ROM is usually stored on a plugin card but it can also reside on the system board. Devices like video cards, network adapters, and storage drivers for RAID modules contain OPROM. Option ROM also provides firmware drivers to the PC. A second strategy is to use device drivers. This is the more common strategy used for sound cards, network adapters, and all kinds of other devices. In this case, we aren’t really using the BIOS to address these devices. Instead, we’re using a device driver which is a piece of software that’s loaded by the operating system. It tells the CPU how to address the sound card or how to address the network board. CMOS 7:42-9:44 Now, let’s talk about CMOS. CMOS stands for Complementary Metal Oxide Semiconductor. The CMOS is RAM, Random Access Memory. The CMOS contains the parameters that BIOS programs need in order to access certain devices. The BIOS, on the other hand, contains programs that the CPU needs in order to communicate with various devices on the motherboard. The BIOS is hard-wired ROM memory, read-only memory, so it cannot be rewritten. For example, let’s say we add a new hard drive into our system. Because this new hard drive has different parameters from the one that was there before, we need to update the CMOS with the new parameters for the new hard drive so that the CPU can access the hard drive. The CPU loads the appropriate programs from the BIOS. Since these programs need the parameters that the CMOS already has, these programs contact the CMOS and ask it for the location where data can be stored on the new hard drive. Whenever you add a new component, you can change the values that are stored in the CMOS and the CMOS will relay these configuration changes to the BIOS. The CMOS is also where your system clock runs from. Have you ever looked down to the bottom right corner of your screen to see what time it is? Your operating system pulls that time from the CMOS. On older systems, the CMOS would lose its BIOS settings if it lost power, so a coin battery was used to provide a small amount of power to the CMOS while the computer was off. This battery is called the CMOS battery. However, since we use EEPROM chips instead of CMOS chips, the configuration information is not lost at shut down. EEPROM is a type of flash memory and won’t lose any BIOS settings when the power is off. Despite that, we still need a CMOS battery. The CMOS battery is used to keep the clock running even when the computer is turned off. Otherwise, you would have to reset the clock every time you turned on the computer. BIOS Settings vs. CMOS Settings 9:45-11:14 Before we end our discussion on BIOS and CMOS, you need to know about two different terms that are used interchangeably in this context in the industry. You might hear someone say, “I’m going to edit my BIOS settings.” Or you might hear someone say, “I’m going to edit my CMOS settings.” They’re talking about the same thing but using the terms CMOS and BIOS interchangeably is not technically correct. In the past, the BIOS chip and the CMOS chip were physically separate. They were two separate chips implemented on your motherboard. Today, they’re both implemented within the same chip package even though they are still separate entities. Because they are implemented within the same chip package, we tend to use both terms, BIOS and CMOS interchangeably. But, the BIOS is still not re-writable and we can’t save any custom parameters to it. That’s the job of the CMOS chip. To modify the parameters, we can run a small program out of the BIOS called the CMOS setup program that provides us with a user interface where we can specify the various parameters that the BIOS program needs to communicate with the hardware in our system. For example, we can store information about our hard drive geometry in the CMOS chip. We can customize the speed in which the CPU and the memory runs in the system and so on. We enter this information using the CMOS setup program which in turn saves it in the CMOS chip. That information is also used by the programs running on the BIOS to allow the CPU to perform its work. Summary 11:15-11:55 Let’s review what we’ve discussed in this lesson. We learned that the CPU can’t directly access other devices that are installed on the motherboard. To do that, we have to have software and that software is stored in the BIOS or the UEFI of the motherboard. These programs allow the chip to communicate with these other devices. For some devices, we have to use the CMOS to store various parameters that the software in the BIOS needs to give to the CPU so that the CPU can access them. We also talked about devices that have their own BIOS or device drivers loaded into the system so that the CPU can use them. Lastly, we talked about the CMOS battery, it’s purpose and the difference between BIOS settings and CMOS settings.