REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1483
Due to the limited resource on the VTd DMA buffer size in the PEI phase, the driver will limit the maximum transfer block number for 48-bit addressing. This commit aims to prevent the potential failure on calls to the IOMMU 'Map' service. Cc: Ray Ni <ray...@intel.com> Cc: Eric Dong <eric.d...@intel.com> Cc: Jian J Wang <jian.j.w...@intel.com> Signed-off-by: Hao Wu <hao.a...@intel.com> --- MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c index a83c213a47..f9174e68b1 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c @@ -48,7 +48,12 @@ UINT8 mAtaTrustCommands[2] = { // Look up table (Lba48Bit) for maximum transfer block number // #define MAX_28BIT_TRANSFER_BLOCK_NUM 0x100 -#define MAX_48BIT_TRANSFER_BLOCK_NUM 0xFFFF +// +// Due to limited resource on VTd PEI DMA buffer size, driver limits the +// maximum transfer block number for 48-bit addressing. +// Setting to 0x800 here means 1M bytes for device with 512-byte block size. +// +#define MAX_48BIT_TRANSFER_BLOCK_NUM 0x800 UINT32 mMaxTransferBlockNumber[2] = { MAX_28BIT_TRANSFER_BLOCK_NUM, -- 2.12.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#38766): https://edk2.groups.io/g/devel/message/38766 Mute This Topic: https://groups.io/mt/31014384/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-