From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
Ruiyu Ni <ruiyu.ni@intel.com>,
"Tian, Feng" <feng.tian@intel.com>,
edk2-devel-01 <edk2-devel@lists.01.org>,
"Gao, Liming" <liming.gao@intel.com>,
"Yao, Jiewen" <jiewen.yao@intel.com>,
Mike Kinney <michael.d.kinney@intel.com>,
Laszlo Ersek <lersek@redhat.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH] MdeModulePkg/PciBusDxe: make OPROM BAR degradation X64 specific
Date: Thu, 15 Sep 2016 16:53:53 +0100 [thread overview]
Message-ID: <CAKv+Gu92jy0UBhyg6fsck1+A-fbMoiSDHiwyJqJP-eSxFT3jnw@mail.gmail.com> (raw)
In-Reply-To: <9892B892-284A-40F8-953C-C7830A0C7C55@apple.com>
On 15 September 2016 at 16:48, Andrew Fish <afish@apple.com> wrote:
>
>> On Sep 15, 2016, at 8:28 AM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>>
>> On Thu, Sep 15, 2016 at 03:54:56PM +0100, Ard Biesheuvel wrote:
>>> The 'universal' PCI bus driver in MdeModulePkg contains a quirk to
>>> degrade 64-bit PCI MMIO BARs to 32-bit in the presence of an option
>>> ROM on the same PCI controller.
>>>
>>> This quirk is highly specific to not just the X64 architecture in general,
>>> but to the PC platform in particular, given that only X64 platforms that
>>> require legacy PC BIOS compatibility require it. However, making the
>>> quirk dependent on the presence of the legacy BIOS protocol met with
>>> resistance, due to the fact that it introduces a dependency on the
>>> IntelFrameworkModulePkg package.
>>>
>>> So instead, make the quirk dependent on whether we are compiling for the
>>> X64 architecture, by putting the #ifdef MDE_CPU_X64/#endif preprocessor
>>> directives around it.
>>>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>
>> I'm happy with the change, but it may be worth putting a comment in
>
> Do we have to use an #ifdef? Seems like it should be a PCD. Is this for legacy BIOS Option ROM support, or for existing EFI ROMs?
>
Strictly for being able to execute a legacy BIOS Option ROM in the
context of a CSM. Hence my assertion that this is specific to the
64-bit variant of the PC platform.
Getting new PCDs introduced is also met with fierce resistance, to the
extent that (as this code testifies), we'd rather keep quirks hidden
in the code like this, and enable them by default rather than
acknowledging their existence by adding explicit controls to
enable/disable them.
Others have suggested a dynamic PCD, which can be flicked when the
legacy BIOS protocol installed. But since X64 is not my primary
interested, I will settle for a feature PCD, and #ifdef or anything
else that results in this quirk to be disabled by default on 64-bit
ARM.
Thanks,
Ard.
prev parent reply other threads:[~2016-09-15 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 14:54 [PATCH] MdeModulePkg/PciBusDxe: make OPROM BAR degradation X64 specific Ard Biesheuvel
2016-09-15 15:28 ` Leif Lindholm
2016-09-15 15:48 ` Andrew Fish
2016-09-15 15:51 ` Brian J. Johnson
2016-09-15 15:53 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKv+Gu92jy0UBhyg6fsck1+A-fbMoiSDHiwyJqJP-eSxFT3jnw@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox