]> git.proxmox.com Git - mirror_edk2.git/commit
IntelSiliconPkg VTdDxe: Option to force no early access attr request
authorStar Zeng <star.zeng@intel.com>
Wed, 17 Oct 2018 09:43:28 +0000 (17:43 +0800)
committerStar Zeng <star.zeng@intel.com>
Thu, 25 Oct 2018 03:50:43 +0000 (11:50 +0800)
commit8c09f300103993985c91532239a72ba879df0b31
tree68339085c7b4b3f7d8bb18dbadb301843d4f2da6
parent0bc7448ad2eafa6f51172c34d24f6a757d5ecf32
IntelSiliconPkg VTdDxe: Option to force no early access attr request

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1272

To have high confidence in usage for platform, add option (BIT2 of
PcdVTdPolicyPropertyMask) to force no IOMMU access attribute request
recording before DMAR table is installed.

Check PcdVTdPolicyPropertyMask BIT2 before RequestAccessAttribute()
and ProcessRequestedAccessAttribute(), then RequestAccessAttribute(),
ProcessRequestedAccessAttribute() and mAccessRequestXXX variables
could be optimized by compiler when PcdVTdPolicyPropertyMask BIT2 = 1.

Test done:
1: Created case that has IOMMU access attribute request before DMAR
   table is installed, ASSERT was triggered after setting
   PcdVTdPolicyPropertyMask BIT2 to 1.

2. Confirmed RequestAccessAttribute(), ProcessRequestedAccessAttribute()
   and mAccessRequestXXX variables were optimized by compiler after
   setting PcdVTdPolicyPropertyMask BIT2 to 1.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c
IntelSiliconPkg/IntelSiliconPkg.dec