From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.119]) by mx.groups.io with SMTP id smtpd.web10.9928.1631721624746800119 for ; Wed, 15 Sep 2021 09:00:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=sYq662bU; spf=pass (domain: os.amperecomputing.com, ip: 40.107.94.119, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mrH0ISoGaoSJV20DXTeM8VS59TTMFk++OoKKIjqHoIlHNorvxYQJHOUJg3HbfwrYO+GgNPQm9ra7o+8tnp8ixN6S0uk6hVA/c20BNfg3L7baKi9s7TsZqOQ9u77IW9ueCx5DITJv67TO7KxwbYSq3vFo+RBdPqLgLBoRTEBqy6p0fgElxzrOqpPXHr+oQkk3/gUG3YO1WAe0NJQHcuXgH7Wr9lGawNXrj7sMiif8wx9SMUY/RoGRgG3Ul5iXe7iLch+bgytGg7tG8EzdLn58+3DHcfi2ITuwphFc5HlnSjXshFQ2Wtza07jC6NvcymaBfIVHBjTPhZqGeiKWLm9Ehg== 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; bh=sxO6z1RCpFVFQIbUp5OFoSItj3vy1mEur95YQD0uSM0=; b=P+UciPf7bFaNZC06UWOSyY5tGgVV03JyYDvULMhpDMuXR4EHpzqbD/FAn63laF/tsHRjhDxyXF+nim8N0Nm79RB1OciofJYFKpyq43nchD7Dc8gPvTh5f/b+L+NONHZ9OELwyKvAoEVCE520GoNiZPICJpdpIegK/a3RT8WD9ja9CeBsAIkdRdr3bTa80w2ycKFWQ/BoDyRgZW8d3KQNPZnuwqiC/D+V6VRAeR6gQxWuBO2RFTZ/PIsBCLsFde4z2OOEjA1c0c/uJo5U6vMPFQaUYFv/+OKjktAdsh5u2AmFVUzfsPbB+lwpkXtVkHhUZnMnYRWynPQnSrsWiz4jqA== 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=sxO6z1RCpFVFQIbUp5OFoSItj3vy1mEur95YQD0uSM0=; b=sYq662bUHlTu6W8Q6cd5ZcsxFNUnUo7s58N6uosLVSvjblCga2EPQzqWHiug75/kIJ1RAlUtACxmUsd//ipgdB9U+3peMV2wVBZbH4wgvD/BH7AXx9ny+GuvQADbQKn4oVzEKSCNAPECIAABUSw+iwbqyNflOdUDG2ZTo9pIC7I= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) by DM5PR0101MB3065.prod.exchangelabs.com (2603:10b6:4:33::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15; Wed, 15 Sep 2021 16:00:18 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::8eb:704f:2ba7:9bc3]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::8eb:704f:2ba7:9bc3%4]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021 16:00:18 +0000 From: "Nhi Pham" To: devel@edk2.groups.io CC: patches@amperecomputing.com, nhi@os.amperecomputing.com, vunguyen@os.amperecomputing.com, Thang Nguyen , Chuong Tran , Phong Vo , Leif Lindholm , Michael D Kinney , Ard Biesheuvel , Nate DeSimone Subject: [PATCH v3 18/28] Ampere: PCIe: Add PciPlatformDxe driver Date: Wed, 15 Sep 2021 22:55:17 +0700 Message-ID: <20210915155527.8176-19-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210915155527.8176-1-nhi@os.amperecomputing.com> References: <20210915155527.8176-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: HK2PR0302CA0012.apcprd03.prod.outlook.com (2603:1096:202::22) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 Received: from sw004.amperecomputing.com (118.69.219.201) by HK2PR0302CA0012.apcprd03.prod.outlook.com (2603:1096:202::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.5 via Frontend Transport; Wed, 15 Sep 2021 16:00:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78c50498-4f7b-4faa-6bf9-08d97861ea0b X-MS-TrafficTypeDiagnostic: DM5PR0101MB3065: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cm2vejn16GlNwT972Z1eNb2nRezar/pAKWpYT0N9cKD5KJ86b1y4QAAx3tawafqTaoIAno+pXpv4b0UtYcQOtzidixTT80+DEkuljy18n50ExmQe6XZAhhIkYw1IBJori49/Np7coBrzh9uFBqmb5Q/BtjG2Z31AUdOJer6QpfmKGnCTIjYjxiw17qWnFmhqOmEUYX0H3kdAj6YUQUN7DAGB1yPl40zMuXtvlv1Ecxg7ErzZzqIyFxyU2mtLnET2KHkBnsYcRvw8c0kt+mSmmy7goSPIHNPbcZ8pFD3Oi77PNardhGOWcrLXKWivKTMzbIETIpWoK4O2t4ZG7WBLl+pHSaLNu8EY2NqbG4eZDMLFIUFo6Kr5VoBIi6FnuyKXm+yfWnhf/JNpjp/fDNL7CWK+b+9WMfmQZyo1Wc54yqM0xKYGYcLKDrrlBqBzlRgGV+bkzerggUfDe2ohAdxMuvodGETv2EKtiv1XAYLZaMlyUtBr7KssNB5BZ8nDtRgLG4ma87hZGlzYQDmnl8QJB2SH+x5x0gcVebAwd6/GoJx75Il3IYvxA4hvrOcEJuEQC0gVefN5tH5D3PlcDIzUmfM2+KHB5hR0LH3vcDGnvfiHIGVI12N/nTFSbsjgV9DU6a2JPGP8gT+HFXFrQYrs1f/RRKbuuc2htbUk0jaS2e6AN8rDbAefUU2ik342rC2zV1zCGD7KxvVP0o0txmPdZZcO5cCnB3GJm0efUJkJqvA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5849.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(396003)(366004)(376002)(39850400004)(2616005)(38100700002)(38350700002)(2906002)(6916009)(83380400001)(6512007)(26005)(8676002)(4326008)(186003)(19627235002)(8936002)(478600001)(6506007)(5660300002)(52116002)(1076003)(86362001)(316002)(66556008)(54906003)(956004)(6486002)(66476007)(66946007)(44824005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?V0iqGY3fdp84GJArky49XgCYSiMjxXXaC76HT4tW/HP0W0t7x9Gne0HJ/d0O?= =?us-ascii?Q?WSNfD01Ne99c31/VFNpTtfQp3Lc/hp52TFxx24X2ewCxgz3xY3wjChV1REAb?= =?us-ascii?Q?6ZssnJ1BFUKZDfQM02KaB1+OFs56nWqUkt9yCufVCG3AQ98N1jZhe8Ur8Eby?= =?us-ascii?Q?V6Y+FXdi5A3bNVJOO6JTrmtrUoS/R37OZux/wpBGLNWm9lJGGg5OWPbU97rk?= =?us-ascii?Q?+qyZms9HnoGQuI0biEsuJU5nwZg5R+Lbjbki1oJPpGejhbYML/TB4agSfxTi?= =?us-ascii?Q?jHa5V1ja3qoFozdYBIDxfgW36Lu4cy8JE0LKA7PYk+LaWcNUd+4saRJNqbHm?= =?us-ascii?Q?q+pjmcXy8kuqkhyWhM9cjNFBIp7b9zE3Z/M0rSVZRgm/k6tLmw2nDf51DJ1Z?= =?us-ascii?Q?ILUULl110gLaQ0mE3IDesTwOGRPt/GSZLc7L86Qag723M5t5h3jTtnh+egme?= =?us-ascii?Q?tXIeSgUJNhnfXAFDC2/aFbtd+P8HkNLC+ubvur4asi4lWBpxx2bGfpSQLPAO?= =?us-ascii?Q?+csctIgSKC36foQvI3Gm+CsVk74QV5u6sUxmSx6HqSvzn2l+woSHNPUtECN3?= =?us-ascii?Q?4uIORknSkL+95csFAK8UZ/12qVDaTIpSpSiYtyKX8Un0W1S6DMQqmHDjjCZE?= =?us-ascii?Q?DCd9K9FrrHumRTxRttDf3lR8vfCnPlFYOdbi5pqy3Z0JIp2N4MocosA7GK5f?= =?us-ascii?Q?yMC1ahtnAJhhoKs4JBzth08tByLsZ7IWyFq7vazeKpwDgVc/pVi0C12hdSRD?= =?us-ascii?Q?6L/32ZM23FxP7eV8pzyYytpFC5HAiAwFQ/aERbpGxkdfn35ZjbSAjxjDvWCl?= =?us-ascii?Q?c3Vt1jKXkKF0d3W9QzZaco09Jw45p8nINefhqNPX0ztIO4D96BJmsGsWC8ZN?= =?us-ascii?Q?NZ1oNioK7mOUPBAIUYw3PgjZcHcUbLvEWaxoPm9hOnpKnZjTZdTUstkP4zAj?= =?us-ascii?Q?Nj78xCGXZSibvbxnX3ZCixN/ceFYePUo7ZN6NwrMyysMYIWZVPySB/8EidjD?= =?us-ascii?Q?w8Kweps5fmRmoVlCEmTA4eOn/Rj/M5enLm5H4JsXKl99Y6zmBoHiXUQnnCqb?= =?us-ascii?Q?4f/x6yFgiqBs4nWew1JC7lQtgp2G1Ar8DyUgDSUCWz1lw1NY9k0hrnsITqhk?= =?us-ascii?Q?FFSJmzGOmUH065QQZaFvP0LSPPCgBuw/Ublp5p5xMyrfKVVn/RSFIJTjb3Bh?= =?us-ascii?Q?kmRhO0U9aW3nIxbnX63OYR0dabcPiqiD5MOXCB1Ly4IxkcD+xVHenJbAhYbd?= =?us-ascii?Q?q6RxWoB/TLu0Qk35LqH1d4RtHBuiYwf79nzzJcoZjuGgbl21N5TLFTIRphOI?= =?us-ascii?Q?Y6KeGVtKAJzk5jsTA69SKNF1?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78c50498-4f7b-4faa-6bf9-08d97861ea0b X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 16:00:18.7361 (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: Z3BGJqJtqrBeed28e2kSwf2P9IEJ1kEYTG7a4HJ97rjDyk12sG+2hBJpVLdYaXyx8oBAMphDQkvNmarfsLM0behd0xpdx8jTDQgJVQBaoBo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0101MB3065 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Vu Nguyen Registers the Platform NotifyPhase() to prevent unexpected issues caused by the enabled PCIe controllers which have unstable link. Cc: Thang Nguyen Cc: Chuong Tran Cc: Phong Vo Cc: Leif Lindholm Cc: Michael D Kinney Cc: Ard Biesheuvel Cc: Nate DeSimone Signed-off-by: Vu Nguyen --- Platform/Ampere/JadePkg/Jade.dsc | 5 + Platform/Ampere/JadePkg/Jade.fdf | 1 + Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.inf | 37 ++= ++ Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c | 212 ++= ++++++++++++++++++ 4 files changed, 255 insertions(+) diff --git a/Platform/Ampere/JadePkg/Jade.dsc b/Platform/Ampere/JadePkg/Jad= e.dsc index b733f8430806..ce5f2c0dc4e1 100644 --- a/Platform/Ampere/JadePkg/Jade.dsc +++ b/Platform/Ampere/JadePkg/Jade.dsc @@ -148,6 +148,11 @@ [Components.common] Silicon/Ampere/AmpereAltraPkg/AcpiCommonTables/AcpiCommonTables.inf Platform/Ampere/JadePkg/AcpiTables/AcpiTables.inf =20 + # + # PCIe + # + Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.inf + # # VGA Aspeed # diff --git a/Platform/Ampere/JadePkg/Jade.fdf b/Platform/Ampere/JadePkg/Jad= e.fdf index 195da2d63a7a..8ddfabcdd9a8 100644 --- a/Platform/Ampere/JadePkg/Jade.fdf +++ b/Platform/Ampere/JadePkg/Jade.fdf @@ -298,6 +298,7 @@ [FV.FvMain] # INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf + INF Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.inf =20 # # VGA Aspeed diff --git a/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.= inf b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.inf new file mode 100644 index 000000000000..5f5316055217 --- /dev/null +++ b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.inf @@ -0,0 +1,37 @@ +## @file +# +# Copyright (c) 2021, Ampere Computing LLC. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[defines] + INF_VERSION =3D 0x0001001B + BASE_NAME =3D PciPlatformDxe + FILE_GUID =3D 73276F3D-DCBC-49B2-9890-7564F917501D + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + ENTRY_POINT =3D PciPlatformDriverEntry + +[Sources] + PciPlatformDxe.c + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/Ampere/AmpereAltraPkg/AmpereAltraPkg.dec + +[LibraryClasses] + Ac01PcieLib + DebugLib + UefiBootServicesTableLib + UefiDriverEntryPoint + +[Protocols] + gEfiDevicePathProtocolGuid + gEfiPciHostBridgeResourceAllocationProtocolGuid + gEfiPciPlatformProtocolGuid + +[Depex] + TRUE diff --git a/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.= c b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c new file mode 100644 index 000000000000..196f857175e9 --- /dev/null +++ b/Platform/Ampere/JadePkg/Drivers/PciPlatformDxe/PciPlatformDxe.c @@ -0,0 +1,212 @@ +/** @file + + Copyright (c) 2021, Ampere Computing LLC. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#pragma pack(1) +typedef struct { + ACPI_HID_DEVICE_PATH AcpiDevicePath; + EFI_DEVICE_PATH_PROTOCOL EndDevicePath; +} EFI_PCI_ROOT_BRIDGE_DEVICE_PATH; +#pragma pack () + +/** + + Perform initialization by the phase indicated. + + @param This Pointer to the EFI_PCI_PLATFORM_PROTO= COL instance. + @param HostBridge The associated PCI host bridge handle= . + @param Phase The phase of the PCI controller enume= ration. + @param ChipsetPhase Defines the execution phase of the PC= I chipset driver. + + @retval EFI_SUCCESS Must return with success. + +**/ +EFI_STATUS +EFIAPI +PhaseNotify ( + IN EFI_PCI_PLATFORM_PROTOCOL *This, + IN EFI_HANDLE HostBridge, + IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase, + IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase + ) +{ + EFI_PCI_ROOT_BRIDGE_DEVICE_PATH *RootBridgeDevPath; + EFI_HANDLE RootBridgeHandle =3D N= ULL; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *ResAlloc =3D NULL; + EFI_STATUS Status; + + if (ChipsetPhase !=3D ChipsetExit) { + return EFI_SUCCESS; + } + + // + // Get HostBridgeInstance from HostBridge handle. + // + Status =3D gBS->HandleProtocol ( + HostBridge, + &gEfiPciHostBridgeResourceAllocationProtocolGuid, + (VOID **)&ResAlloc + ); + + while (TRUE) { + Status =3D ResAlloc->GetNextRootBridge (ResAlloc, &RootBridgeHandle); + if (EFI_ERROR (Status)) { + break; + } + + Status =3D gBS->HandleProtocol ( + RootBridgeHandle, + &gEfiDevicePathProtocolGuid, + (VOID **)&RootBridgeDevPath + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a %d: Failed to locate RootBridge DevicePath\= n", __FUNCTION__, __LINE__)); + break; + } + + Ac01PcieHostBridgeNotifyPhase (RootBridgeDevPath->AcpiDevicePath.UID, = 0, Phase); + } + + return EFI_SUCCESS; +} + +/** + + The PlatformPrepController() function can be used to notify the platform= driver so that + it can perform platform-specific actions. No specific actions are requir= ed. + Several notification points are defined at this time. More synchronizati= on points may be + added as required in the future. The PCI bus driver calls the platform d= river twice for + every PCI controller-once before the PCI Host Bridge Resource Allocation= Protocol driver + is notified, and once after the PCI Host Bridge Resource Allocation Prot= ocol driver has + been notified. + This member function may not perform any error checking on the input par= ameters. It also + does not return any error codes. If this member function detects any err= or condition, it + needs to handle those errors on its own because there is no way to surfa= ce any errors to + the caller. + + @param This Pointer to the EFI_PCI_PLATFORM_PROTOC= OL instance. + @param HostBridge The associated PCI host bridge handle. + @param RootBridge The associated PCI root bridge handle. + @param PciAddress The address of the PCI device on the P= CI bus. + @param Phase The phase of the PCI controller enumer= ation. + @param ChipsetPhase Defines the execution phase of the PCI= chipset driver. + + @retval EFI_SUCCESS The function completed successfully. + @retval EFI_UNSUPPORTED Not supported. + +**/ +EFI_STATUS +EFIAPI +PlatformPrepController ( + IN EFI_PCI_PLATFORM_PROTOCOL *This, + IN EFI_HANDLE HostBridge, + IN EFI_HANDLE RootBridge, + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS PciAddress, + IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase, + IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase + ) +{ + return EFI_UNSUPPORTED; +} + +/** + Set the PciPolicy as EFI_RESERVE_ISA_IO_NO_ALIAS | EFI_RESERVE_VGA_IO_NO= _ALIAS. + + @param This The pointer to the Protocol itself. + @param PciPolicy The returned Policy. + + @retval EFI_UNSUPPORTED Function not supported. + @retval EFI_INVALID_PARAMETER Invalid PciPolicy value. + +**/ +EFI_STATUS +EFIAPI +GetPlatformPolicy ( + IN CONST EFI_PCI_PLATFORM_PROTOCOL *This, + OUT EFI_PCI_PLATFORM_POLICY *PciPolicy + ) +{ + return EFI_UNSUPPORTED; +} + +/** + + Return a PCI ROM image for the onboard device represented by PciHandle. + + @param This Protocol instance pointer. + @param PciHandle PCI device to return the ROM image fo= r. + @param RomImage PCI Rom Image for onboard device. + @param RomSize Size of RomImage in bytes. + + @retval EFI_SUCCESS RomImage is valid. + @retval EFI_NOT_FOUND No RomImage. + +**/ +EFI_STATUS +EFIAPI +GetPciRom ( + IN CONST EFI_PCI_PLATFORM_PROTOCOL *This, + IN EFI_HANDLE PciHandle, + OUT VOID **RomImage, + OUT UINTN *RomSize + ) +{ + return EFI_NOT_FOUND; +} + +// +// Interface defintion of PCI Platform protocol. +// +EFI_PCI_PLATFORM_PROTOCOL mPciPlatformProtocol =3D { + .PlatformNotify =3D PhaseNotify, + .PlatformPrepController =3D PlatformPrepController, + .GetPlatformPolicy =3D GetPlatformPolicy, + .GetPciRom =3D GetPciRom +}; + +/** + + The Entry point of the Pci Platform Driver. + + @param ImageHandle Handle to the image. + @param SystemTable Handle to System Table. + + @retval EFI_STATUS Status of the function calling. + +**/ +EFI_STATUS +PciPlatformDriverEntry ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_HANDLE PciPlatformHandle; + + // + // Install on a new handle + // + PciPlatformHandle =3D NULL; + Status =3D gBS->InstallMultipleProtocolInterfaces ( + &PciPlatformHandle, + &gEfiPciPlatformProtocolGuid, + &mPciPlatformProtocol, + NULL + ); + + return Status; +} --=20 2.17.1