The Initialization of UEFI

本文详细介绍了UEFI的三个核心方面:UEFI的初始化过程、DXE组件及其构成,以及PEI与DXE之间的桥梁——HOBS。通过图表形式直观展示这些复杂的概念和技术细节。

In this blog, I will show you three points of the UEFI:

a.     The process of initializing the UEFI.

b.     The components of DXE.

c.       The bridge between PEI and DXE – HOBS.

 To make it more intelligible, I will introduce them as the flow charts.

1. The process of initializing the UEFI
 


2. The components of DXE

 EFI System Table, Architecture Protocols, DXEFoundation, Drivers. And the relationships of them are as follows:


3. The bridge between PEI and DXE - HOBS

HOBs (Hand-offBlocks): they are series of data structures in memory. They are created duringPEI and read only in DXE.


This Unified Extensible Firmware Interface (hereafter known as UEFI) Specification describes an interface between the operating system (OS) and the platform firmware. UEFI was preceded by the Extensible Firmware Interface Specification 1.10 (EFI). As a result, some code and certain protocol names retain the EFI designation. Unless otherwise noted, EFI designations in this specification may be assumed to be part of UEFI. The interface is in the form of data tables that contain platform-related information, and boot and runtime service calls that are available to the OS loader and the OS. Together, these provide a standard environment for booting an OS. This specification is designed as a pure interface specification. As such, the specification defines the set of interfaces and structures that platform firmware must implement. Similarly, the specification defines the set of interfaces and structures that the OS may use in booting. How either the firmware developer chooses to implement the required elements or the OS developer chooses to make use of those interfaces and structures is an implementation decision left for the developer. The intent of this specification is to define a way for the OS and platform firmware to communicate only information necessary to support the OS boot process. This is accomplished through a formal and complete abstract specification of the software-visible interface presented to the OS by the platform and firmware. Using this formal definition, a shrink-wrap OS intended to run on platforms compatible with supported processor specifications will be able to boot on a variety of system designs without further platform or OS customization. The definition will also allow for platform innovation to introduce new features and functionality that enhance platform capability without requiring new code to be written in the OS boot sequence. Furthermore, an abstract specification opens a route to replace legacy devices and firmware code over time. New device types and associated code can provide equivalent functionality through the same defined abstract interface, again without impact on the OS boot support code. The specification is applicable to a full range of hardware platforms from mobile systems to servers. The specification provides a core set of services along with a selection of protocol interfaces. The selection of protocol interfaces can evolve over time to be optimized for various platform market segments. At the same time, the specification allows maximum extensibility and customization abilities for OEMs to allow differentiation. In this, the purpose of UEFI is to define an evolutionary path from the traditional “PC-AT”- style boot world into a legacy-API free environment.
### UEFI HTTPS Boot Configuration and Secure Boot Setup In environments supporting Unified Extensible Firmware Interface (UEFI), configuring systems to perform an HTTPS boot involves setting up network interfaces securely so that the system can fetch boot-related files over a secure connection. The UEFI specification outlines mechanisms for this process through its defined boot manager functionality[^1]. For ensuring security during such operations, especially when dealing with secure boot settings, verification processes are critical. #### Network Stack Initialization To enable HTTPS booting within a UEFI environment, initializing the necessary network stack components is essential. This includes DHCP client initialization for obtaining IP addresses automatically from a server on the local network: ```c // Initialize DHCP Client in UEFI Shell Script Dhcp4->Configure (& DhcpConfig); ``` Once networking has been established successfully, transitioning towards establishing a secure channel using TLS/SSL protocols becomes feasible. #### Configuring Secure Boot Settings Secure boot relies upon pre-installed public keys stored either in NVRAM or as compiled-in defaults inside the firmware itself. These keys serve to authenticate subsequent stages like bootloader images before execution begins[^3]: - **Enabling Secure Boot**: Through BIOS/UEFI interface options. - **Managing Keys**: Adding/removing trusted certificates via tools provided by motherboard manufacturers or directly manipulating variables accessible under `/sys/firmware/efi/vars`. For platforms based around ARM architecture, such as those utilizing RK3399 SoCs where specific versions of U-Boot have been ported[^2], additional considerations may apply regarding compatibility between chosen bootloaders and hardware-specific features. #### Performing HTTPS Boot With both network connectivity assured along with appropriate secure boot configurations applied, initiating an actual HTTPS-based boot operation typically requires specifying URLs pointing toward desired kernel/initrd pairs alongside any required parameters passed at runtime: ```shell # Example command line arguments for loading remote resources over HTTPS fs0:\> chainload https://example.com/path/to/vmlinuz initrd=https://example.com/path/to/initramfs.img root=LABEL=rootfs ro quiet splash --- ``` This approach leverages built-in support found within modern EFI implementations while adhering strictly to best practices concerning data integrity checks throughout each phase transition leading up until full operating system handoff occurs.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值