Just a update to others in this email. After offline clarifying with Ray, this build failure turns out to be with either VS2008 or VS2013. VS2015 works fine. Ray is working on this now.
Regards, Sunny Wang -----Original Message----- From: Ni, Ruiyu [mailto:ruiyu...@intel.com] Sent: Tuesday, April 05, 2016 12:46 PM To: Wang, Sunny (HPS SW) <sunnyw...@hpe.com> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; El-Haj-Mahmoud, Samer <samer.el-haj-mahm...@hpe.com>; edk2-devel@lists.01.org Subject: RE: [edk2] [Patch v2 3/3] MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk Importance: High Sunny, Did you get real build failure? I checked our internal build test report but didn't find any failures. Regards, Ray >-----Original Message----- >From: Wang, Sunny (HPS SW) [mailto:sunnyw...@hpe.com] >Sent: Friday, April 1, 2016 7:32 PM >To: Ni, Ruiyu <ruiyu...@intel.com> >Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Fu, Siyuan ><siyuan...@intel.com>; Wang, Sunny (HPS SW) <sunnyw...@hpe.com>; >El-Haj-Mahmoud, Samer <samer.el-haj-mahm...@hpe.com>; >edk2-devel@lists.01.org >Subject: RE: [edk2] [Patch v2 3/3] MdeModulePkg/Bds: Memory Bins don't >count the memory used by RAM Disk > >Hi Ray, > >For the code block below in BmSetMemoryTypeInformationVariable() in the >BmMisc.c, >+ if (CurrentMemoryTypeInformation[Index1].Type == EfiReservedMemoryType) { >+ CurrentMemoryTypeInformation[Index1].NumberOfPages -= >RamDiskSizeInPages; >+ } >Since NumberOfPages is UINT32 but RamDiskSizeInPages is UINTN, we need >to either change RamDiskSizeInPages to >UINT32 or modify code to the following to prevent the build warning. >CurrentMemoryTypeInformation[Index1].NumberOfPages -= (UINT32) >RamDiskSizeInPages; > >Regards, >Sunny Wang > >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Ruiyu Ni >Sent: Tuesday, March 29, 2016 6:32 PM >To: edk2-devel@lists.01.org >Cc: Ruiyu Ni <ruiyu...@intel.com>; Michael Kinney ><michael.d.kin...@intel.com>; Siyuan Fu <siyuan...@intel.com> >Subject: [edk2] [Patch v2 3/3] MdeModulePkg/Bds: Memory Bins don't >count the memory used by RAM Disk > >MemoryTypeInformation don't count the reserved memory used by RAM Disk, >but it still check all types of memory and do reset when any type of memory >size changes. > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> >Cc: Siyuan Fu <siyuan...@intel.com> >Cc: Michael Kinney <michael.d.kin...@intel.com> >--- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 5 ++++- > MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 19 +++++++++++++++---- > MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h | 12 ++++++++---- > 3 files changed, 27 insertions(+), 9 deletions(-) > >diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >index 4572644..35aada8 100644 >--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c >@@ -1571,6 +1571,7 @@ EfiBootManagerBoot ( > UINTN FileSize; > EFI_BOOT_LOGO_PROTOCOL *BootLogo; > EFI_EVENT LegacyBootEvent; >+ UINTN RamDiskSizeInPages; > > if (BootOption == NULL) { > return; >@@ -1702,8 +1703,10 @@ EfiBootManagerBoot ( > // 6. Adjust the different type memory page number just before booting > // and save the updated info into the variable for next boot to use > // >+ BmGetRamDiskMemoryInfo (RamDiskHandle, &RamDiskSizeInPages); > BmSetMemoryTypeInformationVariable ( >- (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == >LOAD_OPTION_CATEGORY_BOOT) >+ (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == >LOAD_OPTION_CATEGORY_BOOT), >+ RamDiskSizeInPages > ); > > DEBUG_CODE_BEGIN(); >diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c >b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c >index 1768781..c6ac242 100644 >--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c >+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c >@@ -124,14 +124,18 @@ BmMatchDevicePaths ( > This routine adjust the memory information for different memory type and > save them into the variables for next boot. It resets the system when > memory information is updated and the current boot option belongs to >- boot category instead of application category. >+ boot category instead of application category. It doesn't count the >+ reserved memory occupied by RAM Disk. > >- @param Boot TRUE if current boot option belongs to boot category instead of >- application category. >+ @param Boot TRUE if current boot option belongs to boot >+ category instead of application category. >+ @param RamDiskSizeInPages Reserved memory size in pages occupied by >+ RAM Disk. > **/ > VOID > BmSetMemoryTypeInformationVariable ( >- IN BOOLEAN Boot >+ IN BOOLEAN Boot, >+ IN UINTN RamDiskSizeInPages > ) > { > EFI_STATUS Status; >@@ -225,6 +229,13 @@ BmSetMemoryTypeInformationVariable ( > } > > // >+ // Do not count the reserved memory occupied by RAM Disk. >+ // >+ if (CurrentMemoryTypeInformation[Index1].Type == EfiReservedMemoryType) { >+ CurrentMemoryTypeInformation[Index1].NumberOfPages -= >RamDiskSizeInPages; >+ } >+ >+ // > // Previous is the number of pages pre-allocated > // Current is the number of pages actually needed > // >diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >index 4660323..7466719 100644 >--- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >+++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h >@@ -202,14 +202,18 @@ BmWriteBootToOsPerformanceData ( > This routine adjust the memory information for different memory type and > save them into the variables for next boot. It resets the system when > memory information is updated and the current boot option belongs to >- boot category instead of application category. >+ boot category instead of application category. It doesn't count the >+ reserved memory occupied by RAM Disk. > >- @param Boot TRUE if current boot option belongs to boot category instead of >- application category. >+ @param Boot TRUE if current boot option belongs to boot >+ category instead of application category. >+ @param RamDiskSizeInPages Reserved memory size in pages occupied by >+ RAM Disk. > **/ > VOID > BmSetMemoryTypeInformationVariable ( >- IN BOOLEAN Boot >+ IN BOOLEAN Boot, >+ IN UINTN RamDiskSizeInPages > ); > > /** >-- >2.7.0.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel