\r
#include "IntelVTdPmrPei.h"\r
\r
-#define TOTAL_DMA_BUFFER_SIZE SIZE_4MB\r
-#define TOTAL_DMA_BUFFER_SIZE_S3 SIZE_1MB\r
-\r
EFI_GUID mVTdInfoGuid = {\r
0x222f5e30, 0x5cd, 0x49c6, { 0x8a, 0xc, 0x36, 0xd6, 0x58, 0x41, 0xe0, 0x82 }\r
};\r
PeiServicesGetBootMode (&BootMode);\r
\r
if (BootMode == BOOT_ON_S3_RESUME) {\r
- DmaBufferInfo->DmaBufferSize = TOTAL_DMA_BUFFER_SIZE_S3;\r
+ DmaBufferInfo->DmaBufferSize = PcdGet32 (PcdVTdPeiDmaBufferSizeS3);\r
} else {\r
- DmaBufferInfo->DmaBufferSize = TOTAL_DMA_BUFFER_SIZE;\r
+ DmaBufferInfo->DmaBufferSize = PcdGet32 (PcdVTdPeiDmaBufferSize);\r
}\r
\r
Status = PeiServicesNotifyPpi (&mVTdInfoNotifyDesc);\r
# This driver initializes VTd engine based upon EDKII_VTD_INFO_PPI\r
# and provide DMA protection in PEI.\r
#\r
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
\r
[Pcd]\r
gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask ## CONSUMES\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSize ## CONSUMES\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSizeS3 ## CONSUMES\r
\r
[Depex]\r
gEfiPeiMasterBootModePpiGuid AND\r
#\r
# This package provides common open source Intel silicon modules.\r
#\r
-# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials are licensed and made available under\r
# the terms and conditions of the BSD License that accompanies this distribution.\r
# The full text of the license may be found at\r
# @Prompt The policy for VTd driver behavior.\r
gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask|1|UINT8|0x00000002\r
\r
+ ## Declares VTd PEI DMA buffer size.<BR><BR>\r
+ # When this PCD value is referred by platform to calculate the required\r
+ # memory size for PEI (InstallPeiMemory), the PMR alignment requirement\r
+ # needs be considered to be added with this PCD value for alignment\r
+ # adjustment need by AllocateAlignedPages.\r
+ # @Prompt The VTd PEI DMA buffer size.\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSize|0x00400000|UINT32|0x00000003\r
+\r
+ ## Declares VTd PEI DMA buffer size for S3.<BR><BR>\r
+ # When this PCD value is referred by platform to calculate the required\r
+ # memory size for PEI S3 (InstallPeiMemory), the PMR alignment requirement\r
+ # needs be considered to be added with this PCD value for alignment\r
+ # adjustment need by AllocateAlignedPages.\r
+ # @Prompt The VTd PEI DMA buffer size for S3.\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSizeS3|0x00200000|UINT32|0x00000004\r
+\r