]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
MdeModulePkg NvmExpressDxe: Add buffer alignment check in PassThru API
authorHao Wu <hao.a.wu@intel.com>
Mon, 22 Aug 2016 05:55:52 +0000 (13:55 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 6 Sep 2016 07:31:29 +0000 (15:31 +0800)
commit3c52deafda51b16f665c44eec967ed03689932f9
treed50f517b18ce5b78e1d57bc69fbb5870b4204b52
parent114358eaa856d4f48ecb0a9da68d9bb7659226c7
MdeModulePkg NvmExpressDxe: Add buffer alignment check in PassThru API

According to the UEFI spec, the 'TransferBuffer' and 'MetadataBuffer' used
in a data transfer should be aligned on the boundary specified by the
IoAlign field in the EFI_NVM_EXPRESS_PASS_THRU_MODE structure.

This commit adds this check to follow the spec.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c