From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.39088.1660799839514366996 for ; Wed, 17 Aug 2022 22:17:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dOTkuXbY; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: robert.kowalewski@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660799839; x=1692335839; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=ukOKJV0htvj7gVnjxN8qIXLzBZN1MolaiuU46G050qU=; b=dOTkuXbYxfngaiyuxOaRI0epeaF32fJQmwxbuL0Yrl3H9EYVDiOfaqu5 LcGSeXfcdCKADOvof7raddLS8o/U5GU7aJCosJNAMGTBbYuiieIS38oks 0fgn3lj6Rk6R3DTI4KyUIJautG05zeEx30Xf82w9rjk2+GJOJlSBQU75g 0aAxF0lHRS0iLyn+BPKoJLb3i/DDn6F42a/weenFu9BdqRqyoESNqCWcD u15fChQ+sLi7DXHu7F8AuAgaIYa2d5q8VnsseQhrpb4ey5N8fuTDyWs7h N3j5GcBTW5pMKDUfDC9Wp5aX23anCqRPPQp7Wi16Iln/v7p4DI0cqToq4 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10442"; a="293459313" X-IronPort-AV: E=Sophos;i="5.93,245,1654585200"; d="scan'208";a="293459313" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 22:17:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,245,1654585200"; d="scan'208";a="610880709" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga007.fm.intel.com with ESMTP; 17 Aug 2022 22:17:18 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 17 Aug 2022 22:17:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Wed, 17 Aug 2022 22:17:17 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Wed, 17 Aug 2022 22:17:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gn6tS1Sw1bA/FnV+gYfWsXUl8qRO6c0SqveBNSz9FiD8x67NEGPAYuuy9UBbsEiwXEc2qPUVIx+96bgLWU5A+wUh0QYRMKAdWWuXFvpAprKbSghDnvYdzyWogVPMglb0c1KjOPRrAqPKyf3FZ2htT+QZ8LT6S4haGuh7hjHYFhNnrcjAe2UtbM/nYknfdvtgFRRnLrsUEfm6GML+j/JbPATTk4JY/n1huKz8VB9/To4wQgg06sTJfRRKLdFXlwdjnuuVl/AfdzutvRhIAnB4CbSg0ooBNOkIGQ0gtyneOlcYWeq2Jtyqw5nWd2GJeMPBYcJD9qIVpNFNW7FMUKoaeA== 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=Y85npM2AKuRD0fYxaE+jNnMHcmgd6XyC+wmto732HR0=; b=ZTIOv9+Y5SoV1eRgZyWlL/k+y0FLAmI77boc9p44hDB08fd9OoMwHsdBBsbAyP6lfY1fWYJzeJeA8pqfAIRqm0HuenRsrtu6wEhW8e7xT/BoOGi8EKUHHfls0BSEihFE1MNBymdadFz1hl9nfWw0FOzg2apl4SIsOqdGL8v1mIjG+v2v6qxhLErgzz+5tWztbWf9s6SdFlF2Nqbc6XdOTO11YRJ3x0n701FufndvSb+syhUtG7Cm/VLa71jsFYdGPWJvbLdiZDETaPKK3n+ZruOMH3+Y69cOvSEDAzgXxVukA4mpct2jxbKlIiGaW8k02dxD+XZpbdY9BzOGrcNjKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3509.namprd11.prod.outlook.com (2603:10b6:a03:8e::25) by DM5PR11MB1722.namprd11.prod.outlook.com (2603:10b6:3:f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.19; Thu, 18 Aug 2022 05:17:14 +0000 Received: from BYAPR11MB3509.namprd11.prod.outlook.com ([fe80::e8af:e439:606e:7aa5]) by BYAPR11MB3509.namprd11.prod.outlook.com ([fe80::e8af:e439:606e:7aa5%7]) with mapi id 15.20.5504.028; Thu, 18 Aug 2022 05:17:14 +0000 From: "Robert Kowalewski" To: "Sheng, W" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Chaganty, Rangasai V" , "Huang, Jenny" Subject: Re: [PATCH] IntelSiliconPkg/VTd: Add DMAR SIDP Table dumpping Thread-Topic: [PATCH] IntelSiliconPkg/VTd: Add DMAR SIDP Table dumpping Thread-Index: AQHYsgFvMGAXECkXa0S415p0TLU+SK20H1Vg Date: Thu, 18 Aug 2022 05:17:14 +0000 Message-ID: References: <20220817062006.1617-1-w.sheng@intel.com> In-Reply-To: <20220817062006.1617-1-w.sheng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 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: fa503ba7-7aab-45f6-a7ba-08da80d8e981 x-ms-traffictypediagnostic: DM5PR11MB1722:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PHIiEhI/hDHO0vpSV36RyJZa8JHG175eFDLP1mS1bSSFwNYgici254vD3YPMEwj6PZ47IdlhViZTjGfvWAYf5/6M1N6wF4jOLs2Q1bCKIX3Mk/NBfFx5rD4+Je9xWsxBcuYA+QzJZIaivb61HeRh6lDtE/3JofijHG4U31ITqnnaz3SbxrzR3yAbjdROhFLmux+Gp3UE/kXUIubXqxyTgCGhMb7jqSZieD5gIkDLWzC2sLCh0qOWIE3vnRpjd7YPTdCIlUKxMbL227p/RbwqtFFBksiTB+MU+R0Bo2MvTpaYYJIC2hvbmxaSTde7CHD5XdCyiBPyDKFNz0LOChJeuk7Ni4ObCBeviuMRvqP3w/SSS5rV8qFg+cIWdC0ET3KkVmUqeRmiZuqFzi9IkrlAI406mYYb1dfjGn2Cs4VfJv42yyq5YqzG6gdIWCqmVyIBpP/urgjmWL7krl1jkA79IeUrJleqWZ52YtxmwbVUMtPMg6r1N2jept/+2/lXciTp2HgP1mbkRANKyezGngqFFE+B7GNYeu58qFRV9yp7/92bcMP17QF/WYfuHMGR+SWJWZ5GxIcllyMcmodQt5KTq+B+IKJTsbQwZRTk45lkloZPghmyH03rk9p2tuf621uiefoKQ/bx8SrHrLgRPvpuIS1zATemvLNsMf7eRop644pjneA0u3GaQqCdR2PG0MmNTDVN1dEPxq7GR/RNyTaw6GlrZah24F2xbT+eDwevWSj0D+DL+yVIuAR/VNJ40hxIeyM18LYln8FSmcCaxTWesA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3509.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(376002)(396003)(346002)(136003)(366004)(39860400002)(82960400001)(5660300002)(478600001)(55016003)(71200400001)(107886003)(316002)(110136005)(54906003)(41300700001)(52536014)(64756008)(66946007)(2906002)(66556008)(66476007)(76116006)(8936002)(66446008)(8676002)(4326008)(38100700002)(53546011)(38070700005)(9686003)(186003)(33656002)(7696005)(6506007)(86362001)(26005)(122000001)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?WyYB4F/T8i5JAYlKdPMaqSRQaG0HUierwaABB/KthkA1gCusCW+U8hsSU2eL?= =?us-ascii?Q?k1kNAG+Vw6UxInUjDivYh8MdRwamEiyjCjjkoC2v/8baez4TpgAVW1eJLLxB?= =?us-ascii?Q?tLNr8j9nYFK3sziYwG83GTnB4POMaFL8kJ1H/6AsyNaLE3HX22WlOdCrFfsU?= =?us-ascii?Q?eXgMmhkro2eBoKD5kYe39XNoxN97eE6xSPrC8SAht6rvSfTu70er5NEXnMQ5?= =?us-ascii?Q?DRjWch80P+1GIbcLuV856lzvzX6Qy8x+p3Vsrd4aNKhKXFhWzfhgzSH1v3Lv?= =?us-ascii?Q?CzARsFqEHaxI4dXmPEgYMSm1I1+U8bwBjNopjZbSJ+o+U9MvCH7VS8eDpdnx?= =?us-ascii?Q?X809o7+7Wiz7MQk1zgLpFoa3ALpAAOcEErYeahjJEYs2HsMsl4fL9tYmzdA+?= =?us-ascii?Q?wOA5eNhtUcjkbYUNWnvVr6MSXCvTgG6R6tk+Hcay+Gxl3UFi7RjGaEDuiIpx?= =?us-ascii?Q?tWU8P5WBbKyjgzBeH5oL5lpqT+AFLNEsKsWODcUvFY1IOh/lIgBJAEmrES3L?= =?us-ascii?Q?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4S0PJZxDp12uEE/?= =?us-ascii?Q?WULylX+5wNeYCt3a8s8MdbnxwPw2ar9kG/RhkwWGxRU5Nnw63M/Z/zNgGp20?= =?us-ascii?Q?XvbaPSGIbDSWkpgv3KtA5cqw+bKbRRP3gK7wgNgPIxZOmnlAp/444UWXP3wC?= =?us-ascii?Q?6nb3kZQt/5cAJNbsfKvGNMsqSOLpgZtlqFaMCitEUkTXtKIb70rjgBcyLKVO?= =?us-ascii?Q?HA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3509.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa503ba7-7aab-45f6-a7ba-08da80d8e981 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2022 05:17:14.4913 (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: DIRqlUfvhLlGRuw+KifqxYep0mIfAsZ6aKKmh1jZFqeUUIlVceqDoBUi5PhDOfO2aEP+Yf0PsMVCJprbHXokFyJqC9qXgz1BB25R3lDpLq0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1722 Return-Path: robert.kowalewski@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Robert Kowalewski -----Original Message----- From: Sheng, W = Sent: Wednesday, August 17, 2022 8:20 AM To: devel@edk2.groups.io Cc: Ni, Ray ; Chaganty, Rangasai V ; Huang, Jenny ; Kowalewski, Robert Subject: [PATCH] IntelSiliconPkg/VTd: Add DMAR SIDP Table dumpping VT-d spec 4.0 has added a new structure called SIDP which is more generic t= o describe special properties of integrated devices. Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Signed-off-by: Sheng Wei --- .../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpi= Table.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTab= le.c index 75fbd53ed..42e1b1449 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTabl +++ e.c @@ -93,6 +93,10 @@ DumpDmarDeviceScopeEntry ( " Length ............................................. 0x%02x\n",= DmarDeviceScopeEntry->Length ));+ DEBUG ((DEBUG_INFO,+ " = Flags .............................................. 0x%02x\n",+ DmarDev= iceScopeEntry->Flags+ )); DEBUG ((DEBUG_INFO, " Enumeration I= D ..................................... 0x%02x\n", DmarDeviceScopeEntry= ->EnumerationId@@ -122,6 +126,66 @@ DumpDmarDeviceScopeEntry ( return; } +/**+ Dump DMAR SIDP table.++ @param[in] Sidp DMAR SIDP ta= ble+**/+VOID+DumpDmarSidp (+ IN EFI_ACPI_DMAR_SIDP_HEADER *Sidp+ )+{+ EF= I_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *DmarDeviceScopeEntry;+ INTN = SidpLen;++ if (Sidp =3D=3D NULL) {= + return;+ }++ DEBUG ((DEBUG_INFO,+ " ****************************= ***********************************************\n"+ ));+ DEBUG ((DEBUG_= INFO,+ " * SoC Integrated Device Property Reporting Structure = *\n"+ ));+ DEBUG ((DEBUG_INFO,+ " *********************= ******************************************************\n"+ ));+ DEBUG (= (DEBUG_INFO,+ (sizeof(UINTN) =3D=3D sizeof(UINT64)) ?+ " SIDP addres= s ........................................... 0x%016lx\n" :+ " SIDP add= ress ........................................... 0x%08x\n",+ Sidp+ ))= ;+ DEBUG ((DEBUG_INFO,+ " Type .....................................= ............ 0x%04x\n",+ Sidp->Header.Type+ ));+ DEBUG ((DEBUG_INFO,= + " Length ............................................... 0x%04x\n",= + Sidp->Header.Length+ ));+ DEBUG ((DEBUG_INFO,+ " Segment Num= ber ....................................... 0x%04x\n",+ Sidp->SegmentNum= ber+ ));++ SidpLen =3D Sidp->Header.Length - sizeof(EFI_ACPI_DMAR_SIDP= _HEADER);+ DmarDeviceScopeEntry =3D (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_= HEADER *)(Sidp + 1);+ while (SidpLen > 0) {+ DumpDmarDeviceScopeEntry (= DmarDeviceScopeEntry);+ SidpLen -=3D DmarDeviceScopeEntry->Length;+ D= marDeviceScopeEntry =3D (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)((UI= NTN)DmarDeviceScopeEntry + DmarDeviceScopeEntry->Length);+ }++ DEBUG ((DE= BUG_INFO,+ " **********************************************************= *****************\n\n"+ ));++ return;+}+ /** Dump DMAR SATC table. @@= -472,6 +536,10 @@ DumpDmarDrhd ( " Flags ................................................ 0x%02x\n",= Drhd->Flags ));+ DEBUG ((DEBUG_INFO,+ " Size ..............= ................................... 0x%02x\n",+ Drhd->Size+ )); DEB= UG ((DEBUG_INFO, " INCLUDE_PCI_ALL ...............................= ..... 0x%02x\n", Drhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL= @@ -583,7 +651,11 @@ DumpAcpiDMAR ( case EFI_ACPI_DMAR_TYPE_SATC: DumpDmarSatc ((EFI_ACPI_DMAR_SATC_= HEADER *)DmarHeader); break;+ case EFI_ACPI_DMAR_TYPE_SIDP:+ = DumpDmarSidp ((EFI_ACPI_DMAR_SIDP_HEADER *)DmarHeader);+ break; de= fault:+ DEBUG ((DEBUG_INFO, "Unknown DMAR Table Type : %d\n", DmarHead= er->Type)); break; } DmarLen -=3D DmarHeader->Length;-- = 2.26.2.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.