BIOS (Basic Input Output Service)
Download
Report
Transcript BIOS (Basic Input Output Service)
BIOS
(Basic Input Output Service)
• Contains system data used by the ROM BIOS
service routines.
• Serves as a standardized communication
interface between the computer’s hardware
and the operating system.
BIOS and CMOS in a nutshell
• In the seconds between the time that you press the power
button and the desktop appears on your monitor, your PC
goes through a series of ordered steps called the Boot
Process. The vital components that drive the boot process
are the system ROM, the system basic input/output system
(BIOS), and the complementary metal-oxide
semiconductor (CMOS) memory chip and setup utility. The
system ROM – for read-only memory – is the special
memory chip that stores the BIOS programs. System BIOS
is the collective name for the hundreds of tiny programs
that tell your computer everything from what time it is to
what kind of computer it is. The CMOS memory chip and
the setup utility enable you to control important aspects of
your PC configuration such as the boot device sequence
BIOS
• Is a small ROM chip on the PC’s motherboard.
• A basic software program containing all BIOS functions is
permanently stored in the ROM.
• This software functions as a basic operating system.
• Is responsible for starting the PC. Perform POST (Power-On
Self Test) Boot the computer by providing a basic set of
instructions.
• Load the operating system after turning on the computer
• Provide set-up program for changing BIOS parameters
• Provide low-level routines for the communications between
OS and hardware devices.
• This hardware integrated with software is also referred to as
firmware.
Introduction to BIOS
• Advantages of storing BIOS in ROM
– code and data are readily available during booting
– BIOS content are not corrupted by errant
applications
• BIOS hardware components
– BIOS ROM
• PC startup program (POST)
– BIOS CMOS memory
• house the configuration information of individual PC
Introduction to BIOS
• The BIOS ROM
– All BIOS are contained in ROM in old days
– BIOS is now located in EEPROM chip
• erased and rewritten by special programs
• called flash BIOS
• BIOS CMOS memory
– provide a non-volatile storage for PC’s control
information
– need very little power to operate
– powered by lithium battery
Introduction to BIOS
• BIOS chip
DOS
(Disk Operating System) Fundamentals
• Consisted of two parts
The BIOS itself is one part of the operating system.
The other part consists of the operating system
program files.
– Program files consist of
• Utilities
• A kernel that is loaded into the main memory when the
computer boots.
Functions of the BIOS
• When you first turn on your PC. The power supply sends a signal to
the components in the system unit.
• The CPU finds the ROM chips that contains BIOS.
• The BIOS performs the POST which checks components (e.g. mouse,
keyboard connectors and expansion card)
• The results of the POST are compared with data in the CMOS chip.
• The BIOS looks for the system files in floppy disk drive and hard disk.
• The system files and the kernel of the OS load into RAM from hard
disk.
– Your PC requires information
• to detect PC components
• To find the operating system(floppy disk, hard drive, or a CD-ROM)
– This information is stored in the BIOS
Flow Chart of BIOS Functions
Turn on Computer
Pass through POST Error Free
NO
Output to Monitor
YES
Plug’n’Play
Pass through POST Error Free
Test Boot Drive
Bootable media found
NO
Pass through POST Error Free
YE
S
Pass through POST Error Free
Load boot program
Start operating system
NO
POST
(Power On Self Test)
• Takes place right after you power on.
• Contains diagnostic routines for
– initializing the hardware and peripherals
• the video card, the main memory, the processor, the
keyboard, etc.
– Checking their functions
• Error message on screen if an error is
detected. If monitor cannot be detected, the
beep codes are output by the system loud
speaker.
The BIOS Boot Process
• Beep codes
– A series of beep: BIOS program encounter
problems
– One short beep: everything is normal
– Errors can be indicated when video screen does
not function
– Interpret the beep codes by consulting main
board menu
The BIOS Boot Process
• POST Error messages
– Error messages are shown on display system
– Interpret error messages by consulting owner’s
manual
Plug and Play
• Bios next looks for additional BIOS memory
chips – might be on a Plug and Play card such
as video card or a SCSI controller.
– If present, they run their routines and
supplement or replace some functions of the
system BIOS.
• If components no longer match the data
stored in the CMOS (i.e. hardware change),
message apprears on screen to update.
Plug and Play
• After all hardware components have been
found and checked, Plug and Play goes to
work.
• Interrupts and DMA channels of the plug-in
cards in the ISA and PCI buses are queried and
distributed.
• Onboard hardware, located on motherboard
and in its ISA/PCI slots, are configured for
operation.
Bootstrap Loader
• BIOS next accesses the first sector of the hard
drive, alos termed the boot sector, and starts
the “bootstrap loader”
– A small program that knows the file structure of
the storage medium and can call the operating
system’s start routine.
Operating System Kernel
• Next, the operating system kernel is read into
main memory and control of the hardware
passes onto the operating system.
An Interpreter
• In old operating systems (DOS 6.2), the BIOS
acts as a mediator (or interface) between the
hardware and the software.
• New operating systems, circumvent the BIOS
and communicate directly with the hardware
through the appropriate drivers.
BIOS Updating
• The BIOS is manufactured on FLASH
technology. It is easily updated.
• Previous versions of BIOS were developed on
ROM, EPROM, and EEPROM chips.
DOS
(Disk Operating System) Fundamentals
• Consisted of two parts
The BIOS itself is one part of the operating system.
The other part consists of the operating system
program files.
– Program files consist of
• Utilities
• A kernel that is loaded into the main memory when the
computer boots.
Microsoft Kernels
• Kernel of a Microsoft operating system consists of
– Msdos.sys
– Io.sys
• MSDOS.sys controls the keyboard input and the
screen output.
• IO.sys communicates with the BIOS and contains the
actual program code of the operating system and a
process control for the hardware.
BIOS Data Area, at Segment 0040h
HEX OFFSET
0000 - 0007
0008 - 000F
0010 - 0011
0012
0013 - 0014
0015 - 0016
0017 -0018
0019
001A - 001B
001C - 001D
001E - 003D
003E - 0048
0049
004A - 004B
004C - 004D
004E - 004F
0050 - 005F
0060
0061
0062
0063 - 0064
0065
0066
0067 - 006B
006C - 0070
Description
Port addresses, COM1 - COM4
Port addresses, LPT1 - LPT4
Installed hardware list
initialization flag
memory size, in Kbytes
Memory in I/O channel
keyboard status flags
alternate key entry storage
Keyboard buffer pointer (head)
keyboard buffer pointer (tail)
Keyboard typeahead buffer
Diskette data area
Current video mode
Number of screen columns
Regen buffer length, in bytes
Regen buffer starting offset
Cursor positions, video pages 1 -8
Cursor end line
Cursor start line
Currently displayed video page number
Active display base address
CRT mode register
Register for color graphics adapter
Cassette data area
Timer data area
Other BIOS chips in Your PC
• They have the same functionality as the
system BIOS
– Control the corresponding device
• Contain software similar to the system BIOS.
• Manufactured with FLASH technology to be
upgraded easily.
Video BIOS-ROM
• Contains the basic data
– Initialization routines
– BIOS functions
– Character sets
• Initializes the registers of the VGA chip
• Sets the interrupt vectors for the interrupts
Video Interrupt
• There is a software interrupt that permits the
software to communicate with the video
card.
• INT 10h
• Can access the registers through it
• Can control the mode, character
input/output, and read/write pixels.
Configuring the BIOS
• Setup program interfaces
1.Hit a particular key or key combination at a right
time to enter the BIOS setup utility
Configuring the BIOS
• Setup program interfaces
2. A BIOS setup screen is displayed.
Configuring the BIOS
• Typical key control
– Incorrect settings of BIOS may lead to system halt
– Quit the setup without saving changes if we are
not sure about the changed settings
– Boot sequence
• control the order in which BIOS looks for an OS on
start-up
• usual sequence: floppy disk hard disk CD-ROM
Configuring the BIOS
• Typical key control
– Performance tuning through BIOS settings
• BIOS settings are responsible for how the chipset is
controlled.
• Chipset is the key to the overall system performance
• BIOS parameters:
–
–
–
–
–
–
Choose the optimal bus speed settings
Enable the CPU’s internal cache
External cache memory
Enable system BIOS shadowing
Quick power-on self test
Update the BIOS
BIOS
information
CMOS
information
CMOS or Setup
• Option to use this program is early in the boot
cycle – long before system loads Operating
System
• Different key(s) to enter different Setups
• You should only get to Setup on purpose
• Program stored in BIOS, but only edits data in
CMOS
• First CMOS was set of switches!
Who makes BIOS?
•
•
•
•
Award Software
Same parent
company
Phoenix Technologies
AMI – American Megatrends Inc.
They write BIOS with lots of options;
motherboard maker picks sections to be used
• Long gone are IBM’s patents on BIOS
Setup
• Lots of screens and subscreens
• You don’t need to know about all settings on
all screens
• Motherboard book is mildly helpful on some
options
• You should know generally where things can
be found
Date and Time and …
• Usually on the first screen, or first menu
choice
• Lets you set Date, Time, floppy present (will
autodetect it), memory count, hard drive(s)
present (again, autodetected)
Here is where
you set the boot
order
When adding a
modem, you might
want to turn both of
these off.
New CMOS
• Did you notice the “High Performance”
option?
• Did you see the “Setup Defaults” option?
• BIOS can “talk” to hard disk drive and get all
the information it needs.
• About the worst that happens today is the
need to reset date and time.
The Three-In-One
• We have BIOS that stores code and access
program to CMOS
• We have CMOS that stores changeable
information about our system
• We have RTC (Real Time Clock) that keeps
track of date and time
• All three are now rolled into one chip
Easy way to spot
this chip is by the
shinny label
About that Battery
• Should last 5 to 10 years
• You can find them at Savon even
• If your system forgets date and/or time, it’s
time to replace the battery
More Battery
• Sometimes we WANT to reset CMOS:
– A forgotten password
– Too aggressive overclocking
– Incorrect low-level settings on some screen
• Either move the jumper, or pull the battery
• Do either for about 10 seconds
• If you are to pull battery, make sure you
unplug system too
10