public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset
@ 2023-07-07  9:20 Michael Büchler
  2023-07-07  9:20 ` [PATCH 1/1] " Michael Büchler
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Büchler @ 2023-07-07  9:20 UTC (permalink / raw)
  To: devel

Hi,

this is my first message to this list and the first time I am using git
send-email. Please let me know if I messed something up. For example, I
have to use `git am --keep-cr` to apply the patch myself.

Regards,
Michael

Michael Büchler (1):
  UefiPayloadPkg: Match BAR if framebuffer is at an offset

 UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

-- 
2.39.3


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

* [PATCH 1/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset
  2023-07-07  9:20 [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset Michael Büchler
@ 2023-07-07  9:20 ` Michael Büchler
  2023-08-25  8:32 ` [edk2-devel] [PATCH 0/1] " Sheng Lean Tan
       [not found] ` <177E933937190563.21074@groups.io>
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Büchler @ 2023-07-07  9:20 UTC (permalink / raw)
  To: devel

When the framebuffer region (starting address and address range) from
the GraphicsInfo HOB is fully enclosed within a BAR region, but does not
start on the same address as the BAR, it does not get matched to that
BAR. The driver fails to bind to the graphics device and no graphics
output is possible until the OS initializes its own driver.

This was encountered on a PC with an Intel DQ67SW mainboard and a
discrete GPU (Nvidia GTX 670) that is running coreboot with UefiPayload
from the 'mrchromebox' or 'starlabsltd' fork of EDK II.

coreboot runs the VGA BIOS which reports an address range for the
framebuffer to coreboot. It is within one of its BAR regions, but not
at the starting address (BAR2 at 0xE8000000 vs framebuffer at 0xE9000000).

EDK II finds the framebuffer information provided by coreboot and later
fails to find the correspondig BAR due to the behavior described above.
With this patch, graphics output is working.

Signed-off-by: Michael Büchler <michael.buechler@posteo.net>
---
 UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c b/UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c
