From Zero to UEFI Shell Jason Jin Technical

  • Slides: 26
Download presentation
From Zero to UEFI Shell Jason Jin Technical Marketing Engineer/ECG Sep, 28 2011

From Zero to UEFI Shell Jason Jin Technical Marketing Engineer/ECG Sep, 28 2011

Agenda • What is UEFI? • How does UEFI firmware work? • What is

Agenda • What is UEFI? • How does UEFI firmware work? • What is Intel® BLDK? • How Intel® BLDK address embedded challenges? 2

 • • • Unified Extensible Firmware Interface • Compatible by design – Evolution,

• • • Unified Extensible Firmware Interface • Compatible by design – Evolution, not revolution • Modular and extensible – OS-Neutral value add • Provide efficient Option ROM Replacement – Common source for multiple CPU architectures • Complements existing interfaces UEFI is an interface specification Abstracts BIOS from OS – Decouples development OS Loader UEFI BIOS Hardware Compatibility What is UEFI?

UEFI Forum • The Unified EFI Forum is a non-profit collaborative trade organization formed

UEFI Forum • The Unified EFI Forum is a non-profit collaborative trade organization formed to promote and manage the UEFI standard. • Board of Directors: AMD, AMI, Apple, Dell, HP, IBM, Insyde, Intel, Lenovo, Microsoft, Phoenix. • PC platforms worldwide shipment is more than 50% in 2010.

UEFI Concept OPERATING SYSTEM UEFI BOOT SERVICES Compatibility Timer INTERFACES FROM OTHER REQUIRED SPECS

UEFI Concept OPERATING SYSTEM UEFI BOOT SERVICES Compatibility Timer INTERFACES FROM OTHER REQUIRED SPECS Memory (OTHER) SMBIOS ACPI UEFI API UEFI OS LOADER Legacy OS LOADER Boot Devices Protocols + Handlers UEFI or PI Drivers UEFI RUNTIME SERVICES PLATFORM SPECIFIC FIRMWARE PLATFORM HARDWARE Motherboard ROM/FLASH UEFI Drivers Option ROM ROM UEFI Drivers UEFI SYSTEM PARTITION UEFI Drivers UEFI OS Loader OS PARTITION

Agenda • What is UEFI? • How does UEFI firmware work? • What is

Agenda • What is UEFI? • How does UEFI firmware work? • What is Intel® BLDK? • How Intel® BLDK address embedded challenges? 6

Architecture Execution Flow UEFI Interface Pre verify Verifier OS-Absent App CPU Init Chipset Init

Architecture Execution Flow UEFI Interface Pre verify Verifier OS-Absent App CPU Init Chipset Init Transient OS Environment Device, Bus, or Service Driver Board Init EFI Driver Dispatcher Transient OS Boot Loader Intrinsic Services Security Pre EFI (SEC) Initialization (PEI) Power on Driver Execution Environment (DXE) OS-Present App Boot Manager Boot Dev Select (BDS) [. . Platform initialization. . ] Final OS Boot Loader Final OS Environment ? Transient System Load (TSL) Run Time (RT) After Life (AL) [. . OS boot. . ] Shutdown

POST Execution Flow Reset POST Dispatch Console Init CPU Init Device Init Memory Init

POST Execution Flow Reset POST Dispatch Console Init CPU Init Device Init Memory Init CS Init Bus Init Boot Mode S 3 Resume Recovery Normal Boot Dev Select Legacy OS Load EFI Pre-boot Application OS Runtime

POST Execution Flow PEI Reset POST Dispatch Console Init Firmware Boot Dev Select Legacy

POST Execution Flow PEI Reset POST Dispatch Console Init Firmware Boot Dev Select Legacy OS OS Load OS Runtime Volumes CPU Init Device Init Cache as RAM Memory Init CS Init Boot Mode Bus Init PEIM Normal Boot Handoff Blocks HOB NVRAM S 3 Resume Capsules Recovery EFI Pre-boot Application GUID

POST Execution Flow DXE EFI Driver Reset Dispatcher POST Dispatch Console Init Boot Dev

POST Execution Flow DXE EFI Driver Reset Dispatcher POST Dispatch Console Init Boot Dev Select Legacy OS Load OS Runtime EFI/DXE Drivers CPU Init Device Init Memory Init CS Init Bus Init Boot Mode S 3 Resume Recovery Normal Boot Pre-boot EFIEFI Boot Services Application

POST Execution Flow BDS POST Dispatch Reset Platform Policy CPU Init S 3 Resume

POST Execution Flow BDS POST Dispatch Reset Platform Policy CPU Init S 3 Resume Recovery Boot Dev Select Legacy OS OS Load Device Init Memory Init CS Init Boot Mode Console Init EFI Boot Manager Normal Boot Human Interface HII Bus Init EFI Pre-boot Application OS OS Runtime

POST Execution Flow TSL Reset POST Dispatch Console Init Compatibility Support Module CSM CPU

