public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support
@ 2022-02-01 13:23 Ard Biesheuvel
  2022-02-02 11:10 ` Leif Lindholm
  0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2022-02-01 13:23 UTC (permalink / raw)
  To: devel; +Cc: leif, Ard Biesheuvel

Enable resizable BAR support so that BARs for, e.g., GPU cards that are
sized conservatively by default, but can be resized to cover all of the
GPU's VRAM, are resized by the firmware before handing over to the OS.
This is a more appropriate time to perform the resize, as usually, the
boot time GPU driver and the GOP will be up during PCI discovery of the
OS.

Tested on Overdrive B1 with an AMD GPU based on the Oland ASIC and the
Linux radeon driver (which does not implement PCI BAR resizing in the
first place)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index af207391209c..01d320a6d0ef 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -452,6 +452,8 @@ [PcdsFixedAtBuild.common]
   gAmdModulePkgTokenSpaceGuid.PcdPort0NetSpeed|1
   gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|TRUE
+
 [PcdsDynamicDefault.common]
   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
-- 
2.30.2


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

* Re: [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support
  2022-02-01 13:23 [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support Ard Biesheuvel
@ 2022-02-02 11:10 ` Leif Lindholm
  0 siblings, 0 replies; 2+ messages in thread
From: Leif Lindholm @ 2022-02-02 11:10 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: devel

On Tue, Feb 01, 2022 at 14:23:06 +0100, Ard Biesheuvel wrote:
> Enable resizable BAR support so that BARs for, e.g., GPU cards that are
> sized conservatively by default, but can be resized to cover all of the
> GPU's VRAM, are resized by the firmware before handing over to the OS.
> This is a more appropriate time to perform the resize, as usually, the
> boot time GPU driver and the GOP will be up during PCI discovery of the
> OS.
> 
> Tested on Overdrive B1 with an AMD GPU based on the Oland ASIC and the
> Linux radeon driver (which does not implement PCI BAR resizing in the
> first place)
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Reviewed-by: Leif Lindholm <leif@nuviainc.com>

> ---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> index af207391209c..01d320a6d0ef 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> @@ -452,6 +452,8 @@ [PcdsFixedAtBuild.common]
>    gAmdModulePkgTokenSpaceGuid.PcdPort0NetSpeed|1
>    gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
>  
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|TRUE
> +
>  [PcdsDynamicDefault.common]
>    gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
>    gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> -- 
> 2.30.2
> 

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

end of thread, other threads:[~2022-02-02 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-01 13:23 [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support Ard Biesheuvel
2022-02-02 11:10 ` Leif Lindholm

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