On Jan 21, 2013, at 8:42 AM, 雅虎邮箱 <linyao...@yahoo.cn> wrote:

> Hi All,
>  
> I meet with some problems now.
>  
> 1. I am writing an Application use EFI_FIRMWARE_VOLUME2_PROTOCOL 
> (MdePkg\Include\Protocol\FirmwareVolume2.h), but when I compile it with 
> VS2010 compiler, it will prompt a warning C4431, which warning that UINTN 
> type is not recognized by compiler and must specify its width, like 
> UINT8/UINT16/UINT32/UINT64. Could anyone give me some advices?
>  

Well the MdePkg Include/Base.h includes Include/X64/ProcessorBind.h (or the 
correct one for your processor type) and this contains the correct typedef for 
UINTN for your processor.  So if you start your include list with something 
like #include <PiDxe.h> you should get UINTN properly defined. 

https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Include/Base.h
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdePkg/Include/X64/ProcessorBind.h

Could it be you are passing a UINTN type to a UINT32 argument? Maybe you define 
AuthenticationStatus as a UINTN?

> 2. I am trying to write Service Driver now, the function is to show system 
> time on screen, but I have a problem that Driver will return EFI_SUCCESS in 
> Driver Entry Point, how can I make the event of show-time still work. I don't 
> understand the working mechanism of driver.
>  
Your driver does not run. Your driver publishes protocols that get called by 
others to do work. Your driver can register timer event that will get called 
periodically. If you look in the UEFI specification Boot Services chapter you 
can read about CreateEvent() and SetTimer().

In general it is not recommended that a driver write to the screen in EFI. 

Thanks,

Andrew Fish
> Thanks & Best Regards!
>  
> Justin Lin

------------------------------------------------------------------------------
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. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to