没有合适的资源?快使用搜索试试~ 我知道了~
首页UEFI固件接口规范2.3.1版本详解
UEFI固件接口规范2.3.1版本详解
需积分: 22 5 下载量 121 浏览量
更新于2024-07-19
1
收藏 9.76MB PDF 举报
UEFI 规范 2.3.1 概述
统一可扩展固件接口(UEFI)的规范描述了操作系统(OS)和平台固件之间的接口。 UEFI 是 Extensible Firmware Interface Specification 1.10(EFI)的继承者,因此某些代码和协议名称保留了 EFI 的命名。除非另有说明,EFI 在本规范中的命名可以认为是 UEFI 的一部分。
UEFI 规范的主要目的是定义操作系统和平台固件之间的接口,以便实现更好的平台管理和设备控制。该规范涵盖了固件和操作系统之间的所有交互,包括引导过程、设备控制、安全机制等。
在 UEFI 规范中,定义了多种类型的数据结构和协议,例如 Boot Services、Runtime Services、Device Path 等。这些数据结构和协议为操作系统和平台固件之间的通信提供了统一的接口。
UEFI 规范还定义了多种安全机制,例如 Secure Boot、Authenticated Variables 等,以确保平台的安全性和可靠性。
在 UEFI 规范中,还定义了多种 debugging 机制,例如 Debug Port、Debug Interface 等,以便开发者和测试人员可以更方便地调试和测试固件和操作系统。
此外,UEFI 规范还涵盖了多种平台管理机制,例如 Firmware Management、Platform Configuration 等,以便管理员可以更方便地管理和配置平台。
UEFI 规范为操作系统和平台固件之间的交互提供了统一的接口和标准,为平台管理和设备控制提供了强大的支持。
UEFI 规范的版本历史
UEFI 规范的版本历史可以追溯到 2006 年,第一个版本的 UEFI 规范发布。自那时以来,UEFI 规范已经经历了多次更新和修订,最新的版本是 2.3.1。
UEFI 规范的重要性
UEFI 规范的重要性体现在以下几个方面:
1. 统一的接口:UEFI 规范提供了统一的接口,用于操作系统和平台固件之间的交互。
2. 安全性:UEFI 规范定义了多种安全机制,以确保平台的安全性和可靠性。
3. 可扩展性:UEFI 规范提供了可扩展的架构,允许厂商和开发者添加新的功能和协议。
4. 兼容性:UEFI 规范确保了平台的兼容性,允许不同的操作系统和平台固件之间的交互。
UEFI 规范的应用
UEFI 规范已经广泛应用于各个领域,包括:
1. 个人计算机:UEFI 规范用于个人计算机的固件和操作系统之间的交互。
2. 服务器:UEFI 规范用于服务器的固件和操作系统之间的交互。
3. 嵌入式系统:UEFI 规范用于嵌入式系统的固件和操作系统之间的交互。
4. 手机和平板电脑:UEFI 规范用于手机和平板电脑的固件和操作系统之间的交互。
UEFI 规范是一个重要的工业标准,为操作系统和平台固件之间的交互提供了统一的接口和标准。
Unified Extensible Firmware Interface Specification
xvi April 6, 2011 Version 2.3.1
2.3.3 Intel
®
Itanium
®
-Based Platforms......................................................................... 26
2.3.4 x64 Platforms ...................................................................................................... 30
2.3.5 ARM Platforms ................................................................................................... 33
2.4 Protocols ......................................................................................................................... 36
2.5 UEFI Driver Model .......................................................................................................... 41
2.5.1 Legacy Option ROM Issues ................................................................................ 43
2.5.2 Driver Initialization............................................................................................... 45
2.5.3 Host Bus Controllers ........................................................................................... 46
2.5.4 Device Drivers..................................................................................................... 48
2.5.5 Bus Drivers.......................................................................................................... 49
2.5.6 Platform Components ......................................................................................... 51
2.5.7 Hot-Plug Events .................................................................................................. 52
2.5.8 EFI Services Binding........................................................................................... 52
2.6 Requirements.................................................................................................................. 54
2.6.1 Required Elements.............................................................................................. 54
2.6.2 Platform-Specific Elements ................................................................................ 55
2.6.3 Driver-Specific Elements..................................................................................... 57
2.6.4 Extensions to this Specification published elsewhere........................................ 58
3
Boot Manager................................................................................................ 61
3.1 Firmware Boot Manager ................................................................................................. 61
3.1.1 Boot Manager Programming ............................................................................... 62
3.1.2 Load Option Processing...................................................................................... 62
3.1.3 Load Options....................................................................................................... 63
3.1.4 Boot Manager Capabilities .................................................................................. 65
3.1.5 Launching Boot#### Applications....................................................................... 65
3.1.6 Launching Boot#### Load Options Using Hot Keys ........................................... 66
3.2 Globally Defined Variables.............................................................................................. 68
3.3 Boot Option Variables Default Boot Behavior ................................................................. 71
3.4 Boot Mechanisms ........................................................................................................... 71
3.4.1 Boot via the Simple File Protocol ........................................................................ 72
3.4.2 Boot via LOAD_FILE PROTOCOL...................................................................... 73
4
EFI System Table.......................................................................................... 75
4.1 UEFI Image Entry Point .................................................................................................. 75
EFI_IMAGE_ENTRY_POINT .............................................................................. 75
4.2 EFI Table Header ...........................................................................................................76
EFI_TABLE_HEADER ........................................................................................ 77
4.3 EFI System Table .......................................................................................................... 78
EFI_SYSTEM_TABLE......................................................................................... 78
4.4 EFI Boot Services Table ................................................................................................ 79
EFI_BOOT_SERVICES ...................................................................................... 80
4.5 EFI Runtime Services Table .......................................................................................... 84
EFI_RUNTIME_SERVICES ................................................................................ 84
4.6 EFI Configuration Table ................................................................................................. 86
Version 2.3.1 April 6, 2011 xvii
EFI_CONFIGURATION_TABLE ......................................................................... 86
4.7 Image Entry Point Examples........................................................................................... 88
4.7.1 Image Entry Point Examples............................................................................... 88
4.7.2 UEFI Driver Model Example ............................................................................... 89
4.7.3 UEFI Driver Model Example (Unloadable) .......................................................... 90
4.7.4 EFI Driver Model Example (Multiple Instances) .................................................. 91
5
GUID Partition Table (GPT) Disk Layout .................................................... 95
5.1 GPT and MBR disk layout comparison ........................................................................... 95
5.2 LBA 0 Format.................................................................................................................. 95
5.2.1 Legacy Master Boot Record (MBR) .................................................................... 95
5.2.2 OS Types ............................................................................................................ 97
5.2.3 Protective MBR ................................................................................................... 97
5.3 GUID Partition Table (GPT) Disk Layout ........................................................................ 99
5.3.1 GPT overview...................................................................................................... 99
5.3.2 GPT Header ...................................................................................................... 102
5.3.3 GPT Partition Entry Array.................................................................................. 104
6
Services — Boot Services ......................................................................... 107
6.1 Event, Timer, and Task Priority Services...................................................................... 108
CreateEvent() .................................................................................................... 112
CreateEventEx()................................................................................................ 116
CloseEvent()...................................................................................................... 120
SignalEvent()..................................................................................................... 121
WaitForEvent() .................................................................................................. 122
CheckEvent()..................................................................................................... 124
SetTimer() ......................................................................................................... 125
RaiseTPL() ........................................................................................................ 127
RestoreTPL()..................................................................................................... 129
6.2 Memory Allocation Services.......................................................................................... 129
AllocatePages() ................................................................................................. 133
FreePages() ...................................................................................................... 136
GetMemoryMap() .............................................................................................. 137
AllocatePool() .................................................................................................... 141
FreePool() ......................................................................................................... 142
6.3 Protocol Handler Services ............................................................................................ 142
InstallProtocolInterface() ................................................................................... 147
UninstallProtocolInterface() ............................................................................... 149
ReinstallProtocolInterface() ............................................................................... 151
RegisterProtocolNotify() .................................................................................... 153
LocateHandle().................................................................................................. 155
HandleProtocol() ............................................................................................... 157
LocateDevicePath()........................................................................................... 159
OpenProtocol() .................................................................................................. 161
CloseProtocol().................................................................................................. 168
OpenProtocolInformation() ................................................................................ 170
Unified Extensible Firmware Interface Specification
xviii April 6, 2011 Version 2.3.1
ConnectController()........................................................................................... 172
DisconnectController()....................................................................................... 177
ProtocolsPerHandle() ........................................................................................ 179
LocateHandleBuffer() ........................................................................................ 181
LocateProtocol() ................................................................................................ 184
InstallMultipleProtocolInterfaces() ..................................................................... 185
UninstallMultipleProtocolInterfaces()................................................................. 186
6.4 Image Services ............................................................................................................. 186
LoadImage()...................................................................................................... 189
StartImage() ...................................................................................................... 192
UnloadImage()................................................................................................... 194
EFI_IMAGE_ENTRY_POINT ............................................................................ 195
Exit() .................................................................................................................. 197
ExitBootServices()............................................................................................. 199
6.5 Miscellaneous Boot Services ........................................................................................ 200
SetWatchdogTimer() ......................................................................................... 201
Stall() ................................................................................................................. 203
CopyMem()........................................................................................................ 204
SetMem()........................................................................................................... 205
GetNextMonotonicCount()................................................................................. 206
InstallConfigurationTable() ................................................................................ 207
CalculateCrc32() ............................................................................................... 209
7
Services — Runtime Services ................................................................... 211
7.1 Runtime Services Rules and Restrictions..................................................................... 212
7.1.1 Exception for Machine Check, INIT, and NMI. .................................................. 212
7.2 Variable Services .......................................................................................................... 213
GetVariable() ..................................................................................................... 215
GetNextVariableName() .................................................................................... 217
SetVariable() ..................................................................................................... 219
7.2.1 Using the EFI_VARIABLE_AUTHENTICATION_2 descriptor (Recommended).....
222
7.2.2 Using the EFI_VARIABLE_AUTHENTICATION descriptor .............................. 224
QueryVariableInfo() ........................................................................................... 227
7.2.3 Hardware Error Record Persistence ................................................................. 228
7.3 Time Services ...............................................................................................................229
GetTime() .......................................................................................................... 230
SetTime()........................................................................................................... 234
GetWakeupTime() ............................................................................................. 235
SetWakeupTime() ............................................................................................. 236
7.4 Virtual Memory Services ............................................................................................... 237
SetVirtualAddressMap() .................................................................................... 238
ConvertPointer() ................................................................................................ 240
7.5 Miscellaneous Runtime Services .................................................................................. 241
7.5.1 Reset System.................................................................................................... 241
ResetSystem()................................................................................................... 242
Version 2.3.1 April 6, 2011 xix
7.5.2 Get Next High Monotonic Count ....................................................................... 243
GetNextHighMonotonicCount() ......................................................................... 244
7.5.3 Update Capsule ................................................................................................ 245
UpdateCapsule() ............................................................................................... 246
QueryCapsuleCapabilities() .............................................................................. 252
8
Protocols — EFI Loaded Image................................................................. 255
8.1 EFI Loaded Image Protocol .......................................................................................... 255
EFI_LOADED_IMAGE_PROTOCOL ................................................................ 255
EFI_LOADED_IMAGE_PROTOCOL.Unload() ................................................. 258
8.2 EFI Loaded Image Device Path Protocol...................................................................... 258
EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL ..................................... 258
9
Protocols — Device Path Protocol ........................................................... 261
9.1 Device Path Overview................................................................................................... 261
9.2 EFI Device Path Protocol.............................................................................................. 261
EFI_DEVICE_PATH_PROTOCOL.................................................................... 261
9.3 Device Path Nodes ....................................................................................................... 262
9.3.1 Generic Device Path Structures........................................................................ 263
9.3.2 Hardware Device Path ...................................................................................... 264
9.3.3 ACPI Device Path ............................................................................................. 266
9.3.4 ACPI _ADR Device Path................................................................................... 268
9.3.5 Messaging Device Path .................................................................................... 269
9.3.6 Media Device Path ............................................................................................ 293
9.3.7 BIOS Boot Specification Device Path ............................................................... 296
9.4 Device Path Generation Rules...................................................................................... 297
9.4.1 Housekeeping Rules......................................................................................... 297
9.4.2 Rules with ACPI _HID and _UID....................................................................... 298
9.4.3 Rules with ACPI _ADR...................................................................................... 299
9.4.4 Hardware vs. Messaging Device Path Rules .................................................... 299
9.4.5 Media Device Path Rules.................................................................................. 299
9.4.6 Other Rules ....................................................................................................... 300
9.5 Device Path Utilities Protocol........................................................................................ 300
EFI_DEVICE_PATH_UTILITIES_PROTOCOL................................................. 300
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.GetDevicePathSize() .............. 302
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.DuplicateDevicePath() ............ 303
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDevicePath()............... 304
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDeviceNode() ............. 305
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.AppendDevicePathInstance() . 306
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.GetNextDevicePathInstance() 307
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.CreateDeviceNode() ............... 308
EFI_DEVICE_PATH_UTILITIES_PROTOCOL.IsDevicePathMultiInstance() ... 309
9.6 EFI Device Path Display Format Overview................................................................... 309
9.6.1 Design Discussion............................................................................................. 309
9.6.2 Device Path to Text Protocol............................................................................. 326
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL ................................................. 326
Unified Extensible Firmware Interface Specification
xx April 6, 2011 Version 2.3.1
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDeviceNodeToText()... 328
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText().... 329
9.6.3 Device Path from Text Protocol ........................................................................ 330
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL............................................ 330
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL.ConvertTextToDeviceNode() ...
331
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL.ConvertTextToDevicePath() ....
332
10
Protocols — UEFI Driver Model ................................................................ 333
10.1 EFI Driver Binding Protocol......................................................................................... 333
EFI_DRIVER_BINDING_PROTOCOL .............................................................. 333
EFI_DRIVER_BINDING_PROTOCOL.Supported() .......................................... 336
EFI_DRIVER_BINDING_PROTOCOL.Start() ................................................... 342
EFI_DRIVER_BINDING_PROTOCOL.Stop() ................................................... 350
10.2 EFI Platform Driver Override Protocol ........................................................................ 353
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL..................................... 354
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.GetDriver().................. 356
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.GetDriverPath() .......... 358
EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL.DriverLoaded()............ 360
10.3 EFI Bus Specific Driver Override Protocol .................................................................. 361
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL .............................. 361
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL.GetDriver() ........... 363
10.4 EFI Driver Diagnostics Protocol .................................................................................. 364
EFI_DRIVER_DIAGNOSTICS2_PROTOCOL .................................................. 364
EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.RunDiagnostics()...................... 366
10.5 EFI Component Name Protocol .................................................................................. 368
EFI_COMPONENT_NAME2_PROTOCOL....................................................... 368
EFI_COMPONENT_NAME2_PROTOCOL.GetDriverName() .......................... 370
EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() .................... 371
10.6 EFI Service Binding Protocol ...................................................................................... 372
EFI_SERVICE_BINDING_PROTOCOL............................................................ 372
EFI_SERVICE_BINDING_PROTOCOL.CreateChild() ..................................... 374
EFI_SERVICE_BINDING_PROTOCOL.DestroyChild().................................... 378
10.7 EFI Platform to Driver Configuration Protocol............................................................. 382
EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL .................. 383
EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL.Query() ..... 384
EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL.Response().....
386
10.7.1 DMTF SM CLP ParameterTypeGuid .............................................................. 388
10.8 EFI Driver Supported EFI Version Protocol ................................................................ 390
EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL............................. 390
10.9 EFI Driver Family Override Protocol ........................................................................... 390
10.9.1 Overview ......................................................................................................... 390
EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL ........................................... 391
EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL.GetVersion ()..................... 393
剩余2209页未读,继续阅读
2012-11-30 上传
2021-07-06 上传
2021-03-10 上传
2021-01-09 上传
2021-07-15 上传
2020-03-11 上传
clam_zxf
- 粉丝: 64
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python和Opencv的车牌识别系统实现
- 我的代码小部件库:统计、MySQL操作与树结构功能
- React初学者入门指南:快速构建并部署你的第一个应用
- Oddish:夜潜CSGO皮肤,智能爬虫技术解析
- 利用REST HaProxy实现haproxy.cfg配置的HTTP接口化
- LeetCode用例构造实践:CMake和GoogleTest的应用
- 快速搭建vulhub靶场:简化docker-compose与vulhub-master下载
- 天秤座术语表:glossariolibras项目安装与使用指南
- 从Vercel到Firebase的全栈Amazon克隆项目指南
- ANU PK大楼Studio 1的3D声效和Ambisonic技术体验
- C#实现的鼠标事件功能演示
- 掌握DP-10:LeetCode超级掉蛋与爆破气球
- C与SDL开发的游戏如何编译至WebAssembly平台
- CastorDOC开源应用程序:文档管理功能与Alfresco集成
- LeetCode用例构造与计算机科学基础:数据结构与设计模式
- 通过travis-nightly-builder实现自动化API与Rake任务构建
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功