Hi Andrew,
Thank you for your reply!
I have noticed that only driver can produce protocol, but how to locate the
dirver (DXE Driver.etc) by protocol GUID?
What's more, we all know that APs are produced by Initial DXE Driver, do you
have some clear ubderstand about APs?
Thanks!
Justin Lin
发件人: Andrew Fish
发送时间: 2013-01-04 02:30
收件人: linyao_71; edk2-devel
主题: Re: [edk2] Where are the realize source code of Protocol in UDK2010
On Jan 3, 2013, at 8:13 AM, 雅虎邮箱 <[email protected]> wrote:
Hi All,
I got a trouble during learing UEFI that when I tried to retrive more
information about protocols defined in the path of MdePkg\Include\Protocol, I
only see the header files but not find the corresponding file of *.c
Think of the protocol .h file as the public class definition. The EFI_GUID
global extern in the .h file is the name that is set to the #define
*_PROTOCOL_GUID value.
So for example if you look at
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Include/Protocol/BlockIo.h
you can search the code base for gEfiBlockIoProtocolGuid to see the producers
and consumers of Block IO protocol.
The modules that produce or consume the Block IO protocol will include
gEfiBlockIoProtocolGuid in the [Protocols] section of their INF file and this
will cause the build generated AutoGen.c file to contain:
EFI_GUID gEfiBlockIoProtocolGuid = EFI_BLOCK_IO_PROTOCOL_GUID
Producers will use gBS->InstallProtocolInterface() or
gBS->InstallMultipleProtocolInterfaces() to register the protocol instance(s)
that they produce.
Consumers will use gBS->OpenProtocol(), gBS->HandleProtocol(), or
gBS->LocolProtocol() to discover the protocol instance.
In both the consumers and producers you will see &gEfiBlockIoProtocolGuid
passed as an argument.
Thanks,
Andrew Fish
Could you offer me some information about this question?!
I am looking forward to your reply!
Thanks & Best Regards!
Justin Lin
From TJ China
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel