From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.123]) by mx.groups.io with SMTP id smtpd.web10.54055.1683792665199109785 for ; Thu, 11 May 2023 01:11:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=hSpLbRQP; spf=pass (domain: os.amperecomputing.com, ip: 40.107.92.123, mailfrom: minhnguyen1@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gUrGRNvKovir9+XAD9VwD44osGfyGwWL+Zt8R2rWstdxg5HU/5DZjk1PNwyXi/DdDHvCOT1aAbkD6BCVk8SfxE3yO5J7wZDYw+cs3ZFEaCoUCjGTEApV+sMTcLfUzZKtMVkKvElyC+DUIx3ymMuPj//71iHgRNVksQ6AdnzQX3GD+mAwsLgyjGpKPTHtGYR6StmbRh4easi/5LWRb02HzaR1EIFSVGoogiUE0WyRqsMGru4JVH0UNs61vEVWwHKTywB6oHQXUMIgA3znUk98Uqdzvx8qOVBNK1yafgo2ZmFUpG3geGkgOONRiRo+MLofhDz2RxYoRwzW1U5UbXUFTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JX6c9n5RbQNG/t19GXVo9DaUZ0Uc/bEF/sqzYH9YF7E=; b=dDvI0dKuXGcIvZyOtuud2TGjRdXKUAHdq8ExIHZEyP+3NuICbHGDssKpAoqTaFBGrHTuz1GDy7OfziwlO7qIQiE3F7n13cfnZWwwmDU8I3EaPcffW1pK6JGPJhVqRQWMlTLxt8Fn8sPNflEWp05th/cdCoFdq1wu1D4YcnQRdxYjShURKgplKk2vUYJk1C3X74QG1s4ULlrK1x+In24hesNsIi+UkMjPXC1dhkHYp11H5mf7x0jK2AiTn4tDmP1ySAu4gtjrYPBkN488NwoFfXzu1ck9oOCA2Bvv+rvwmo+y9vK6qPJzGX/Ltevrhhf+qS5MVmJXspq33Ug50z4T3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JX6c9n5RbQNG/t19GXVo9DaUZ0Uc/bEF/sqzYH9YF7E=; b=hSpLbRQPKdP+6asXfihsANqJXiAHVHH+UMIs28dvFDkGYsNAUIGDQRW0pfVsRMKGH2rxBHaGU5UgH68msIssx0DV3slP9H8yy+7tkVStj/1b8p9n2trhWNk2cJou2jOO6y1VbNkWwE4iX5KSHCqrB5a+lLeEgIGYdM9SHwuwsdc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) by DM6PR01MB5436.prod.exchangelabs.com (2603:10b6:5:154::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.31; Thu, 11 May 2023 08:10:54 +0000 Received: from PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1]) by PH0PR01MB8048.prod.exchangelabs.com ([fe80::bbdb:b58c:140e:c4e1%6]) with mapi id 15.20.6387.019; Thu, 11 May 2023 08:10:53 +0000 From: Minh Nguyen 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 , Minh Nguyen Subject: [edk2-platforms][PATCH 6/6] AmpereAltraPkg: Enable NVMe Hot Plug feature Date: Thu, 11 May 2023 15:10:11 +0700 Message-ID: <20230511081011.2692963-7-minhnguyen1@os.amperecomputing.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230511081011.2692963-1-minhnguyen1@os.amperecomputing.com> References: <20230511081011.2692963-1-minhnguyen1@os.amperecomputing.com> X-ClientProxiedBy: SI2P153CA0033.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::21) To PH0PR01MB8048.prod.exchangelabs.com (2603:10b6:510:280::7) Return-Path: minhnguyen1@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB8048:EE_|DM6PR01MB5436:EE_ X-MS-Office365-Filtering-Correlation-Id: c83f5628-1f84-4309-2955-08db51f73d91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QFOKgPsp4vFWOgNR8pc995YpqVJgiQb/O3Tf+28fOYiQwoJq5biG4rUm+D79NkMP1QZTyLMkgwDavk5IscTxQaJwRgrBikoD5k/QCyi8Wpu/k9X2oYQ0A0FMsrl2djEII5La7JnEL1DE7ii8KXIzjy/KVfBJnNOxkzuQ/A5KgQp+Xf3yECmH9+iEoK2OkK0eHVW2j/EqxTMcTlDHxpZo5i0iBc4VOplGQdDsgQY7Wc+yp6r7Q4S5ZGLZyM4B4A+LFrgCtHxzQCHEJPoVarkLIUUZbDHyx5CRq0HnQPqu2rNHwgme3MyWbIplOJ0H92DRr2mbWyLGAIwvZuUoVCTU/efaw5K0F7XxEtPVXPSgrjMKAXW1KagLgH+MhFh2quqvTF6ByU4Y0g9WedQ0v6jiwBkcD4nwk8AUni77U3MOetIiP+jwhHuIHDdajSYn92kQBchX9Eh39FVIqMRrxBYeOpj4zIi3Z23LpeF7LfHoJXvPieUCDfX5aak7tcrmcO6AGSTCP3jWlulBD2N9fG1CD0GXmxBQsJ4PEzHUrgIZSTDq1nlr+AyTANqz3VnPAsJKPtQLOdiY1PWVQOYdnMwh467+6t0QcU+c5sYqqSV6oVZ5I3PYGMTTmkcFFF+2W4Jh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB8048.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(366004)(136003)(396003)(346002)(451199021)(6666004)(6916009)(19627235002)(66556008)(316002)(54906003)(52116002)(66476007)(478600001)(6486002)(4326008)(66946007)(6506007)(2906002)(5660300002)(41300700001)(8676002)(8936002)(186003)(38100700002)(38350700002)(107886003)(86362001)(6512007)(26005)(83380400001)(1076003)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pEHpyvc8kFWF+pq09LuThHUGms4AvBMngaQO5woxmuHYVQ/Hglg5FBvGIDrm?= =?us-ascii?Q?qJtWqDloYLErkV2ShG9XbWYUhLhj6woG16o8JYbSJ5gD2zxfMD3Q5rh7MkO5?= =?us-ascii?Q?Jt8Rl31Pe6zxCbgk028+ecBR41FDsTBQF7iej7NU4jXjckmZYi0M7LeDAORc?= =?us-ascii?Q?i1dJ4M5uiV+zUkmGG76e4ezBxpXHrFw2jS/UwbrDhWErPVXHgcheYylHH9D9?= =?us-ascii?Q?Yjsyh0u7CoYMy+4LLlshZY1zaukXDRKnHf/umigMWYnzpJlLFA9lRgdvv4XS?= =?us-ascii?Q?K54zgQnh8yc0E+dlbIjuzqY/rfjZW7FWu50PfOy9++M294lhzdqE0yLfKniX?= =?us-ascii?Q?655VYDCuZxTiSaTQcx/yEF+bwfwggi9Y/SmjMt+oaxRW8OxsXolf6rgC19HR?= =?us-ascii?Q?w8AVZeU49GvibJtIG5Vun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= =?us-ascii?Q?vYhdj5sGV4A8qQTyRUXjwAioxhTwQ1jELf94OO99hRB35OjdnEITzYoJaR+r?= =?us-ascii?Q?E3hTTu5/OWyWEOeiglTiRIQ4pFkB22T7ycK7fWoQNANwVuLeQAFIG2x/iFzA?= =?us-ascii?Q?cdPT8ro9y2KyFfY5xcl1iT05jyY67MMedK22xf0f6IotvEPk/Orc/c57F4P0?= =?us-ascii?Q?GVcQW3T5A1KTwCmC3otQwRighN4T39wPGwRuoUwecMzvb7rU86wxqg4HuqAv?= =?us-ascii?Q?x/e0qCpsYs+/4TviSJiZ0rbsTztlIFr+wYV+tbGYSUwwxdbdBREe/xVY1ZKo?= =?us-ascii?Q?AybC6IlXHwgW5gHNJllnKBqLoRQ6aZ7xpqSQcKmFPMzg?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c83f5628-1f84-4309-2955-08db51f73d91 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB8048.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 08:10:53.8376 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hZY9bvdXGqAdJoBKCHgANuLcrr4GlumE/K2Pgb/6a/b5hPvGUrbQcOpHXTmI5YDb7jGgNcNZUd04WvPbli4VB7hILYoqM9L4gLg0gqQcXQ6B3pfB37tkaO/wdgjiZg5B X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB5436 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen 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 --- 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. +# Copyright (c) 2020 - 2023, Ampere Computing LLC. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -30,6 +30,7 @@ [LibraryClasses] BoardPcieLib DebugLib HobLib + PcieHotPlugLib PeimEntryPoint PeiServicesLib =20 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 #include #include +#include #include #include #include @@ -207,6 +208,8 @@ PcieInitEntry ( =20 Ac01PcieCorePostSetupRC (mRootComplexList); =20 + PcieHotPlugStart (); + // // Build Root Complex info Hob // --=20 2.39.0