UEFI Boot Time Optimization Under Microsoft* Windows 7* Mark Doran Senior Principal Engineer, Intel Kevin D. Davis VP Client Chipset and Kernel Engineering, Insyde Software Mark Svancarek Principal Program Manager, Microsoft Corporation EFIS004 Agenda • Overview of boot time • Performance improvements • Sample results • Demo • Why fast POST for Windows* 7 • Other considerations for Windows 7 2 Overall View of Boot Time Line Pre Verifier PEI Core CPU Init Chipset Init Board Init Device, Bus, or Service Driver EFI Driver Dispatcher Architectural Protocols UEFI Interfaces OS-Absent App UEFI Shell Transient OS Boot Loader Boot Manager Final OS Boot Loader OS-Present App Final OS Environment Security (SEC) Power on Pre EFI Initialization (PEI) Driver Execution Environment (DXE) Boot Dev Select (BDS) Transient System Load (TSL) [ . . Platform initialization . . ] [ . . . . OS boot . . . . ] Run Time (RT) Shutdown 3 Overview of Boot Time BIOS progress begins BIOS hands control To Winload.exe Winload.exe hands Control to kernel Desktop reports Itself “ready” System Reasonable idle BIOS Initialization OS Loader Main Path Boot Time line Post Boot 4 UEFI BIOS initialization: Phase 1: SEC Phase 2: PEI Phase 3: DXE Phase 4: BDS Overview of Boot Time • 4 UEFI BIOS Initialization phases: – SEC (Security) phase: Pre-RAM code handles CPU initialization to create temporary stack in CPU cache. – PEI (Pre-EFI initialization) phase: finishes CPU initialization, discovers the DRAM, and determines boot mode (cold boot, S3, S4) – DXE (Driver Execution Environment) phase. Loads drivers that initialize the rest of system hardware. – BDS (Boot Device Selection) phase. Finds boot devices, loads the OS, and passes control over to the OS. 5 Agenda Overview of boot time • Performance improvements • Sample results • Demo • Why fast POST for Windows* 7 • Other considerations for Windows 7 6 Typical UEFI BIOS Initialization Time ® ® ™ Intel Mobile Platform with Intel Core i7- 1 920XM Processor Extreme Edition SEC phase 1.638 s PEI 2.647 s DXE 1.296 s BDS 3.139 s 2 Total Duration: 8.720 s 1 Reference platform 2 Using InsydeH2O BIOS*; Source - Insyde Software Corp 7 Performance Improvements SEC phase: • Aggregate all SEC and PEI drivers to 1 64Kb block of flash – All code must be in the processor’s cache before enabling Non-Eviction Mode • If code is outside NEM area, it is running extremely slow • Set CPU throttling to min (max power) • CPU microcode loading – Only 1 in system; no searching 8 Performance Improvements PEI: • Memory Init: – Don’t clear memory to zero with code – Use hardware if available in memory controller – Or don’t clear it at all, if no ECC req’d • Skip Memory detection: – No SMBus SPD reads – Good for closed systems 9 Performance Improvements DXE: • DXE dispatcher tries to load and run DXE drivers in a round robin loop • Reduce dependencies to a minimum • Try to have drivers loaded in efficient order • a-priori – Read the full SF 2009.