# UEFI

**UEFI**（Unified Extensible Firmware Interface，统一可扩展固件接口）是一项规范，定义操作系统与平台固件之间的接口，提供描述平台的数据表，以及操作系统及其加载器可用的引导服务和运行时服务调用。它为引导操作系统和运行预引导应用程序提供标准环境，并已在大多数现代x86和ARM系统上取代传统BIOS。<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/tool/unified-extensible-firmware-interface.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一项固件规范，而非软件产品；它定义用于加载操作系统的数据表、引导服务和运行时服务<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/tool/unified-extensible-firmware-interface.html)</sup><sup> • </sup><sup>[2](https://doc.coreboot.org/getting_started/faq.html)</sup> |
| 起源 | 英特尔引导计划（1998年）的产物；英特尔的EFI规范止于1.10版<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/tool/unified-extensible-firmware-interface.html)</sup> |
| 治理 | 统一EFI论坛于2005年中由BIOS厂商、操作系统厂商、系统制造商和芯片生产商共同成立<sup>[3](https://www.intel.com/content/dam/www/public/us/en/documents/research/2011-vol15-iss-1-intel-technology-journal.pdf)</sup> |
| 当前版本 | UEFI 2.11和平台初始化（PI）1.9，2024年12月17日发布，新增龙架构支持和新密码算法<sup>[4](https://uefi.org/press-release/uefi-forum-releases-uefi-211-specification-and-pi-19-specification-streamline-user)</sup> |
| 安全启动 | 在UEFI规范2.3.1中加入；在加载固件驱动程序、EFI应用程序和操作系统加载器之前验证其签名<sup>[5](https://static.sched.com/hosted_files/openssfcdin2025/06/UEFI%20Secure%20Boot%20In%20Linux.pdf)</sup><sup> • </sup><sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup> |
| 参考实现 | TianoCore EDK2，开源，不含硬件支持；大多数出货固件是在其上构建的专有实现<sup>[2](https://doc.coreboot.org/getting_started/faq.html)</sup> |
| 固件更新 | Windows使用UEFI UpdateCapsule函数以驱动程序包形式交付系统固件更新<sup>[7](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/windows-uefi-firmware-update-platform)</sup> |

## 历史

该规范最初是英特尔的可扩展固件接口（Extensible Firmware Interface，EFI），是1998年启动的英特尔引导计划（Intel Boot Initiative）的产物。英特尔最初的版本公开命名为EFI，止于EFI 1.10版。2005年，包括BIOS厂商、操作系统厂商、系统制造商和芯片生产公司在内的行业利益相关方成立了统一EFI论坛（Unified EFI Forum），以推动采用并继续开发，以EFI 1.10为起点，形成更名后的统一EFI规范。论坛于2007年1月发布了2.1版。<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/tool/unified-extensible-firmware-interface.html)</sup><sup> • </sup><sup>[3](https://www.intel.com/content/dam/www/public/us/en/documents/research/2011-vol15-iss-1-intel-technology-journal.pdf)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/2407.07166)</sup>

最近一次发布于2024年12月17日宣布，将UEFI 2.11与平台初始化（PI）1.9规范配套。UEFI 2.11更新了内存管理和分配，包括针对热插拔的新内存属性和Arm内存分配要求，新增密码算法和HTTP引导中的代理主机URI支持，并通过通用平台错误记录（Common Platform Error Record）定义改进错误处理。PI 1.9新增龙架构支持，为签名固件卷提供除此前RSA2048_SHA256之外的其他密码算法，提供用于熵的随机数生成器PEIM间接口（PEIM-to-PEIM Interface），以及用于具有不同块擦除大小的多个SPI区域的协议。<sup>[4](https://uefi.org/press-release/uefi-forum-releases-uefi-211-specification-and-pi-19-specification-streamline-user)</sup>

## 架构与服务

UEFI固件通过两个函数指针表——EFI_BOOT_SERVICES和EFI_RUNTIME_SERVICES——对外暴露其能力，操作系统通过系统表定位这两个表。规范为每种架构定义调用约定，以便各编译器提供合适的关键字。<sup>[9](https://uefi.org/specs/UEFI/2.9_A/02_Overview.html)</sup>

**引导服务**仅在操作系统取得控制权之前可用。UEFI应用程序或驱动程序在此阶段分配内存、加载映像并执行I/O；UEFI运行时驱动程序只能在引导服务期间分配运行时内存。<sup>[10](https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html?highlight=exitbootservice)</sup>当操作系统加载器调用ExitBootServices()时，引导服务结束，只有运行时服务仍可调用，例如时间服务和变量服务。<sup>[11](https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown)</sup>

**启动管理器**是一个固件策略引擎，从UEFI定义的文件系统中的任意文件，或通过UEFI映像加载服务，加载UEFI应用程序，包括操作系统第一阶段加载器和UEFI驱动程序。其配置存储在架构定义的全局非易失性随机存取存储器（NVRAM）变量中。<sup>[9](https://uefi.org/specs/UEFI/2.9_A/02_Overview.html)</sup><sup> • </sup><sup>[12](https://uefi.org/specs/UEFI/2.9_A/03_Boot_Manager.html)</sup>规范还定义了硬件初始化之外的能力，包括固件更新、命令行解释器、网络通信和集成设置菜单。<sup>[2](https://doc.coreboot.org/getting_started/faq.html)</sup>

## 操作系统引导

在基于UEFI的Windows计算机上，固件加载并启动位于\EFI\Microsoft\Boot\bootmgfw.efi的Windows启动管理器EFI应用程序，后者随后启动Windows操作系统加载器（winload.efi），该加载器加载内核所需的驱动程序并启动内核。基于BIOS的机器通过[主引导记录](https://www.edgepedia.org/zh/master-boot-record)和bootmgr走等效路径。<sup>[13](https://learn.microsoft.com/troubleshoot/windows-client/performance/windows-boot-issues-troubleshooting)</sup>SoC平台上的Windows需要UEFI变量服务来管理多个启动设备和安全变量，并强制要求按UEFI v2.3.1第27节定义的[安全启动](https://www.edgepedia.org/zh/secure-boot)，出厂时即启用，并预置包含微软提供的EFI_CERT_X509签名的签名数据库。<sup>[14](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/uefi-requirements-that-apply-to-all-windows-platforms)</sup>

Linux可以通过GRUB等传统EFI引导加载程序引导，也可以直接通过内核内置的EFI引导桩（EFI boot stub）引导。该桩使x86 bzImage或arm64 Image伪装成PE/COFF可执行文件，以便固件加载器将其作为EFI应用程序运行；内核映像被复制到EFI系统分区并加上.efi扩展名，内核参数和initrd路径通过命令行传递。<sup>[15](https://kernel.org/doc/html/v6.7/admin-guide/efi-stub.html)</sup>

## 安全启动

安全启动在规范2.3.1版中加入，在加载每件引导软件之前验证其签名，包括UEFI固件驱动程序（选项ROM）、EFI应用程序和操作系统加载器。<sup>[5](https://static.sched.com/hosted_files/openssfcdin2025/06/UEFI%20Secure%20Boot%20In%20Linux.pdf)</sup><sup> • </sup><sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>信任通过制造时存储在非易失性随机存取存储器中的四个密钥数据库来表达：

- **平台密钥（PK）** 在平台所有者和固件之间建立信任；OEM在最终验证后生成它，并锁定固件，使其不可编辑。<sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>
- **密钥交换密钥数据库（KEK）** 保存有权更新签名数据库的签名密钥。<sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>
- **签名数据库（db）** 保存固件和软件模块的可信签名者的摘要。<sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>
- **吊销签名数据库（dbx）** 保存被吊销的摘要；如果某个哈希同时出现在db和dbx中，以吊销为准。<sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>

物理在场的授权用户可以通过正确签名的更新或固件菜单编辑这些数据库，PK可用于关闭安全启动。<sup>[6](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)</sup>在Windows认证的PC上，微软提供一项服务，为非微软引导加载程序签名，使其受到信任，用户可以向UEFI数据库添加签名，以运行任何操作系统，包括自制系统。<sup>[16](https://learn.microsoft.com/nl-nl/windows/security/operating-system-security/system-security/secure-the-windows-10-boot-process)</sup>配备UEFI固件和[可信平台模块](https://www.edgepedia.org/zh/trusted-platform-module)的PC可以配置为只加载受信任的操作系统引导加载程序，固件会记录引导过程，以便Windows将其发送到受信任的服务器进行健康评估。<sup>[16](https://learn.microsoft.com/nl-nl/windows/security/operating-system-security/system-security/secure-the-windows-10-boot-process)</sup>

## 实现

UEFI是一项规范，其服务（包括映像加载）的事实标准通用实现是TianoCore EDK2，由英特尔和Tianocore项目以开源形式发布。EDK2不附带硬件支持，大多数运行UEFI的硬件使用在其之上构建的专有实现。<sup>[2](https://doc.coreboot.org/getting_started/faq.html)</sup><sup> • </sup><sup>[17](https://arxiv.org/abs/2012.05471)</sup>

开源coreboot项目采取不同方法：它初始化硬件后退出，不实现UEFI规范。它可以启动EDK2载荷，为需要UEFI的操作系统提供UEFI引导服务和运行时服务，也可以使用非UEFI载荷，例如用于传统中断的SeaBIOS或用于全盘加密的GRUB。<sup>[2](https://doc.coreboot.org/getting_started/faq.html)</sup>

## 固件更新

Windows支持通过使用UEFI UpdateCapsule函数的驱动程序包交付系统和设备固件更新：Windows将固件载荷交给平台固件，在重启时处理。系统必须实现UpdateCapsule和QueryCapsuleCapabilities（UEFI规范2.8第8.5.3节要求），并在EFI系统资源表（ESRT）中暴露固件资源，以便Windows能够定位和报告更新。UEFI不应用于更新外围设备，因为设备必须在应用更新的重启期间存在。<sup>[7](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/windows-uefi-firmware-update-platform)</sup>在Linux上，fwupd项目使用UEFI胶囊机制进行固件更新，吊销和更新通过Linux厂商固件服务分发。<sup>[18](https://github.com/fwupd/fwupd/blob/main/plugins/uefi-capsule/README.md)</sup>

## 安全态势

固件位于操作系统之下，被系统其余部分隐式信任，这使其成为攻击目标：恶意BIOS修改可能导致永久拒绝服务或持久性恶意软件，因此美国国家标准与技术研究院的SP 800-147要求经过身份验证、带有签名的BIOS更新机制，并防止回滚到存在漏洞的早期版本。<sup>[19](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-147.pdf)</sup>2023年一项关于UEFI安全性的系统研究描述了UEFI相关攻击的激增，并构建了类似[MITRE ATT&CK](https://www.edgepedia.org/zh/mitre-att-and-ck)的UEFI攻击战术和技术分类法。<sup>[20](https://arxiv.org/abs/2311.03809)</sup>

近期案例显示了弱点的范围。2025年，固件安全公司Binarly在多块技嘉（Gigabyte）主板的UEFI中发现四个漏洞（CVE-2025-7026至CVE-2025-7029，CVSS均为8.2），全部位于[系统管理模式](https://www.edgepedia.org/zh/system-management-mode)（SMM）中，这是一种高权限x86运行模式，其代码在操作系统内核之下的SMRAM中运行。拥有管理权限的攻击者可以在SMM中执行任意代码，绕过安全启动，并安装隐蔽的固件植入程序；技嘉为受影响型号推出了覆盖英特尔100至500系列平台的固件更新。<sup>[21](https://www.tomshardware.com/pc-components/motherboards/critical-uefi-vulnerabilities-found-in-gigabyte-motherboards-allow-attackers-to-bypass-secure-boot-and-install-firmware-backdoors)</sup>另外，[ESET](https://www.edgepedia.org/zh/eset)研究人员发现11个存在漏洞的UEFI shim引导加载程序，均由微软签名，其十年前就已存在的缺陷让攻击者无需利用新漏洞即可绕过安全启动：任何信任Microsoft Corporation UEFI CA 2011第三方证书的系统，都可能遭到攻击者利用旧的、仍受信任的shim二进制文件发动的攻击，研究人员估计这一群体达数十亿台设备。存在漏洞的shim已被吊销，用户应应用最新的UEFI吊销更新，Windows会自动执行，Linux用户通过Linux厂商固件服务应用。<sup>[22](https://www.techradar.com/pro/security/no-new-vulnerability-is-needed-to-bypass-uefi-secure-boot-experts-find-attackers-can-exploit-decades-old-flaws-to-gain-access-to-key-systems)</sup>2011年时代的安全启动证书本身已于2026年6月开始到期，需要微软和OEM将系统过渡到新证书。<sup>[23](https://www.windowscentral.com/microsoft/windows/secure-boot-certificates-expire-how-to-check)</sup>

## References

1. [Unified Extensible Firmware Interface, Intel Developer Resources](https://www.intel.com/content/www/us/en/developer/articles/tool/unified-extensible-firmware-interface.html)
2. [coreboot FAQ](https://doc.coreboot.org/getting_started/faq.html)
3. [Intel Technology Journal, Volume 15, Issue 1 (2011)](https://www.intel.com/content/dam/www/public/us/en/documents/research/2011-vol15-iss-1-intel-technology-journal.pdf)
4. [UEFI Forum Releases the UEFI 2.11 Specification and the PI 1.9 Specification, UEFI Forum (December 2024)](https://uefi.org/press-release/uefi-forum-releases-uefi-211-specification-and-pi-19-specification-streamline-user)
5. [UEFI Secure Boot in Linux, OpenSSF presentation](https://static.sched.com/hosted_files/openssfcdin2025/06/UEFI%20Secure%20Boot%20In%20Linux.pdf)
6. [Firmware Secure Boot, Microsoft Learn (Azure Security)](https://learn.microsoft.com/en-us/azure/security/fundamentals/secure-boot)
7. [Windows UEFI Firmware Update Platform: Implementation Guide, Microsoft Learn](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/windows-uefi-firmware-update-platform)
8. [UEFI Vulnerability Signature Generation using Static and Symbolic Analysis, arXiv:2407.07166](https://arxiv.org/abs/2407.07166)
9. [UEFI Specification 2.9A, Overview](https://uefi.org/specs/UEFI/2.9_A/02_Overview.html)
10. [UEFI Specification 2.10, Boot Services](https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html?highlight=exitbootservice)
11. [UEFI Specification 2.9A, Runtime Services](https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown)
12. [UEFI Specification 2.9A, Boot Manager](https://uefi.org/specs/UEFI/2.9_A/03_Boot_Manager.html)
13. [Windows Startup Issues Troubleshooting, Microsoft Learn](https://learn.microsoft.com/troubleshoot/windows-client/performance/windows-boot-issues-troubleshooting)
14. [UEFI Requirements for Windows on SoC Platforms, Microsoft Learn](https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/uefi-requirements-that-apply-to-all-windows-platforms)
15. [The EFI Boot Stub, Linux Kernel documentation](https://kernel.org/doc/html/v6.7/admin-guide/efi-stub.html)
16. [Secure the Windows Boot Process, Microsoft Learn](https://learn.microsoft.com/nl-nl/windows/security/operating-system-security/system-security/secure-the-windows-10-boot-process)
17. [Securing the EDK II Image Loader, arXiv:2012.05471](https://arxiv.org/abs/2012.05471)
18. [fwupd UEFI capsule plugin README, fwupd GitHub](https://github.com/fwupd/fwupd/blob/main/plugins/uefi-capsule/README.md)
19. [NIST SP 800-147, BIOS Protection Guidelines](https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-147.pdf)
20. [SoK: Security Below the OS -- A Security Analysis of UEFI, arXiv:2311.03809](https://arxiv.org/abs/2311.03809)
21. [Critical UEFI vulnerabilities found in Gigabyte motherboards, Tom's Hardware (2025)](https://www.tomshardware.com/pc-components/motherboards/critical-uefi-vulnerabilities-found-in-gigabyte-motherboards-allow-attackers-to-bypass-secure-boot-and-install-firmware-backdoors)
22. [No new vulnerability is needed to bypass UEFI Secure Boot, TechRadar (2026)](https://www.techradar.com/pro/security/no-new-vulnerability-is-needed-to-bypass-uefi-secure-boot-experts-find-attackers-can-exploit-decades-old-flaws-to-gain-access-to-key-systems)
23. [Secure Boot certificates expire: how to check, Windows Central (2026)](https://www.windowscentral.com/microsoft/windows/secure-boot-certificates-expire-how-to-check)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Operating systems › Operating system concepts

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/uefi

English original: https://www.edgepedia.org/uefi
