svn commit: r306466 - in stable: 10/sys/x86/iommu 11/sys/x86/iommu
John Baldwin
jhb at FreeBSD.org
Fri Sep 30 00:31:19 UTC 2016
Author: jhb
Date: Fri Sep 30 00:31:17 2016
New Revision: 306466
URL: https://svnweb.freebsd.org/changeset/base/306466
Log:
MFC 303886: Add additional constants.
- Add constants for the fields in the root-entry table address register,
namely the root type type (RTT) and root table address (RTA) mask.
- Add macros for the bitmask of the domain ID field in the second word
of context table entries as well as a helper macro (DMAR_CTX2_GET_DID)
to extract the domain ID from a context table entry.
Sponsored by: Chelsio Communications
Modified:
stable/10/sys/x86/iommu/intel_reg.h
Directory Properties:
stable/10/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/x86/iommu/intel_reg.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/10/sys/x86/iommu/intel_reg.h
==============================================================================
--- stable/10/sys/x86/iommu/intel_reg.h Fri Sep 30 00:16:54 2016 (r306465)
+++ stable/10/sys/x86/iommu/intel_reg.h Fri Sep 30 00:31:17 2016 (r306466)
@@ -67,7 +67,9 @@ typedef struct dmar_ctx_entry {
#define DMAR_CTX2_AW_4LVL 2 /* 4-level page tables */
#define DMAR_CTX2_AW_5LVL 3 /* 5-level page tables */
#define DMAR_CTX2_AW_6LVL 4 /* 6-level page tables */
+#define DMAR_CTX2_DID_MASK 0xffff0
#define DMAR_CTX2_DID(x) ((x) << 8) /* Domain Identifier */
+#define DMAR_CTX2_GET_DID(ctx2) (((ctx2) & DMAR_CTX2_DID_MASK) >> 8)
typedef struct dmar_pte {
uint64_t pte;
@@ -214,6 +216,8 @@ typedef struct dmar_irte {
/* Root-Entry Table Address register */
#define DMAR_RTADDR_REG 0x20
+#define DMAR_RTADDR_RTT (1 << 11) /* Root Table Type */
+#define DMAR_RTADDR_RTA_MASK 0xfffffffffffff000
/* Context Command register */
#define DMAR_CCMD_REG 0x28
More information about the svn-src-all
mailing list