Yes, please. Then we could discuss how to solve them.
Thanks
Feng
From: Sergey Isakov [mailto:isakov...@bk.ru]
Sent: Monday, October 08, 2012 15:51
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument
Hi Feng,
I agree with the conclusion but in this case I may write a long list of
mistakes in MdeModulePkg using the macro. If you want I do this.
Sergey
On 08.10.2012, at 11:16, Tian, Feng wrote:
Hi, Isakov
Sorry for forgetting this macro usage was ever discussed internally. Our
conclusion is the caller should cast the parameter to (UINTN) before calling
this macro.
Thanks
Feng
From: Tian, Feng
[mailto:feng.t...@intel.com]<mailto:[mailto:feng.t...@intel.com]>
Sent: Monday, October 08, 2012 14:53
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument
Thanks for your contribution.
I agree with your suggestion, and EFI_SIZE_TO_PAGES() macro also need update.
Br
Feng
From: Sergey Isakov [mailto:isakov...@bk.ru]<mailto:[mailto:isakov...@bk.ru]>
Sent: Sunday, October 07, 2012 17:09
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] EFI_PAGES_TO_SIZE for UINT32 argument
Dear sirs,
The follow warning
--------------
image.c(288) : warning C6297: Arithmetic overflow: 32-bit value is shifted,
then cast to 64-bit value. Results might not be an expected value.
--------------
It means that if we are using the macro
A = EFI_PAGES_TO_SIZE(N);
then the result will be same size as an argument. For example, if
UINT16 N;
then the result will be restricted to 16 bit - not as expected.
So I propose to change the definition of the macro in UefiBaseType.h to be the
follow
---------------
#define EFI_PAGES_TO_SIZE(Pages) (((UINTN)Pages) << EFI_PAGE_SHIFT)
---------------
Or check all sources for a size of argument.
Sergey
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel