]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Include/Library/MtrrLib.h
UefiCpuPkg/MtrrLib: Add comments to recommend to use batch-set API
[mirror_edk2.git] / UefiCpuPkg / Include / Library / MtrrLib.h
index d56f1057e1677551649e710fc233b16dfa662a70..f82c27ea0c7e9bc13e6de66858556220cad8e26a 100644 (file)
@@ -157,6 +157,11 @@ GetFirmwareVariableMtrrCount (
   @retval RETURN_OUT_OF_RESOURCES   There are not enough system resources to\r
                                     modify the attributes of the memory\r
                                     resource range.\r
+                                    Multiple memory range attributes setting by calling this API multiple\r
+                                    times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+                                    the number of CPU MTRRs are too small to set such memory attributes.\r
+                                    Pass the multiple memory range attributes to one call of\r
+                                    MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
   @retval RETURN_BUFFER_TOO_SMALL   The fixed internal scratch buffer is too small for MTRR calculation.\r
                                     Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
                                     external scratch buffer.\r
@@ -354,6 +359,11 @@ MtrrGetDefaultMemoryType (
                                     BaseAddress and Length cannot be modified.\r
   @retval RETURN_OUT_OF_RESOURCES   There are not enough system resources to modify the attributes of\r
                                     the memory resource range.\r
+                                    Multiple memory range attributes setting by calling this API multiple\r
+                                    times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+                                    the number of CPU MTRRs are too small to set such memory attributes.\r
+                                    Pass the multiple memory range attributes to one call of\r
+                                    MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
   @retval RETURN_BUFFER_TOO_SMALL   The fixed internal scratch buffer is too small for MTRR calculation.\r
                                     Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
                                     external scratch buffer.\r