From nobody Tue May 7 09:20:39 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+69373+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+69373+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1608620871; cv=none; d=zohomail.com; s=zohoarc; b=PZqU4DqRvaOC1uIgGYPGxXXTuFcYAWoKWacMb0+1Bq8xFlpTrs8J3yZV/VVaSoSne1R1EceoPvE7yBJzptlw5v20lmkmFGi9VcFAMg3dw9z5hdvy/mTveeZOQuLlG/fZjn5mjvNZy8Q21qMprH6WorzMMdfoKL5mPbFW0tJwFgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608620871; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=thSOKGRkv3us4vCwoD4ESCxecDDD/9wqU6nqIqaJHR0=; b=YnqGPxrp3JXSWq7B5wh2SuhEEq1qcbkbAtuun0T94TDokw0wgjM4ZEDC2NLokxj05AnVVIYcQMM/3sYaz9LVg3xpGd8OuWgQImkTNvNMaV5EDzUqWh0uvcbMMbFvRWqD1+8WMVEhaThnKmYYgilxzxWkdbmp21yV9FwloMszL1E= 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+69373+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608620870955968.3037660448109; Mon, 21 Dec 2020 23:07:50 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id wTnGYY1788612xUQTe3llITC; Mon, 21 Dec 2020 23:07:50 -0800 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.8451.1608620865104881781 for ; Mon, 21 Dec 2020 23:07:45 -0800 IronPort-SDR: 3c7Uu7GQES4TZp7XNIvoLhZTC160MZpZxpUhNK+7LEnStdsDW0STNZR+tws+C+r21qn8RAMn/v 0JWeVYOag0jA== X-IronPort-AV: E=McAfee;i="6000,8403,9842"; a="175977755" X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="175977755" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2020 23:07:43 -0800 IronPort-SDR: ygYpcCIa7nb5JWLUpSaQzh47oCoAncqBT44z6ejw68/0fiKuGZ5lUbw0J15SCQtkcLcleroja5 k4WWgVa9Avdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,438,1599548400"; d="scan'208";a="416347157" X-Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga001.jf.intel.com with ESMTP; 21 Dec 2020 23:07:41 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Kowalewski Robert , Feng Roger Subject: [edk2-devel] [PATCH] Silicon/Intel: Dump DMAR SATC Table Date: Tue, 22 Dec 2020 15:07:38 +0800 Message-Id: <20201222070738.17948-1-w.sheng@intel.com> Precedence: Bulk List-Unsubscribe: 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,w.sheng@intel.com X-Gm-Message-State: hzoNhveaXYaUyjoFjva2zLLNx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608620870; bh=AbK/WIy4Geb42WU8ILOqXuL9cS6YmYXZA6xaFS4MjU0=; h=Cc:Date:From:Reply-To:Subject:To; b=DEYi8K8YaY+2gOP8RkBKBkspc7xSNab2kibDh9LsQ89D1U29I+yjz9sfqTeXbTAkb7R oQpOR9MVLBMtWvlpEvJVaD8rd6uEizdqsvTEzVg7g5Lp0t91ifOlQjeVUUC3sZznQX0nK 56GyITmEX8jIgf8yEzvRPN8bs9Eurhk9jQc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" SoC Integrated Address Translation Cache (SATC) reporting structure is one of the Remapping Structure, which is imported since Intel(R) Virtualization Technology for Directed I/O (VT-D) Architecture Specification v3.2. IntelVtdDxe driver will dump the DMAR SATC struct. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3115 Signed-off-by: Sheng Wei Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jiewen Yao Cc: Jenny Huang Cc: Kowalewski Robert Cc: Feng Roger Reviewed-by: Jenny Huang --- .../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 67 ++++++++++++++++++= ++++ 1 file changed, 67 insertions(+) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpi= Table.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTab= le.c index 52bc1890..2d9b4374 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c @@ -122,6 +122,70 @@ DumpDmarDeviceScopeEntry ( return; } =20 +/** + Dump DMAR SATC table. + + @param[in] Satc DMAR SATC table +**/ +VOID +DumpDmarSatc ( + IN EFI_ACPI_DMAR_SATC_HEADER *Satc + ) +{ + EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *DmarDeviceScopeEntry; + INTN SatcLen; + + if (Satc =3D=3D NULL) { + return; + } + + DEBUG ((DEBUG_INFO, + " *******************************************************************= ********\n" + )); + DEBUG ((DEBUG_INFO, + " * ACPI Soc Integrated Address Translation Cache reporting Str= ucture *\n" + )); + DEBUG ((DEBUG_INFO, + " *******************************************************************= ********\n" + )); + DEBUG ((DEBUG_INFO, + (sizeof(UINTN) =3D=3D sizeof(UINT64)) ? + " SATC address ........................................... 0x%016lx\n= " : + " SATC address ........................................... 0x%08x\n", + Satc + )); + DEBUG ((DEBUG_INFO, + " Type ................................................. 0x%04x\n", + Satc->Header.Type + )); + DEBUG ((DEBUG_INFO, + " Length ............................................... 0x%04x\n", + Satc->Header.Length + )); + DEBUG ((DEBUG_INFO, + " Flags ................................................ 0x%02x\n", + Satc->Flags + )); + DEBUG ((DEBUG_INFO, + " Segment Number ....................................... 0x%04x\n", + Satc->SegmentNumber + )); + + SatcLen =3D Satc->Header.Length - sizeof(EFI_ACPI_DMAR_SATC_HEADER); + DmarDeviceScopeEntry =3D (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)= (Satc + 1); + while (SatcLen > 0) { + DumpDmarDeviceScopeEntry (DmarDeviceScopeEntry); + SatcLen -=3D DmarDeviceScopeEntry->Length; + DmarDeviceScopeEntry =3D (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER = *)((UINTN)DmarDeviceScopeEntry + DmarDeviceScopeEntry->Length); + } + + DEBUG ((DEBUG_INFO, + " *******************************************************************= ********\n\n" + )); + + return; +} + /** Dump DMAR ANDD table. =20 @@ -516,6 +580,9 @@ DumpAcpiDMAR ( case EFI_ACPI_DMAR_TYPE_ANDD: DumpDmarAndd ((EFI_ACPI_DMAR_ANDD_HEADER *)DmarHeader); break; + case EFI_ACPI_DMAR_TYPE_SATC: + DumpDmarSatc ((EFI_ACPI_DMAR_SATC_HEADER *)DmarHeader); + break; default: break; } --=20 2.16.2.windows.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 (#69373): https://edk2.groups.io/g/devel/message/69373 Mute This Topic: https://groups.io/mt/79144566/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-