2. ο Commonly known as the system BIOS or ROM
BIOS is a de facto standard defining a
firmware interface
ο The BIOS software is built into the PC, and is
the first software run by a PC when powered
on
ο Initializes and tests the system hardware
components, and loads an OS or other
program from a mass memory device.
3.
4. ο Invented by Gary Kildall in 1976
ο Describes the machine-specific part of CP/M
ο Later versions of CP/M come with an XIOS
instead of the BIOS.
ο Most versions of DOS have a file called
"IO.SYS", "IBMBIO.COM", "IBMBIO.SYS", or
"DRBIOS.SYSβ
5. ο Check the CMOS Setup for custom settings
ο Load the interrupt handlers and device
drivers
ο Initialize registers and power management
ο Perform the power-on self-test (POST)
ο Display system settings
ο Determine which devices are bootable
ο Initiate the bootstrap sequence
6. ο BIOS checks the information stored in a tiny
(64 bytes) amount of RAM located on a
(CMOS) chip.
ο CMOS Setup provides detailed information
particular to your system
ο The BIOS uses this information to modify or
supplement its default programming as
needed
7. ο Interrupt handlers are small pieces of S/W
that act as translators b/w the H/W
components & the OS.
ο The device drivers are other pieces of S/W
that identify the base H/W components
ο Since the BIOS is constantly intercepting
signals to and from the hardware, it is
usually copied, or shadowed, into RAM to run
faster.
8. ο When the processor is reset, it initializes its
program counter to a fixed.
ο The BIOS ROM chips are located in memory so
that this starting address is within the BIOS.
ο A jump instruction then directs the processor to
start executing code in the BIOS.
ο If the system has just been powered up POST is
run.
ο If a powered-up computer has had its reset key
pressed , a special flag value is detected in
memory and the BIOS does not run the POST.
9. ο Selects candidate boot devices using
information collected by POST and
configuration information from EEPROM,
CMOS RAM or, in the earliest PCs, DIP
switches.
ο The BIOS checks each device in order to see
if it is bootable.
ο The BIOS proceeds to test each device
sequentially until a bootable device is found.
10. ο In the IBM PC and AT, certain peripheral cards
carried their own BIOS extension option ROM
ο BIOS extension ROMs, are executed before
the operating system is loaded from mass
storage.
ο These ROMs can test and initialize hardware,
add BIOS services, or replace BIOS services
programmed in the motherboard
11. ο The CPU is in real mode
ο The general-purpose and segment registers
are undefined.
ο The memory below address 500 hex contains
the interrupt vector table and the 256-byte
BIOS data area
ο The interrupt vectors corresponding to the
BIOS interrupts have been set to point at the
appropriate entry points in the BIOS.
12. ο The BIOS in the IBM PC and XT had no built-in
user-interface. The BIOS versions in earlier
PCs (XT-class) were not software
configurable
ο But a modern BIOS has a user interface (UI),
typically a menu system accessed by pressing
a certain key on the keyboard when the PC
starts.
13. In the BIOS UI, a user can:
ο Configure hardware
ο Set the system clock
ο Enable or disable system components
ο Select which devices are potential boot
devices
ο set various password prompts
14. ο 32 pin DIP chip.
ο 2Mb (256KB) in size.
ο Hardware-
independent module,
that describes the
loading period of his
operating system.
15.
16.
17. Functions
The BIOS chip starts up the computer, loads
basic drivers, loads the operating system,
checks hardware systems, and loads other BIOS
programs on the computer.
Features
The first instructions run by a computer are
those from the BIOS chip. The internal clock of
a computer runs off the BIOS chip.
18. ο Some BIOS chips allow overclocking, an
action in which the CPU is adjusted to a
higher clock rate than its factory preset.
ο Overclocking may, compromise system
reliability in insufficiently cooled computers
ο Overclocking, incorrectly performed, may
also cause components to overheat so quickly
that they destroy themselves.
19. ο Search "System Information" from the Start
menu, then open the program.
ο Click on the System Summary section on left-
hand side of the window, which will bring up
system information on the right-hand side of
the window.
ο Check the line reading "Bios Version/Date" to
see the current BIOS version.
20. ο The BIOS is stored in rewritable memory,
allowing the contents to be replaced or
'rewritten'. This rewriting of the contents
is termed flashing.
ο Done by a special program, usually
provided by the system's manufacturer, or
at POST, with a BIOS image in a hard drive
or USB flash drive.
ο A file containing such contents is
sometimes termed 'a BIOS image'.
21. Flashing the bios:
ο Can correct bugs or compatibility that
have been discovered
ο Increases system stability
ο Enhances Storage Capacity
22. ο Large hard drive support
ο ACPI compatibility
ο CPU support
ο Fix problems
ο Memory support
23. ο The disadvantages are that the BIOS often boots
in 16-bit real mode & because of the type of
chip used, it is not always the fastest.
ο BIOS routines are generally inefficient, so
modern OSs have their own hardware routines
and depend on drivers.
ο Some BIOSes still have the initial types of bugs
from the PC-XT days.
ο BIOS EEPROMS can be overwritten or destroyed
by users when updating the BIOS.
ο BIOS could become virus infected or overwritten
by viruses
24. The four known BIOS Virus attacks are:
ο CIH, whose name matches the initials of its
creator, Chen Ing Hau in 1998
ο It was able to erase flash ROM BIOS content
ο Infected computers could no longer boot,
and people had to remove the flash ROM IC
from the motherboard and reprogram it.
25. ο The second BIOS virus was a technique
presented by John Heasman.
ο In 2006, at the Black Hat Security
Conference, he showed how to elevate
privileges and read physical memory, using
malicious procedures that replaced normal
ACPI functions stored in flash memory.
26. ο The third BIOS virus was a technique called
"Persistent BIOS infectionβin 2009
ο Researchers Anibal Sacco and Alfredo Ortega,
demonstrated how to insert malicious code
into the decompression routines in the BIOS,
allowing for nearly full control of the PC at
start-up, even before the operating system is
booted.
27. ο The fourth one is Mebromi
ο Mebromi is a trojan which targets computers
with AwardBIOS, Microsoft Windows
ο Mebromi installs a rootkit which infects the
master boot record.
28.
29. ο Refers to routines executed by
microprocessor as soon as the PC is powered
on.
ο The routines are part of a device's pre-boot
sequence.
ο Once POST completes successfully, bootstrap
loader code is invoked.
ο Verifies whether hardware is free from
faults.
ο On encountering an error, PC is halted with
an error message.
ο POST routines are stored in ROM.
30. ο POST vector starts from FFFF0
ο First instruction is JUMP instruction to the
address fro where exactly the POST routine
starts.
ο First instruction in POST routine is CLI
ο The POST starts executing test programs
31. ο Disable Interrupts using CLI instruction
ο Set SF,CF,ZF and PF flags
ο Verify whether each of these flags is set
ο If any flag is not set, a HALT instruction at
address FE0AD is executed
ο Write 1βs in all
registers:AX,DS,BX,ES,CX,SS,DX,SP,BP,SI & DI
ο Verify the contents of DI
ο Write all 0βs in AX register
ο Verify whether DI has received all zeroes
32. ο Disable NMI by outputting zero to NMI
register at port address X β0A0β
ο Initialize DMA page register by outputting
zeroes at port address X β83β
ο Disable color video by outputting zeroes to
mode control register at port address X β3D8β
ο Disable monochrome display & set high
resolution mode by outputting X β01;
33. ο Program the PPI as follows:
1. Port A and Port B output vectors
2. Port C input port
ο Binary pattern 10100101 is outputted to PPI
port B
34. ο Output Xβ01β on port A of PPI
ο Give FE000 as the start address & enter
subroutine ROM checksum
ο It performs XOR of contents of all locations
in 8k ROM
ο If (checksum==0) the ROM contents are OK
ο If (checksumβ 0) it indicates failure of ROM
checksum test
35. ο Output X β02β on port A in PPI
ο Output X β04β on port X β08β to disable DMA
controller
ο Program the Timer 1 for mode 2
ο Output zero as initial value to Timer 1
ο Latch Timer 1
ο Set an initial value in Timer 1
ο Latch Timer 1 count
ο Read Timer 1 count and if it counts too slow
or fast the POST halts the processor
36. ο Tests DMA channel address registers
ο Tests count registers in all channels in DMA
Controller chip,8237
ο If there is an error the POST halts the
processor at FE12D
37. ο Channel 0 of DMA controller is initialized
with appropriate start address and byte
count values
ο It does memory refreshing when Timer 1
sends DMA request signal
38. ο After initializing channel 0 for memory
refresh and starting the memory refresh, the
POST sets modes for DMA channel 2 and 3
I/0 EXPANSION BOX ENABLING
ο Done by outputting X β01β on port X β1302β
39. ο The first location is written with a pattern
X β00β and read back
ο The POST repeats the above test for all
patterns Xβ01β to XβFFβ on first location
ο The POST tries 5 patterns namely
AA,FF,55,00,01 on first location
ο The POST indicates two types of failures:
ο‘ The pattern written and pattern read are
different
ο‘ The pattern written and pattern read maybe
same but there is parity error during reading
40. ο The POST finds out the total system memory
including motherboard RAM and RAM on
expansion boards
ο The total program memory allowed is 640K
Bytes
41. ο A portion of 16K DRAM can be used as stack
for the remaining POST programs
ο The POST initializes the stack pointer and
stack segment register
42. ο Programs the 8259 by issuing a set of control
words:ICW1,ICW2,ICW4
ο In PC, 8259 is operated in 8086 mode not in
8085 mode
ο No cascading
ο Masks all interrupts by sending a mask
pattern FF to PIC
43. ο Writes a temporary set of interrupt vectors in
the initial portion of the first 16K DRAM.
ο Establishes βBIOS subroutine call interrupt
vectorsβ
44. ο The DIP switch block contains 8 switches
ο The POST reads the 8 switches & store the 8
bit pattern in a memory location
ο The 8 switches are sensed by POST through
port C
45. ο Configuration includes information of type of
display adapter attached
ο Four possibilities are:
ο‘ No display adapter
ο‘ CGA in 40X30 mode
ο‘ CGA in 80X25 mode
ο‘ MDA for both MDA and CGA
46. ο Failure is indicated by long-short-short
beeps.
ο POST goes ahead with subsequent tests
ο During Warm Boot, the POST skips the video
RAM test
47. ο POST enables video
ο Sets the mode by programming mode control
register
ο POST stores blanks in reverse video form in
video corresponding to the top of the screen
ο The horizontal bar display will stay only for a
few seconds
48. ο Reads the CRT status port
ο Verifies timing of video signal & horizontal
sync signal
ο POST produces speaker beeps on sensing any
error
49. ο Sets and Resets Interrupt Mask Register
ο Looks for the presence of spurious interrupt
ο POST displays error code 101 on CRT Monitor
on detecting error
50. ο Checks
1. Whether Timer 0 interrupt occurs or not?
2. Is Timer 0 counting too slowly? i.e.,slow
interrupts
3. Is Timer 0 counting too fast? i.e.,fast interrupts
51. ο Resets the keyboard
ο Keyboard sends a scancode
ο Keyboard interrupt is raised by keyboard
interface
ο Then POST reads scancode through PPI Port A
ο If scancode is other than X βAAβ, the POST
displays an error message on CRT screen
52. ο A data pattern X β55 55β is written on
expansion box adapter board
ο Is same data is received from port, the
I/O box is present else itβs absent
53. ο Same as first 16K DRAM Test
ο Test patterns are AA,55,FF,01 and 00
ο On detecting error, the POST displays a
detailed message on CRT screen giving the
following information:
ο‘ Failing location: Address
ο‘ Failing bits pattern
54. ο BASIC ROM is present as four 8K ROMs in IBM
PC
ο Detects the presence of BASIC ROM
ο If present it performs checksum calculation
of contents of BASIC ROM
ο If not, POST displays the failing ROMβS Start
address followed by the word βROMβ
Eg., F6000 ROM
55. ο POST Detects the presence of parallel ports
by writing data on O/P data port & reading
through I/P data port
ο If the data received is same, printer
controller is present
ο If not, POST checks for next Parallel ports
SERIAL PORTS SET UP
ο Checks for the presence of serial ports
ο Updates Equipment Flag table
56. ο Enables interrupt controller
ο Checks for errors
ο On detecting error , it gives 2 short beeps
and displays ERROR(RESUME=βF1β KEY)
ο Gives one short beep indicating the
reliability test is successful
57. ο POST enables NMI by removing mask from the
NMI register
ο NMI will be generated by hardware if RAM
parity check error is present
ο 8088 is unaware Of external masking of NMI
by software
58. ο Bootstrap is the process of loading a set of
instructions when a computer is first turned
on or booted.
ο During the start-up process, diagnostic tests
are performed that set or check
configurations and implement routine testing
for the connection of peripherals, hardware
and external memory devices.
ο The bootloader or bootstrap program is then
loaded to initialize the OS.
59.
60.
61. ο 100-199 Motherboard
ο 200-299 RAM or Memory
ο 300-399 Keyboard
ο 400-499 Video Mono
ο 500-599 Video Color
ο 600-699 Floppy Drive
ο 700-799 Math Co-Processor
ο 900-999 LPT1
ο 1000-1099 LPT2
ο 1100-1199 COM 1
ο 1200-1299 COM 2
ο 17xx Hard Disk Controller
ο 3xxx NIC
ο 86xx Mouse
62. Beep Meaning
1 short beep Normal POST β system is OK
2 short beeps POST error β error code shown on
screen
No beep
Power supply, system board problem,
disconnected CPU, or disconnected
speaker
Continuous beep
Power supply, system board,
or keyboard problem
Repeating short beeps
Power supply or system board problem
or keyboard
1 long, 1 short beep System board problem
1 long, 2 short beeps Display adapter problem (MDA, CGA)
1 long, 3 short beeps
Enhanced Graphics Adapter
problem (EGA)
3 long beeps 3270 keyboard card
63. Color Meaning
Red Bad ROM
Yellow
CPU Exception Before
Bootstrap Code is
Loaded
Green
Bad Chip RAM or fail
of Agnus Chip (check
seating of Agnus)
Black No CPU
White
Expansion passed
test successfully
Grey Turn on
Constant white Failure of CPU