From nobody Fri May 17 02:03:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105712+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105712+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685963582; cv=none; d=zohomail.com; s=zohoarc; b=RjmwhETcjWeOtOjlIJZjYgZosYNAt+zRyadC+srDvtY0akjSsLrJQmbDOYtwi+SZ2gNInNcdGwMCd92nGHSyQeZs+L0w8NGv/UtQ+s/DpZiHesFWRz/kir0/LMmth/Rd9BTcob4Bf9IHc+amwaIi/1PxdQUQCkdfWVQd8bGzgKA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685963582; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=JE8/p0GEI2FISLFSG0JKk7143olKKX2HsnqIQ9m0y9k=; b=i9gtmEovMZK7D+X6j/ixHSe43uVaerKVwbUkkNcC4Z3qm1HXCSNGmJRZ9LuZeJXJUTiDS3EAcSOfYsKwt2nRklrFJ5WRPy07N7u5oHcrddVM5U1Q4KIHVfNQ3cYlkiRV0d8lvozVkC5fqjaflDPzFjPHwLYXrY/YDhIQh8y/Ze4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105712+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685963582788987.7784033565536; Mon, 5 Jun 2023 04:13:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ybCaYY1788612xuJjgFXqszH; Mon, 05 Jun 2023 04:13:02 -0700 X-Received: from sgoci-sdnproxy-4.icoremail.net (sgoci-sdnproxy-4.icoremail.net [129.150.39.64]) by mx.groups.io with SMTP id smtpd.web10.4490.1685962205792683082 for ; Mon, 05 Jun 2023 03:50:07 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwD32pV2vX1kmitNAg--.19563S2; Mon, 05 Jun 2023 18:48:22 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwC34iLRvX1koZQAAA--.793S4; Mon, 05 Jun 2023 18:49:56 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, chenbaozi@phytium.com.cn, devel@edk2.groups.io, Yuquan Wang Subject: [edk2-devel] [PATCH 1/3] Platform/Qemu/SbsaQemu/SbsaQemu.dsc: define XHCI Pcd settings Date: Mon, 5 Jun 2023 18:49:11 +0800 Message-Id: <20230605104913.117643-2-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> References: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwC34iLRvX1koZQAAA--.793S4 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icE4gAAs6 X-Coremail-Antispam: 1Uk129KBjvJXoW7ZFW8AF4rXFWxJw43KFW5trb_yoW8Xry7pr 10vr93CrWkJryaqw4UC3WrXa1YkF1aya18GrsFqw18ursxXF1jqr4UK3W0yry7ZFnxW34D Jr1Iv34jvF4ruaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: 36JawxGNCRA9S9JPbhBtXLwHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685963582; bh=aXDMdw8/JXOmv7oe9bNlkbYZdBmubZLxxe4tZbGojtI=; h=Cc:Date:From:Reply-To:Subject:To; b=ktWyfWhZ5TvYkkH5cIycSVExXo6irrY6QilZXdSunrL82HgJ8Y0VsfUqyfwD8MeubDw 2u1mTjB8ulSncmnc7ufdGgEpa+Ag86UtGuJaVYWqFenaHNBacehLIrqMSp7yBlFQEITe6 DNhWpPl+23ZjEpljiLbLzIxWFf8Q/TAnrY4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685963583282100006 Content-Type: text/plain; charset="utf-8" Define the pcd settings for identifying the base address of XHCI and XHCI's mmio size, and remove relevant EHCI settings. Signed-off-by: Yuquan Wang Change-Id: Ic144e7125332de5f2f2151f3b6856bd095c95a58 --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index 79dd200c..7ffe8635 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -435,11 +435,11 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE =3D FALSE # Initial Device Tree Location gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000 =20 - # Non discoverable devices (AHCI,EHCI) + # Non discoverable devices (AHCI,XHCI) gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase|0x60100000 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x00010000 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase|0x60110000 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x00010000 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase|0x60110000 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize|0x00010000 =20 # PL011 - Serial Terminal gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x60000000 --=20 2.34.1 -=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 (#105712): https://edk2.groups.io/g/devel/message/105712 Mute This Topic: https://groups.io/mt/99337901/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 17 02:03:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105714+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105714+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685963581; cv=none; d=zohomail.com; s=zohoarc; b=fuUnhr5ngUjMiGSfQpQ0ml0+a1CuvnDOjajMbgMDeJwpf4U3z6TFHYjqOoHY3HcxCHYc3lbtT5qF77xhHUVObgpUcd6LEAQwzI2tZ23JYobC4/qyQwIRiqyGqZfXrhDqkiVg+JuGIJDr+PhFEugvEN5CIif1mGbPAjUVZ5emtrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685963581; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=EWQrNf4NbHgXcbrvUHV297P1hnah8UT8mOipL9ZHc14=; b=ZOUrho1bKrwcU9HDN3A3vkVHo2nyd5zTQ0NOx5zT2ULnhwf+NwhVkVOl2YJeyG2vwMtwgbRL4QYV4z9vWXZtx3L38HodjIPvNXguugnBhasIeHpFPzcGRaT5UhtGnbz+HS0y7mDzYbANRgBwzZqm6egtb78LCFXdUAeCH5PD5q4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105714+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16859635818777.556558142394124; Mon, 5 Jun 2023 04:13:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ujyGYY1788612xmHWlzEvKKP; Mon, 05 Jun 2023 04:13:01 -0700 X-Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by mx.groups.io with SMTP id smtpd.web11.4527.1685962214143401388 for ; Mon, 05 Jun 2023 03:50:15 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwC3wp1_vX1kqSxNAg--.1973S2; Mon, 05 Jun 2023 18:48:31 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwC34iLRvX1koZQAAA--.793S5; Mon, 05 Jun 2023 18:49:57 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, chenbaozi@phytium.com.cn, devel@edk2.groups.io, Yuquan Wang Subject: [edk2-devel] [PATCH 2/3] SbsaQemu: Drivers: Add initial support for XHCI Date: Mon, 5 Jun 2023 18:49:12 +0800 Message-Id: <20230605104913.117643-3-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> References: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwC34iLRvX1koZQAAA--.793S5 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icE4QAAs5 X-Coremail-Antispam: 1Uk129KBjvJXoWxXFWrtrW8Xry7Kw1kGFWruFg_yoWrZrWxpF 10vFZ3Cw1xGryayw43Ga4rXF4YkFyakrWDGrsIqF10kwsxXF1UXw4YqFy8ZF9rJFnxXw4D Ar10y34jyFs5urJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: dd655TwZBcm6s8rD3OaLwJuPx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685963581; bh=HqMvhn4/kxNUuC9IX9I8ze01X8JBmMXNhb7W6rAVwQo=; h=Cc:Date:From:Reply-To:Subject:To; b=nJFDacHzwQ2fr1tjhVeXQPBcjCCahEGIFMmu1gzpIkviid1s2gtfBY5dKtLAZk2Gkal CLYrh+Ej7jtB98r1Q/DkfAxUsNZ7UWAsXIhW+x8gf4vEZT5Ql/aLapDcoVHZnOif7NRId 0ctHDDBw52eFpCwyB3ApExks2KNqVe+xITM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685963583272100003 Content-Type: text/plain; charset="utf-8" This registers the non-discoverable XHCI for sbsa-ref. Signed-off-by: Yuquan Wang Change-Id: Iace5a04ea6087de6b0d855e84c90b4754a66594a --- .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 40 ++++++++++++++----- .../SbsaQemuPlatformDxe.inf | 2 + Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 4 +- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlat= formDxe.c b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatf= ormDxe.c index b7270a07..1a34773f 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .c +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .c @@ -24,18 +24,19 @@ InitializeSbsaQemuPlatformDxe ( ) { EFI_STATUS Status; - UINTN Size; - VOID* Base; + UINTN AhciSize, XhciSize; + VOID* AhciBase; + VOID* XhciBase; =20 DEBUG ((DEBUG_INFO, "%a: InitializeSbsaQemuPlatformDxe called\n", __FUNC= TION__)); =20 - Base =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformAhciBase); - ASSERT (Base !=3D NULL); - Size =3D (UINTN)PcdGet32 (PcdPlatformAhciSize); - ASSERT (Size !=3D 0); + AhciBase =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformAhciBase); + ASSERT (AhciBase !=3D NULL); + AhciSize =3D (UINTN)PcdGet32 (PcdPlatformAhciSize); + ASSERT (AhciSize !=3D 0); =20 DEBUG ((DEBUG_INFO, "%a: Got platform AHCI %llx %u\n", - __FUNCTION__, Base, Size)); + __FUNCTION__, AhciBase, AhciSize)); =20 Status =3D RegisterNonDiscoverableMmioDevice ( NonDiscoverableDeviceTypeAhci, @@ -43,13 +44,34 @@ InitializeSbsaQemuPlatformDxe ( NULL, NULL, 1, - Base, Size); + AhciBase, AhciSize); =20 if (EFI_ERROR(Status)) { DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install AHCI device = @%p (Staus =3D=3D %r)\n", - __FUNCTION__, Base, Status)); + __FUNCTION__, AhciBase, Status)); return Status; } =20 + XhciBase =3D (VOID*)(UINTN)PcdGet64 (PcdPlatformXhciBase); + ASSERT (XhciBase !=3D NULL); + XhciSize =3D (UINTN)PcdGet32 (PcdPlatformXhciSize); + ASSERT (XhciSize !=3D 0); + + DEBUG ((DEBUG_INFO, "%a: Got platform XHCI %llx %u\n", + __FUNCTION__, XhciBase, XhciSize)); + + Status =3D RegisterNonDiscoverableMmioDevice ( + NonDiscoverableDeviceTypeXhci, + NonDiscoverableDeviceDmaTypeCoherent, + NULL, + NULL, + 1, + XhciBase, XhciSize); + + if (EFI_ERROR(Status)) { + DEBUG ((DEBUG_ERROR, "%a: NonDiscoverable: Cannot install XHCI device = @%p (Staus =3D=3D %r)\n", + __FUNCTION__, XhciBase, Status)); + return Status; + } return EFI_SUCCESS; } diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlat= formDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPla= tformDxe.inf index 21d2135f..41cdcf16 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe= .inf @@ -35,6 +35,8 @@ [Pcd] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize =20 [Depex] TRUE diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/Sbs= aQemu.dec index 94488529..028c2974 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -32,8 +32,8 @@ # Non discoverable devices Pcds gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase|0|UINT64|0x00= 000001 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x10000|UINT3= 2|0x00000002 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase|0|UINT64|0x00= 000003 - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize|0x10000|UINT3= 2|0x00000004 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase|0|UINT64|0x00= 000003 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize|0x10000|UINT3= 2|0x00000004 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100000= 00000|UINT64|0x00000005 =20 # PCDs complementing PCIe layout pulled into ACPI tables --=20 2.34.1 -=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 (#105714): https://edk2.groups.io/g/devel/message/105714 Mute This Topic: https://groups.io/mt/99337902/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 17 02:03:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+105715+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105715+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1685963582; cv=none; d=zohomail.com; s=zohoarc; b=kDu+6dg3DehJAOru4/VWY10LpBigaZPTv3O7KeW1DvpvvlCf9qTEhzqaYkCjvP5h1qeGspp7h9JncTmftA9ylXyoXCM9b2ZyafHf/vU/tJ1h0i0vpgVUMIvDxeUv/H7VCH4CN/m/QHEWqj1WMpgmOHJerEurOyVhcm9IcRE+Qro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685963582; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=beZyfyNGVvBnhEfKujgzK28eyqOXjodoIKjJfiLlWO8=; b=X8FrJE+TOPCQEE8s3cTlPDdUR18CycWQG12zQoEjQy7OGAKnpkBPfu5+l+aOClNNPMq1uWPSB4yy7esj9V9cUEJG6aVusA9mgUn+0k99F4dgZW288cko1sWTTn2NcI82nyNIyuCgbg1Md0pvPuNiq8jx+9TYOdAKtESKSsTU+/I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+105715+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1685963582404103.32938649316714; Mon, 5 Jun 2023 04:13:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dk1GYY1788612xjUM0YUFneb; Mon, 05 Jun 2023 04:13:02 -0700 X-Received: from sgoci-sdnproxy-4.icoremail.net (sgoci-sdnproxy-4.icoremail.net [129.150.39.64]) by mx.groups.io with SMTP id smtpd.web11.4532.1685962224103554179 for ; Mon, 05 Jun 2023 03:50:24 -0700 X-Received: from prodtpl.icoremail.net (unknown [10.12.1.20]) by hzbj-icmmx-7 (Coremail) with SMTP id AQAAfwCXop2KvX1kzS1NAg--.1986S2; Mon, 05 Jun 2023 18:48:42 +0800 (CST) X-Received: from phytium.com.cn (unknown [123.150.8.50]) by mail (Coremail) with SMTP id AQAAfwC34iLRvX1koZQAAA--.793S6; Mon, 05 Jun 2023 18:49:58 +0800 (CST) From: "wangyuquan1236" To: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com Cc: quic_ggregory@quicinc.com, rad@semihalf.com, chenbaozi@phytium.com.cn, devel@edk2.groups.io, Yuquan Wang Subject: [edk2-devel] [PATCH 3/3] SbsaQemu: AcpiTables: Add XHCI info into DSDT Date: Mon, 5 Jun 2023 18:49:13 +0800 Message-Id: <20230605104913.117643-4-wangyuquan1236@phytium.com.cn> In-Reply-To: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> References: <20230605104913.117643-1-wangyuquan1236@phytium.com.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAfwC34iLRvX1koZQAAA--.793S6 X-CM-SenderInfo: 5zdqw5pxtxt0arstlqxsk13x1xpou0fpof0/1tbiAQABAWR84icE5QAAs9 X-Coremail-Antispam: 1Uk129KBjvJXoWxXFWrtrWUtr4DCrWfuFyrtFb_yoWrCw1xpr 17ZFWfCr4kCrn8tw1Yg3W0vrn3AFy0yF4qkwnFqr1UJws7KF4UXr45Ka48GFyUJanxZF1j 9Fn2vFWqvF1kWw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAU7a7-sFnT9fnUUIcSsGvfJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUU UUUUU Precedence: Bulk List-Unsubscribe: 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,wangyuquan1236@phytium.com.cn X-Gm-Message-State: fD9oV26fz8rUI0l6cd4ci2yxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1685963582; bh=rgBz1ah2J9tbnSTpO8nD+qZ6YOBm7wJOcFqWr8HOfFU=; h=Cc:Date:From:Reply-To:Subject:To; b=QSf8x80uXofJXmAKShv8NqgBl8eeHI8cvFafL2u/xJDitN99D/brsO2GTguUy03QtOr Xqa3R/TASDpPV4LlRjtraNECGbZTjdK5wRHiLLZIvu0RcCvISsFTixczkRvv7yw3x1aEz 3QNQCFvfjH4kK2pQOv6ChQjXeGyYn++5qes= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1685963583807100012 Content-Type: text/plain; charset="utf-8" As sbsa-ref board uses xhci to replace ehci, the DSDT is updated to match the platform xhci controller. This also removes previous ehci structure. Signed-off-by: Yuquan Wang Change-Id: I7f7d6f69e3091f036ff086722ea5847ba2a1e27c --- .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 4 +- Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl | 125 ++---------------- 2 files changed, 15 insertions(+), 114 deletions(-) diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu= /SbsaQemu/AcpiTables/AcpiTables.inf index 176d8fab..f9caca96 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -72,5 +72,5 @@ =20 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciBase - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformEhciSize + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl b/Silicon/Qemu/SbsaQ= emu/AcpiTables/Dsdt.asl index 33579165..b4ef2c1f 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dsdt.asl @@ -68,120 +68,21 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", } } =20 - // USB EHCI Host Controller - Device (USB0) { - Name (_HID, "LNRO0D20") - Name (_CID, "PNP0D20") + // USB XHCI Host Controller + Device (XHCI) { + Name (_HID, "PNP0D10") // _HID: Hardware ID + Name (_UID, 0x00) // _UID: Unique ID + Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute + Name (_CRS, ResourceTemplate() { + Memory32Fixed (ReadWrite, + FixedPcdGet32 (PcdPlatformXhciBase), + FixedPcdGet32 (PcdPlatformXhciSize)) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 4= 3 } + }) Method (_STA) { - Return (0xF) - } - Method (_CRS, 0x0, Serialized) { - Name (RBUF, ResourceTemplate() { - Memory32Fixed (ReadWrite, - FixedPcdGet32 (PcdPlatformEhciBase), - FixedPcdGet32 (PcdPlatformEhciSize)) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive)= { 43 } - }) - Return (RBUF) + Return (0xF) } - - // Root Hub - Device (RHUB) { - Name (_ADR, 0x00000000) // Address of Root Hub should be 0 as= per ACPI 5.0 spec - Method (_STA) { - Return (0xF) - } - - // Ports connected to Root Hub - Device (HUB1) { - Name (_ADR, 0x00000001) - Name (_UPC, Package() { - 0x00, // Port is NOT connectable - 0xFF, // Don't care - 0x00000000, // Reserved 0 must be zero - 0x00000000 // Reserved 1 must be zero - }) - Method (_STA) { - Return (0xF) - } - - Device (PRT1) { - Name (_ADR, 0x00000001) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer(0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT1 - Device (PRT2) { - Name (_ADR, 0x00000002) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer(0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT2 - - Device (PRT3) { - Name (_ADR, 0x00000003) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer (0x10) { - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT3 - - Device (PRT4) { - Name (_ADR, 0x00000004) - Name (_UPC, Package() { - 0xFF, // Port is connectable - 0x00, // Port connector is A - 0x00000000, - 0x00000000 - }) - Name (_PLD, Package() { - Buffer (0x10){ - 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x31, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }) - Method (_STA) { - Return (0xF) - } - } // USB0_RHUB_HUB1_PRT4 - } // USB0_RHUB_HUB1 - } // USB0_RHUB - } // USB0 + } =20 Device (PCI0) { --=20 2.34.1 -=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 (#105715): https://edk2.groups.io/g/devel/message/105715 Mute This Topic: https://groups.io/mt/99337903/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-