1 / 24

Enhancing Your UEFI BIOS for Windows 7

Enhancing Your UEFI BIOS for Windows 7. Mark Svancarek Principal Program Manager Microsoft Corporation. Agenda. Why create fast power-on self test (POST) for Windows ® 7? What is UEFI? Overview of Unified Extensible Firmware Interface (UEFI) boot time Achieving performance improvements

haruko
Download Presentation

Enhancing Your UEFI BIOS for Windows 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enhancing Your UEFI BIOS for Windows 7 Mark Svancarek Principal Program Manager Microsoft Corporation

  2. Agenda • Why create fast power-on self test (POST) for Windows® 7? • What is UEFI? • Overview of Unified Extensible Firmware Interface (UEFI)boot time • Achieving performance improvements • Sample results • Other considerations for Windows 7 • Call to action • Resources

  3. Why Create Fast POST for Windows 7? • Windows 7 is generally faster than Windows Vista® on the same hardware; long POST times are more noticeable • Fast POST now becoming mainstream • Median POST 3 seconds faster than last year (11 seconds  8 seconds) • But some very slow POSTs remain % of laptops measured Time in seconds (smaller is better)

  4. Device, Bus, or Service Driver Power on Platform initialization Shutdown Operating system (OS) boot What Is UEFI? UEFIInterfaces Pre Verifier OS-AbsentApp verify PEICore UEFI Shell CPUInit Transient OS Boot Loader Chipset Init Board Init OS-PresentApplication Boot Manager EFI Driver Dispatcher Final OS Environment Final OS Boot Loader Architectural Protocols Security (SEC) Pre-EFI Initialization (PEI) Driver Execution Environment (DXE) Boot Dev Select(BDS) Transient System Load (TSL) Run Time (RT) Source: Intel Corporation

  5. Typical UEFI Initialization Time Source: Insyde Software Corporation Platform: Intel® Mobile Reference Platform w/ Intel® Core i7-920XM Processor Extreme Edition

  6. Improving SEC Speed • Aggregate all SEC and PEI drivers to a single 64-KB block of flash memory • All code must be in the processor cache before enabling No-Eviction Mode (NEM) • Code outside the NEM area will run very slowly • Set CPU throttling to minimum (allow maximum power) • Store only a single CPU microcode set to avoid searching

  7. Improving PEI Speed • Limit memory initialization • Do not test the RAM by default • Do not clear the memory to zero with code unless error-correcting code (ECC) is required and you have no hardware support • Limit memory detection • Do not read serial presence detect (SPD) on closed systems

  8. Improving DXE Speed • DXE dispatcher will load and run DXE drivers in a round-robin loop • Order drivers to reduce dependencies to a minimum • Do not hardcode the driver ordering • Remove legacy PS/2 devices • Use high-speed USB devices • Do not initialize extra SATA channels or any other redundant devices

  9. Improving DXE Speed (cont.) • Eliminate legacy option ROMs • Replace legacy option code with UEFI drivers and UEFI option ROMs • Do not initialize option ROMs unless you need the device • Eliminate legacy video • Use faster UEFI device drivers • Use console redirect • Analyze DXE driver timings

  10. Using DXE Driver Analysis • Measure driver load times using tools provided by the BIOS vendor • Look for outliers Source: Insyde Software Corporation Platform: Intel Mobile w/ Core i7-920XM EE

  11. Using DXE Driver Analysis (cont.) • Analyze the list of modules for customers • Decide whether the features should be kept, removed, or hidden • Hidden items do not run unless one of the following: • First boot after configuration changed • Previous boot failed • Pre-POST hotkeys were pressed • By hiding and removing drivers, POST can be extremely fast

  12. Improving BDS Speed • Preselect the boot device • Searching is too slow • Systems boot from the same device most of the time • Default to solid-state drive (SSD) or hard disk drive (HDD) • Do not default to DVD • Use SSD if density and price point can support it

  13. Making Miscellaneous Improvements • Choose compiler optimizations properly • UEFI is written in C • Make sure max speed is enabled • Investigate embedded controller (EC) performance • Controls battery, power supply, and so on • Minimize usage of slow battery and power supply devices • Do not put UEFI into Serial Peripheral Interface (SPI) Flash behind the EC • Use a direct SPI Flash connection to the I/O hub (Southbridge)

  14. Real-World Results Source: Insyde Software Corporation Platform: Hewlett Packard DV4-1145go

  15. Reference Board Results Source: Insyde Software Corporation Platform: Intel Mobile w/ Core i7-920XM EE

  16. BIOS Compatibility • Keep BIOS compatibility support module (CSM) small • Windows 7 does not require Int13 support for storage • Use the UEFI interface instead • Usually possible to initialize the video BIOS without the CSM • Int10 is still required, but not during POST • The video BIOS must be in the C0000 segment, and a real-mode IDT must be at physical address 0x0 

  17. Supply the correct device paths in Int13 Enhanced Disk Drive extensions Legacy BIOS provides a mechanism to know the physicalpath to a HDD Examples: Bus/Device/Function used for PCI Express; IDE controller; and master  Windows 7 does not depend on EDD device paths Majority of legacy BIOS implementations populated this information incorrectly Or use UEFI driver instead of Int13 BIOS Compatibility (cont.)

  18. ACPI Implementation • Check Advanced Configuration and Power Interface (ACPI) for common compatibility issues • Use AcpiReclaimMemory memory region at your own risk • The OS can reclaim it after copying it • Typically used by the platform for ACPI tables • Windows 7 does not reclaim this memory nor verify that ACPI firmware does not attempt to access this memory • Avoid battery issues • Check that the battery state is reported correctly • Check that the overall battery capacity is reported correctly • Enable product activation • If Software Licensing (SLIC) table is missing or not well-formed, it may block enterprise licensing

  19. Other Windows 7 Considerations • Measure baseline to prevent regressions • Use the Windows Logo Kit to measure power transitions • Especially important if you did not have aggressive targets for Windows Vista • Verify that you do not have dependencies on undocumented Windows behavior • Example: Restoring Memory Type Range Registers (MTRR) for each CPU after S3 resume • Adds ~400 milliseconds if you let the operation system do it • Also affects time to synchronize the processor time-stamp counters (TSC), which are new in Windows 7

  20. Other Windows 7 Considerations (cont.) • Verify 64-bit operating system and 4 GB compatibility • 4-GB RAM machines became common in Windows Vista SP1 timeframe • 64-bit operating system required in order to support 4 GB RAM • Check 64-bit ISO images from CD-ROM or DVD • Verify solid-state drive (SSD) compatibility • SSDs now becoming popular for both high-end and low-end machines running Windows 7 • Verify that there are no race conditions or other compatibility problems • Verify both boot and hibernate use cases

  21. Call to Action Work with your BIOS teams to: Improve POST speed and compatibility Specify POST times to original design manufacturers (ODMs) Specify minimum hardware performance standards to ODMs Require native UEFI drivers and option ROMs from independent hardware vendors (IHVs) Use the latest UEFI specification and UEFI Platform Initialization (PI) specification to improve boot times View these other Windows Summit 2010 presentations: On/Off Scenarios - Common Issues, Recommendations, and Best Practice (SYST-175) On/Off Scenarios - Performance Analysis and Diagnosis Overview (SYST-176) Fill out the evaluation form for this presentation

  22. Resources • Specifications and implementation sites www.uefi.org, www.intel.com/technology/efi, www.tianocore.org • Link to Microsoft UEFI support and requirements http://www.microsoft.com/whdc/system/platform/firmware/uefireg.mspx • White Paper: Firmware Enhancements for PCs Running Windows 7http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/FirmwareEnhance_Win7.docx • Beyond BIOS: Implementing the Unified Extensible Firmware Interface with Intel’s Framework www.intel.com/intelpress • UEFI Plugfest Event at Intel in Dupont, Washington June 22-25, 2010 www.uefi.org 24

  23. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related