public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Minh Nguyen <minhnguyen1@os.amperecomputing.com>
To: devel@edk2.groups.io
Cc: patches@amperecomputing.com, quic_llindhol@quicinc.com,
	ardb+tianocore@kernel.org, nhi@os.amperecomputing.com,
	tinhnguyen@os.amperecomputing.com,
	Vu Nguyen <vunguyen@os.amperecomputing.com>,
	Minh Nguyen <minhnguyen1@os.amperecomputing.com>
Subject: [edk2-platforms][PATCH 6/6] AmpereAltraPkg: Enable NVMe Hot Plug feature
Date: Thu, 11 May 2023 15:10:11 +0700	[thread overview]
Message-ID: <20230511081011.2692963-7-minhnguyen1@os.amperecomputing.com> (raw)
In-Reply-To: <20230511081011.2692963-1-minhnguyen1@os.amperecomputing.com>

From: Vu Nguyen <vunguyen@os.amperecomputing.com>

This enables NVMe Hot Plug feature after finishing
PCIe set up. This helps to detect NVMe disk when
it's removed or inserted into its slot.

Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com>
---
 Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf | 3 ++-
 Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.c   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf b/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf
index 32d60bec1440..f9d5c927fca3 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.inf
@@ -1,6 +1,6 @@
 ## @file
 #
-# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
+# Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -30,6 +30,7 @@ [LibraryClasses]
   BoardPcieLib
   DebugLib
   HobLib
+  PcieHotPlugLib
   PeimEntryPoint
   PeiServicesLib
 
diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.c
index 598a2e64d02f..bf4395d48d40 100644
--- a/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.c
+++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/PcieInitPei/PcieInitPei.c
@@ -16,6 +16,7 @@
 #include <Library/DebugLib.h>
 #include <Library/HobLib.h>
 #include <Library/Ac01PcieLib.h>
+#include <Library/PcieHotPlugLib.h>
 #include <Library/PeiServicesLib.h>
 #include <Platform/Ac01.h>
 #include <Ppi/ReadOnlyVariable2.h>
@@ -207,6 +208,8 @@ PcieInitEntry (
 
   Ac01PcieCorePostSetupRC (mRootComplexList);
 
+  PcieHotPlugStart ();
+
   //
   // Build Root Complex info Hob
   //
-- 
2.39.0


  parent reply	other threads:[~2023-05-11  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  8:10 [edk2-platforms][PATCH 0/6] Support NVMe Hot Plug feature for Ampere Altra and Ampere Altra Max Minh Nguyen
2023-05-11  8:10 ` [edk2-platforms][PATCH 1/6] AmpereAltraPkg: Add PCIe Hot Plug library Minh Nguyen
2023-05-11  8:10 ` [edk2-platforms][PATCH 2/6] AmpereAltraPkg: Add Hot Plug Slot Capable during PCIe port initialization Minh Nguyen
2023-05-11  8:10 ` [edk2-platforms][PATCH 3/6] AmpereAltraPkg: Change PCIe Amba Link Timeout value Minh Nguyen
2023-05-11  8:10 ` [edk2-platforms][PATCH 4/6] JadePkg: Support ACPI tables for Hot Plug of Ampere Altra Minh Nguyen
2023-05-11  8:10 ` [edk2-platforms][PATCH 5/6] JadePkg: Support ACPI tables for Hot Plug of Ampere Altra Max Minh Nguyen
2023-05-11  8:10 ` Minh Nguyen [this message]
2023-06-02 12:37 ` [edk2-platforms][PATCH 0/6] Support NVMe Hot Plug feature for Ampere Altra and " Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230511081011.2692963-7-minhnguyen1@os.amperecomputing.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox