From: Jiewen Yao <jiewen.yao@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>
Subject: [PATCH 1/3] IntelSiliconPkg/header: update PlatformVtdPolicy
Date: Fri, 25 Aug 2017 15:40:44 +0800 [thread overview]
Message-ID: <1503646846-1036-2-git-send-email-jiewen.yao@intel.com> (raw)
In-Reply-To: <1503646846-1036-1-git-send-email-jiewen.yao@intel.com>
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 <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
---
IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h | 51 +++++++++++++++++++-
1 file changed, 50 insertions(+), 1 deletion(-)
diff --git a/IntelSiliconPkg/Include/Protocol/PlatformVtdPolicy.h b/IntelSiliconPkg/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__
#include <IndustryStandard/Vtd.h>
+#include <IndustryStandard/DmaRemappingReportingTable.h>
#define EDKII_PLATFORM_VTD_POLICY_PROTOCOL_GUID \
{ \
@@ -66,6 +67,53 @@ EFI_STATUS
OUT EDKII_PLATFORM_VTD_DEVICE_INFO *DeviceInfo
);
+#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_EXCEPTION_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_DEVICE_INFO)];
+} EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO;
+
+#pragma pack()
+
+
/**
Get a list of the exception devices.
@@ -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 list of DeviceInfo.
+ Each DeviceInfo pointer points to EDKII_PLATFORM_VTD_EXCEPTION_DEVICE_INFO.
@retval EFI_SUCCESS The DeviceInfoCount and DeviceInfo are returned.
@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
);
struct _EDKII_PLATFORM_VTD_POLICY_PROTOCOL {
--
2.7.4.windows.1
next prev parent reply other threads:[~2017-08-25 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 7:40 [PATCH 0/3] Add flexible exception device reporting Jiewen Yao
2017-08-25 7:40 ` Jiewen Yao [this message]
2017-08-25 7:40 ` [PATCH 2/3] IntelSiliconPkg/IntelVTd: update PlatformVtdPolicy Jiewen Yao
2017-08-25 7:40 ` [PATCH 3/3] IntelSiliconPkg/PlatformVTdSample: update ExceptionDevice Jiewen Yao
2017-08-25 9:39 ` Zeng, Star
2017-08-25 13:34 ` Yao, Jiewen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503646846-1036-2-git-send-email-jiewen.yao@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox