From nobody Fri May 17 09:38:15 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+91155+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+91155+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1657216441; cv=none; d=zohomail.com; s=zohoarc; b=a7PE4cN44Ihlb1DiEy/TgPQ1zQLSAHDsKgk9lYt4T3614VpzRAVc8JiBtWGH31lZ/zWptPIHEMHaKGj433g1n3LDfZ8jhwuktHnXYRHwwpxuss99RLkmEgTzCidnRglBwIiKM3LLa3NRYZc0753GsprVjYPDk5/tCTOP/MVJTY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657216441; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=SUR0lrDJQlBfbeI8YrYHenhP3vSqz+DYXig8QaI+Fjs=; b=TPviKoWUCzem1BUW9eSJjKEbIraA4wNpkCnFslXTOmqEHIeshs6GB4rZV7YL3Lb7lqR6agjeeHt8pJmUiWntpM4Wv798hVdTjaGk/22bUNBJ7KeVP/XmwuQ62FSRKOeJXMeUW9mvMiKAVH8JfV4I4/JDjD8j0mOIY4e293DPU6M= 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+91155+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1657216441199252.75454944533703; Thu, 7 Jul 2022 10:54:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id kQgqYY1788612xV4h3DgY2t7; Thu, 07 Jul 2022 10:54:00 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.3955.1657098204432255564 for ; Wed, 06 Jul 2022 02:03:25 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="282440675" X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="282440675" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 02:03:23 -0700 X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="567979692" X-Received: from rkowalew-mobl2.ger.corp.intel.com ([10.213.17.244]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 02:03:21 -0700 From: "Robert Kowalewski" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jenny Huang , Sheng Wei Subject: [edk2-devel] [PATCH] MdePkg/include: Update DMAR definitions to Intel VT-d spec ver4.0 Date: Wed, 6 Jul 2022 11:03:08 +0200 Message-Id: MIME-Version: 1.0 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,robert.kowalewski@intel.com X-Gm-Message-State: pbjOQ4XuR9yfuBzURNM4OuyWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1657216440; bh=OTs9GKhATKhuceKidMEYU9SFOCJF9mEhh4ksJ83mH5g=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=dZ4fMQsrUMBMM/PgTCxhDvFEfW69/r9PAcAIYOfA/CKVukMnLLfmstuAWk+Quh/KqIg V4U6S0KbJ72MZrs0kEjWr4S8STOrNXrZtSQeWTOeS9rtv+jX5AUQztsDhdPJaDS+vBQeU 0vYXf46u2rmOfZZoO29OGjUXjn1yrH1+mUM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1657216443249100005 Content-Type: text/plain; charset="utf-8" Updated DMAR definitions accordingly to changes in Intel(R) Virtualization Technology for Directed I/O (VT-D) Architecture Specification ver4.0. Added new definition of remapping structure - SIDP. The SoC Integrated Device Property (SIDP) reporting structure identifies devices that have special properties and that may put restrictions on how system software must configure remapping structures that govern such devices in a platform where remapping hardware is enabled. Updated DRHD definition - field 'reserved' is replaced with 'Size'. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3978 Signed-off-by: Robert Kowalewski Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jenny Huang Cc: Sheng Wei Reviewed-by: Liming Gao Reviewed-by: Sheng Wei --- .../DmaRemappingReportingTable.h | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h b= /MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h index 193e4bced5..00588ff234 100644 --- a/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h +++ b/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h @@ -2,12 +2,12 @@ DMA Remapping Reporting (DMAR) ACPI table definition from Intel(R) Virtualization Technology for Directed I/O (VT-D) Architecture Specifica= tion. =20 - Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Revision Reference: - Intel(R) Virtualization Technology for Directed I/O (VT-D) Architect= ure - Specification v3.2, Dated October 2020. + Specification v4.0, Dated June 2022. https://software.intel.com/content/dam/develop/external/us/en/docume= nts/vt-directed-io-spec.pdf =20 @par Glossary: @@ -41,6 +41,7 @@ #define EFI_ACPI_DMAR_TYPE_RHSA 0x03 #define EFI_ACPI_DMAR_TYPE_ANDD 0x04 #define EFI_ACPI_DMAR_TYPE_SATC 0x05 +#define EFI_ACPI_DMAR_TYPE_SIDP 0x06 ///@} =20 /// @@ -56,6 +57,12 @@ #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_IOAPIC 0x03 #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_MSI_CAPABLE_HPET 0x04 #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_ACPI_NAMESPACE_DEVICE 0x05 + +#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_NESTED_NOTALLOWED BIT0 +#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_PWSNP_NOTALLOWED BIT1 +#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_PGSNP_NOTALLOWED BIT2 +#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_ATC_HARDENED BIT3 +#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_ATC_REQUIRED BIT4 ///@} =20 /// @@ -83,11 +90,12 @@ typedef struct { /// Device Scope Structure is defined in section 8.3.1 /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved2; - UINT8 EnumerationId; - UINT8 StartBusNumber; + UINT8 Type; + UINT8 Length; + UINT8 Flags; + UINT8 Reserved; + UINT8 EnumerationId; + UINT8 StartBusNumber; } EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER; =20 /** @@ -111,7 +119,14 @@ typedef struct { - Bits[7:1] Reserved. **/ UINT8 Flags; - UINT8 Reserved; + + /** + - Bits[3:0]: Indicates the size of the remapping hardware register set= for + this remapping unit. If the value in this field is N, the= size + of the register set is 2^N 4 KB pages + - Bits[7:4]: Reserved. + **/ + UINT8 Size; /// /// The PCI Segment associated with this unit. /// @@ -249,6 +264,20 @@ typedef struct { UINT16 SegmentNumber; } EFI_ACPI_DMAR_SATC_HEADER; =20 +/** + SoC Integrated Device Property (SIDP) Reporting Structure is defined in + section 8.9. +**/ +typedef struct { + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + + UINT16 Reserved; + /// + /// The PCI Segment associated with this SIDP structure. + /// + UINT16 SegmentNumber; +} EFI_ACPI_DMAR_SIDP_HEADER; + /** DMA Remapping Reporting Structure Header as defined in section 8.1 This header will be followed by list of Remapping Structures listed below @@ -258,6 +287,7 @@ typedef struct { - Remapping Hardware Static Affinity (RHSA) - ACPI Name-space Device Declaration (ANDD) - SoC Integrated Address Translation Cache reporting (SATC) + - SoC Integrated Device Property reporting (SIDP) These structure types must by reported in numerical order. i.e., All remapping structures of type 0 (DRHD) enumerated before remapp= ing structures of type 1 (RMRR), and so forth. --=20 2.32.0.windows.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydz= ial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-31= 6 | Kapital zakladowy 200.000 PLN. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata= i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wi= adomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiek= olwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). If you are not the intended recipient= , please contact the sender and delete all copies; any review or distributi= on by others is strictly prohibited. -=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 (#91155): https://edk2.groups.io/g/devel/message/91155 Mute This Topic: https://groups.io/mt/92223894/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-