在好例子网,分享、交流、成长!
您当前所在位置:首页C/C++ 开发实例Windows Mobile → EDK_II Module Writer_s Guide_0_7

EDK_II Module Writer_s Guide_0_7

Windows Mobile

下载此实例
  • 开发语言:C/C++
  • 实例大小:0.28M
  • 下载次数:7
  • 浏览次数:78
  • 发布时间:2021-08-20
  • 实例类别:Windows Mobile
  • 发 布 人:tunker
  • 文件格式:.pdf
  • 所需积分:4
 相关标签: GUIDE Write GUID IDE GUI

实例介绍

This document is a guideline for new EDK II module developers, and provides detailed
instructions on how to develop and build a new module, and how to release with a
package. For information about developing new modules, start with this document.

from clipboard

Contents
1 The Basics of EDK II..........................................................................................1
1.1 Overview ..............................................................................................1
1.1.1 Module, Package and Platform.....................................................1
1.1.2 Module Customization ................................................................2
1.1.3 EDK II Development Lifecycle .....................................................2
1.1.4 Build Infrastructure ...................................................................4
1.2 Related References .................................................................................5
1.3 Terms...................................................................................................6
1.4 Target Audience .....................................................................................6
2 An EDK II Package ............................................................................................7
2.1 Introduction ..........................................................................................7
2.1.1 EDK II Packages .......................................................................7
2.1.2 The Package Directory ...............................................................7
2.1.3 Package Declaration File.............................................................8
2.1.4 Package DSC File ....................................................................10
2.2 Manage Package ..................................................................................11
2.2.1 Create Package .......................................................................11
2.2.2 Using a Package......................................................................12
2.2.3 Updating a Package .................................................................12
3 Module Development .......................................................................................16
3.1 What is an EDK II module? ....................................................................16
3.1.1 Module Type ...........................................................................17
3.2 Creating a Module ................................................................................18
3.2.1 Location.................................................................................18
3.2.2 Sample: Module Meta File - INF .................................................19
3.2.3 Adding a Package Dependency ..................................................21
3.2.4 Adding Source Files .................................................................21
3.2.5 Add Library Class References ....................................................22
3.2.6 Adding PCD References ............................................................23
3.2.7 Referencing a Protocol, PPI, or GUID ..........................................25
3.2.8 Adding a Dependency to a Module .............................................26
3.3 Additional Steps for Library Instances .....................................................26
3.3.1 Define Produced Library Class ...................................................26
3.3.2 Define a Library Constructor (Optional) ......................................27
3.3.3 Define a Library Destructor (Optional) ........................................27
3.4 Additional Steps for Driver.....................................................................28
3.4.1 Define a Driver Entry Point .......................................................28
3.5 EDK II Common Library Class ................................................................28
3.6 Module using HII ..................................................................................29
3.6.1 Forms....................................................................................29
3.6.2 Using Unicode Strings ..............................................................33
3.7 Building the module..............................................................................36
3.7.1 Add the module INF in package DSC ..........................................36
3.7.2 Select Library Instances ...........................................................37
iv
3.7.3 Configure PCDs .......................................................................39
3.7.4 Customize Build Options...........................................................42
3.7.5 Build module image .................................................................44
3.7.6 Build EFI Option Rom image .....................................................46
3.7.7 Common build module breaks ...................................................47
3.8 Debugging a Module .............................................................................48
3.8.1 Required steps for debugging a module ......................................48
3.8.2 Basic debugging methods .........................................................49
4 UEFI Applications ............................................................................................50
4.1 Begin with INF file ................................................................................50
4.2 Write UEFI Application Entry Point ..........................................................51
4.3 Get Service Tables................................................................................51
4.4 Communicating with a UEFI driver ..........................................................52
4.4.1 Protocol .................................................................................52
4.4.2 Variable .................................................................................52
5 UEFI Drivers ..................................................................................................53
5.1 Begin With INF File ...............................................................................53
5.2 Write the UEFI Driver entry point............................................................53
5.2.1 Example: APIs in UefiLib ..........................................................54
5.2.2 Example: Entry point to the Abc driver .......................................54
5.3 Get Service Tables................................................................................56
5.4 Communication between UEFI Drivers .....................................................57
5.4.1 Protocol .................................................................................57
5.4.2 Variable .................................................................................57
6 SEC Module....................................................................................................59
6.1 Beginning to Write the INF File ...............................................................59
6.2 Setup Pre-Memory Environment .............................................................59
6.3 Prepare for Data PEI Foundation .............................................................60
6.3.1 EFI_SEC_PEI_HAND_OFF * SecCoreData ....................................60
6.3.2 EFI_PEI_PPI_DESCRIPTOR *PpiList ............................................61
7 Pre-EFI Initialization Modules............................................................................63
7.1 Introduction ........................................................................................63
7.2 Beginning to Write a PEIM INF File ..........................................................63
7.3 Defining a PEIM’s entry point .................................................................63
7.4 Get Pei Services ...................................................................................64
7.5 Communicate between PEIM Modules ......................................................64
7.5.1 PPI........................................................................................64
7.5.2 HOB ......................................................................................65
7.5.3 PCD ......................................................................................66
7.6 Communicate with DXE Modules.............................................................66
7.6.1 HOB ......................................................................................66
7.6.2 Variable .................................................................................66
7.6.3 PCD ......................................................................................67
7.7 Boot Mode...........................................................................................67
7.8 Execution in Place PEIMs .......................................................................68
7.9 Dependency for PEIMs ..........................................................................68
8 DXE Drivers: non-UEFI drivers ..........................................................................70
 v
