From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 438C77803D9 for ; Tue, 17 Oct 2023 11:47:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=OZpmU1IWl6kY7UIJJSJ23E5ZLljkC0+r6KCfliC6yDI=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697543227; v=1; b=atc8vTxPkDR7uBcpRP+9vSY0QDGY31iFO5FKJnlB0CmlKTpgcenle5wJ/uMsn6sr42DxMJnx 15zNgG4J490yvRJybxnYTRBgAMIhMlhj5yIuUSNFkRfjO94knq+GaVTbizq54sprj6fdntOha9q dwMb1stCgf7W8YatxPk50rcg= X-Received: by 127.0.0.2 with SMTP id sx5gYY7687511xtVqAe73n65; Tue, 17 Oct 2023 04:47:07 -0700 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.100]) by mx.groups.io with SMTP id smtpd.web10.211485.1697543226985093682 for ; Tue, 17 Oct 2023 04:47:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K02FWEI0BUBGmyflHkYRL08sPhkKuemvit3AySMPgkKgRMzLXum3hglF/3agvSito9CkesYFeD3LLw0PeTOlH60bysYhg/BPU4qWqV3DzSJPb2Bla09JG1QaI+5ujNunxmCSwg4cNu/24CECM69L4VxEYwXrA/BtWdPVR6l8NWDkp2jZkz2pibb4uyuvmXhfBb/x/evdszsiIkuc3C3XVEBbz/074W/W0VlXTOrc132ko3OwvvUYRCgAY6vsSgzu+bOuq1f08vmqkYDOFXKBkEALoJosxSyxGdfVMkocP84Uof/SQ6FX2xBmn83PkLFB4g9qz4z9k7WDz7txfe1C3Q== 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=IC2Hy0nXFEiTWPVIno+LAoxwyvkh49pA2aASa37c9Hk=; b=G8/33mSJ3WUcQ6x8jxowGYlpYyZnmr4j+VfqRywtd7SX8lb8sLsu3GAgA+FAaZTBYE2NdsQvVaobhNK+zWfXLzOYyBhA/ULA/4Ob7wFhFkyF2RfCbcjoty6PXsJ01p0YrYEdSueUPNY8bC4TO/i9bjl18oZsaY4YTN2CD/jZuGeg07dB2WSI6EhIKVwqTvooq+o2cg+U0lJvi1KtI+cNqJlubgUUhadTbRTJc/cQy+j4IkiZDE178GPrvq+LzG+AWLpDr4BPwGgZ7kgF8Z2MVKkgGfWxcAE87iLkcqgfhzcQt8/Y3NnwUndedOZMtoWvr6nz6hQb8vz3fw/oaiaR3w== 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 X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by SJ2PR01MB8617.prod.exchangelabs.com (2603:10b6:a03:542::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Tue, 17 Oct 2023 11:47:03 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::2237:1801:e15c:e8b7]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::2237:1801:e15c:e8b7%7]) with mapi id 15.20.6886.034; Tue, 17 Oct 2023 11:47:03 +0000 Message-ID: <0fb28403-2174-43ab-b064-bc829bf6808f@os.amperecomputing.com> Date: Tue, 17 Oct 2023 18:46:52 +0700 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH edk2-platforms v2 0/4] Provide XHCI USB controller only for newer hardware To: Marcin Juszkiewicz , devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton , Chuong Tran , Rebecca Cran References: <20231016-ehci-xhci-fix-v2-0-cec625451daf@linaro.org> From: "Nhi Pham via groups.io" In-Reply-To: <20231016-ehci-xhci-fix-v2-0-cec625451daf@linaro.org> X-ClientProxiedBy: SI1PR02CA0025.apcprd02.prod.outlook.com (2603:1096:4:1f4::13) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|SJ2PR01MB8617:EE_ X-MS-Office365-Filtering-Correlation-Id: aa38642f-94dc-4660-d524-08dbcf06c799 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Z58zo39NqViaDobsrIBtauoOIZhp5w+0soQJLugtBn2qBTUGxgb7i4LT049p6ks8sdtrH1INoaCOiWQV3toi58x7bC8on011cBdhSxTA4v1wq8D3d9XeDRrZBpWcAcpx2p4Az94TXrMgg1ADij1+Z3sP3qZ5L5mgOoWw6vMId2X2g1T8tr7MoUZdnFLBYYmc+8+IN4bllajZ+cpESVdnCmlvJmdoJiFMJ/URoQuPq0kCDrGwD/mq7Lp+DU0lJIdcfbnQLRpHZFEkGx/7TYGuD/hNKja0z+PSI5dww8mIIHzu6gkwIFVHkVVCE5l+Yzc4a03NL8YyxP65XKSFNrObw8LySgRRMthxT+3YTR3w45uSzeeWyl9dakTxU1KFxJhOOTxEYbRNhmRfA8qciq+l7JoC/DJeHe5Qn90vADb/QAowymgVlCiojgIMDT9aZ1vln6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LTjhFZ3I1a0NYMkloNWNwSTdvYlIvNTNpaU5y?= =?utf-8?B?U3dqUmUzcENTcUJPWnZCNXlMbVlLL2d6aHh4cTJXM1dSMHpsckNwMlF2c0xx?= =?utf-8?B?S2dKdlN2bnkwRWQ0M0pudjJrZnk5cFYxbEFQL0JHbWFWd0wwU2VKS2F4Wm91?= =?utf-8?B?RDhvSGlpSFNwYzJTTTBDM1F3MDRtN2pPMExjM250Vm1WNWZ0SjhFY0Z4OWl3?= =?utf-8?B?aDhJc0tNUGRPcXo0QlliNjV1aE5neEt2aUNtQTk4RTg0ZlpTZXdncHVGaTdM?= =?utf-8?B?QmZUVnYwMEc2UWo0RHBza2xQWjVCSmh3WVlPamwvdEg3dlVkb2o1YzFKdUV3?= =?utf-8?B?YURTQ2taTFF1TWRoMUZIUndod0xSTDhrZ3A5Mm9obFk3VmYvRkZWblc1V2dt?= =?utf-8?B?akpxMjJ4TWJxZzkwc1FDL2hmcGJCK1U5NTVYMllKc1ZKUG1kS2llMURjdkFt?= =?utf-8?B?ODA1a3hEWVdQOG9kcEs1WnFsWnFFY0h6dnZoT1FyVFRuYmRSemJYeEhObGRr?= =?utf-8?B?ZW9PeTBMbjl1QW9ua3ZJYUxKbThZa2VxZjArVHpyV1ZLV3A4blowem51Z1py?= =?utf-8?B?anc9PQ==?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa38642f-94dc-4660-d524-08dbcf06c799 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 11:47:03.0205 (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: s4lftXjIXqyYOXqh58oTupws7iblHDg6mm2S4dLeYmcGNePOWwqZz7nDpEbQwMV2H+I/x9Zem3MdPjEyGs87JEO2rxCuEdlcQY+HBBkz1l8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR01MB8617 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nhi@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1PXBjfNaTxlNR39AmQsDzQLxx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=atc8vTxP; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Marcin, On 10/16/2023 5:06 PM, Marcin Juszkiewicz wrote: > Platform version 0.3 introduced XHCI USB controller instead of EHCI one. > But we did it in a way that there is no in-EDK2 check for platform > version (XHCI is always given). >=20 > This behaviour works with Linux as it complains about being unable to > initialize EHCI and goes on. Free/Net/Open BSD systems hang in such > situation. >=20 > Now we check are we on Platform Version 0.3 at least and then initialize > XHCI controller. Otherwise we disable it's node in DSDT table. >=20 > I checked several ways to handle the situation. >=20 > SSDT overlay enabling with LocateAndInstallAcpiFromFvConfitional() was > first one but this function had only DBG2 and FACP tables. >=20 > Then looked at trying to detect XHCI from _STA method. But this is > sysbus device which is there or not without way to discover it. >=20 > Next attempt was to have variable in DSDT and to use it in _STA. Too > much trouble. >=20 > Then looked again at code from > Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiDsdt.c and noticed > UpdateStatusMethodObject() function. Copied some code and it worked. Could you please check whether we can replace the=20 UpdateStatusMethodObject() function with the=20 AcpiAmlObjectUpdateInteger() function provided by AcpiLib? Regards, Nhi >=20 > Booting OpenBSD reminded me to update table checksum. >=20 > --- > Changes in v2: > - XHCI initialized only on PlatVer 0.3+ > - XHCI disabled in DSDT for older platforms > - no SSDT overlays for EHCI/XHCI > - no EHCI at all (it does not work anyway) > - no Pcd renaming >=20 > --- > Marcin Juszkiewicz (4): > SbsaQemu: introduce macro to compare platform version > SbsaQemu: add AcpiLib > SbsaQemu: initialize XHCI only if it exists > SbsaQemu: disable XHCI in DSDT if not present >=20 > Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 2 + > .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 4 + > .../IndustryStandard/SbsaQemuPlatformVersion.h | 25 ++++++ > .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 93 +++++++++++++= +++++++ > .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 47 +++++----- > 5 files changed, 149 insertions(+), 22 deletions(-) > --- > base-commit: 06f6274d56422084281886fad447ab117fd0e487 > change-id: 20231013-ehci-xhci-fix-c529356a7a8f >=20 > Best regards, -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109675): https://edk2.groups.io/g/devel/message/109675 Mute This Topic: https://groups.io/mt/101992601/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-