Until now it was assumed that the configuration space size is 256MB.
Allow setting different values in the board description library
instance for each platform.

Signed-off-by: Marcin Wojtas <m...@semihalf.com>
---
 Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h                | 1 +
 Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h 
b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
index 2ad19aae7a..80c55eb3a7 100644
--- a/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
+++ b/Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h
@@ -111,6 +111,7 @@ typedef struct {
 typedef struct {
   EFI_PHYSICAL_ADDRESS PcieDbiAddress;
   EFI_PHYSICAL_ADDRESS ConfigSpaceAddress;
+  UINT64 ConfigSpaceSize;
   BOOLEAN HaveResetGpio;
   MV_GPIO_PIN PcieResetGpio;
   UINT64 PcieBusMin;
diff --git 
a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c 
b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
index 853c1b4e56..43aacb7a11 100644
--- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
+++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c
@@ -141,7 +141,9 @@ ArmPlatformGetVirtualMemoryMap (
   for (PcieIndex = 0; PcieIndex < PcieControllerCount; PcieIndex++) {
     mVirtualMemoryTable[++Index].PhysicalBase  = 
PcieControllers[PcieIndex].ConfigSpaceAddress;
     mVirtualMemoryTable[Index].VirtualBase     = 
PcieControllers[PcieIndex].ConfigSpaceAddress;
-    mVirtualMemoryTable[Index].Length = SIZE_256MB;
+    mVirtualMemoryTable[Index].Length          = 
(PcieControllers[PcieIndex].ConfigSpaceSize == 0) ?
+                                                 SIZE_256MB :
+                                                 
PcieControllers[PcieIndex].ConfigSpaceSize;
     mVirtualMemoryTable[Index].Attributes      = 
ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
   }
 
-- 
2.29.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78485): https://edk2.groups.io/g/devel/message/78485
Mute This Topic: https://groups.io/mt/84605050/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to