In order to detect the NVMe after OS boots successfully but
that NVMe's not present previously. Hot Plug Slot Capable
will help PCI Linux driver to initialize its slot iomem resource
which is used for detecting the disk when it's inserted.

Signed-off-by: Minh Nguyen <minhnguy...@os.amperecomputing.com>
---
 Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c 
b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
index f7c8defc1906..c5a299cca6c5 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
@@ -1093,6 +1093,11 @@ Ac01PcieCoreSetupRC (
     // Program the power limit
     TargetAddress = CfgBase + PCIE_CAPABILITY_BASE + SLOT_CAPABILITIES_REG;
     Val = MmioRead32 (TargetAddress);
+    // In order to detect the NVMe after OS boots successfully but
+    // that NVMe's not present previously. Hot Plug Slot Capable
+    // will help PCI Linux driver to initialize its slot iomem resource
+    // which is used for detecting the disk when it's inserted.
+    Val = SLOT_HPC_SET(Val, 1);
     Val = SLOT_CAP_SLOT_POWER_LIMIT_VALUE_SET (Val, SLOT_POWER_LIMIT_75W);
     MmioWrite32 (TargetAddress, Val);
 
-- 
2.39.0



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


Reply via email to