0% found this document useful (0 votes)
12 views27 pages

BIOS

The document provides a comprehensive overview of the Basic Input Output System (BIOS), detailing its functions, components, and boot flow processes. It explains how BIOS initializes hardware, manages power, and facilitates communication between the operating system and various peripherals. Additionally, it covers the structure of BIOS firmware, including its storage, memory allocation, and the phases of UEFI BIOS boot flow.

Uploaded by

cinu97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views27 pages

BIOS

The document provides a comprehensive overview of the Basic Input Output System (BIOS), detailing its functions, components, and boot flow processes. It explains how BIOS initializes hardware, manages power, and facilitates communication between the operating system and various peripherals. Additionally, it covers the structure of BIOS firmware, including its storage, memory allocation, and the phases of UEFI BIOS boot flow.

Uploaded by

cinu97
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

BIOS

Overview of BIOS
Basics of BIOS
• What is BIOS ?
• What does it do?
• BIOS in software stack.
• Where does bios present?
What is BIOS ?
• Basic Input Output System
• The system software that initializes processor, Memory, Chipset and
other peripherals including graphics.
What does it do?
• Gets your computer up and running.
• Provides Power Management functionality.
• Loads and hands control over to the OS boot loader.
• Provides standardized routines for the OS to use during runtime.
• Allows the same OS to run on different motherboards.
• Allows the different OSes to run on same motherboard.
• Configure the platform based on the settings maintained in CMOS or
NVRAM memory.
BIOS in software stack
Where is BIOS present?
• BIOS is stored as firmware on a EEPROM/SPI Flash
chip on the motherboard
• ICL boards have 32 MB of flash area.
• BIOS size is 10 MB and remaining part has other components CSME, GbE, EC, strap
settings, etc.
• BIOS settings are stored in separate non-volatile chip.
• Allows users to customize certain settings through the BIOS Setup screen
• CMOS memory is powered by a battery on the motherboard
SPI Layout

NFTP

BPDT2
Offset

BPDT1
Offset

SPI
Size
Region
SPI Image overview
• In the SPI controller, a 4K descriptor at the base of the SPI device
splits the device into regions and defines the access control to each
region.
• CSE region starts from offset 4K.
• The GbE region and any other optional Flash regions will be allocated
as necessary after the CSE Data Region and prior to the BIOS Region.
• BIOS region will be at the end of the flash part.
Shadow Memory
• ROM chips are very slow compared to DRAM
• Copy ROM images into DRAM memory
• Increases performance of system and option ROM services
• System BIOS image is transferred to shadow memory
• Early in the POST cycle
• Compressed BIOS images are decompressed into shadow memory
• Allocations are made by the PnP/PCI configuration managers
• May also be used by PCI, ISA/LPC option ROM’s (Video, LAN, SCSI)
Basic BIOS components
A System BIOS when built as a binary includes the following components as part of it
• Boot Guard ACM
• Legacy Option ROMs
• RAID Option ROM
• Video BIOS Option ROM
• Microcode
• GOP (UEFI) driver
• NVMe (UEFI) driver
• RAID (UEFI) driver
• MEBx (ME BIOS extensions) UEFI driver
• Wi-FI/BT FW
IFWI Space Allocation
FW Ingredient Consumer Corporate
BIOS Image (Including Ref Code, GOP, uCode) 8MB (RVP) 8MB (RVP)

CSE (Including iUNIT) 2.5MB 7.5MB

SPI descriptor (soft straps) 4KB 4KB


PMC 128KB 128
PUNIT Part of uCode Part of uCode
ISH 256KB 256KB
iFP (300KB) Not POR Not POR
iTouch 256KB 256KB
TBT 256KB 256KB
IOM 64KB 64KB
MG/Dekel PHY(s) 40KB 40KB
LAN 8KB 8KB
EC 512KB 512KB
Wi-Fi Boot 1MB 1MB
Bluetooth boot 1MB 1MB
TOTAL ~14MB ~19MB
Basic BIOS Flow
• Power is applied to the computer : Power good signal is generated , CPU starts processing
instructions.

