[edk2-devel] [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support

Ard Biesheuvel posted 1 patch 2 years, 3 months ago
Failed in applying to current master (apply log)
Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 2 ++
1 file changed, 2 insertions(+)
[edk2-devel] [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support
Posted by Ard Biesheuvel 2 years, 3 months ago
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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86278): https://edk2.groups.io/g/devel/message/86278
Mute This Topic: https://groups.io/mt/88831646/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH edk2-platforms] Platform/Overdrive: enable resizable BAR support
Posted by Leif Lindholm 2 years, 3 months ago
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
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86333): https://edk2.groups.io/g/devel/message/86333
Mute This Topic: https://groups.io/mt/88831646/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-