public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] [PATCH v1] MdeModulePkg/Core: Fix MaxAddress in Gcd
@ 2018-04-27 22:36 Roman Bacik
  0 siblings, 0 replies; 2+ messages in thread
From: Roman Bacik @ 2018-04-27 22:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Vladimir Olovyannikov

When BottomUp search is used the MaxAddress is incorrectly chosen to
be BaseAddress instead of EndAddress.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
---
 MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index e17e98230b79..9eeb2bd74599 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -1170,8 +1170,8 @@ CoreAllocateSpace (
     //
     // Compute the maximum address to use in the search algorithm
     //
-    if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchBottomUp ||
-        GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown     ) {
+    if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown ||
+        GcdAllocateType == EfiGcdAllocateAnySearchTopDown ) {
       MaxAddress = *BaseAddress;
     } else {
       MaxAddress = Entry->EndAddress;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [PATCH v1] MdeModulePkg/Core: Fix MaxAddress in Gcd
@ 2018-04-30 15:46 Roman Bacik
  0 siblings, 0 replies; 2+ messages in thread
From: Roman Bacik @ 2018-04-30 15:46 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ruiyu Ni, Vladimir Olovyannikov

Will change subject to: "[edk2] [PATCH v2] MdeModulePkg/Core: Fix
MaxAddress in Gcd" for the next version if required.

On Fri, Apr 27, 2018 at 3:36 PM, Roman Bacik <roman.bacik@broadcom.com>
wrote:

> When BottomUp search is used the MaxAddress is incorrectly chosen to
> be BaseAddress instead of EndAddress.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
> ---
>  MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
> b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
> index e17e98230b79..9eeb2bd74599 100644
> --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
> +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
> @@ -1170,8 +1170,8 @@ CoreAllocateSpace (
>      //
>      // Compute the maximum address to use in the search algorithm
>      //
> -    if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchBottomUp ||
> -        GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown     ) {
> +    if (GcdAllocateType == EfiGcdAllocateMaxAddressSearchTopDown ||
> +        GcdAllocateType == EfiGcdAllocateAnySearchTopDown ) {
>        MaxAddress = *BaseAddress;
>      } else {
>        MaxAddress = Entry->EndAddress;
> --
> 1.9.1
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-30 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-30 15:46 [PATCH] [PATCH v1] MdeModulePkg/Core: Fix MaxAddress in Gcd Roman Bacik
  -- strict thread matches above, loose matches on Subject: below --
2018-04-27 22:36 Roman Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox