From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.9345.1642753494238795184 for ; Fri, 21 Jan 2022 00:24:54 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=cQjkxS3M; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: jenny.huang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642753494; x=1674289494; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9fE2JS4wrrBaXKt/9LP1csmjcrSbkmGxCKeZDl1X+vE=; b=cQjkxS3MO9x9AlR3xAm0MTs/FlFM1FVEA/rQdYLkmM94L/3acPRoZm0d gJiZOhLqZolAnmeem9ii2onFTO0mdVnXArLmSiKTnM17VnQnKp5KSUEK9 QQkOGBJyRp0f+/XHP94l9h58GyBJJAYTgsHQzA9YNCQcF0Rt5xGDcVnjK egW6sO2hGUBo407DJrreMC/E+nofrh/JOjdsdF2K6T7oBAxAtmY/4P5io GXZmd3IvEe0c0nSc2+epnfQImLzCQ1czhvp38NzdNftl/HzmaXQVlfvQX cixqk5Sf9EnRv7tzdBLLyAKZCZE3kgm/kui5tw+Ph+AacN+V7JmjTYI2e A==; X-IronPort-AV: E=McAfee;i="6200,9189,10233"; a="308929113" X-IronPort-AV: E=Sophos;i="5.88,304,1635231600"; d="scan'208";a="308929113" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2022 00:24:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,304,1635231600"; d="scan'208";a="533185194" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga008.jf.intel.com with ESMTP; 21 Jan 2022 00:24:51 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 21 Jan 2022 00:24:50 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 21 Jan 2022 00:24:50 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Fri, 21 Jan 2022 00:24:50 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Fri, 21 Jan 2022 00:24:50 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KkoNWXsYIvGKRhdTqxTgRk6RXIoTnRCujBfNruPCzrLoGeNlA2czLUsBbN/bAt91x39eiMNtioQXzFEi5wyXIKtAyq5fFbjKNBjXhlglipE4eR0haUni+f/ojWdS9sxFEPSo2GTN+IBcNkQQ95wZm551wDLEmGWcFiSpPaFkQAUFwcu22/HwcnZJKwEbKcVgUz675Ne1qFzKlD4rKKiW2TlRDp4pKjDd3upgXKvnV39kAHszl/D/xJ7imq1fnTwR8HmHmKha9NgL9EUgnXolzULqLjpemQryqKZlCPX2sJPfI3GVwQSz35MrXjUpwUz3pQjtByKpkXaMLnDNVd+fFQ== 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=fATjczP3X0LwCIHzitYSE0Q/jvlDZI9Xp927KHX/X10=; b=h6GeiCGG6DU3zocKwtoncIuKY/G0Qd8djhGD1X2Op8+C78S1l7mTk0osfT6aEvTflpEOX1JX4IZp/sFvngjRSI1nRh89JzRw3d7NJGs1Zj8HewKTmngML0oHykSDpP4B4oYLcFteIgiAHt7ce9l8Cs+eq6UbLKsb4iULD5Bpmj1Ea+GjrvKV2L51MSkmGtFJnimCSTcnYIGaJBMcH9NSAY4WzpnHvvqXn6sAa0Z7rMgnuCAsL8gkG87Z+xMEh5q+zsoG+YbVwGOwV8Pdd13500c2TFiYGJytgfmh9K7EozNRpv0RqFrk9x2j8metpxN0zAkacU6638iFi4BMkA02sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM6PR11MB4627.namprd11.prod.outlook.com (2603:10b6:5:2a2::19) by MWHPR11MB1871.namprd11.prod.outlook.com (2603:10b6:300:111::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.7; Fri, 21 Jan 2022 08:24:47 +0000 Received: from DM6PR11MB4627.namprd11.prod.outlook.com ([fe80::d48a:c41e:cdea:8e58]) by DM6PR11MB4627.namprd11.prod.outlook.com ([fe80::d48a:c41e:cdea:8e58%5]) with mapi id 15.20.4909.010; Fri, 21 Jan 2022 08:24:47 +0000 From: "Huang, Jenny" To: "Sheng, W" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Chaganty, Rangasai V" , "Kowalewski, Robert" Subject: Re: [PATCH v5 2/4] IntelSiliconPkg/VTd: Update VTd register structs Thread-Topic: [PATCH v5 2/4] IntelSiliconPkg/VTd: Update VTd register structs Thread-Index: AQHYDEN3mxte2oaozUqnLdsah4r5QqxtKBvw Date: Fri, 21 Jan 2022 08:24:47 +0000 Message-ID: References: <20220118081433.15620-1-w.sheng@intel.com> <20220118081433.15620-3-w.sheng@intel.com> In-Reply-To: <20220118081433.15620-3-w.sheng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cd60546d-1887-47b6-b62d-08d9dcb77c48 x-ms-traffictypediagnostic: MWHPR11MB1871:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uf+o1g2ZdyHLPBZdtWjtDKvkDWDTH8hd3aY8KYQXve2BUVIClrq5cWa7o6Mc9ekQXOLkV5JrzGnHTWbrHf/CS4KugnVQ9E8Zo1LRrFwelczYIM6xcGio3xh7xqDeXH7aDIeI8fa2M1WF2YfABORgXUHr/ih4jlVf9B8Se6u7/StYsrAfLcHFlResdCdD1gk0fL6M89XD85yfGWvO80USmiVeQ8wdY1F8KR9mtR9QRthtixsYxICJV+PItsixg4JAjbfh7eh/jWlFHAGd91ppJtqRAEV2WDkNgS0zC9TAo639TRlM3mMtTzkwGwoVuXDZZyDBHsiRW0EKXuYxkiwJS/KehicoDGSC+mfzi3WQCMPYmh2nD7mYMWF3u9LjYaGAE321Tx34KsWmevxzULudyam7TgekJ4j2gf/GN97cd0JoR1ApK8p9wBkLu5LUv8NASZUvoSpYANOmEmrZc25cip7EG9HW0N29ikrhohgnyiBxpi0VfFY/8FBehQZyAUtt3ZWb5sZLUX4X1Yli7GoltrcBTT8AbinRbsQT47HIKW6s+Xqb/tX3LSOxK1Ow5SuMzBtZ9nB02zPkJE3j1HOe+cKKvo1ED1XGKNirNa+sI34NpA149/4q8oYXb1Zhv0eEeJgA965N2YmtfCVpWb60nBebz+SJwfbx5cVn0dStnR+jcFx0YMcvnT7hV7m/vh3OfTMhK1vFSfarJ5FG/Yd2agkZ1QEUgYTl+eGzj9giQQgSN5C+d0T6xLrM2nTvMuHEAiHybWORByYz4mRpnLKwBcrMtCQLdfsIDL8ugHPCbHA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4627.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(64756008)(66476007)(66446008)(2906002)(66556008)(107886003)(66946007)(7696005)(508600001)(76116006)(83380400001)(5660300002)(9686003)(52536014)(4326008)(8676002)(55016003)(38100700002)(53546011)(8936002)(33656002)(6506007)(316002)(15650500001)(54906003)(71200400001)(110136005)(82960400001)(186003)(38070700005)(122000001)(26005)(86362001)(966005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hRccRIzJbD5DX3+Wl1qQ016pBZlk3UqVcboFQvQkJ8pY35LnICKj1lANKRLB?= =?us-ascii?Q?jzZimyzVc9MTiRo+Upo/PCLtacCEyEubh4sGdLbUOT9Yn3jvh9/WH5n51N+c?= =?us-ascii?Q?4UUgH5xLIypd6TeULSw2PcwB96XpdVM5JPvlvx+yN56qeKavQnoh3lavtSMh?= =?us-ascii?Q?DMoWa9ec35tcK/3+hnXAdU0dOc/niUtStJeNgAPbSDkzBm4zoqWlae3CghzL?= =?us-ascii?Q?fAY9zUo/40EgYh/3XbnePmxy89PLxMMjq1cz+CwJkmjXT9zeqnujVXOknjYQ?= =?us-ascii?Q?tHt7IKweMF6x0Vv1cplbBYMR5hzvKECEXtXsy02jsbh0MtAO/k3E0S0csfQW?= =?us-ascii?Q?7kzNfLtgM8HuGl19Pt3Frdbi48Qpzz4QMtuUflpbSIUlcqMbAAR6KXessyim?= =?us-ascii?Q?4D7iafWDLuSxU+mx1C9+4sl7qaL7ifE9Yo2X8sU/iQvt3pqkr9A/pO9ejsKj?= =?us-ascii?Q?xSKFzL4Oqb3OO6aLLGncyDJcRsWYOkN12VOaO+qR0B2XUoQnHalMMboG25AX?= =?us-ascii?Q?6KC6LAXMRfaD0Ktpu8ObEkPsotFbO4GyTBvwPsrCvJB58E2uV4ykJfpDh/h5?= =?us-ascii?Q?NU2o7AHRcdduUODKJ2a8S+zC/aJa5DZfYqCmKE8YEpFARL23gjdi8nqEBdl7?= =?us-ascii?Q?rpRRl97qTmxgv/Hc+tEgP/RTayeFRSdtCVGU1ecNRXg9k5QiwamWGcZk0ccK?= =?us-ascii?Q?PHX36q1wu2WwILxhh0whZxGnQ5ycJ4b9X0xZMW/pq7fP2ksK/RoV5DbFYCGb?= =?us-ascii?Q?NeLRzKeKuZBXsuWdjt9JsJpEVdCoeBKzuW+dC3BI+nExxP0ReH/M2n64vPKw?= =?us-ascii?Q?0M/0o6Q0Fkcf+bmGpZp6eXIfPk+pOr96igajA4kmTCvmGEDzyTC8RWYlqsNm?= =?us-ascii?Q?40i8pLWfTgwDD2m8WGrbqgf+grQNYTCqXqRPtdfjAHht8kbTJ6ADkOnpuQFP?= =?us-ascii?Q?UR/UDeOrQtb60nXG1mdsQdQ1+WXgJeGPvjie7gHFmLmgJxMOiHc6cy/+ROU7?= =?us-ascii?Q?ECNwKZ404rFzHXTX1zAOjnHM2Vs1aK01ldPlzZVxSshi066dgCHFawfIWprG?= =?us-ascii?Q?4hWuG6BmMN9JyiFTi3sy/r5QDoXetwnddXVM/yWDP3xSNrDKiHZXtfkWKNBT?= =?us-ascii?Q?w7rdRr1V1A8nHH8gS6hhjSiN55YR20aY7VXNLuOeXUf/CwZfD7zLPHTr82FE?= =?us-ascii?Q?mnHBHzBbGIMNXKXJMsOKZdbXSAxiRx5MHAGL8kn8RuxT1gXUx96UHbc7vNUc?= =?us-ascii?Q?L2cOOQ4q3NNTJeoBaRW3f/dZpQEwr6I4R3FX8rXhnYAxe5opZzlhpYSpxrx4?= =?us-ascii?Q?iTiJcc3HvafRpmmf1grFwsw+1gvjNitZ8Uf4g7H8ek02ROf7Ove6iU2ArgNW?= =?us-ascii?Q?JuEvyITWq71mD464fNU8mrm0pCGo0185yex4LNJTlDL7xejVfUZMXRLIJysV?= =?us-ascii?Q?csG77FHJoxVdcrbAxvjF8+3ar3JV93nr5GT8bOb///6lsky9eUMeq24MVfkg?= =?us-ascii?Q?7facyhTFj6gwbwHCzrmPdpjhs9EdzFZQuIW9EXdNrtRfhaJ/BOCHQHp6+i75?= =?us-ascii?Q?ujIQr51ZgYTTrBAimdyKvh7+tyX6HP05644481nq22zgZoBCQiQCLlpYkdbu?= =?us-ascii?Q?uE71LTw8c4Wuo4UZsH4ENUY=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4627.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd60546d-1887-47b6-b62d-08d9dcb77c48 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jan 2022 08:24:47.0808 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RbJjXdd6YyKvEnvxsSRPQ9KqY/eLVUJuEogQWDJTFqgBWaH2+iAClr+05YCA3Gpg86E1fMtV53spDULhZBXJow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1871 Return-Path: jenny.huang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jenny Huang -----Original Message----- From: Sheng, W =20 Sent: Tuesday, January 18, 2022 4:15 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Chaganty, Rangasai V ; Huang, Jenny ; Kowalewski, Robert Subject: [PATCH v5 2/4] IntelSiliconPkg/VTd: Update VTd register structs Update VTd register structs accroding to VTd spec ver 3.3 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3765 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 3 +- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 23 +++++++++++---- .../Feature/VTd/IntelVTdDxe/TranslationTable.c | 22 ++++++++++++-- .../Feature/VTd/IntelVTdDxe/VtdReg.c | 7 +++-- .../IntelSiliconPkg/Include/IndustryStandard/Vtd.h | 34 +++++++++++++++++-= ---- 5 files changed, 68 insertions(+), 21 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/Inte= lVTdDmar.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/Inte= lVTdDmar.c index c3a939c9..87ce9716 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDma= r.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDma= r.c @@ -631,10 +631,8 @@ DumpVtdECapRegs ( DEBUG ((DEBUG_INFO, " SC - 0x%x\n", ECapReg->Bits.SC)); DEBUG ((DEBUG_INFO, " IRO - 0x%x\n", ECapReg->Bits.IRO)); DEBUG ((DEBUG_INFO, " MHMV - 0x%x\n", ECapReg->Bits.MHMV)); - DEBUG ((DEBUG_INFO, " ECS - 0x%x\n", ECapReg->Bits.ECS)); DEBUG ((DEBUG_INFO, " MTS - 0x%x\n", ECapReg->Bits.MTS)); DEBUG ((DEBUG_INFO, " NEST - 0x%x\n", ECapReg->Bits.NEST)); - DEBUG ((DEBUG_INFO, " DIS - 0x%x\n", ECapReg->Bits.DIS)); DEBUG ((DEBUG_INFO, " PASID - 0x%x\n", ECapReg->Bits.PASID)); DEBUG ((DEBUG_INFO, " PRS - 0x%x\n", ECapReg->Bits.PRS)); DEBUG ((DEBUG_INFO, " ERS - 0x%x\n", ECapReg->Bits.ERS)); @@ -642,6 +640,7 @@ DumpVtdECapRegs ( DEBUG ((DEBUG_INFO, " NWFS - 0x%x\n", ECapReg->Bits.NWFS)); DEBUG ((DEBUG_INFO, " EAFS - 0x%x\n", ECapReg->Bits.EAFS)); DEBUG ((DEBUG_INFO, " PSS - 0x%x\n", ECapReg->Bits.PSS)); + DEBUG ((DEBUG_INFO, " ADMS - 0x%x\n", ECapReg->Bits.ADMS)); } =20 =20 diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/Tran= slationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/= TranslationTable.c index 6676b2a9..a309d566 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/Translation= Table.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/Translation= Table.c @@ -884,13 +884,26 @@ SetupTranslationTable ( return Status; } =20 - if (VtdUnitInfo->ECapReg.Bits.ECS) { - DEBUG ((DEBUG_INFO, "CreateExtContextEntry - %d\n", Index)); - Status =3D CreateExtContextEntry (VtdUnitInfo); + if (VtdUnitInfo->ECapReg.Bits.SMTS) { + if (VtdUnitInfo->ECapReg.Bits.DEP_24) { + DEBUG ((DEBUG_ERROR,"ECapReg.bit24 is not zero\n")); + ASSERT(FALSE); + Status =3D EFI_UNSUPPORTED; + } else { + Status =3D CreateExtContextEntry (VtdUnitInfo); + } } else { - DEBUG ((DEBUG_INFO, "CreateContextEntry - %d\n", Index)); - Status =3D CreateContextEntry (VtdUnitInfo); + if (VtdUnitInfo->ECapReg.Bits.DEP_24) { + // + // To compatible with pervious VTd engine + // It was ECS(Extended Context Support) bit. + // + Status =3D CreateExtContextEntry (VtdUnitInfo); + } else { + Status =3D CreateContextEntry (VtdUnitInfo); + } } + if (EFI_ERROR (Status)) { return Status; } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Translat= ionTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/Translat= ionTable.c index ca5f65a8..48e38d56 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= e.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTabl= e.c @@ -382,11 +382,27 @@ SetupTranslationTable ( =20 for (Index =3D 0; Index < mVtdUnitNumber; Index++) { DEBUG((DEBUG_INFO, "CreateContextEntry - %d\n", Index)); - if (mVtdUnitInformation[Index].ECapReg.Bits.ECS) { - Status =3D CreateExtContextEntry (Index); + + if (mVtdUnitInformation[Index].ECapReg.Bits.SMTS) { + if (mVtdUnitInformation[Index].ECapReg.Bits.DEP_24) { + DEBUG ((DEBUG_ERROR,"ECapReg.bit24 is not zero\n")); + ASSERT(FALSE); + Status =3D EFI_UNSUPPORTED; + } else { + Status =3D CreateExtContextEntry (Index); + } } else { - Status =3D CreateContextEntry (Index); + if (mVtdUnitInformation[Index].ECapReg.Bits.DEP_24) { + // + // To compatible with pervious VTd engine + // It was ECS(Extended Context Support) bit. + // + Status =3D CreateExtContextEntry (Index); + } else { + Status =3D CreateContextEntry (Index); + } } + if (EFI_ERROR (Status)) { return Status; } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c= b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c index 1ce9c1c0..1aacd39a 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c @@ -698,10 +698,8 @@ DumpVtdECapRegs ( DEBUG((DEBUG_INFO, " SC - 0x%x\n", ECapReg->Bits.SC)); DEBUG((DEBUG_INFO, " IRO - 0x%x\n", ECapReg->Bits.IRO)); DEBUG((DEBUG_INFO, " MHMV - 0x%x\n", ECapReg->Bits.MHMV)); - DEBUG((DEBUG_INFO, " ECS - 0x%x\n", ECapReg->Bits.ECS)); DEBUG((DEBUG_INFO, " MTS - 0x%x\n", ECapReg->Bits.MTS)); DEBUG((DEBUG_INFO, " NEST - 0x%x\n", ECapReg->Bits.NEST)); - DEBUG((DEBUG_INFO, " DIS - 0x%x\n", ECapReg->Bits.DIS)); DEBUG((DEBUG_INFO, " PASID - 0x%x\n", ECapReg->Bits.PASID)); DEBUG((DEBUG_INFO, " PRS - 0x%x\n", ECapReg->Bits.PRS)); DEBUG((DEBUG_INFO, " ERS - 0x%x\n", ECapReg->Bits.ERS)); @@ -709,6 +707,8 @@ DumpVtdECapRegs ( DEBUG((DEBUG_INFO, " NWFS - 0x%x\n", ECapReg->Bits.NWFS)); DEBUG((DEBUG_INFO, " EAFS - 0x%x\n", ECapReg->Bits.EAFS)); DEBUG((DEBUG_INFO, " PSS - 0x%x\n", ECapReg->Bits.PSS)); + DEBUG((DEBUG_INFO, " SMTS - 0x%x\n", ECapReg->Bits.SMTS)); + DEBUG((DEBUG_INFO, " ADMS - 0x%x\n", ECapReg->Bits.ADMS)); } =20 /** @@ -769,9 +769,10 @@ DumpVtdRegs ( DEBUG((DEBUG_INFO, " FRCD_REG[%d] - 0x%016lx %016lx\n", Index, FrcdRe= g.Uint64[1], FrcdReg.Uint64[0])); if (FrcdReg.Uint64[1] !=3D 0 || FrcdReg.Uint64[0] !=3D 0) { DEBUG((DEBUG_INFO, " Fault Info - 0x%016lx\n", VTD_64BITS_ADDRESS= (FrcdReg.Bits.FILo, FrcdReg.Bits.FIHi))); + DEBUG((DEBUG_INFO, " Fault Bit - %d\n", FrcdReg.Bits.F)); SourceId.Uint16 =3D (UINT16)FrcdReg.Bits.SID; DEBUG((DEBUG_INFO, " Source - B%02x D%02x F%02x\n", SourceId.Bits= .Bus, SourceId.Bits.Device, SourceId.Bits.Function)); - DEBUG((DEBUG_INFO, " Type - %x (%a)\n", FrcdReg.Bits.T, FrcdReg.B= its.T ? "read" : "write")); + DEBUG((DEBUG_INFO, " Type - 0x%02x\n", (FrcdReg.Bits.T1 << 1) | F= rcdReg.Bits.T2)); DEBUG((DEBUG_INFO, " Reason - %x (Refer to VTd Spec, Appendix A)\= n", FrcdReg.Bits.FR)); } } diff --git a/Silicon/Intel/IntelSiliconPkg/Include/IndustryStandard/Vtd.h b= /Silicon/Intel/IntelSiliconPkg/Include/IndustryStandard/Vtd.h index a759ca10..32fbdd02 100644 --- a/Silicon/Intel/IntelSiliconPkg/Include/IndustryStandard/Vtd.h +++ b/Silicon/Intel/IntelSiliconPkg/Include/IndustryStandard/Vtd.h @@ -216,6 +216,7 @@ typedef union { #define B_GSTS_REG_RTPS BIT30 #define B_GSTS_REG_TE BIT31 #define R_RTADDR_REG 0x20 +#define V_RTADDR_REG_TTM_ADM (BIT11|BIT10) #define R_CCMD_REG 0x28 #define B_CCMD_REG_CIRG_MASK (BIT62|BIT61) #define V_CCMD_REG_CIRG_GLOBAL BIT61 @@ -334,7 +335,10 @@ typedef union { UINT8 FL1GP:1; // First Level 1-GByte Page Support UINT8 Rsvd_57:2; UINT8 PI:1; // Posted Interrupts Support - UINT8 Rsvd_60:4; + UINT8 FL5LP:1; // First Level 5-level Paging Support + UINT8 Rsvd_61:1; + UINT8 ESIRTPS:1; // Enhanced Set Interrupt Remap Table Pointer= Support + UINT8 ESRTPS:1; // Enhanced Set Root Table Pointer Support } Bits; UINT64 Uint64; } VTD_CAP_REG; @@ -346,7 +350,7 @@ typedef union { UINT8 DT:1; // Device-TLB support UINT8 IR:1; // Interrupt Remapping support UINT8 EIM:1; // Extended Interrupt Mode - UINT8 Rsvd_5:1; + UINT8 DEP_5:1; UINT8 PT:1; // Pass Through UINT8 SC:1; // Snoop Control =20 @@ -354,11 +358,11 @@ typedef union { UINT16 Rsvd_18:2; UINT16 MHMV:4; // Maximum Handle Mask Value =20 - UINT8 ECS:1; // Extended Context Support + UINT8 DEP_24:1; UINT8 MTS:1; // Memory Type Support UINT8 NEST:1; // Nested Translation Support - UINT8 DIS:1; // Deferred Invalidate Support - UINT8 PASID:1; // Process Address Space ID Support + UINT8 Rsvd_27:1; + UINT8 DEP_28:1; UINT8 PRS:1; // Page Request Support UINT8 ERS:1; // Execute Request Support UINT8 SRS:1; // Supervisor Request Support @@ -367,7 +371,20 @@ typedef union { UINT32 NWFS:1; // No Write Flag Support UINT32 EAFS:1; // Extended Accessed Flag Support UINT32 PSS:5; // PASID Size Supported - UINT32 Rsvd_40:24; + UINT32 PASID:1; // Process Address Space ID Support + UINT32 DIT:1; // Device-TLB Invalidation Throttle + UINT32 PDS:1; // Page-request Drain Support + UINT32 SMTS:1; // Scalable Mode Translation Support + UINT32 VCS:1; // Virtual Command Support + UINT32 SLADS:1; // Second-Level Accessed Dirty Support + UINT32 SLTS:1; // Second-level Translation Support + UINT32 FLTS:1; // First-level Translation Support + UINT32 SMPWCS:1; // Scalable-Mode Page-walk Coherency Support + UINT32 RPS:1; // RID-PASID Support + UINT32 Rsvd_50:2; + UINT32 ADMS:1; // Abort DMA Mode Support + UINT32 RPRIVS:1; // RID_PRIV Support + UINT32 Rsvd_54:10; } Bits; UINT64 Uint64; } VTD_ECAP_REG; @@ -379,7 +396,8 @@ typedef union { UINT32 FIHi:32; // FaultInfo =20 UINT32 SID:16; // Source Identifier - UINT32 Rsvd_80:13; + UINT32 Rsvd_80:12; + UINT32 T2:1; // Type bit2 (0: Write/Read, 1: Page/AtomicOp) UINT32 PRIV:1; // Privilege Mode Requested UINT32 EXE:1; // Execute Permission Requested UINT32 PP:1; // PASID Present @@ -387,7 +405,7 @@ typedef union { UINT32 FR:8; // Fault Reason UINT32 PV:20; // PASID Value UINT32 AT:2; // Address Type - UINT32 T:1; // Type (0: Write, 1: Read) + UINT32 T1:1; // Type bit1 (0: Write/Page, 1: Read/AtomicOp) UINT32 F:1; // Fault } Bits; UINT64 Uint64[2]; --=20 2.16.2.windows.1