From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=izqxa2WY; spf=pass (domain: linaro.org, ip: 209.85.166.193, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-it1-f193.google.com (mail-it1-f193.google.com [209.85.166.193]) by groups.io with SMTP; Thu, 16 May 2019 00:54:07 -0700 Received: by mail-it1-f193.google.com with SMTP id 9so4656745itf.4 for ; Thu, 16 May 2019 00:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VZQZvKpjlNmNAn//xS4BOuZv5ox3dO0ayPoH1FU6ZD8=; b=izqxa2WYploq8juGpE0qi7JLi97owl698bYvM8A1CvnRbThobNeNEMFWKju+5+Iwo+ RYM1zOH1m39NONqtCy5R2dhrE/ZtdL8zqhqHdbUE2SezxjRCXwo6zaqO/rcpv4vZUocK xxLy170jOZBe9vghR8+N+GjEIRSO8FjymnnyLzLNI+doTb2gILGdqXK0sJrJIPzgPpt7 /hFmN5OkZW3G541udfoDTuC5aGpA7IL3C57yG2eGqtdkVktBrOUTiRObKq/Nze8bzwCF rgfGnKtXqHmYecfNALIVyFoCmANZRVlalB2s7kbN5z+SKCYhB/heSU5SgXZJ4at0usT9 VCBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VZQZvKpjlNmNAn//xS4BOuZv5ox3dO0ayPoH1FU6ZD8=; b=SMahneKXRi/uQmBurNhGsA2IynWAC7MhYgXMRpaLl8aPLW9E737xhlj5f/EjJ2E0O1 hKGe0m2ALtG8xJsVq/Wr04k/OYppal343jmithwcx0MSxUfl2CUhH4pazOkQYZ5spBC3 m3VT3bQR1hmxW7DwYEDaCHGsNdaGBaGuuE8VgIwSXQEg37IUEQCWNFlN9JcfJxPc3vY8 SQH5dG6aTxX/mU3yPaFOUqhxTWf+JwxkaYNneu0GOwa8TbpFdhdBWXYH22SEFUDgCNP9 J4pnoGUqYS29EVco6HzF9d5BK9fsZXu8R0g9pf+YsKNY6wO9M0Xs08f1AvJxiQY1ZfVl +6Vw== X-Gm-Message-State: APjAAAW/isDV/CETlFPrTTHrGb0wvIBx2Ejk564SsAh7FFqRmLx0h2CX q81Lyc/B1XKHcJ0rfN/RWcYKrmtS58pc9q/Zz0VsMg== X-Google-Smtp-Source: APXvYqxo92hfhBB+esxwbQSD38kh6cvOQQ9tqzE8gv7l7c3CLSgTPYJZm9+onfyAXK+7Fl267Q+snS3h5l5gusCgb+0= X-Received: by 2002:a05:660c:444:: with SMTP id d4mr12672127itl.158.1557993247111; Thu, 16 May 2019 00:54:07 -0700 (PDT) MIME-Version: 1.0 References: <20190504000716.7525-1-lersek@redhat.com> <20190504000716.7525-3-lersek@redhat.com> In-Reply-To: <20190504000716.7525-3-lersek@redhat.com> From: "Ard Biesheuvel" Date: Thu, 16 May 2019 09:53:55 +0200 Message-ID: Subject: Re: [PATCH 2/4] OvmfPkg/PlatformPei: hoist PciBase assignment above the i440fx/q35 branching To: Laszlo Ersek Cc: edk2-devel-groups-io , Gerd Hoffmann , Jordan Justen Content-Type: text/plain; charset="UTF-8" On Sat, 4 May 2019 at 02:07, Laszlo Ersek wrote: > > In the MemMapInitialization() function, we currently assign PciBase > different values, on both branches of the board type check. Hoist the > PciBase assignment from the i440fx branch in front of the "if". This is a > no-op for the i440fx branch. On the q35 branch, we overwrite this value, > hence the change is a no-op on q35 as well. > > This is another refactoring for simplifying the rest of this series. > > Cc: Ard Biesheuvel > Cc: Gerd Hoffmann > Cc: Jordan Justen > Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1666941 > Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1701710 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > OvmfPkg/PlatformPei/Platform.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c > index 5e0a15484230..9c013613a1a0 100644 > --- a/OvmfPkg/PlatformPei/Platform.c > +++ b/OvmfPkg/PlatformPei/Platform.c > @@ -181,6 +181,7 @@ MemMapInitialization ( > > TopOfLowRam = GetSystemMemorySizeBelow4gb (); > PciExBarBase = 0; > + PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam; > if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { > // > // The MMCONFIG area is expected to fall between the top of low RAM and > @@ -192,7 +193,6 @@ MemMapInitialization ( > PciBase = (UINT32)(PciExBarBase + SIZE_256MB); > PciSize = 0xFC000000 - PciBase; > } else { > - PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam; > PciSize = 0xFC000000 - PciBase; > } > > -- > 2.19.1.3.g30247aa5d201 > >