From nobody Fri Dec 27 03:22:50 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503646871855262.94233568255174; Fri, 25 Aug 2017 00:41:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4DFC421E7903A; Fri, 25 Aug 2017 00:38:32 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BB54821E14547 for ; Fri, 25 Aug 2017 00:38:31 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 25 Aug 2017 00:41:07 -0700 Received: from jyao1-mobl.ccr.corp.intel.com ([10.239.196.35]) by fmsmga004.fm.intel.com with ESMTP; 25 Aug 2017 00:41:06 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,424,1498546800"; d="scan'208";a="304276355" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Fri, 25 Aug 2017 15:40:44 +0800 Message-Id: <1503646846-1036-2-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1503646846-1036-1-git-send-email-jiewen.yao@intel.com> References: <1503646846-1036-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 1/3] IntelSiliconPkg/header: update PlatformVtdPolicy X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add flexible exception list format: 1) Support Device scope based reporting: Such as, Seg:0/StartBus:0/(Dev:1C|Func:0)/(Dev:0|Func:0) 2) Support PCI VendorId/DeviceId based reporting Such as, VID:8086|DID:9D2F|Rev:21|SVID:8086|SDID:7270 Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h | 51 ++++++++++++++++= +++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h b/IntelSi= liconPkg/Include/Protocol/PlatformVtdPolicy.h index 29774c1..441da5c 100644 --- a/IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h +++ b/IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h @@ -16,6 +16,7 @@ #define __PLATFORM_VTD_POLICY_PROTOCOL_H__ =20 #include +#include =20 #define EDKII_PLATFORM_VTD_POLICY_PROTOCOL_GUID \ { \ @@ -66,6 +67,53 @@ EFI_STATUS OUT EDKII_PLATFORM_VTD_DEVICE_INFO *DeviceInfo ); =20 +#pragma pack(1) + +typedef struct { + // + // The segment number of the device + // + UINT16 SegmentNumber; + // + // Device scope definition in DMAR table + // + EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER DeviceScope; + // + // Pci path definition in DMAR table + // +//EFI_ACPI_DMAR_PCI_PATH PciPath[]; +} EDKII_PLATFORM_VTD_DEVICE_SCOPE; + +typedef struct { + UINT16 VendorId; + UINT16 DeviceId; + UINT8 RevisionId; + UINT16 SubsystemVendorId; + UINT16 SubsystemDeviceId; +} EDKII_PLATFORM_VTD_PCI_DEVICE_ID; + +#define EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO_TYPE_END 0 +#define EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO_TYPE_DEVICE_SCOPE 1 +#define EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO_TYPE_PCI_DEVICE_ID 2 + +typedef struct { + // + // EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO_TYPE_xxx defined above. + // + UINT8 Type; + // + // The length of the full data structure including EDKII_PLATFORM_VTD_EX= CEPTION_DEVICE_INFO and Data. + // + UINT8 Length; + // + // Data can be EDKII_PLATFORM_VTD_DEVICE_SCOPE or EDKII_PLATFORM_VTD_PCI= _DEVICE_ID + // +//UINT8 Data[Length - sizeof(EDKII_PLATFORM_VTD_EXCEPTION_DEVI= CE_INFO)]; +} EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO; + +#pragma pack() + + /** Get a list of the exception devices. =20 @@ -74,6 +122,7 @@ EFI_STATUS @param[in] This The protocol instance pointer. @param[out] DeviceInfoCount The count of the list of DeviceInfo. @param[out] DeviceInfo A callee allocated buffer to hold a li= st of DeviceInfo. + Each DeviceInfo pointer points to EDKI= I_PLATFORM_VTD_EXCEPTION_DEVICE_INFO. =20 @retval EFI_SUCCESS The DeviceInfoCount and DeviceInfo are ret= urned. @retval EFI_INVALID_PARAMETER DeviceInfoCount is NULL, or DeviceInfo is = NULL. @@ -85,7 +134,7 @@ EFI_STATUS (EFIAPI *EDKII_PLATFORM_VTD_POLICY_GET_EXCEPTION_DEVICE_LIST) ( IN EDKII_PLATFORM_VTD_POLICY_PROTOCOL *This, OUT UINTN *DeviceInfoCount, - OUT EDKII_PLATFORM_VTD_DEVICE_INFO **DeviceInfo + OUT VOID **DeviceInfo ); =20 struct _EDKII_PLATFORM_VTD_POLICY_PROTOCOL { --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel