Boot-Up

Power-On Self-Test

When you hit the on switch of your computer, nothing seems to be happening for a few seconds. But your computer is really going through a complex set of operations to see if all its components are working properly and to warn you if something's wrong. This is the first step of the process called booting up. The POST is the first thing that runs when your computer turns on. It gives a combination of different beeps when there is something wrong with one of the components in your computers. When the POST check has passed, the computer gives one beep, which means everything is all right. CIRCUIT will explain the entire Power-On-Self-Test.

  1. When the PC is turned on, an electrical signal follows a programmed path to the CPU to clear any leftover data in the processor's internal registers. It also resets a CPU register called the program counter to the hexadecimal number F000. This number tells the CPU the address of the next instruction which needs processing. The address F000 is the beginning of a boot program stored in the BIOS's ROM chips which contains the PC's Basic Input/Output System.
  2. The CPU uses the address to to find and execute the ROM BIOS boot program, which subsequently starts a series of system checks and POSTs (Power-On Self-Tests). First, the CPU checks itself and the POST program by reading code at different locations and checking it against permanent records.
  3. Signals are sent by the CPU over the system bus, which connects all of the components of the computer together. This is done to make sure that the circuits are functioning properly.
  4. The CPU then checks the system timer, which makes sure that the PC's operation function in a synchronized way.
  5. The procedure then checks the memory on the video card and the video signals which control the display. POST makes the card's BIOS code part of the system's overall BIOS and memory configuration. This is when you first see something on the screen.
  6. POST then runs checks on the system's RAM. The CPU writes data to each chip and then reads the data. It compares what it reads to what it wrote to the chips in the first place. An account of the memory that has been checked is displayed in the upper right hand corner of the monitor.
  7. The CPU checks the keyboard's attachment and also checks to see if any keys have been pressed. If, for example, the F1 key was pressed during the boot-up screen, the system goes to the BIOS screen.
  8. The POST sends signals over the bus to the disk drives and listens for a response to determine the drives available.
  9. The results of the POST tests are compared with a record in a CMOS chip which contains the actual record of which components are installed. This chip retains its memory because it gets a small amount of electricity from a battery. If the basic system configuration is changed, it must be recorded in CMOS setup.
  10. Systems which contain components with their own BIOS (e.g. disk controller cards) recognize the code and incorporate it as part of the system's own BIOS and memory use. Modern PC's also run Plug and Play to distribute system resources between different components. The system now loads an operating system.

Disk Boot

The boot program on the ROM BIOS chip checks drive A to see if there is a system disk. If there isn't, it starts booting from the hard disk. The program searches for two hidden files called IO.SYS and MS-DOS.SYS on MS-DOS systems. On IBM systems, it searches for IBMDOS.COM and IBMBIO.COM.

The boot program reads the first sector of the disk and copies it to RAM at the hexadecimal address 7C00. This information is the DOS boot record, which is 512 bytes, and it has code to initiate the two hidden files. After the boot record has been copied to RAM, the BIOS passes control to the boot record by branching to that address.

The boot record starts controlling the PC and loads IO.SYS into RAM. This file contains extensions to the ROM BIOS and also has a routine called SYSINIT, which takes over the rest of the boot-up. After IO.SYS is loaded, the boot record in RAM is no longer needed, and is replaced by other code.

SYSINIT now takes control over boot-up, and it loads MSDOS.SYS into RAM. MSDOS.SYS works with BIOS in managing files, executing programs, and responding to signals from hardware.

Under DOS, SYSINIT searches the root directory for the file CONFIG.SYS. SYSINIT then tells MSDOS.SYS to execute the commands in the file. CONFIG.SYS is a file created by the user, and it tells the operating system how to handle certain operations, such as how many files can be open at one time. This file may also contain instructions on loading device drivers, which are files that extend the capabilities of BIOS to manage memory or hardware devices.

Next, SYSINIT commands MSDOS.SYS to load the file COMMAND.COM. This is an operating system file, and it contains three major parts. One is an extension to I/O functions, and this part is loaded in memory with BIOS, becoming part of the operating system.

The next part of COMMAND.COM contains DOS commands, such as COPY and EDIT. Finally, the third part of COMMAND.COM searches the root directory for a file called AUTOEXEC.BAT. This file is created by the user, and it contains different batch files and programs that the computer executes each time it is turned on. The PC has now booted, and can be used.

Plug and Play

When installing new hardware to your computer, you have to make sure that it is not in conflict with any other devices. Components need to communicate with the processor and other components, and there are only a few channels of communication. These channels are called system resources. One resource is a Direct Memory Access (DMA), which gives the component access to RAM. The other resource is called an Interrupt Request Query (IRQ), which interrupts whatever the processor is doing and makes it look at the request the component has. Each component must have a its own DMA and IRQ channel if the computer is to function properly. Plug and Play prevents devices from having the same resources, which would cause conflict. If every device in your PC has the Plug and Play standard, the PC's BIOS, system software, and the devices work together to make sure there is no conflict with a system resource.

When a Plug and Play PC is turned on, the BIOS searches for all the necessary devices it needs, such as keyboards, video cards, and RAM, which are necessary for the PC to work properly. The BIOS then passes control to the operating system.

The operating system executes drivers called enumerators, which are programs which act as an interface between the operating system and different devices. There are different kinds of enumerators, such as bus enumerators and port enumerators. Each enumerator identifies which device its going to control and what system resources it needs.

This information is stored in a database in RAM called a hardware tree. After storing the information in the tree, the operating system examines the hardware tree and decides what resources to give to each device. Then it tells the enumerators what it allocated for their respective devices. The resource allocation information is stored in the enumerators programmable registers (memory).

Lastly, the system loads all necessary device drivers, and it tells each device driver which resources it is using. Device drivers are code for the operating system which tell it how to communicate with a certain piece of hardware. The device drivers load their respective devices, and the system is finished booting.