From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.108]) by mx.groups.io with SMTP id smtpd.web08.11408.1623772468845006362 for ; Tue, 15 Jun 2021 08:54:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=J97QeeMZ; spf=pass (domain: os.amperecomputing.com, ip: 40.107.223.108, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBrGIlWRN1XMeNj+iw0mKZF05qDs93GxNsgrNkiISBFWOJ6NL1uZ2Ywp8mxj9dDe1afYshdtcRjtT0+REJbBCep1Bjg4IgiWjvLF0iDIMn9RzcVVbo+egkpOIQFfwIGy4KpeoXXgDbp/uuNQraDTp5UABKDUlk6vb14AkDGFGTUhwWAlfNHF2DedaUGOGMIiWgMryEwQpvTHyUcW0ulnCU/A/4SDeFlwlZdUx1yMB4lgBujWw2Ap3I4KGO5b9cBh5rbnlc+xONRS5roLKd7KO8afHwGGxsY4MV0y+DjAVpaMeterVfL/M4zvwRTQKmgjf4CZtqWDjFAns9b0HLdwsA== 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-SenderADCheck; bh=LP7lX8OWBeVb4w4186BTdOfdO2u3AQhqxvu6UYU8Znk=; b=Lr2Yf5HfBJh9ipkWUCA5+B74s2RJ7ppfkVdv6fm/xTFfLfIoPBRwt7AtlJwIronTtG6ntr7XLv5rsvz/HIwxLniCFtsdP5jGSftGNJCfxpyBNSg7wx8CVasG1qAwBrdJtt/0KcC+ASfYW+i0F4DmUrvkYS2uaBCQ0jt1pcHQr1SXBj47SLGgqmdlrjE0kf/4aGlPuDza7gQiAxsP6h0hV91G//AQ9Ylyu6nY/7pA6FZLkML7Kq36EBgiuxB1Sprz868Db4yDE0WlaJogtDUcTnyjeCwg5r/O6p53ggguvaGSk4KGueVN+ms4yLpSMTjEa9J0K69oxONu8iSIIgAueQ== 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=LP7lX8OWBeVb4w4186BTdOfdO2u3AQhqxvu6UYU8Znk=; b=J97QeeMZFq1smCX8EH6+YbSm2+fIlXC//ALHPMgyePX9xChqYDcx4JmNkASPBFmmngOflv8pYbKj1ZXlEiMtWvJplQl93mlAVZivGKoOnrtAzJ2IArBVxnfTnCzzbcoexnQ1YRPqljmpts0VX8gVESg1alA4SXsDOqm5q6L3uO4= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) by DM6PR01MB5737.prod.exchangelabs.com (2603:10b6:5:200::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.25; Tue, 15 Jun 2021 15:54:26 +0000 Received: from DM6PR01MB5849.prod.exchangelabs.com ([fe80::4d8d:74e3:6747:75a2]) by DM6PR01MB5849.prod.exchangelabs.com ([fe80::4d8d:74e3:6747:75a2%7]) with mapi id 15.20.4219.025; Tue, 15 Jun 2021 15:54:26 +0000 Subject: Re: [edk2-platforms][PATCH v2 16/32] AmpereAltraPkg: Add PciHostBridge driver To: Ard Biesheuvel , Leif Lindholm Cc: edk2-devel-groups-io , Vu Nguyen , Thang Nguyen , Chuong Tran , Phong Vo , Michael D Kinney , Ard Biesheuvel , Nate DeSimone References: <20210526100724.5359-1-nhi@os.amperecomputing.com> <20210526100724.5359-18-nhi@os.amperecomputing.com> From: "Nhi Pham" Message-ID: <5db4a526-8c62-3635-985f-0625b9040bc0@os.amperecomputing.com> Date: Tue, 15 Jun 2021 22:54:16 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: X-Originating-IP: [116.110.40.240] X-ClientProxiedBy: HK2P15301CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::21) To DM6PR01MB5849.prod.exchangelabs.com (2603:10b6:5:205::20) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.7] (116.110.40.240) by HK2P15301CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.1 via Frontend Transport; Tue, 15 Jun 2021 15:54:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 111e6807-9d8a-42fc-0ec1-08d93015da4e X-MS-TrafficTypeDiagnostic: DM6PR01MB5737: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: baNirAuexBHVUbFzOcKyPo/RTqndLMVAmnNNZcVSsoeHU+S4640tr1lGayOPfNcXdUb6ijbKdY0md227wgRVNE3bDL50V0pZnqdJ9GD4A9Zfw8vCgnmc6VI0TFlDekiwieEOR4ZRnRH8v0VPbPLMvGY2a0epXQUJw7PKa7KJvdb1wIC6DnqpKWQbRuFiHo4VIokPYKLI0KTdMe3ayjKskZj/HaipKfOVu/CHrzZNZWzkCjCpLBgOcq5ZD4Sx4m4f5iG6XUpoI5lfB6EHlJForoqEoKgfKSG8Pu8Q74uD5AQkNK88UX0pG95n7ICxAAUrUqew2pjAuqKPjAURyxYA80vtCKxNa94laG+2npIKzDP4WyLg5W2fSZjGGTAYEy6aNjNbYemILMbOFqpuLO7rVpr+l8dBkVhtH259jPkIlmZhH4RgQQ962AhdN6lKw2jt+c/4AXQmdeqf1U3qVF6bzXM87GEXhfg955Sk4N8hC0nakYrrnnCoFw+3NYDbj9arl61X6EI0bIULuVLmwB5QZcI8oGJUzO8glLvLP8r2UIfzMBch5laoQlnYajQKY7nfsfxb4b7GcJqv5SSvFlNO6p1PTeJdcne40Xw/B211TdiIqumUm9OaQN7DJtX4kFft/bYNIvPMQUptBFkesSUDV1EOlIBfmOVpj6y9KrvhayuMI2oxMSWPYIa4YdLED8I8KxUzfBErnpFbdUhdRa/CqrnSNaBriVQKxCDc/SK4O+M= 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)(396003)(366004)(136003)(376002)(346002)(39840400004)(6486002)(52116002)(5660300002)(26005)(6666004)(66476007)(31686004)(66556008)(110136005)(16526019)(956004)(31696002)(38350700002)(2616005)(38100700002)(478600001)(186003)(2906002)(8936002)(4326008)(54906003)(16576012)(8676002)(86362001)(66946007)(53546011)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dXk1eXFQUzNhOUhtbXZ6QVdmcEF2OVFEcjg1ZTYvdFFEeVZwRFFYNWN1SkFk?= =?utf-8?B?Qyt2VkJPSnFPZ0g2NUlUcjZsNHB1aEdFOElSaUtqTHE0TFJTNE9rd01XQmZE?= =?utf-8?B?TG9pbkg4YTJBSHFCdWkwUUpUOHdYcHNNb05XYVdYQk5HUU1sNldhbEN3N1dR?= =?utf-8?B?c0NvRHlQSW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kwzSVJSQUNhM3Yx?= =?utf-8?B?TUZOZWNNbnEybWYxWmhDU09KcExhRVNGbVgzTjBZSWJnTktSTkcvMU90cWpD?= =?utf-8?B?cjNFS2JMTDNuYm5yZkJIaUdqSXlsbzhlOXlrN252ODQ3RW95MXZLQmlRVGZs?= =?utf-8?B?R1ZuM3NXNUdwQW9XcmUzM0hqd0h0SVROd2FzL0puQmxjVmk2ZEFlZ2xpRGRv?= =?utf-8?B?ZzZMdE5NT3ltaVMvRlJxUUcyNmN5eHdmWGdkeWo3aEhoRUhTa1NER1lXSi91?= =?utf-8?B?L1RyQitYMDJjMUFTZzZDM0JVazdZaWEzQTBZeDV5WUhEc3BkcWo1Y0F0MEpM?= =?utf-8?B?NUU1M1pySVZJTnBoMVhDSUJaUWZzNEYwYmNsZjh5NENoZG1UdXFWaU1PU2w3?= =?utf-8?B?YnNNcnBuKy9FRHdrZEZOK2FQUlNHWWVWUWExOXhaaVVGNEdKUWJOQXZJc2Ey?= =?utf-8?B?WXR5WitNMnNMNngyQW02Y00xUFlBL05tMWJOa0lyZTJ0b3k0bE80cFB2U0lp?= =?utf-8?B?bUt4U0JQeTBScnFYMEtBK1dCTUwxU2VVNVNCRU1sMFB1R2l2Wm96NFdKRngw?= =?utf-8?B?RjBhU2ZFK1BJQUE2Nks5QXk5NzA3V3VnT1Y4RTVUSjltZkhOMkwwbjZtZjEv?= =?utf-8?B?UTVQMGcxeVFqYWV6VURDdzR6eFFBUHgwbk1IcXVGOVpOeDVHMkZGL3JsOWpT?= =?utf-8?Q?BrSCVww+OXZPY6e1TlX84CQYRsACvN6frm2Cs/X?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 111e6807-9d8a-42fc-0ec1-08d93015da4e X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5849.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 15:54:26.6180 (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: 1feoWwRoncGKS+OP2xcVMhBsXiIr3AYi7oecjx/rLUT5rTKAopGKvHKdWcsEgJlK54K/KRkFvy+db+QbIt77Ua6wJ6G4MU/VE1qamqRcJgQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR01MB5737 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 6/9/21 12:29, Ard Biesheuvel wrote: > On Wed, 26 May 2021 at 12:12, Nhi Pham wrote: >> From: Vu Nguyen >> >> The roles of this driver: >> * Consume PcieCoreLib to initialize all enable PCIe controllers. >> * Produce neccessary protocols like RootBridgeIo an ResourceAllocation >> which will be used later by PciBus. >> >> 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 > Why do you need a re-implementation of PciHostBridgeDxe for any of > this? There is very little h/w specific code there, and it is all > customizable using PciHostBridgeLib and PciSegmentLib (among others) > > There are a couple of examples of this in edk2-platforms - please take > a look at those, and if that does not give you enough wiggle room, > let's see if we can accommodate your needs in PciHostBridgeDxe itself. > Hi Leif, Ard, Thanks for your comments. The current implementation which has little deltas comparing with the standard one has been well-tested. It's a good idea that we need to re-implement it based on Ard's suggestion, but it will take time and we need to make sure that it is well-tested internally before getting it out. So, we want to keep this current implementation but we will start looking at working the re-implementation in the future. Best regards, Nhi