]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c
MdeModulePkg/AhciPei: Limit max transfer blocknum for 48-bit address
[mirror_edk2.git] / MdeModulePkg / Bus / Ata / AhciPei / AhciMode.c
index a83c213a474d4722a0cba175db421442958ba0ea..11754b305702dcdca0bdfa4127fd9b97599720dc 100644 (file)
@@ -48,7 +48,13 @@ UINT8  mAtaTrustCommands[2] = {
 // Look up table (Lba48Bit) for maximum transfer block number\r
 //\r
 #define MAX_28BIT_TRANSFER_BLOCK_NUM     0x100\r
-#define MAX_48BIT_TRANSFER_BLOCK_NUM     0xFFFF\r
+//\r
+// Due to limited resource for VTd PEI DMA buffer on platforms, the driver\r
+// limits the maximum transfer block number for 48-bit addressing.\r
+// Here, setting to 0x800 means that for device with 512-byte block size, the\r
+// maximum buffer for DMA mapping will be 1M bytes in size.\r
+//\r
+#define MAX_48BIT_TRANSFER_BLOCK_NUM     0x800\r
 \r
 UINT32 mMaxTransferBlockNumber[2] = {\r
   MAX_28BIT_TRANSFER_BLOCK_NUM,\r