* [PATCH] MdeModulePkg/Core: fix an IA32 build failure @ 2018-10-26 4:53 Jian J Wang 2018-10-26 5:13 ` Zeng, Star 0 siblings, 1 reply; 3+ messages in thread From: Jian J Wang @ 2018-10-26 4:53 UTC (permalink / raw) To: edk2-devel; +Cc: Star Zeng, Liming Gao REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1277 The failure is caused by data type conversion between UINTN and UINT64, which is checked in at 63ebde8ef6d4ff497d054ccc010904ecd4441198. Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c index 449a022658..521e0d7b2a 100644 --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c @@ -463,7 +463,7 @@ IsGuardPage ( IN EFI_PHYSICAL_ADDRESS Address ) { - UINTN BitMap; + UINT64 BitMap; // // There must be at least one guarded page before and/or after given @@ -1368,7 +1368,7 @@ GuardAllFreedPages ( UINT64 Address; UINT64 GuardPage; INTN Level; - UINTN BitIndex; + UINT64 BitIndex; UINTN GuardPageNumber; if (mGuardedMemoryMap == 0 || @@ -1475,12 +1475,12 @@ MergeGuardPages ( } Bitmap = 0; - Pages = EFI_SIZE_TO_PAGES (MaxAddress - MemoryMapEntry->PhysicalStart); - Pages -= MemoryMapEntry->NumberOfPages; + Pages = EFI_SIZE_TO_PAGES ((UINTN)(MaxAddress - MemoryMapEntry->PhysicalStart)); + Pages -= (INTN)MemoryMapEntry->NumberOfPages; while (Pages > 0) { if (Bitmap == 0) { EndAddress = MemoryMapEntry->PhysicalStart + - EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages); + EFI_PAGES_TO_SIZE ((UINTN)MemoryMapEntry->NumberOfPages); Bitmap = GetGuardedMemoryBits (EndAddress, GUARDED_HEAP_MAP_ENTRY_BITS); } -- 2.19.0.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MdeModulePkg/Core: fix an IA32 build failure 2018-10-26 4:53 [PATCH] MdeModulePkg/Core: fix an IA32 build failure Jian J Wang @ 2018-10-26 5:13 ` Zeng, Star 2018-10-26 8:03 ` Wang, Jian J 0 siblings, 1 reply; 3+ messages in thread From: Zeng, Star @ 2018-10-26 5:13 UTC (permalink / raw) To: edk2-devel, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zeng, Star Reviewed-by: Star Zeng <star.zeng@intel.com> -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] Sent: Friday, October 26, 2018 12:54 PM To: edk2-devel@lists.01.org Cc: Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com> Subject: [edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1277 The failure is caused by data type conversion between UINTN and UINT64, which is checked in at 63ebde8ef6d4ff497d054ccc010904ecd4441198. Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c index 449a022658..521e0d7b2a 100644 --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c @@ -463,7 +463,7 @@ IsGuardPage ( IN EFI_PHYSICAL_ADDRESS Address ) { - UINTN BitMap; + UINT64 BitMap; // // There must be at least one guarded page before and/or after given @@ -1368,7 +1368,7 @@ GuardAllFreedPages ( UINT64 Address; UINT64 GuardPage; INTN Level; - UINTN BitIndex; + UINT64 BitIndex; UINTN GuardPageNumber; if (mGuardedMemoryMap == 0 || @@ -1475,12 +1475,12 @@ MergeGuardPages ( } Bitmap = 0; - Pages = EFI_SIZE_TO_PAGES (MaxAddress - MemoryMapEntry->PhysicalStart); - Pages -= MemoryMapEntry->NumberOfPages; + Pages = EFI_SIZE_TO_PAGES ((UINTN)(MaxAddress - MemoryMapEntry->PhysicalStart)); + Pages -= (INTN)MemoryMapEntry->NumberOfPages; while (Pages > 0) { if (Bitmap == 0) { EndAddress = MemoryMapEntry->PhysicalStart + - EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages); + EFI_PAGES_TO_SIZE ((UINTN)MemoryMapEntry->NumberOfPages); Bitmap = GetGuardedMemoryBits (EndAddress, GUARDED_HEAP_MAP_ENTRY_BITS); } -- 2.19.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MdeModulePkg/Core: fix an IA32 build failure 2018-10-26 5:13 ` Zeng, Star @ 2018-10-26 8:03 ` Wang, Jian J 0 siblings, 0 replies; 3+ messages in thread From: Wang, Jian J @ 2018-10-26 8:03 UTC (permalink / raw) To: Zeng, Star, edk2-devel, edk2-devel@lists.01.org; +Cc: Zeng, Star, Gao, Liming Thanks. Since this failure blocks others work, I'll check in this patch soon. Regards, Jian > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zeng, > Star > Sent: Friday, October 26, 2018 1:13 PM > To: edk2-devel <edk2-devel-bounces@lists.01.org>; edk2-devel@lists.01.org > Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com> > Subject: Re: [edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure > > Reviewed-by: Star Zeng <star.zeng@intel.com> > > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] > Sent: Friday, October 26, 2018 12:54 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming <liming.gao@intel.com>; Zeng, Star <star.zeng@intel.com> > Subject: [edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1277 > > The failure is caused by data type conversion between UINTN and UINT64, > which is checked in at 63ebde8ef6d4ff497d054ccc010904ecd4441198. > > Cc: Star Zeng <star.zeng@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang <jian.j.wang@intel.com> > --- > MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > index 449a022658..521e0d7b2a 100644 > --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > @@ -463,7 +463,7 @@ IsGuardPage ( > IN EFI_PHYSICAL_ADDRESS Address > ) > { > - UINTN BitMap; > + UINT64 BitMap; > > // > // There must be at least one guarded page before and/or after given > @@ -1368,7 +1368,7 @@ GuardAllFreedPages ( > UINT64 Address; > UINT64 GuardPage; > INTN Level; > - UINTN BitIndex; > + UINT64 BitIndex; > UINTN GuardPageNumber; > > if (mGuardedMemoryMap == 0 || > @@ -1475,12 +1475,12 @@ MergeGuardPages ( > } > > Bitmap = 0; > - Pages = EFI_SIZE_TO_PAGES (MaxAddress - MemoryMapEntry->PhysicalStart); > - Pages -= MemoryMapEntry->NumberOfPages; > + Pages = EFI_SIZE_TO_PAGES ((UINTN)(MaxAddress - MemoryMapEntry- > >PhysicalStart)); > + Pages -= (INTN)MemoryMapEntry->NumberOfPages; > while (Pages > 0) { > if (Bitmap == 0) { > EndAddress = MemoryMapEntry->PhysicalStart + > - EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages); > + EFI_PAGES_TO_SIZE ((UINTN)MemoryMapEntry->NumberOfPages); > Bitmap = GetGuardedMemoryBits (EndAddress, > GUARDED_HEAP_MAP_ENTRY_BITS); > } > > -- > 2.19.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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-26 8:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-10-26 4:53 [PATCH] MdeModulePkg/Core: fix an IA32 build failure Jian J Wang 2018-10-26 5:13 ` Zeng, Star 2018-10-26 8:03 ` Wang, Jian J
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox