From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=roman.bacik@broadcom.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C0F8D203B8BEB for ; Mon, 30 Apr 2018 08:47:18 -0700 (PDT) Received: by mail-wm0-x244.google.com with SMTP id i3so14938598wmf.3 for ; Mon, 30 Apr 2018 08:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=CrEYImEqSdpYC3ygry2RYvER6mmUQbdHRuYW21ZLnac=; b=UiXiJFY/rVTQzrgruc+OW5qdg6IDLETwearf+8tftginz5k2vSyvibrtCHKcvm2cxp jpBCImvixzGu0LTe83XiPQqqMhKqJj6fbmz2pgB99sZ7scGRJE/R2yAp5ORN5UOQkz1B GcLe/pteQtZtv8VKLYJT4iSQPc8YitbGAbOuk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=CrEYImEqSdpYC3ygry2RYvER6mmUQbdHRuYW21ZLnac=; b=Irmev9YDuP/AebdIbz1rthxLcH/U4w2c8dA0FGfGrG/U/QiZlG3GKEjkMDVX3durdB yT0ThGa4AFjflvgBQSL6Ro2eLUt5JbIZPtn6Ap9rDChdDU59koOtPsvHJhkSIdfArE1C PgDfX58tsm2TwB8MH99cctw/WUtNxPnTT7QxeZ0p5sLvtz9JCgia3KGpt+o5QsGP402H 0Dl0MiQuPHl99WcYVldRcSjhdaD3zsxLyfG1h9lhc2KnuR//ws5FgVr6z8u8zUJhIWEk srO81KNqTVp+u13Gtp6vn93E3s1pcC8jAbpE5M8fx9aDEKfuRx2zgiFJsvcRXvAxLJl0 9TpQ== X-Gm-Message-State: ALQs6tBfyEV4Lvh+5r3q7GBk+CBx5DNL8E7pQjMGfWHVQiSj1y+COJ1U 215bdEzOlNrzb7BmpVSEZs8mrvet52xbGU7UKXGXOKgmUW4= X-Google-Smtp-Source: AB8JxZqw5FqSu/Ma+6CH9v2oxFmWubCXEeqK5yCvlfNDqBbzldrTM2vc2hdUawM2JJFXCZKN5Gw90mEJ5NH2wC+2IW8= X-Received: by 10.28.235.14 with SMTP id j14mr7276531wmh.87.1525103236877; Mon, 30 Apr 2018 08:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.210.68 with HTTP; Mon, 30 Apr 2018 08:46:36 -0700 (PDT) From: Roman Bacik Date: Mon, 30 Apr 2018 08:46:36 -0700 Message-ID: To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Vladimir Olovyannikov X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: Re: [PATCH] [PATCH v1] MdeModulePkg/Core: Fix MaxAddress in Gcd X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 15:47:19 -0000 Content-Type: text/plain; charset="UTF-8" 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 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 > --- > 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 >