




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Loads the Windows boot applications. OS loader, Resume loader, memory tester. Display boot menu and handles user to select. Loads the BCD store to ...
Typology: Slides
1 / 36
This page cannot be seen from the preview
Don't miss anything!





























Murali Ravirala
Kernel Platform Architecture Team
Microsoft
High-level description of Windows boot process Roles of different components involved Windows UEFI services usage Firmware Implementation points
UEFI Firmware
UEFI Boot Manager
Windows Boot Manager (bootmgfw.efi)
Windows OS Loader (winload.efi)
Kernel (ntoskrnl.exe)
Performs CPU and Chipset initialization, load drivers etc.
Loads UEFI device drivers (based on NVRAM DriverXxx variable), loads boot application
Loads Windows OS loader selected by user
Loads the Windows OS, calls ExitBootServices()
Windows Boot Manager
Windows OS Loader OS
Stores configuration information required to boot Replaces legacy boot.ini (BIOS) and efinvr.exe (on Itanium) BCD is a container for BCD objects Each boot application is represented by a BCD object Object are identifed by GUIDs or aliases ({bootmgr}, {default}) BCD object is a container of BCD elements Elements contain configuration setting for a boot application Located at (ESP)\EFI\Microsoft\Boot\BCD
Boot manager looks under
{bootmgr} BCD object
Reads “displayorder” and “toolsdisplayorder” elements
Load all files needed by the kernel to initialize Setup the execution environment for the kernel Terminate boot services Transfer control to the kernel
What files are loaded? Kernel + other kernel components required for initialization (ntoskrnl.exe, hal.dll, kdcom, …) All drivers marked as boot start The system hive Boot entry provides the path to the OS files BCD entry has “osdevice” and “systemroot” elements
Virtual Addresses for Runtime
Services
OS calls runtime services in virtual mode OS loader creates virtual address mappings for all runtime regions Informs the firmware of virtual address mappings SetVirtualAddressMap service is used Invoked after calling ExitBootServices()
Execution context includes: GDT, IDT, stack and page table mappings Boot manager executes in firmware context GDT, IDT and stack initialized by firmware Page tables created by firmware Firmware established mapping of physical memory (identity mapping)
Contains state of physical memory and processors Created by kernel before putting system in S
Runtime memory map must not conflict with OS memory map Otherwise OS or firmware may corrupt each other’s data
OS physical memory during boot must be available to OS during resume Required to restore physical memory across S transition Runtime firmware memory must be consistent in size and location between boot and resume Windows will fail to resume from S4 if these conditions are not satisfied
Windows Boot Manager
Windows OS Loader
Kernel
Set Video Mode [GOP.SetMode()] Load BCD Store [BLOCK_IO. ReadBlocks()] Display Boot menu [Direct write to frame buffer] Load winload.efi [BLOCK_IO. ReadBlocks()] Setup loader context + Jump to OS loader
Switch to alternate paging context Snapshot FW memory map [for S4 consistency check] Read OS binaries [BLOCK_IO. ReadBlocks()] Prepare for runtime virtualization (snapshot FW runtime memory map, allocate virtual regions) Setup OS environment ExitBootServices() SetVirtualAddressMap() to virtualize runtime services
Draw initial progress bar (write to frame buffer) Read/Write NVRAM entries
BCD abstracts all the information in the NVRAM Provides consistent interfaces to manipulate boot entries NVRAM boot entries are cached in the BCD store
BCD has 1:1 mappings for some UEFI global variables BootOrder “displayorder” Timeout “timeout” BootNext “bootsequence” All variables encapsulated by {fwbootmgr} object