8.1 Beginning with INF File .........................................................................70
8.2 Write DXE Driver Entry Point..................................................................70
8.3 Obtaining Services Tables......................................................................71
8.4 Communication between DXE Drivers......................................................72
8.4.1 Protocol .................................................................................72
8.4.2 Variable .................................................................................74
8.4.3 Dynamic PCD..........................................................................75
8.5 Communication with PEIMs ....................................................................76
8.5.1 HOB ......................................................................................76
8.5.2 Variable .................................................................................78
8.5.3 Dynamic PCD..........................................................................78
8.6 Dependency Expressions .......................................................................78
8.7 Handler for EVT_SIGNAL_EXIT_BOOT_SERVICES ......................................79
8.8 DXE Runtime Driver..............................................................................80
8.8.1 INF File..................................................................................81
8.8.2 Handler for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE ................81
8.9 DXE SAL Driver ....................................................................................82
8.9.1 INF File..................................................................................83
8.9.2 Entry Point .............................................................................83
8.10 DXE SMM Driver...................................................................................83
8.10.1 INF File..................................................................................84
8.10.2 Constraints.............................................................................84
Appendix A Dynamic PCD ....................................................................................................87
A.1.1 Class of Dynamic Type.....................................................................................87
A.1.2 When and how to use dynamic PCD ...................................................................88
Tables
Table 1 EDK II Module Types ............................................................................17
Table 2 Recommended name convention for module directory ...............................19
Table 3 EDK II supported file extensions ............................................................22
Table 4 INF PCD Section Name .........................................................................24
Table 5 PCD access functions............................................................................25
Table 6 Commonly use library classes ................................................................28
Table 7 Module Entry Point and Service Table Libraries .........................................29
Table 9 Protocols Used to Separate the Loading and Starting/Stopping of Drivers .....53
Table 10. Table Global Variables .......................................................................57
Table 11 Reference to Services Tables for DXE Drivers .........................................71
Figures
Figure 1 Conceptual workflow .............................................................................5
Figure 2 Firmware Volume................................................................................16
Figure 3 Temporary Memory Layout...................................................................60

标签: GUIDE Write GUID IDE GUI

实例下载地址

EDK_II Module Writer_s Guide_0_7

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警