[edk2] [PATCH edk2-platforms fix bug] Hisilicon/D03/D05: Add AddressTranslationOffset support

Heyi Guo posted 1 patch 7 years, 2 months ago
Failed in applying to current master (apply log)
Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c | 1 +
1 file changed, 1 insertion(+)
[edk2] [PATCH edk2-platforms fix bug] Hisilicon/D03/D05: Add AddressTranslationOffset support
Posted by Heyi Guo 7 years, 2 months ago
From: Yan Zhang <zhangyan81@huawei.com>

Assign valid value to AddressTranslationOffset to support
address translation between domains of CPU and PCIe, which
is need by GOP to enable frame buffer.

This patch fix the bug:
Kernel (4.12, without the vga driver) boot hang with kernel panic
while kernel accesses UEFI GOP frame buffer.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yan Zhang <zhangyan81@huawei.com>
Signed-off-by: Ming Huang <huangming23@huawei.com>
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
---
 Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c b/Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c
index b57bd51..55b80aa 100644
--- a/Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c
+++ b/Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c
@@ -2316,6 +2316,7 @@ RootBridgeIoConfiguration (
       }
       Configuration.SpaceDesp[Index].AddrRangeMax = Configuration.SpaceDesp[Index].AddrRangeMin + PrivateData->ResAllocNode[Index].Length - 1;
       Configuration.SpaceDesp[Index].AddrLen      = PrivateData->ResAllocNode[Index].Length;
+      Configuration.SpaceDesp[Index].AddrTranslationOffset = PrivateData->MemBase - PrivateData->PciRegionBase;
     }
   }
 
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel