diff options
author | kib <kib@FreeBSD.org> | 2015-03-31 00:57:25 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-03-31 00:57:25 +0000 |
commit | cff2ee95c4f999e54d6d521538a8ec1540b01af3 (patch) | |
tree | 2860a011852338b28432b483e1f3f1ea6c30606f /sys/x86 | |
parent | 2f3af4a1a441be2964714800c92797a067ba201b (diff) | |
download | FreeBSD-src-cff2ee95c4f999e54d6d521538a8ec1540b01af3.zip FreeBSD-src-cff2ee95c4f999e54d6d521538a8ec1540b01af3.tar.gz |
MFC r280435:
When mapping an allocated entry, use the entry size, instead of the
requested size. If tag restrictions caused split entry, its size is
less then requsted.
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/iommu/intel_gas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/iommu/intel_gas.c b/sys/x86/iommu/intel_gas.c index 2049744..0957df3 100644 --- a/sys/x86/iommu/intel_gas.c +++ b/sys/x86/iommu/intel_gas.c @@ -648,7 +648,7 @@ dmar_gas_map(struct dmar_ctx *ctx, const struct bus_dma_tag_common *common, entry->flags |= eflags; DMAR_CTX_UNLOCK(ctx); - error = ctx_map_buf(ctx, entry->start, size, ma, + error = ctx_map_buf(ctx, entry->start, entry->end - entry->start, ma, ((eflags & DMAR_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & DMAR_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & DMAR_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) | |