Professional Documents
Culture Documents
Inside The Windows Pre-Boot Environment
Inside The Windows Pre-Boot Environment
Andrew Ritz Development Manager Core Platform Architecture Team Microsoft Corporation
Agenda
What is firmware (and how does Windows use it)? Multi-OS Firmware roadmap for Windows Windows Boot Environment overview Deployment Guidelines for Boot Environment
What Is Firmware
Power on sequence
Installed with a computer in non-volatile location (PROM\EEPROM) Initializes low level hardware
Initializes memory controller timings, powers on critical boot devices
What Is Firmware
Limited runtime usage
Firmware may still be involved after operating system starts
This is called runtime firmware Operating system normally strives to place runtime firmware into a sandbox for reliability An exception is System Management Mode (SMM) firmware
Firmware is used in cases where a high-performance WDM driver does not exist
Handles some of the specifics of a particular platform running Windows
What Is firmware
Limited runtime usage
Advanced Configuration and Power Interface (ACPI) defines an industry standard for runtime firmware
Primary supported runtime firmware interface for Windows Microsoft co-authored industry standard ACPI specification Used to identify and configure soldered on motherboard hardware and more Asynchronously notifies operating system of changes in hardware (e.g., when a laptop switches from AC to battery power) Firmware runs in an OS-provided virtual machine
Implementations are not always consistent 16-bit real mode complexity (getting compilers, staffing engineers, supporting 64-bit systems)
Strategy: Migrate away from any 16-bit code usage over time
EFI Firmware
Motivation and history
EFI creation motivated by Itanium bring up
Desire to avoid BIOS limitations in a brand new high end architecture Also designed as a BIOS replacement
Well specified; largely in one self-contained document Architecture is modular and extensible
EFI Interfaces are object oriented For example, Block IO Protocol contains a base class for reading from any block IO device
EFI Firmware
Windows usage
Windows uses EFI as pre-boot firmware Some limited runtime interfaces used
Mainly to manipulate NVRAM boot entries
Challenge: How to achieve EFI adoption in mainstream PC client and server systems
Forum members with common goal allowed engineers to focus on technical details
Runtime calls must run in same mode as operating system; for native EFI boot,
A 64-bit operating system requires 64-bit UEFI firmware A 32-bit operating system requires 32-bit UEFI firmware
Focusing on 64-bit UEFI achieves our goals Little motivation to support 32-bit UEFI boot
Too few 32-bit only processors in new platforms Avoid any assumptions about firmware and bootstrap in larger base of 32-bit drivers
32-bit UEFI support is currently not part of our long term client and server roadmaps
32-bit systems must boot Windows via BIOS A firmware compatibility module may be used in the transition
Architecture
x86 x64 IA-64 x86 x64 x86 x64 IA-64
EFI
Unsupported Unsupported Required Unsupported Unsupported Unsupported Required Unsupported
EFI
Unsupported Unsupported Required Unsupported Unsupported Unsupported Supported Required Unsupported Supported
x86 x64
KEY: Yes, logo: Can be used and is also a requirement in order to get a Designed for Windows logo for that OS release on that architecture Supported: Can be used but is not the only choice for that OS release on that architecture Unsupported: Cannot be used for that OS release on that architecture Required: The only choice for that OS release on that architecture
With emergence of UEFI, taking opportunity to begin transitioning Windows Vista and beyond to be boot firmware independent
This is consistent with the portability goals of the Windows platform A more robust approach that should survive for many years
One windows boot manager per machine Different than the UEFI boot manager
OS loader
Tied 1:1 to the OS (unlike NTLDR)
Resume loader
Tied 1:1 to the OS
Pre-boot Configuration
Boot Configuration Data (BCD)
Windows Vista introduces BCD data store Abstracted data store
Replacement for boot.ini Replacement for NVRAM settings
Programmatic access
Accessible via utilities and WMI provider Fully documented on MSDN
Pre-Boot Configuration
BCD system store
Each machine has a BCD store designated as the system BCD store
Present on the active system partition on BIOS systems Present on ESP on UEFI systems
BIOS platforms must support VESA bios extensions: Either 1024x768 or 800x600 (32-bit linear frame buffer) EFI platforms must support either UGA or UEFI Graphics Output Protocol (GOP)
UGA can be used for existing implementations Long term direction is to use GOP
UEFI Installation
To install via UEFI requires that the installation be booted via UEFI
And vice versa an OS installed via BIOS can only boot via BIOS
Once the OS is installed via UEFI it can only boot via UEFI
Booting via BIOS cannot access the BCD store on the ESP Features like BitLockerTM require the same boot process each time the system boots
Deployment Guidelines
CD/DVD boot
Windows Server Longhorn media will contain both BIOS and UEFI bootstrap code A BIOS system should boot via BIOS An x64 or IA64 UEFI system should boot via EFI A system with both UEFI and BIOS support should boot via UEFI
Such systems should never prompt the user to boot via UEFI and BIOS
Deployment Guidelines
Identifying disks
Windows Boot Environment uses disk signatures to identify partitions on disks
Avoids ambiguity of firmware enumeration dependencies
Special cases
Special designation for the boot partition For un-partitioned disks, boot loader will not stamp disk signature
User must partition disk A reboot may be necessary
Deployment Guidelines
Consider implementing system partition
BIOS deployments should create separate system partition and Windows partition
The system partition is the partition marked active in the MBR Referred to as the boot partition Many OEM systems already have a recovery partition as well This takes that process one step further
Provides isolation
End users do not need to access the system partition manually and likely wont even notice The BCD tools abstract away any need to access the system partition
Deployment Guidelines
Consider implementing system partition
Required for BitLockerTM support Required to enable sysprep migration between EFI and BIOS systems Enables transition to UEFI systems which will require two partitions
Note: The EFI system partition is hidden
Deployment Guidelines
System partition guidelines
Minimal state should be on system partition
Windows Boot manager BCD store
No OEM state for an install of Windows should be on system partition Boot partition designation cannot be used on multi-partition systems
Deployment tool needs to set the proper partition device identifier for target system
Deployment Guidelines
BCD deployment
Do not manually copy the BCD store onto systems
Use import functionality or let Setup create it
If you want to apply a setting to all objects, consider the power of inherited objects
See MSDN for details
Summary
Windows supports a variety of firmware and has long been a leader in driving industry innovation Windows firmware roadmap includes a non-jarring transition to UEFI Windows Boot Environment internals re-architected for this transition Consider how to deploy Windows Vista for optimal user experience
Call To Action
Get involved in the transition to UEFI
Try out the beta UEFI support
Evaluate when you are making the UEFI transition OEMs: Please send evaluation systems and let us know what you think ISVs: Stay tuned for industry enablement events
Additional Resources
Web resources
Microsoft Platform Design Portal (whitepapers, documentation): http://www.microsoft.com/whdc/system/ platform/default.mspx UEFI specification: http://www.uefi.org
For questions about boot support in Windows, contact Microsoft at: Winboot @ microsoft.com
Backup
EFI Firmware
Great for the industry
Standards-based
Well-specified and unambiguous Conformance testing means cross-platform consistency
Robustness
GPT support adds more fault tolerance
Security
NVRAM entries to launch a boot option; no MBR bootstrap no MBR Viruses
Speed
Quicker hand-off from firmware to the Windows Boot Manager possible on Server systems
Architecturally clean and modernized A native 64-bit firmware implementation for 64-bit processors
Take advantage of newer compilers and languages
Eases bring up
Modular design speeds implementation bring up
For this to work the BIOS must support multiple boot entries, and should default to booting the default entry
Windows is planned to support both CD and DVD/UDFS boot UDFS also uses El Torito, and is built using the UDFS bridge format
2006 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.