linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	"open list:EFIFB FRAMEBUFFER DRIVER"
	<linux-fbdev@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	linux-arm-msm@vger.kernel.org, Timur Tabi <timur@codeaurora.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:FRAMEBUFFER LAYER" <dri-devel@lists.freedesktop.org>,
	Peter Jones <pjones@redhat.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V2 2/2] efi/fb: Convert PCI bus address to resource if translated by the bridge
Date: Fri, 22 Jun 2018 15:55:19 +0200	[thread overview]
Message-ID: <CAKv+Gu9HAJRHwjYLNjf+gg=1vFoFu3BJphifKKE-aR4o_MW84A@mail.gmail.com> (raw)
In-Reply-To: <2a805337-c0b5-e134-7695-5a543ecaa26a@codeaurora.org>

On 22 June 2018 at 15:52, Sinan Kaya <okaya@codeaurora.org> wrote:
> Hi Ard,
>
> On 6/22/2018 7:21 AM, Ard Biesheuvel wrote:
>> Apologies for only bringing this up now, but I think this patch is
>> wrong after all.
>>
>> screen_info.lfb_base is supposed to be a CPU address, and so
>> translating it like this is wrong. If you end up with a PCI address
>> here, you have made a mistake in hacking support for PCI outbound
>> translations into UEFI. Other users such as UEFI itself or GRUB will
>> treat this as a CPU physical address as well, so the kernel should not
>> treat it any differently.
>
> The behavior I'm seeing is from a UEFI BIOS vendor. I did not write the
> code for it...
>
> I was asked to debug it.
>
> I'd like to dive into your statement about UEFI and GRUB using this address
> as physical addresses.
>
> AFAIK, all PCI outbound requests go through PCI IO protocol in UEFI and the
> translation information is hidden inside the UEFI PCI Host Bridge driver.
> Drivers are not allowed to access PCI resources directly especially as a
> memory mapped address.
>
> This particular vendor is programming the BAR address into the GOP protocol.
> Since the host bridge driver is doing a translation, we are hitting this
> issue.
>
> Is there a UEFI spec reference about the definition of this field?
>

Yes, it is part of the PCI I/O protocol definition. FrameBufferBase is
described as

"""
Base address of graphics linear frame buffer. Info contains
information required to allow software to draw directly to the
frame buffer without using Blt().Offset zero in
FrameBufferBase represents the upper left pixel of the
display.
"""

  reply	other threads:[~2018-06-22 13:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 14:17 [PATCH V2 1/2] efi/fb: Simplify fixup code to prefer struct resource Sinan Kaya
2018-05-18 14:17 ` [PATCH V2 2/2] efi/fb: Convert PCI bus address to resource if translated by the bridge Sinan Kaya
2018-06-13 14:22   ` Sinan Kaya
2018-06-13 15:06     ` Ard Biesheuvel
2018-06-13 15:17       ` okaya
2018-06-13 15:22         ` Ard Biesheuvel
2018-06-13 15:29           ` okaya
2018-06-13 15:45   ` Ard Biesheuvel
2018-06-13 15:50     ` okaya
2018-06-13 16:08     ` Bartlomiej Zolnierkiewicz
2018-06-22  7:54       ` Ard Biesheuvel
     [not found]         ` <CGME20180622100749eucas1p2a47cfba3b4d3d5004e9a0068917d5616@eucas1p2.samsung.com>
2018-06-22 10:07           ` Bartlomiej Zolnierkiewicz
     [not found]             ` <CGME20180622101111eucas1p119946679a7686911744b1296c2796b15@eucas1p1.samsung.com>
2018-06-22 10:11               ` Bartlomiej Zolnierkiewicz
2018-06-19 22:29   ` Bjorn Helgaas
2018-06-22 11:21     ` Ard Biesheuvel
2018-06-22 13:52       ` Sinan Kaya
2018-06-22 13:55         ` Ard Biesheuvel [this message]
2018-06-22 18:01           ` Ard Biesheuvel
2018-06-22 18:30             ` Sinan Kaya
2018-06-22 19:29               ` Ard Biesheuvel
2018-06-25  8:20                 ` Ard Biesheuvel
2018-06-25 15:52                   ` okaya
2018-06-25 17:28                     ` Sinan Kaya
2018-06-25 17:29                       ` Ard Biesheuvel
2018-06-25 17:31                         ` Sinan Kaya
2018-06-13 15:42 ` [PATCH V2 1/2] efi/fb: Simplify fixup code to prefer struct resource Ard Biesheuvel
2018-06-22 10:11   ` Bartlomiej Zolnierkiewicz

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-all 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+Gu9HAJRHwjYLNjf+gg=1vFoFu3BJphifKKE-aR4o_MW84A@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=okaya@codeaurora.org \
    --cc=pjones@redhat.com \
    --cc=timur@codeaurora.org \
    /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;
as well as URLs for NNTP newsgroup(s).