How computer boot
In this blog we will try
to understand how computer start from starting point.
In last 25-30 years
there is no major change in the booting process in computer, even same program
is used in the processor to load the OS.
To start a Computer, we
power on the button of CPU, or we can say we reset the power button on CPU. So
when we press the button it generates electric signal (Plus) and this plus send
to a specific pin on the CPU, this pin is called reset pin. And when the CPU
gets this signal it start booting. So we need to see what happens here.
Step 1: When we switch
on the computer a plus send to CPU reset pin.
Step 2: Every register
in CPU initialized to 0 except two register (code Segment (CS) and Instruction
pointer (IP)). code Segment (CS) set the value of 0XF000 and Instruction
pointer (IP) set as 0xfff0.
So the physical Address
of first instruction is set as 0xfff0.
How this happen as we
know in 8086 or 8088 processor (CS<<4) + IP (CS Register shifted 4 bit
and IP added to it.)
So at the first memory
location which is 0xfff0, it has 16 bit memory where it get instruction to move
or jump into bios.
From here it enters into
bios (it stands for Basic input output device) and it is read only memory. It
is in the form of Flash/EPROM/ EEPROM.
The term BIOS (Basic
Input/Output System) was created by Gary Kildall and first appeared in the CP/M operating
system in 1975.
Bios is present in a
small chip connected to the processor
What are the basic function of Bios:
1. first power on self
test (I check is computer has all parts ( Monitor, keyboard, mouse etc) and is
all parts working fine.
2. Initialize video card
and other device.
3. Now it displays BIOS
screen, since video card has been initialized so screen can work fine.
4. Perform brief memory
test
5. Set DRAM memory
parameters
6. Configure plug &
Play device configured
7. Assign resources (DMA
channels IRQs)
8. It identifies boot
device
It
read sector 0 from boot device into memory location 0x7c00 (Sector 0 hold the
OS location)
0x7c00 is a Memory location in the Low memory region of RAM, it copies sector 0 from the boot device (which is generally a hard disk) into memory location 0x7c00. At location 0x7c00 there is a code of 512 bits which helps in booting the OS.
MBR:
A master boot
record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use
with IBM PC-compatible systems and beyond.
The concept of MBRs was publicly introduced in 1983 with PC DOS 2.0.
For example, a hard disk
is divided into sectors and the first sector of hard disk contain boot loader,
it contains information, where OS installed in the computer.
It also contends
information of logical partition like from where c drive or d drives starts
At the MBR we also get
an option to select OS, which OS we want to use if we have more than one OS in
the computer.
MBR
Master boot loader (446 bites) |
Partition table (64 Bytes) |
Signatures (2 Bits) |