Skip to content

Commit

Permalink
UefiPayloadPkg/GraphicsOutputDxe: Allow for framebuffer at an offset …
Browse files Browse the repository at this point in the history
…from BAR

On Meteor Lake the framebuffer is at BAR2 + 0x800000. Allow for this
case when validating the framebuffer info received from coreboot.

Fixes graphics output on Meteor Lake platforms.

Signed-off-by: Michał Kopeć <[email protected]>
  • Loading branch information
mkopec authored and Sean-StarLabs committed Nov 25, 2024
1 parent 27f033d commit ad606bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ GraphicsOutputDriverBindingStart (
}

if (DeviceInfo->BarIndex == MAX_UINT8) {
if (Resources->AddrRangeMin == GraphicsInfo->FrameBufferBase) {
FrameBufferBase = Resources->AddrRangeMin;
if (Resources->AddrRangeMin <= GraphicsInfo->FrameBufferBase
&& Resources->AddrRangeMin + Resources->AddrLen >= GraphicsInfo->FrameBufferBase + GraphicsInfo->FrameBufferSize ) {
FrameBufferBase = GraphicsInfo->FrameBufferBase;
break;
}
} else {
Expand Down

0 comments on commit ad606bc

Please sign in to comment.