• Actual boot: As the very first step, CPU reads contents of memory 0xfffffff0. That has a jmp
instruction to the BIOS.

• Power On Self Test :

1. Initialization of CPU , Memory, Chipset, DMA controller, IRQ controllers, PCI controller, USB
controller, etc.
2. Searches for any other ROMs that might be installed such as Network Cards.
Boot Flow Cont….
• Looks for OS :

1. Searches for boot sector on boot devices such as HDD, CD, USB then
boot sector is loaded into memory.
2. The boot loader starts loading OS and OS takes over the control.
UEFI BIOS Boot flow
We have four different phases of UEFI bios boot flow

1. SEC (Security Phase)


2. PEI (Pre-EFI initialization Phase)
3. DXE (Driver Execution Environment)
4. BDS (Boot Device Selection)
SEC (Security Phase)
• Code that is executed just after power-on.

• Serves as the root of trust in the system and Performs


firmware authenticity

• Authenticated by ACM module and signed using OEM keys.

• BIOS ACM  to authenticate the BIOS image. Signed using Intel key and this is authenticated by CPU
loader.

• Passes Handoff information to the PEI


• Launches PEI core.
PEI (Pre-EFI initialization)
• Memory is discovered in this phase.
• Memory is initialized and tested.
• Runs initial configuration routines for processor, chipset
and other platform specific functionalities.
• Reset services provided.
DXE (Driver Execution
Environment)
• Most of the system initialization is performed.
• DXE drivers are loaded and executed.
• DXE uses data passes to it by PEI phase.
• PCIe and I/O resources are managed.
• All peripherals (external and on board) are initialized.
DXE Cont…
The DXE phase consists of several components

• DXE Core : The DXE Core produces a set of Boot Services, Runtime Services,
and DXE Services.

• DXE Dispatcher : The DXE Dispatcher is responsible for discovering and


executing DXE drivers in the correct order.

• DXE Drivers : The DXE drivers are responsible for initializing the processor,
chipset, and platform components as well as providing software abstractions
for console and boot devices.
BDS (Boot Device Selection)
• Runs after all DXE drivers are loaded.
• Initializes console devices.
• Disk devices, Display Adapters, Serial terminals are enumerated.
• Boot sector is loaded from boot device.
• ExitBootServices() is called to terminate BDS.
• OS takes control over to continue boot process.
BIOS Flow Chart
Power-On/Reset

CPU starts executing by fetching instructions


from the reset address (which is nothing but
BIOS)

BIOS verifies checksum of itself

20
BIOS Flow Chart
check -
sum ok Try recovery
? N

Initialize MCH and


Memory

Copy compressed POST code to memory and


start executing

21
BIOS Flow Chart Invoke Setup, save
F2 Pressed ? settings in CMOS
Y RAM and Reboot

Install runtime services in


the shadow RAM

Load OS boot loader in memory and give control


to it

22
Other functionalities of BIOS
• Plug and Play
• Power Management
Plug n Play
• BIOS code that configures Plug And Play devices
• PnP manages the following resources
• Memory space
• I/O space
• IRQ resources
• DMA channels
Power Management
• Advanced Power Management (APM)
• BIOS did all of the power management
• Controls the power to devices not actively being used
• Setup fields allow the users to specify power management options
• Obsolete
• Advanced Configuration and Power Interface (ACPI)
• Based on the ACPI specification creates a robust interface for configuring
motherboard devices Power management
ACPI
• Is basically an interface between the OS, BIOS and the hardware for configuring devices
and implementing power management

• Exposes platform power management features and details to the Operating System

• ACPI defines
• Global States (G States)
• System Sleeping States (S States)
• CPU Power States (C States)
• CPU Performance States (P States)
• CPU Throttling States (T States)
• Device States (D States)
Thank You

You might also like