index 39ad03fe32..eb657b46b5 100644
--- a/UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c
+++ b/UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c
@@ -435,9 +435,12 @@ GraphicsOutputDriverBindingStart (
             }
 
             if (DeviceInfo->BarIndex == MAX_UINT8) {
-              if (Resources->AddrRangeMin == GraphicsInfo->FrameBufferBase) {
-                FrameBufferBase = Resources->AddrRangeMin;
-                break;
+              if (GraphicsInfo->FrameBufferBase >= Resources->AddrRangeMin) {
+                if ((GraphicsInfo->FrameBufferBase + GraphicsInfo->FrameBufferSize) <= (Resources->AddrRangeMin + Resources->AddrLen))
+                {
+                  FrameBufferBase = GraphicsInfo->FrameBufferBase;
+                  break;
+                }
               }
             } else {
               break;
-- 
2.39.3


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

* Re: [edk2-devel] [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset
  2023-07-07  9:20 [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset Michael Büchler
  2023-07-07  9:20 ` [PATCH 1/1] " Michael Büchler
@ 2023-08-25  8:32 ` Sheng Lean Tan
       [not found] ` <177E933937190563.21074@groups.io>
  2 siblings, 0 replies; 5+ messages in thread
From: Sheng Lean Tan @ 2023-08-25  8:32 UTC (permalink / raw)
  To: devel, michael.buechler, Guo, Gua, Dong, Guo, Lu, James,
	Sean Rhodes, Benjamin Doron

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

Hi Michael,
You will need to CC the maintainers/reviewers for UEFIpayloadpkg.
I have added them in ;)
Best Regards,
*Lean Sheng Tan*



9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: sheng.tan@9elements.com
Phone: *+49 234 68 94 188 <+492346894188>*
Mobile: *+49 176 76 113842 <+4917676113842>*

Registered office: Bochum
Commercial register: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar

Data protection information according to Art. 13 GDPR
<https://9elements.com/privacy>


On Fri, 7 Jul 2023 at 20:04, Michael Büchler <michael.buechler@posteo.net>
wrote:

> Hi,
>
> this is my first message to this list and the first time I am using git
> send-email. Please let me know if I messed something up. For example, I
> have to use `git am --keep-cr` to apply the patch myself.
>
> Regards,
> Michael
>
> Michael Büchler (1):
>   UefiPayloadPkg: Match BAR if framebuffer is at an offset
>
>  UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> --
> 2.39.3
>
>
>
> 
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108032): https://edk2.groups.io/g/devel/message/108032
Mute This Topic: https://groups.io/mt/100011246/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 4238 bytes --]

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

* Re: [edk2-devel] [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset
       [not found] ` <177E933937190563.21074@groups.io>
@ 2023-09-05  9:48   ` Sheng Lean Tan
  2023-09-05 12:21     ` Guo, Gua
  0 siblings, 1 reply; 5+ messages in thread
From: Sheng Lean Tan @ 2023-09-05  9:48 UTC (permalink / raw)
  To: devel, sheng.tan
  Cc: michael.buechler, Guo, Gua, Dong, Guo, Lu, James, Sean Rhodes,
	Benjamin Doron

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

Reminder: Can anyone help to review this? Thanks!


On Fri, 25 Aug 2023 at 10:33, Sheng Lean Tan via groups.io <sheng.tan=
9elements.com@groups.io> wrote:

> Hi Michael,
> You will need to CC the maintainers/reviewers for UEFIpayloadpkg.
> I have added them in ;)
> Best Regards,
> *Lean Sheng Tan*
>
>
>
> 9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
> Email: sheng.tan@9elements.com
> Phone: *+49 234 68 94 188 <+492346894188>*
> Mobile: *+49 176 76 113842 <+4917676113842>*
>
> Registered office: Bochum
> Commercial register: Amtsgericht Bochum, HRB 17519
> Management: Sebastian German, Eray Bazaar
>
> Data protection information according to Art. 13 GDPR
> <https://9elements.com/privacy>
>
>
> On Fri, 7 Jul 2023 at 20:04, Michael Büchler <michael.buechler@posteo.net>
> wrote:
>
>> Hi,
>>
>> this is my first message to this list and the first time I am using git
>> send-email. Please let me know if I messed something up. For example, I
>> have to use `git am --keep-cr` to apply the patch myself.
>>
>> Regards,
>> Michael
>>
>> Michael Büchler (1):
>>   UefiPayloadPkg: Match BAR if framebuffer is at an offset
>>
>>  UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> --
>> 2.39.3
>>
>>
>>
>>
>>
>>
>> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108280): https://edk2.groups.io/g/devel/message/108280
Mute This Topic: https://groups.io/mt/100011246/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 4869 bytes --]

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

* Re: [edk2-devel] [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset
  2023-09-05  9:48   ` Sheng Lean Tan
@ 2023-09-05 12:21     ` Guo, Gua
  0 siblings, 0 replies; 5+ messages in thread
From: Guo, Gua @ 2023-09-05 12:21 UTC (permalink / raw)
  To: Tan, Lean Sheng, devel@edk2.groups.io
  Cc: michael.buechler@posteo.net, Dong, Guo, Lu, James, Rhodes, Sean,
	Doron, Benjamin

[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]

Below it Edk2 developer guideline https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process

You may need to follow it to send review.

________________________________
寄件者: Lean Sheng Tan <sheng.tan@9elements.com>
寄件日期: 星期二, 9月 5, 2023 5:49:30 下午
收件者: devel@edk2.groups.io <devel@edk2.groups.io>; Tan, Lean Sheng <sheng.tan@9elements.com>
副本: michael.buechler@posteo.net <michael.buechler@posteo.net>; Guo, Gua <gua.guo@intel.com>; Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Doron, Benjamin <benjamin.doron@9elements.com>
主旨: Re: [edk2-devel] [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset

Reminder: Can anyone help to review this? Thanks!


On Fri, 25 Aug 2023 at 10:33, Sheng Lean Tan via groups.io<http://groups.io> <sheng.tan=9elements.com@groups.io<mailto:9elements.com@groups.io>> wrote:
Hi Michael,
You will need to CC the maintainers/reviewers for UEFIpayloadpkg.
I have added them in ;)
Best Regards,
Lean Sheng Tan

[http://static.9elements.com/logo-signature.png]

9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
Email: sheng.tan@9elements.com<mailto:sheng.tan@9elements.com>
Phone: +49 234 68 94 188<tel:+492346894188>
Mobile: +49 176 76 113842<tel:+4917676113842>

Registered office: Bochum
Commercial register: Amtsgericht Bochum, HRB 17519
Management: Sebastian German, Eray Bazaar

Data protection information according to Art. 13 GDPR<https://9elements.com/privacy>


On Fri, 7 Jul 2023 at 20:04, Michael Büchler <michael.buechler@posteo.net<mailto:michael.buechler@posteo.net>> wrote:
Hi,

this is my first message to this list and the first time I am using git
send-email. Please let me know if I messed something up. For example, I
have to use `git am --keep-cr` to apply the patch myself.

Regards,
Michael

Michael Büchler (1):
  UefiPayloadPkg: Match BAR if framebuffer is at an offset

 UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--
2.39.3










-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108281): https://edk2.groups.io/g/devel/message/108281
Mute This Topic: https://groups.io/mt/100011246/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 6622 bytes --]

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

end of thread, other threads:[~2023-09-05 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-07  9:20 [PATCH 0/1] UefiPayloadPkg: Match BAR if framebuffer is at an offset Michael Büchler
2023-07-07  9:20 ` [PATCH 1/1] " Michael Büchler
2023-08-25  8:32 ` [edk2-devel] [PATCH 0/1] " Sheng Lean Tan
     [not found] ` <177E933937190563.21074@groups.io>
2023-09-05  9:48   ` Sheng Lean Tan
2023-09-05 12:21     ` Guo, Gua

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