POST Execution Flow TSL Reset POST Dispatch Console Init Compatibility Support Module CSM CPU Init Device Init Memory Init CS Init Bus Init Boot Mode EFI Preboot Normal Boot EFI Runtime Services S 3 Resume Recovery Boot Dev Select Legacy OS Load EFI Pre-boot Application OS Runtime

Architecture Execution Flow UEFI Interface Pre verify Verifier OS-Absent App CPU Init Chipset Init

Architecture Execution Flow UEFI Interface Pre verify Verifier OS-Absent App CPU Init Chipset Init Transient OS Environment Device, Bus, or Service Driver Board Init EFI Driver Dispatcher Transient OS Boot Loader Intrinsic Services Security Pre EFI (SEC) Initialization (PEI) Power on Driver Execution Environment (DXE) OS-Present App Boot Manager Boot Dev Select (BDS) [. . Platform initialization. . ] Final OS Boot Loader Final OS Environment ? Transient System Load (TSL) Run Time (RT) After Life (AL) [. . OS boot. . ] Shutdown

Boot Sequence High Level 14

Boot Sequence High Level 14

Agenda • What is UEFI? • How does UEFI firmware work? • What is

Agenda • What is UEFI? • How does UEFI firmware work? • What is Intel® BLDK? • How Intel® BLDK address embedded challenges? 15

Intel® Boot Loader Development Kit Intel® UDK 2010 Source code Platform BSF Intel® BLDK

Intel® Boot Loader Development Kit Intel® UDK 2010 Source code Platform BSF Intel® BLDK source code Intel® BLDK GUI CPU and Chipset Bnianry Bootloader Binary User Doc Intel® BLDK firmware package

Intel® BLDK GUI • Intel® BLDK Development Application is used to build and customize

Intel® BLDK GUI • Intel® BLDK Development Application is used to build and customize target boot loader images. • Main Features Menu & Toolbar – Graphical User Interface (GUI) – Project driven – Build environment – Binary configuration § Enable/Disable FW features Help Window Navigation Pane Main Window § Configure feature settings – Source code editor with syntax highlighting Output Window

Intel® BLDK firmware package • Code Base Build Tree – Package concept for each

Intel® BLDK firmware package • Code Base Build Tree – Package concept for each directory – Platform is contained in a package • Operating System – Build machine runs Microsoft* Windows XP* with SP 3 • Compiler Tool Chains – i. ASL – Microsoft* Visual Studio. NET 2005 Team Suite Edition – Microsoft* Windows Server 2003 DDK version 3790. 1830 *Other names and brands may be claimed as the property of others. Platform related packages

Agenda • What is UEFI? • How does UEFI firmware work? • What is

Agenda • What is UEFI? • How does UEFI firmware work? • What is Intel® BLDK? • How Intel® BLDK address embedded challenges? 19

Embedded Device Boot loader Challenges (Device in Diversity) Performance Config urabili ty (Speed is

Embedded Device Boot loader Challenges (Device in Diversity) Performance Config urabili ty (Speed is everything) Challenges 20 Intel® UEFI Development Kit 2010 (Intel® UDK 2010) Debug gabilit y (Limits accessibility) (Reduces TTM) Closed Source

Binary Configurability • Intel® BLDK offers a way to configure firmware settings by patching

Binary Configurability • Intel® BLDK offers a way to configure firmware settings by patching binary without rebuilding. • Intel BLDK has hundreds of feature setting options. • Intel BLDK Development Application makes the patching process easy. Intel® BLDK: Intel® Boot Loader Development Kit

Closed Source Limited access to certain source material • Traditionally, closed source code and

Closed Source Limited access to certain source material • Traditionally, closed source code and distribution restrictions in a Boot Loader has made distribution to a wide audience a challenge. www. tianocore. org forwards user to a Source Forge repository Relatively small portion remains With source & distribution restrictions 22

Closed Source By extending the configurability of binary components, we can enable much broader

Closed Source By extending the configurability of binary components, we can enable much broader usage. USB SIO PCI FLASH Map MRC Configure? • UEFI Boot Loader in FLASH block Binary Patchable Element Restricted Files without source File with open source reference 23

Boot Performance Make good use of system cache Avoid initializing unnecessary devices Organize the

Boot Performance Make good use of system cache Avoid initializing unnecessary devices Organize the FLASH layout effectively Use saved data during boot time Whitepaper: “Reducing Platform Boot Time” (http: //edc. intel. com/Link. aspx? id=4603)

Debuggability Software-only debugger solution • • New Intel® UEFI Development Kit Debugger Tool available

Debuggability Software-only debugger solution • • New Intel® UEFI Development Kit Debugger Tool available • • Supports Win. Dbg as a front-end Provides ability to debug target without need for exposed JTAG – Leverage various debug ports Few differences between this solution and a high-end HW-based debugger – To break into target, SEC startup code must have established a stack. • Typically a few dozen instructions from the reset vector. • This is also true of first few dozen instructions in SMI entry. – Some Processor mode transitions are difficult to debug. 25