当前位置:网站首页>How to define guid in AMI code
How to define guid in AMI code
2022-07-05 07:51:00 【Yang_ Winston】
When looking at the code and writing the code, I found two Guid How to define , Record here , Here to create PEIM Moudle when installPpi when Ppi Used Guid For example .
The first is the most common way , Since you need to use one Guid, We define a in the header file Guid Just fine , as follows :
EFI_GUID gOemPeiTestPeimPpiGuid = {
0x2e1e7cae, 0x01fd, 0x4cf7, {
0x8f, 0xbe, 0x8, 0xc4, 0x86, 0x82, 0x61, 0x89}};
The second is not written in the header file Guid Value ,OEM_PEI_TESTPEIM_PPI_GUID This value is just a decoration , It may be to increase the readability of the code .
#define OEM_PEI_TESTPEIM_PPI_GUID \ {
0x2e1e7cae, 0x01fd, 0x4cf7, {
0x8f, 0xbe, 0x8, 0xc4, 0x86, 0x82, 0x61, 0x89}}
extern EFI_GUID gOemPeiTestPeimPpiGuid;
actually gOemPeiTestPeimPpiGuid The value of is in a Package Under the dec Of documents [Ppis] Block , as follows :
[Ppis]
gOemPeiTestPeimPpiGuid = {
0x2e1e7cae, 0x01fd, 0x4cf7, {
0x8f, 0xbe, 0x8, 0xc4, 0x86, 0x82, 0x61, 0x89}}
that C How does the file reference this value ? In fact, in this Moudle Of inf Of documents [Packages] The above is listed under the block dec file , And also in [Ppis] It is listed under the block gOemPeiTestPeimPpiGuid The name ( If you don't list your name, you won't find this Guid value ).
[Packages]
MdePkg/MdePkg.dec
OemIp3Pkg/OemIp3Pkg.dec
[Ppis]
gOemPeiTestPeimPpiGuid
Say your opinion , The second method may reduce the coupling of the code , In case you need to change this one day Guid Value , We just need to change dec In the document Guid Just fine .( Of course, this reason doesn't seem to hold water , When changes are needed Guid Well ...)
边栏推荐
- Global and Chinese markets for flexible endoscopic lithotripsy devices 2022-2028: Research Report on technology, participants, trends, market size and share
- Count and sort the occurrence times of specific fields through SQL statements
- How to migrate the device data accessed by the RTSP of the easycvr platform to easynvr?
- Can't find real-time chat software? Recommend to you what e-commerce enterprises are using!
- Application of ultra pure water particle counter in electronic semiconductors
- PIL's image tool image reduction and splicing.
- Build your own random wallpaper API for free
- Record the opening ceremony of Beijing Winter Olympics with display equipment
- Temperature sensor DS18B20 principle, with STM32 routine code
- Opendrive record
猜你喜欢
[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen
Altium designer 19.1.18 - clear information generated by measuring distance
MySQL - storage engine
Mlperf training v2.0 list released, with the same GPU configuration, the performance of Baidu PaddlePaddle ranks first in the world
Train your dataset with yolov4
Openxlsx field reading problem
About the problem that MySQL connector net cannot be cleared in MySQL
Ads learning record (lna_atf54143)
SQL JOINS
Oracle-触发器和程序包
随机推荐
Extended application of single chip microcomputer-06 independent key
Global and Chinese markets for waste treatment air switches 2022-2028: Research Report on technology, participants, trends, market size and share
通过sql语句统计特定字段出现次数并排序
Charles- unable to grab bags and surf the Internet
Esmini longspeedaction modification
[untitled] record the visual shock of the Winter Olympics and the introduction of the display screen
QT excellent articles
[popular science] some interesting things that I don't know whether they are useful or not
Ten thousand words detailed eight sorting must read (code + dynamic diagram demonstration)
Explain STM32 startup file in detail
Close of office 365 reading
Day09 how to create packages import package naming conventions Alibaba Development Manual
Record the visual shock of the Winter Olympics and the introduction of the screen 2
Process (P) runs, and idle is different from pycharm
Opendrive arc drawing script
Apple modify system shortcut key
String judgment
Differences between pycharm and idle and process -- join() in vs Code
What is deep learning?
[professional literacy] core conferences and periodicals in the field of integrated circuits